فهرست منبع

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 ماه پیش
والد
کامیت
70641a769b

+ 1 - 0
src/api/drawLessons/index.ts

@@ -30,6 +30,7 @@ export interface DrawLessonsItem {
   canAudit?: boolean;
   canVoid?: boolean;
   canFeedback?: boolean;
+  feedbackHasIssue?: boolean;
 }
 
 /**

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

@@ -9,10 +9,10 @@
   <main class="safety-platform-container__main">
     
     <el-form label-width="150px" :model="ruleFormData" :rules="isViewMode ? undefined : formRules" ref="basicFormRef">
-      <el-form-item label="隐患问题类别:" prop="typeId">
+      <el-form-item label="隐患类别:" prop="typeId">
         <el-select
           v-model="ruleFormData.typeId"
-          placeholder="请选择隐患问题类别"
+          placeholder="请选择隐患类别"
           clearable
           filterable
           :disabled="isViewMode"
@@ -502,7 +502,7 @@ const attachmentsFileList = ref([]) as any
     const walk = (items: DeptTree[]) => {
       items.forEach((n) => {
         if (n.id != null) list.push({ id: n.id, deptName: n.deptName });
-        if (n.children?.length) walk(n.children);
+        // if (n.children?.length) walk(n.children);
       });
     };
     walk(nodes);

+ 31 - 10
src/views/production-safety/hiddenTroubleInvestigationAndGovernance/hiddenTroubleAccountManagement/configs/tables.ts

@@ -15,6 +15,12 @@ export const HIDDEN_DANGER_TABLE_COLUMNS: TableColumnProps[] = [
     align: 'center',
     width: '80px',
   },
+  {
+    label: '隐患类别',
+    prop: 'typeName',
+    align: 'left',
+    minWidth: '150px',
+  },
   {
     label: '隐患问题',
     prop: 'dangerProblem',
@@ -38,25 +44,33 @@ export const HIDDEN_DANGER_TABLE_COLUMNS: TableColumnProps[] = [
     prop: 'taskSource',
     align: 'left',
     minWidth: '120px',
+  },
+    {
+    label: '整改部门',
+    prop: 'rectificationDepartmentNames',
+    align: 'left',
+    minWidth: '200px',
+    slot: 'rectificationDepartmentNames',
   },
   {
-    label: '整改要求',
-    prop: 'rectificationRequirement',
+    label: '整改负责人',
+    prop: 'rectificationResponsiblePerson',
     align: 'left',
     minWidth: '200px',
+    slot: 'rectificationResponsiblePerson',
   },
   {
-    label: '隐患问题类别',
-    prop: 'typeName',
+    label: '是否举一反三',
+    prop: 'isDrawLessonsPush',
     align: 'left',
-    minWidth: '150px',
+    minWidth: '200px',
+    slot: 'isDrawLessonsPush',
   },
   {
-    label: '当前流程节点',
-    // prop: 'currentNode',
-    slot: 'currentNode',
-    align: 'center',
-    minWidth: '150px',
+    label: '整改要求',
+    prop: 'rectificationRequirement',
+    align: 'left',
+    minWidth: '200px',
   },
   {
     label: '状态',
@@ -65,6 +79,13 @@ export const HIDDEN_DANGER_TABLE_COLUMNS: TableColumnProps[] = [
     align: 'center',
     minWidth: '100px',
   },
+  {
+    label: '当前流程节点',
+    // prop: 'currentNode',
+    slot: 'currentNode',
+    align: 'center',
+    minWidth: '150px',
+  },
   {
     label: '操作',
     prop: 'action',

+ 81 - 2
src/views/production-safety/hiddenTroubleInvestigationAndGovernance/hiddenTroubleAccountManagement/hiddenTroubleAccountManagement.vue

@@ -50,6 +50,36 @@
                   clearable
                 />
               </div>
+              <div class="select-box--item">
+                <span>部门名称:</span>
+                <el-cascader
+                  v-model="tableQuery.queryParam.rectificationDepartmentId"
+                  style="width: 170px"
+                  ref="cascaderRef"
+                  :options="firstLevelDepts"
+                  :props="cascaderProp"
+                  :show-all-levels="false"
+                  placeholder="部门名称"
+                  filterable
+                  @change="handleChangeDept"
+                />
+              </div>
+              <div class="select-box--item">
+                <span>隐患类别:</span>
+                <el-select
+                  v-model="tableQuery.queryParam.typeId"
+                  placeholder="请选择隐患类别"
+                  clearable
+                  filterable
+                >
+                  <el-option
+                    v-for="option in hiddenRiskCategoriesList || []"
+                    :key="option.id"
+                    :label="option.categoryName"
+                    :value="option.id"
+                  />
+                </el-select>
+              </div>
             </section>
             <section class="search-btn">
               <el-button type="primary" @click="handleSearch">查询</el-button>
@@ -69,6 +99,15 @@
             @update:pageSize="handleSizeChange"
             @update:pageNumber="handleCurrentChange"
           >
+            <template #rectificationDepartmentNames="scope">
+              <span>{{ scope.row.rectificationDepartmentNames || '-' }}</span>
+            </template>
+            <template #rectificationResponsiblePerson="scope">
+              <span>{{ scope.row.rectificationResponsiblePerson || '-' }}</span>
+            </template>
+            <template #isDrawLessonsPush="scope">
+              <span>{{ scope.row.isDrawLessonsPush === 1 ? '是' : '否' }}</span>
+            </template>
             <template #currentNode="scope">
               <span>{{ scope.row.currentNode  }}</span>
             </template>
@@ -248,10 +287,13 @@
   import BatchImport from '@/components/batch-import/BatchImport.vue';
   import { useGlobSetting } from '@/hooks/setting';
   import urlJoin from 'url-join';
+  import { formatDeptTree } from '@/views/disaster/utils/formatDeptTree';
   import { useUserInfoHook } from '@/hooks/useUserInfoHook'
+  import { queryDangerTypePage } from '@/api/production-safety';
   const { id } = useUserInfoHook();
-
+  const cascaderRef = ref();
   const router = useRouter();
+  const hiddenRiskCategoriesList = ref();
 
   // 表格
   const basicTableRef = ref<InstanceType<typeof BasicTable>>();
@@ -267,9 +309,20 @@
       keyword: '',
       status: undefined,
       taskSource: '',
+      rectificationDepartmentId: undefined,
+      typeId: undefined,
     },
   });
 
+  const firstLevelDepts = ref<any[]>([]);
+  const cascaderProp = {
+    expandTrigger: 'hover',
+    checkStrictly: true,
+    // emitPath: false,
+    value: 'id',
+    label: 'deptName',
+  };
+
   const handleSizeChange = (value: number) => {
     pagination.pageSize = value;
     tableQuery.pageSize = value;
@@ -302,6 +355,9 @@
           statusId: item.statusId,
           reviewPersonId: item.reviewPersonId,
           rectificationResponsibleIds: Number(item.rectificationResponsibleIds),
+          rectificationDepartmentNames: item.rectificationDepartmentNames,
+          rectificationResponsiblePerson: item.rectificationResponsiblePerson,
+          isDrawLessonsPush: item.isDrawLessonsPush,
         }));
         pagination.total = (res as any).totalRow ?? (res as any).total ?? 0;
       } else {
@@ -588,8 +644,31 @@
     });
   };
 
-  onMounted(() => {
+  const getDeptData = () => {
+    getAllDepartments().then((res) => {
+      firstLevelDepts.value = formatDeptTree(res);
+    });
+  };
+
+  const handleChangeDept = () => {
+    const deptInfo = cascaderRef.value?.getCheckedNodes();
+    if (deptInfo?.[0]) {
+      tableQuery.queryParam.rectificationDepartmentId = deptInfo[0].value;
+    }
+  };
+
+  onMounted(async () => {
     getTableData();
+    getDeptData();
+    await queryDangerTypePage({
+      pageNumber: 1,
+      pageSize: 9999,
+      queryParam: {
+        status: 1
+      }
+    }).then(res => {
+      hiddenRiskCategoriesList.value = res?.records || [];
+    });
   });
 </script>
 

+ 42 - 30
src/views/production-safety/hiddenTroubleInvestigationAndGovernance/oneByOneManagement/components/OneByOneAuditDetail.vue

@@ -56,38 +56,48 @@
 
         <h4 class="section-title">
           <el-icon class="section-title__icon"><Document /></el-icon>
-          <span>材料上传</span>
+          <span>是否存在问题</span>
         </h4>
-        <div class="detail-ct detail-ct--table attachment-row">
-          <div class="row">
-            <div class="col">
-              <div class="label">上传附件:</div>
-              <div class="value value--attachment">
-                <template v-if="attachmentFileList.length">
-                  <div
-                    class="file-container--div"
-                    v-for="item in attachmentFileList"
-                    :key="item.fileUrl || item.fileName"
-                  >
-                    <img
-                      class="file-container--div__icon"
-                      :src="FILE_TYPE_ICON[item.fileType]"
-                      @click="previewOnline(item.fileUrl, item.fileType)"
-                    />
-                    <span
-                      class="file-container--div__name"
-                      @click="previewOnline(item.fileUrl, item.fileType)"
+        <div class="detail-ct requirement-block">
+          <div class="value value-text">{{ detailData?.feedbackHasIssue ? '是' : '否' }}</div>
+        </div>
+
+        <div v-if="detailData?.feedbackHasIssue">
+          <h4 class="section-title">
+            <el-icon class="section-title__icon"><Document /></el-icon>
+            <span>材料上传</span>
+          </h4>
+          <div class="detail-ct detail-ct--table attachment-row">
+            <div class="row">
+              <div class="col">
+                <div class="label">上传附件:</div>
+                <div class="value value--attachment">
+                  <template v-if="attachmentFileList.length">
+                    <div
+                      class="file-container--div"
+                      v-for="item in attachmentFileList"
+                      :key="item.fileUrl || item.fileName"
                     >
-                      {{ item.fileName }}
-                    </span>
-                    <img
-                      class="file-container--div__download"
-                      :src="DownloadIcon"
-                      @click="downloadFile(item.fileUrl, item.fileName)"
-                    />
-                  </div>
-                </template>
-                <span v-else class="empty-text">-</span>
+                      <img
+                        class="file-container--div__icon"
+                        :src="FILE_TYPE_ICON[item.fileType]"
+                        @click="previewOnline(item.fileUrl, item.fileType)"
+                      />
+                      <span
+                        class="file-container--div__name"
+                        @click="previewOnline(item.fileUrl, item.fileType)"
+                      >
+                        {{ item.fileName }}
+                      </span>
+                      <img
+                        class="file-container--div__download"
+                        :src="DownloadIcon"
+                        @click="downloadFile(item.fileUrl, item.fileName)"
+                      />
+                    </div>
+                  </template>
+                  <span v-else class="empty-text">-</span>
+                </div>
               </div>
             </div>
           </div>
@@ -156,6 +166,7 @@
     attachments?: string;
     attachmentList?: Array<{ fileName?: string; fileUrl?: string; fileNameOrUrl?: string; url?: string }>;
     issueId?: number;
+    feedbackHasIssue?: boolean;
   } | null>(null);
 
   const showRejectDialog = ref(false);
@@ -224,6 +235,7 @@
           attachments: data.attachments,
           attachmentList: data.attachmentList,
           issueId: data.issueId,
+          feedbackHasIssue: data.feedbackHasIssue ?? false,
         };
       }
     } catch (e) {

+ 1 - 1
src/views/production-safety/productionSafetySystem/safetySystemConstructionWorkPlanManagement/components/safetySystemConstructionWorkPlanManagementDetail.vue

@@ -284,7 +284,7 @@
     const res = await handleValidate();
     if (!res) return;
     try {
-      if (isViewMode && form.fileUrl) {
+      if (isViewMode.value && form.fileUrl) {
         // 处理附件格式
         form.fileUrl = JSON.parse(form.fileUrl)[0].url;
       }

+ 1 - 1
src/views/production-safety/safety-culture/safetyCultureActivityManagement/safetyCultureActivityManagement.vue

@@ -178,7 +178,7 @@
       :import-api-url="importApiUrl"
       :template-url="templateUrl"
       template-name="安全文化活动管理导入模版"
-      :show-template="false"
+      :show-template="true"
       @close="batchImportVisible = false"
       @update="handleUpdate"
     />

+ 0 - 2
src/views/production-safety/safety-culture/safetyPublicityBoardManagement/configs/form.ts

@@ -45,7 +45,5 @@ export const ACADEMY_FILE_FORM_DATA = {
 
 export const ACADEMY_FILE_FORM_RULES = {
   materialName: [{ required: true, message: '请输入宣传资料名称', trigger: 'blur' }],
-  categoryName: [{ required: true, message: '请选择分类名称', trigger: 'change' }],
   description: [{ required: true, message: '请输入资料描述', trigger: 'blur' }],
-  attachmentUrl: [{ required: true, message: '请上传文档', trigger: 'change' }],
 };