Bläddra i källkod

Merge branch 'feat/production-safety' of http://14.103.151.10:8888/product-group-fe/sfy-safety-group/sfy-safety into feat/production-safety

sunqijun 1 månad sedan
förälder
incheckning
ffec761c4b
12 ändrade filer med 79 tillägg och 39 borttagningar
  1. 1 1
      src/api/production-safety-system/index.ts
  2. 1 0
      src/views/production-safety/hiddenTroubleInvestigationAndGovernance/areaCheckPlanManagement/areaCheckPlanManagement.vue
  3. 8 3
      src/views/production-safety/hiddenTroubleInvestigationAndGovernance/areaCheckPlanManagement/components/areaCheckPlanManagementDetail.vue
  4. 1 1
      src/views/production-safety/hiddenTroubleInvestigationAndGovernance/areaCheckPlanManagementDept/components/areaCheckPlanManagementDeptDetail.vue
  5. 8 8
      src/views/production-safety/hiddenTroubleInvestigationAndGovernance/employeeReportHiddenTroubleManagement/employeeReportHiddenTroubleManagement.vue
  6. 17 7
      src/views/production-safety/hiddenTroubleInvestigationAndGovernance/hiddenTroubleAccountManagement/components/hiddenTroubleAccountManagementDetail.vue
  7. 7 7
      src/views/production-safety/hiddenTroubleInvestigationAndGovernance/hiddenTroubleReviewManagement/hiddenTroubleReviewManagement.vue
  8. 6 0
      src/views/production-safety/hiddenTroubleInvestigationAndGovernance/oneByOneManagement/oneByOneManagement.vue
  9. 9 2
      src/views/production-safety/hiddenTroubleInvestigationAndGovernance/oneByOneManagementDept/components/oneByOneManagementDeptDetail.vue
  10. 2 2
      src/views/production-safety/safetyAssessment/evaluationSystem/components/EvaluationTarget.vue
  11. 1 1
      src/views/production-safety/safetyAssessment/evaluationSystem/configs/targetTables.ts
  12. 18 7
      src/views/production-safety/safetyAssessment/evaluationSystem/evaluationSystem.vue

+ 1 - 1
src/api/production-safety-system/index.ts

@@ -1240,7 +1240,7 @@ export function sandAreaCheckRecordToProductionHiddenDanger(data: SandAreaCheckR
 export function cancelAreaCheckPlanManage(id: number) {
   return http.request({
     url: `${ADMIN_BASE}/updateStatusAreaCheckPlanManage?id=${id}`,
-    method: 'post',
+    method: 'delete',
   });
 }
 

+ 1 - 0
src/views/production-safety/hiddenTroubleInvestigationAndGovernance/areaCheckPlanManagement/areaCheckPlanManagement.vue

@@ -19,6 +19,7 @@
                   v-model="tableQuery.queryParam.keyword"
                   placeholder="搜索检查场所或计划名称"
                   class="act-search-input"
+                  style="min-width: 200px;"
                   clearable
                 />
               </div>

+ 8 - 3
src/views/production-safety/hiddenTroubleInvestigationAndGovernance/areaCheckPlanManagement/components/areaCheckPlanManagementDetail.vue

@@ -152,9 +152,9 @@
           start-placeholder="开始日期"
           end-placeholder="结束日期"
           value-format="YYYY-MM-DD"
-          style="margin-right: 12px"
+          style="margin-right: 12px;max-width: 280px;"
         />
-        <el-button type="primary" @click="onRecordSearch">查询</el-button>
+        <el-button type="primary" class="view-record-toolbar-btn" @click="onRecordSearch">查询</el-button>
         <el-button @click="onRecordExport">导出</el-button>
       </div>
       <BasicTable
@@ -1172,7 +1172,7 @@ import { id } from 'element-plus/es/locale';
           align-items: center;
           justify-content: flex-end;
           flex-shrink: 0;
-          width: 200px;
+          width: 260px;
           padding: 0 12px;
           background-color: #f5f5f5;
           border-right: 1px solid #dcdfe6;
@@ -1222,4 +1222,9 @@ import { id } from 'element-plus/es/locale';
   .view-record-table {
     margin-bottom: 16px;
   }
+
+  .view-record-toolbar-btn{
+    margin-left: auto;
+  }
+
 </style>

+ 1 - 1
src/views/production-safety/hiddenTroubleInvestigationAndGovernance/areaCheckPlanManagementDept/components/areaCheckPlanManagementDeptDetail.vue

@@ -952,7 +952,7 @@
             align-items: center;
             justify-content: flex-end;
             flex-shrink: 0;
-            width: 200px;
+            width: 260px;
             padding: 0 12px;
             background-color: #f5f5f5;
             border-right: 1px solid #dcdfe6;

+ 8 - 8
src/views/production-safety/hiddenTroubleInvestigationAndGovernance/employeeReportHiddenTroubleManagement/employeeReportHiddenTroubleManagement.vue

@@ -17,7 +17,7 @@
                 <span>隐患问题:</span>
                 <el-input
                   v-model="tableQuery.queryParam.keyword"
-                  placeholder="请输入隐患问题、地点、姓名、工号或联系电话"
+                  placeholder="请输入隐患问题"
                   class="act-search-input"
                 />
               </div>
@@ -32,17 +32,17 @@
               </div>
               <div class="select-box--item">
                 <span>提交类型:</span>
-                <el-input
-                  v-model="tableQuery.queryParam.sourceTypeName"
-                  placeholder="请输入提交类型"
-                  class="act-search-input"
-                />
+                <el-select v-model="tableQuery.queryParam.sourceTypeName" placeholder="请选择提交类型" clearable>
+                  <el-option label="员工提交" value="员工提交" />
+                  <el-option label="供应商提交" value="供应商提交" />
+                  <el-option label="第三方提交" value="第三方提交" />
+                </el-select>
               </div>
             </section>
             <section class="search-btn">
               <el-button type="primary" @click="handleSearch">查询</el-button>
               <el-button @click="handleReset">重置</el-button>
-              <el-button plain class="search-table-container--button" @click="handleDownload"> 导出 </el-button>
+              <el-button plain @click="handleDownload"> 导出 </el-button>
             </section>
           </div>
         </header>
@@ -64,7 +64,7 @@
               <div class="action-container--div" style="justify-content: left">
                 <!-- 待审核:显示审核和查看 -->
                 <template v-if="scope.row.status === 1">
-                  <ActionButton text="审核" @click="handleApprove(scope.row.id)" />
+                  <ActionButton text="审核" @click="handleApprove(scope.row.id)" v-if="scope.row.canApprove"/>
                   <ActionButton text="查看" @click="handleView(scope.row.id)" />
                 </template>
                 <!-- 审核通过(需求部门通过或安全部门通过):显示查看和入账 -->

+ 17 - 7
src/views/production-safety/hiddenTroubleInvestigationAndGovernance/hiddenTroubleAccountManagement/components/hiddenTroubleAccountManagementDetail.vue

@@ -19,10 +19,10 @@
           style="width: 450px"
         >
           <el-option
-            v-for="option in ruleFormConfig.find((c) => c.prop === 'typeId')?.selectOptions || []"
-            :key="option.value"
-            :label="option.label"
-            :value="option.value"
+            v-for="option in hiddenRiskCategoriesList || []"
+            :key="option.id"
+            :label="option.categoryName"
+            :value="option.id"
           />
         </el-select>
       </el-form-item>
@@ -235,7 +235,7 @@
   <footer class="safety-platform-container__footer">
     <el-button @click="router.back()">返回</el-button>
     <template v-if="isReviewMode">
-      <el-button type="warning" @click="openReviewRejectDialog">审查不通过</el-button>
+      <el-button type="primary" @click="openReviewRejectDialog">审查不通过</el-button>
       <el-button type="primary" @click="handleReviewPass">审查通过</el-button>
     </template>
     <template v-else-if="!isViewMode">
@@ -376,14 +376,17 @@
   import type { DeptTree } from '@/types/dept/type';
   import { queryAvailableUserList } from '@/api/production-safety/responsibility-implementation';
   import PreviewOnline from '@/views/disaster/components/PreviewOnline.vue';
-import { ru } from 'element-plus/es/locale';
+  import { ru } from 'element-plus/es/locale';
+  import {
+    queryDangerTypePage
+  } from '@/api/production-safety';
 
   const router = useRouter();
   const route = useRoute();
   const searchDeptName = ref('');
   const operate = computed(() => (route.query.operate as string) || 'hidden-trouble-account-create');
   const currentId = computed(() => Number(route.query.id));
-
+  const hiddenRiskCategoriesList = ref();
   const isCreateMode = computed(() => operate.value === 'hidden-trouble-account-create');
   const isEditMode = computed(() => operate.value === 'hidden-trouble-account-edit');
   const isViewMode = computed(
@@ -868,6 +871,13 @@ const attachmentsFileList = ref([]) as any
   onMounted(async () => {
     cloneRuleFormData();
     await loadDeptAndUserOptions();
+    await queryDangerTypePage({
+      pageNumber: 1,
+      pageSize: 9999,
+      queryParam: {}
+    }).then(res => {
+      hiddenRiskCategoriesList.value = res?.records || [];
+    });
     if (isEditMode.value || isViewMode.value) {
       await getDetail();
       if (route.query.action === 'review' && isViewMode.value && canReview.value) {

+ 7 - 7
src/views/production-safety/hiddenTroubleInvestigationAndGovernance/hiddenTroubleReviewManagement/hiddenTroubleReviewManagement.vue

@@ -34,17 +34,17 @@
               </div>
               <div class="select-box--item">
                 <span>提交类型:</span>
-                <el-input
-                  v-model="tableQuery.queryParam.sourceTypeName"
-                  placeholder="请输入提交类型"
-                  class="act-search-input"
-                />
+                <el-select v-model="tableQuery.queryParam.sourceTypeName" placeholder="请选择提交类型" clearable>
+                  <el-option label="员工提交" value="员工提交" />
+                  <el-option label="供应商提交" value="供应商提交" />
+                  <el-option label="第三方提交" value="第三方提交" />
+                </el-select>
               </div>
             </section>
             <section class="search-btn">
               <el-button type="primary" @click="handleSearch">查询</el-button>
               <el-button @click="handleReset">重置</el-button>
-              <el-button plain class="search-table-container--button" @click="handleDownload"> 导出 </el-button>
+              <el-button plain @click="handleDownload"> 导出 </el-button>
             </section>
           </div>
         </header>
@@ -66,7 +66,7 @@
               <div class="action-container--div" style="justify-content: left">
                 <!-- 待审核:显示审核和查看 -->
                 <template v-if="scope.row.status === 1">
-                  <ActionButton text="审核" @click="handleApprove(scope.row.id)" />
+                  <ActionButton text="审核" @click="handleApprove(scope.row.id)" v-if="scope.row.canApprove"/>
                   <ActionButton text="查看" @click="handleView(scope.row.id)" />
                 </template>
                 <!-- 审核通过(需求部门通过或安全部门通过):显示查看和入账 -->

+ 6 - 0
src/views/production-safety/hiddenTroubleInvestigationAndGovernance/oneByOneManagement/oneByOneManagement.vue

@@ -489,6 +489,12 @@
   async function handleIssueSubmit() {
     await issueFormRef.value?.validate?.().catch(() => {});
     if (!currentIssueRow.value) return;
+    const startDate = issueForm.value.planStartDate;
+    const endDate = issueForm.value.planEndDate;
+    if (startDate && endDate && endDate < startDate) {
+      ElMessage.warning('计划结束时间不能早于计划开始时间');
+      return;
+    }
     try {
       await issueDrawLessons({
         associationOtId: currentIssueRow.value.id,

+ 9 - 2
src/views/production-safety/hiddenTroubleInvestigationAndGovernance/oneByOneManagementDept/components/oneByOneManagementDeptDetail.vue

@@ -112,12 +112,13 @@
           <div class="row row--upload" v-if="!isViewMode">
             <div class="col col--full">
               <div class="label">选择附件:</div>
-              <div class="value value--attachment">
+              <div class="value">
                 <UploadFiles
+                  label="上传附件"
                   v-if="!isViewMode"
-                  label="选择附件"
                   :file-list="materialAttachmentList"
                   @uploadSuccess="handleMaterialUploadSuccess"
+                  class="custom-upload-files"
                 />
               </div>
             </div>
@@ -557,4 +558,10 @@
       }
     }
   }
+
+  .custom-upload-files :deep(.upload-button) {
+    height: 34.49px;
+    line-height: 34.49px;
+  }
+
 </style>

+ 2 - 2
src/views/production-safety/safetyAssessment/evaluationSystem/components/EvaluationTarget.vue

@@ -163,7 +163,7 @@
             <template #evaluationDocument="scope">
               <div
                 class="file-container--div"
-                v-for="item in parseAttachments(scope.row.evaluationDocument)"
+                v-for="item in scope.row.evaluationDocument"
                 :key="item.fileUrl"
               >
                 <img
@@ -483,7 +483,7 @@
             issueDepartment: item.deptName, // 下发部门(部门考核结果)
             departmentLeader: item.deptUserName || '-', // 部门负责人
             contactPhone: item.deptUserLink || '-', // 联系方式
-            evaluationDocument: item.attachments, // 考核文档
+            evaluationDocument: JSON.parse(item.attachments || '[]'), // 考核文档
             plannedCompletionTime: item.planEndTime || '-', // 计划完成时间(使用计划结束时间)
             // 保留原始数据,供其他操作使用
             psemId: item.psemId,

+ 1 - 1
src/views/production-safety/safetyAssessment/evaluationSystem/configs/targetTables.ts

@@ -37,7 +37,7 @@ export const EVALUATION_TARGET_TABLE_COLUMNS: TableColumnProps[] = [
     prop: 'evaluationDocument',
     slot: 'evaluationDocument',
     align: 'left',
-    minWidth: '150px',
+    minWidth: '250px',
   },
   {
     label: '计划完成时间',

+ 18 - 7
src/views/production-safety/safetyAssessment/evaluationSystem/evaluationSystem.vue

@@ -128,12 +128,12 @@
                     }"
                     @confirm="handleDelete(scope.row.id)"
                   />
-                  <ActionButton text="下发" @click="handleIssue(scope.row.id)" />
+                  <ActionButton text="下发" @click="handleIssue(scope.row)" />
                 </template>
 
                 <!-- 待反馈:作废 / 考核对象 -->
                 <template v-else-if="Number(scope.row.status) === 2">
-                  <!-- <ActionButton text="下发" @click="handleIssue(scope.row.id)" /> -->
+                  <ActionButton text="下发" @click="handleIssue(scope.row)" />
                   <ActionButton
                     text="作废"
                     :popconfirm="{
@@ -255,6 +255,7 @@
               value-format="YYYY-MM-DD"
               format="YYYY-MM-DD"
               style="width: 100%"
+              :disabled="showTimeDisabled"
               :disabled-date="(date: Date) => {
                 if (issueForm.endDate) {
                   return date > new Date(issueForm.endDate);
@@ -265,6 +266,7 @@
           </el-form-item>
           <el-form-item label="计划结束日期:">
             <el-date-picker
+              :disabled="showTimeDisabled"
               v-model="issueForm.endDate"
               type="date"
               placeholder="请选择计划结束日期"
@@ -322,6 +324,8 @@
 
   const router = useRouter();
 
+  const showTimeDisabled = ref(false);
+
   // 表格
   const basicTableRef = ref<InstanceType<typeof BasicTable>>();
 
@@ -444,6 +448,8 @@
             item.planStartTime && item.planEndTime
               ? `${item.planStartTime} 至 ${item.planEndTime}`
               : item.planStartTime || item.planEndTime || '-', // 计划完成时间
+          planStartTime: item.planStartTime || '', // 计划开始时间
+          planEndTime: item.planEndTime || '', // 计划结束时间
         }));
         pagination.total = res.totalRow;
       }
@@ -511,17 +517,22 @@
   };
 
   // 下发考核表
-  const handleIssue = async (id: number) => {
-    currentIssueId.value = id;
+  const handleIssue = async (row: any) => {
+    currentIssueId.value = row.id;
     issueForm.departmentName = '';
-    issueForm.startDate = '';
-    issueForm.endDate = '';
+    issueForm.startDate = row.planStartTime;
+    issueForm.endDate = row.planEndTime;
     issueForm.userGroupId = undefined;
     issueForm.deptSelfApproveUserId = undefined;
     issueDeptIds.value = [];
     issueDialogVisible.value = true;
+    if(row.planStartTime && row.planEndTime && row.status === 2) {
+      showTimeDisabled.value = true;
+    } else {
+      showTimeDisabled.value = false;
+    }
     // 弹窗打开时才加载下发弹窗所需数据
-    await Promise.all([getDeptTreeData(), getUserGroupOptions(), getDeptSelfApproveUserList(id)]);
+    await Promise.all([getDeptTreeData(), getUserGroupOptions(), getDeptSelfApproveUserList(row.id)]);
   };
 
   const handleIssueDeptChange = () => {