Explorar o código

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 hai 1 mes
pai
achega
8d529a569b
Modificáronse 19 ficheiros con 136 adicións e 47 borrados
  1. 5 4
      src/api/production-safety-system/index.ts
  2. 7 0
      src/api/safety-system-construction-work-plan/index.ts
  3. 10 1
      src/views/production-safety/hiddenTroubleInvestigationAndGovernance/areaCheckPlanManagementDept/components/areaCheckPlanManagementDeptDetail.vue
  4. 1 1
      src/views/production-safety/hiddenTroubleInvestigationAndGovernance/checkTemplateManagement/checkTemplateManagement.vue
  5. 4 4
      src/views/production-safety/hiddenTroubleInvestigationAndGovernance/employeeReportHiddenTroubleManagement/employeeReportHiddenTroubleManagement.vue
  6. 6 0
      src/views/production-safety/productionSafetySystem/doubleSystemManagement/components/doubleSystemManagementDetail.vue
  7. 1 1
      src/views/production-safety/productionSafetySystem/safetyStandardizationSystemManagement/components/safetyStandardizationSystemManagementDetail.vue
  8. 1 1
      src/views/production-safety/productionSafetySystem/safetySystemConstructionWorkPlanManagement/configs/tables.ts
  9. 2 2
      src/views/production-safety/productionSafetySystem/safetySystemConstructionWorkPlanManagement/safetySystemConstructionWorkPlanManagementViewSender.vue
  10. 6 0
      src/views/production-safety/productionSafetySystem/safetySystemConstructionWorkPlanManagementDept/components/safetySystemConstructionWorkPlanManagementDeptDetail.vue
  11. 8 8
      src/views/production-safety/safety-culture/accidentCaseManagement/configs/form.ts
  12. 27 1
      src/views/production-safety/safety-culture/safetyCultureActivityManagement/components/safetyCultureActivityManagementDetail.vue
  13. 23 4
      src/views/production-safety/safety-culture/safetyCultureActivityManagement/safetyCultureActivityManagement.vue
  14. 1 1
      src/views/production-safety/safety-culture/safetyCultureMaterialManagement/components/safetyCultureMaterialManagementDetail.vue
  15. 11 11
      src/views/production-safety/safety-culture/safetyCultureMaterialManagement/configs/form.ts
  16. 9 6
      src/views/production-safety/safety-culture/safetyCultureMaterialManagement/configs/tables.ts
  17. 6 0
      src/views/production-safety/safety-culture/safetyCultureMaterialManagement/safetyCultureMaterialManagement.vue
  18. 7 1
      src/views/production-safety/safetyTrainingAndEducation/educationTrainingPlanManagementDept/components/addTrainingInformation.vue
  19. 1 1
      src/views/production-safety/safetyTrainingAndEducation/educationTrainingPlanManagementDept/educationTrainingPlanManagementDept.vue

+ 5 - 4
src/api/production-safety-system/index.ts

@@ -663,6 +663,7 @@ interface ChecklistTemplatePageRes {
   total: number;
   totalPage: number;
   records: ChecklistTemplatePageItem[];
+  totalRow: number;
 }
 
 /** 检查单模版实体(用于名称下拉等场景,后端返回 WebResult<List<ChecklistTemplate>>) */
@@ -1526,16 +1527,16 @@ export function exportAreaCheckPlanList (params: AreaCheckPlanQuery) {
  * 导出区域检查计划清单
  * @returns Promise<any> 导出的区域检查计划清单数据
  */
-export function exportAreaCheckInspectionRecord (id:number) {
+export function exportAreaCheckInspectionRecord (params: AreaCheckPlanQuery) {
   return http.request({
-    url: '/areaCheckPlanManageDept/exportAreaCheckRecord?id=' + id,
-    method: 'get',
+    url: '/areaCheckPlanManageDept/exportAreaCheckPlanDetail',
+    method: 'post',
     responseType: 'blob',
+    data: params,
   }, {
     isTransformResponse: false,
   });
 }
-
 /**
  * 导出区域检查计划管理
  * @returns Promise<any> 导出的区域检查计划管理数据

+ 7 - 0
src/api/safety-system-construction-work-plan/index.ts

@@ -212,6 +212,13 @@ export function cancelWorkPlan(id: number) {
   });
 }
 
+export function newCancelWorkPlan(id: number) {
+  return http.request<number | void>({
+    url: `/safetyWorkPlan/workPlanSendObj/invalid?id=${id}`,
+    method: 'post',
+  });
+}
+
 /**
  * @description: 查看发送对象列表
  */

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

@@ -855,7 +855,16 @@ import { rules } from '../../../../../types/camera/constant';
   };
   const onRecordExport = async () => {
     try {
-      const response = await exportAreaCheckInspectionRecord(currentId.value);
+      const [start, end] = recordDateRange.value && recordDateRange.value.length === 2
+        ? recordDateRange.value
+        : ['', ''];
+      const queryParam = {
+          searchKey: recordSearchKeyword.value || undefined,
+          startDate: start || undefined,
+          endDate: end || undefined,
+          id: currentId.value || undefined,
+      };
+      const response = await exportAreaCheckInspectionRecord(queryParam);
       if (response) {
         const fileName = `检查记录_${new Date().toISOString().split('T')[0]}.xlsx`;
         downloadByData(response, fileName);

+ 1 - 1
src/views/production-safety/hiddenTroubleInvestigationAndGovernance/checkTemplateManagement/checkTemplateManagement.vue

@@ -155,7 +155,7 @@
           updateUserName: item.updateUserName,
           updatedAt: (item as any).updatedAt,
         }));
-        pagination.total = res.total ?? 0;
+        pagination.total = res.totalRow ?? 0;
       }
     } catch (e) {
       console.error('获取检查单模版列表失败:', e);

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

@@ -16,7 +16,7 @@
               <div class="select-box--item">
                 <span>隐患问题:</span>
                 <el-input
-                  v-model="tableQuery.queryParam.keyword"
+                  v-model="tableQuery.queryParam.hazardDesc"
                   placeholder="请输入隐患问题"
                   class="act-search-input"
                 />
@@ -164,7 +164,7 @@
     pageNumber: pagination.pageNumber,
     pageSize: pagination.pageSize,
     queryParam: {
-      keyword: '',
+      hazardDesc: '',
       statusType: undefined,
       sourceTypeName: '',
     },
@@ -206,7 +206,7 @@
   };
 
   const handleReset = () => {
-    tableQuery.queryParam.keyword = '';
+    tableQuery.queryParam.hazardDesc = '';
     tableQuery.queryParam.statusType = undefined;
     tableQuery.queryParam.sourceTypeName = '';
     handleSearch();
@@ -230,7 +230,7 @@
   const handleDownload = async () => {
     try {
       const exportParams: QueryHiddenDangerReq = {
-        keyword: tableQuery.queryParam.keyword || undefined,
+        keyword: tableQuery.queryParam.hazardDesc || undefined,
         statusType: tableQuery.queryParam.statusType,
         sourceTypeName: tableQuery.queryParam.sourceTypeName || undefined,
       };

+ 6 - 0
src/views/production-safety/productionSafetySystem/doubleSystemManagement/components/doubleSystemManagementDetail.vue

@@ -222,6 +222,12 @@
       return;
     }
     
+    
+    if(!ruleFormData.content || ruleFormData.content === '<p><br></p>') {
+      ElMessage.error('请输入文档内容');
+      return;
+    }
+
     try {
       // 处理文件上传:先上传文件获取 URL,然后提取 fileUrl
       // let fileUrl = '';

+ 1 - 1
src/views/production-safety/productionSafetySystem/safetyStandardizationSystemManagement/components/safetyStandardizationSystemManagementDetail.vue

@@ -23,7 +23,7 @@
         /> -->
         <UploadFiles
           v-if="!isViewMode"
-          label="上传地址确认书"
+          label="上传文件"
           :maxCount="1"
           :file-list="ruleFormData.fileUrlList"
           @uploadSuccess="handleUploadSuccess"

+ 1 - 1
src/views/production-safety/productionSafetySystem/safetySystemConstructionWorkPlanManagement/configs/tables.ts

@@ -178,7 +178,7 @@ export const VIEW_SENDS_TABLE_COLUMNS: TableColumnProps[] = [
   },
   {
     label: '计划完成时间',
-    prop: 'plannedEndTime',
+    prop: 'plannedComplateTime',
     align: 'left',
     minWidth: '160px',
   },

+ 2 - 2
src/views/production-safety/productionSafetySystem/safetySystemConstructionWorkPlanManagement/safetySystemConstructionWorkPlanManagementViewSender.vue

@@ -122,7 +122,7 @@ import BreadcrumbBack from '@/components/BreadcrumbBack.vue';
   import {
     queryViewSender,
     deleteWorkPlanDept,
-    cancelWorkPlan,
+    newCancelWorkPlan,
     queryWorkPlanDetail,
     type SaveWorkPlanRequest,
   } from '@/api/safety-system-construction-work-plan';
@@ -287,7 +287,7 @@ import BreadcrumbBack from '@/components/BreadcrumbBack.vue';
   // 作废
   const handleViewInvalid = async (id: number) => {
     try {
-      await cancelWorkPlan(id);
+      await newCancelWorkPlan(id);
       ElMessage.success('作废成功');
       getTableData();
     } catch (e) {

+ 6 - 0
src/views/production-safety/productionSafetySystem/safetySystemConstructionWorkPlanManagementDept/components/safetySystemConstructionWorkPlanManagementDeptDetail.vue

@@ -296,6 +296,12 @@
   };
 
   const handleSubmit = async () => {
+
+    if(!form.fileUrl || form.fileUrl.length === 0) {
+      ElMessage.error('请先上传附件!');
+      return;
+    }
+
     const res = await handleValidate();
     if (!res) return;
     try {

+ 8 - 8
src/views/production-safety/safety-culture/accidentCaseManagement/configs/form.ts

@@ -13,14 +13,14 @@ export const ACADEMY_FILE_FORM_CONFIG: FormConfig[] = [
   {
     prop: 'categoryName',
     label: '分类名称:',
-    component: 'ElSelect',
+    component: 'ElInput',
     componentProps: {
-      placeholder: '请选择分类名称',
+      placeholder: '请输入分类名称',
     },
-    selectOptions: [
-      { label: '外部院级文件', value: '外部院级文件' },
-      { label: '内部院级文件', value: '内部院级文件' },
-    ],
+    // selectOptions: [
+    //   { label: '外部院级文件', value: '外部院级文件' },
+    //   { label: '内部院级文件', value: '内部院级文件' },
+    // ],
   },
   {
     prop: 'description',
@@ -55,9 +55,9 @@ export const ACADEMY_FILE_FORM_DATA = {
 
 export const ACADEMY_FILE_FORM_RULES = {
   caseName: [{ required: true, message: '请输入事故案例名称', trigger: 'blur' }],
-  categoryName: [{ required: true, message: '请选择分类名称', trigger: 'change' }],
+  // categoryName: [{ required: true, message: '请选择分类名称', trigger: 'change' }],
   attachmentUrl: [{ required: true, message: '请选择文档上传', trigger: 'change' }],
   description: [{ required: true, message: '请输入案例描述', trigger: 'blur' }],
   status: [{ required: true, message: '请选择状态', trigger: 'change' }],
-  imageUrl: [{ required: true, message: '请选择图片上传', trigger: 'change' }],
+  // imageUrl: [{ required: true, message: '请选择图片上传', trigger: 'change' }],
 };

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

@@ -21,6 +21,7 @@
           placeholder="请选择责任部门"
           style="width: 100%"
           :disabled="isViewMode"
+          @change="handleResponsibleDeptChange"
         />
       </template>
       <template #cooperateDeptIds>
@@ -143,6 +144,8 @@
     ACADEMY_FILE_FORM_RULES,
   );
 
+  const responsibleDeptName = ref('');
+
   const viewFormConfig = ref([
     // 原有的表单配置
     ...ACADEMY_FILE_FORM_CONFIG.map((item) => ({
@@ -218,7 +221,9 @@
     const result = await queryAvailableUserList({
       pageNumber: 1,
       pageSize: 1000,
-      queryParam: {},
+      queryParam: {
+        deptName: responsibleDeptName.value || '',
+      },
     });
     responsiblePersonOptions.value = (result.records || []).map((item) => ({
       label: item.realname || item.staffNo,
@@ -328,6 +333,27 @@
     }
   };
 
+  const handleResponsibleDeptChange = (val: number | undefined) => {
+    if (val) {
+      ruleFormData.responsiblePersonId = undefined;
+      const findDeptName = (tree: any[], id: number): string => {
+        for (const node of tree) {
+          if (node.id === id) {
+            return node.deptName || node.label || '';
+          }
+          if (node.children) {
+            const found = findDeptName(node.children, id);
+            if (found) return found;
+          }
+        }
+        return '';
+      };
+      const deptName = findDeptName(deptTree.value, val);
+      responsibleDeptName.value = deptName;
+      loadResponsiblePersonOptions();
+    }
+  };
+
   onMounted(() => {
     cloneRuleFormData();
     loadDeptTreeData();

+ 23 - 4
src/views/production-safety/safety-culture/safetyCultureActivityManagement/safetyCultureActivityManagement.vue

@@ -239,6 +239,7 @@
   };
   const issueDeptTree = ref<DeptTree[]>([]);
   const issueUserList = ref<Array<{ id: number; realname?: string; username?: string }>>([]);
+  const rectificationResponsibleDeptName = ref('');
 
   // 表格
   const basicTableRef = ref<InstanceType<typeof BasicTable>>();
@@ -536,7 +537,9 @@
     try {
       const [deptRes, userRes] = await Promise.all([
         getAllDepartments(),
-        queryAvailableUserList({ pageNumber: 1, pageSize: 9999, queryParam: {} }),
+        queryAvailableUserList({ pageNumber: 1, pageSize: 9999, queryParam: {
+          deptName: rectificationResponsibleDeptName.value,
+        } }),
       ]);
       const fullTree = (deptRes as DeptTree[]) ?? [];
       issueDeptTree.value = Array.isArray(fullTree) && fullTree[0]?.children ? fullTree[0].children : [];
@@ -549,9 +552,25 @@
     }
   };
 
-  const onIssueDeptChange = () => {
-    issueForm.value.rectificationResponsibleUserId = undefined;
-    issueForm.value.rectificationResponsiblePersonName = '';
+  const onIssueDeptChange = (val: number | undefined) => {
+    if (val) {
+      issueForm.value.rectificationResponsibleUserId = undefined;
+      const findDeptName = (tree: any[], id: number): string => {
+        for (const node of tree) {
+          if (node.id === id) {
+            return node.deptName || node.label || '';
+          }
+          if (node.children) {
+            const found = findDeptName(node.children, id);
+            if (found) return found;
+          }
+        }
+        return '';
+      };
+      const deptName = findDeptName(issueDeptTree.value, val);
+      rectificationResponsibleDeptName.value = deptName;
+      onIssueDialogOpen();
+    }
   };
 
   const handleDispatch = (id: number) => {

+ 1 - 1
src/views/production-safety/safety-culture/safetyCultureMaterialManagement/components/safetyCultureMaterialManagementDetail.vue

@@ -17,7 +17,7 @@
           :allow-all-file-types="true" @uploadSuccess="handleUploadSuccess" /> -->
 
         <UploadFiles
-          v-if="!isViewMode"
+          v-if="!isViewMode" 
           label="上传文件"
           :maxCount="1"
           :file-list="ruleFormData.attachmentUrl"

+ 11 - 11
src/views/production-safety/safety-culture/safetyCultureMaterialManagement/configs/form.ts

@@ -12,14 +12,14 @@ export const ACADEMY_FILE_FORM_CONFIG: FormConfig[] = [
   {
     prop: 'categoryName',
     label: '分类名称:',
-    component: 'ElSelect',
+    component: 'ElInput',
     componentProps: {
-      placeholder: '请选择分类名称',
+      placeholder: '请输入分类名称',
     },
-    selectOptions: [
-      { label: '外部院级文件', value: '外部院级文件' },
-      { label: '内部院级文件', value: '内部院级文件' },
-    ],
+    // selectOptions: [
+    //   { label: '外部院级文件', value: '外部院级文件' },
+    //   { label: '内部院级文件', value: '内部院级文件' },
+    // ],
   },
   {
     prop: 'fileCode',
@@ -92,13 +92,13 @@ export const ACADEMY_FILE_FORM_DATA = {
 
 export const ACADEMY_FILE_FORM_RULES = {
   fileName: [{ required: true, message: '请输入文件名称', trigger: 'blur' }],
-  categoryName: [{ required: true, message: '请选择分类名称', trigger: 'change' }],
-  fileCode: [{ required: true, message: '请输入文件编号', trigger: 'blur' }],
-  fileVersion: [{ required: true, message: '请输入文件版本号', trigger: 'blur' }],
+  // categoryName: [{ required: true, message: '请选择分类名称', trigger: 'change' }],
+  // fileCode: [{ required: true, message: '请输入文件编号', trigger: 'blur' }],
+  // fileVersion: [{ required: true, message: '请输入文件版本号', trigger: 'blur' }],
   fileFormat: [{ required: true, message: '请选择文件格式', trigger: 'change' }],
   publishDate: [{ required: true, message: '请选择发布日期', trigger: 'change' }],
   status: [{ required: true, message: '请选择状态', trigger: 'change' }],
   fileUrl: [{ required: true, message: '请选择文档上传', trigger: 'change' }],
-  content: [{ required: true, message: '请输入文档内容', trigger: 'blur' }],
-  imageUrls: [{ required: true, message: '请选择图片上传', trigger: 'change' }],
+  // content: [{ required: true, message: '请输入文档内容', trigger: 'blur' }],
+  // imageUrls: [{ required: true, message: '请选择图片上传', trigger: 'change' }],
 };

+ 9 - 6
src/views/production-safety/safety-culture/safetyCultureMaterialManagement/configs/tables.ts

@@ -28,17 +28,19 @@ export const INVENTORY_TABLE_COLUMNS: TableColumnProps[] = [
     align: 'center',
     minWidth: '100px',
   },
-  {
-    label: '分类名称',
-    prop: 'categoryName',
-    align: 'left',
-    minWidth: '120px',
-  },
+  // {
+  //   label: '分类名称',
+  //   prop: 'categoryName',
+  //   align: 'left',
+  //   minWidth: '120px',
+  //   slot:'categoryName'
+  // },
   {
     label: '文件编号',
     prop: 'fileCode',
     align: 'left',
     minWidth: '120px',
+    slot:'fileCode'
     // showOverflowTooltip: true,
   },
   {
@@ -46,6 +48,7 @@ export const INVENTORY_TABLE_COLUMNS: TableColumnProps[] = [
     prop: 'fileVersion',
     align: 'left',
     minWidth: '150px',
+    slot:'fileVersion'
   },
   {
     label: '发布日期',

+ 6 - 0
src/views/production-safety/safety-culture/safetyCultureMaterialManagement/safetyCultureMaterialManagement.vue

@@ -67,6 +67,12 @@
                 {{ scope.row.status === 1 ? '启用' : scope.row.status === 0 ? '禁用' : '-' }}
               </span>
             </template>
+            <template #fileCode="scope">
+              <span>{{ scope.row.fileCode || '-'}}</span>
+            </template>
+            <template #fileVersion="scope">
+              <span>{{ scope.row.fileVersion || '-'}}</span>
+            </template>
             <template #action="scope">
               <div class="action-container--div" style="justify-content: left">
                 <ActionButton text="编辑" @click="handleEdit(scope.row.id)" />

+ 7 - 1
src/views/production-safety/safetyTrainingAndEducation/educationTrainingPlanManagementDept/components/addTrainingInformation.vue

@@ -309,6 +309,12 @@ const openState = ref(false)
     }
   };
   const handleSave = debounce(async () => {
+    
+    if(form.startDate > form.endDate) {
+      ElMessage.error('开始日期不能晚于结束日期');
+      return;
+    }
+
     const res = await handleValidate();
     if (!res) return;
     try {
@@ -463,7 +469,7 @@ const openState = ref(false)
           <div class="file-item" v-for="file in fileList" :key="file.fileId">
             <span class="file-item--name">{{ file.name }}</span>
             <div class="file-item--footer">
-              <el-button link type="primary" @click.stop="downloadFile(file.fileUrl, file.name)">下载</el-button>
+              <el-button link type="primary" @click.stop="downloadFile(file.url, file.name)">下载</el-button>
             </div>
           </div>
         </div>

+ 1 - 1
src/views/production-safety/safetyTrainingAndEducation/educationTrainingPlanManagementDept/educationTrainingPlanManagementDept.vue

@@ -158,7 +158,7 @@
   const dateRange = ref<[string, string] | null>(null);
   // 分类名称选项
   const classifyNameOptions = ref<Array<{ label: string; value: string }>>([
-    { label: '全部', value: '全部' },
+    { label: '全部', value: '' },
     { label: '全员安全培训', value: '全员安全培训' },
     { label: '新员工培训', value: '新员工培训' },
     { label: '岗位资质培训', value: '岗位资质培训' },