Просмотр исходного кода

fix:修改安全组织体系组织信息保存,反馈材料支持上传多个

sunqijun 1 месяц назад
Родитель
Сommit
c100d1af8a

+ 1 - 1
src/api/safety-organization-management/index.ts

@@ -2,7 +2,7 @@
  * @Author: liuJie
  * @Date: 2026-02-05 11:15:09
  * @LastEditors: liuJie
- * @LastEditTime: 2026-03-30 13:26:55
+ * @LastEditTime: 2026-03-30 21:58:49
  * @Describe: 安全组织体系管理
  */
 

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

@@ -187,7 +187,7 @@
   // 批量导入
   const batchImportVisible = ref(false);
   const { urlPrefix } = useGlobSetting();
-  const importApiUrl = ref(urlJoin(urlPrefix, '/api/employeeHazardReport/importEmployeeHazardReport'));
+  const importApiUrl = ref(urlJoin(urlPrefix, '/employeeHazardReport/importEmployeeHazardReport'));
   const templateUrl = ref('./skyeye-file-upload/sfysecurity/TEMPLATE/员工上报导入模版.xlsx');
 
   const handleImport = () => {

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

@@ -198,7 +198,6 @@
         <el-form-item label="附件上传" prop="attachments">
             <UploadFiles
                 label="选择附件"
-                :maxCount="1"
                 v-if="detailStatusOrder==2"
                 :disabled="!isRectifyMode"
                 :file-list="attachmentsFileList"
@@ -210,9 +209,12 @@
                     <div class="file-item" v-for="file in attachmentsFileList" :key="file.fileId">
                         <span class="file-item--name">{{ file.fileName }}</span>
                         <div class="file-item--footer">
-                            <el-button link type="primary" @click="previewOnline(file.fileUrl, file.fileType)"
-                                >预览</el-button
-                            >
+                            <el-button link type="primary" @click="previewOnline(file.fileUrl, file.fileType)">
+                                预览
+                            </el-button>
+                            <el-button link type="primary" @click.stop="downloadFile(file.fileUrl, file.fileName)">
+                                下载
+                            </el-button>
                         </div>
                     </div>
                 </div>
@@ -352,6 +354,7 @@
   import type { FileItem } from '@/components/UploadFiles/types';
   import { formatAttachmentList } from '@/components/UploadFiles/utils';
   import { useFormConfigHook } from '@/hooks/useFormConfigHook';
+  import { downloadFile } from '@/views/disaster/utils';
   import {
     HIDDEN_DANGER_FORM_CONFIG,
     HIDDEN_DANGER_FORM_DATA,

+ 28 - 4
src/views/production-safety/productionSafetySystem/safetyOrganizationSystemManagement/components/collapseItem.vue

@@ -3,7 +3,7 @@
     <el-collapse-item :name="String(data.orgId)">
       <!-- 标题 -->
       <template #title>
-        <div class="node">
+        <div class="node" :style="{ marginLeft: (level - 1) * 2 + 'px' }">
             <div @click.stop="handleClick" class="cursor-pointer">
             {{ data?.orgName }}
             </div>
@@ -26,7 +26,7 @@
       <div
         v-if="data.children && data.children.length && level < 10"
         class="ml-4">
-        <el-collapse accordion>
+        <el-collapse  accordion>
           <CollapseItem
             v-for="child in data.children"
             :key="child.id"
@@ -47,7 +47,7 @@
 </template>
 
 <script setup>
-  import { defineProps, defineEmits, defineOptions } from 'vue'
+  import { defineProps, defineEmits, defineOptions, ref, inject } from 'vue'
   import {
   Delete,
   Edit,
@@ -58,7 +58,8 @@
 defineOptions({
   name: 'CollapseItem'
 })
-
+const childrenActiveName = ref('')
+// const activeName = inject('activeName')
 // 定义 props
 const props = defineProps({
   data: {
@@ -92,11 +93,13 @@ const bindingEvents = (state, type, item)=>{
 // 点击当前项
 const handleClick = () => {
   emit('click-node', props.data)
+//   activeName.value = String(props.data.orgId)
 }
 
 // 接收子组件点击
 const handleClickItem = (item) => {
   emit('click-node', item)
+//   activeName.value = String(item.orgId)
 }
 </script>
 
@@ -124,4 +127,25 @@ li{
     margin: 4px 0;
     cursor: pointer;
 }
+/* 全局生效 /deep/ 穿透 */
+/* :deep(.el-collapse-item__header) {
+  border-left: 3px solid transparent;
+  transition: all 0.2s;
+} */
+
+/* 选中展开的项 → 高亮 */
+/* :deep(.el-collapse-item__header.is-active) {
+  background-color: #f5f7fa !important;
+  border-left: 3px solid #1677ff;
+} */
+
+/* 选中的标题文字高亮 */
+/* :deep(.el-collapse-item__header.is-active .node) {
+  color: #1677ff !important;
+} */
+
+/* hover 效果 */
+/* :deep(.el-collapse-item__header:hover) {
+  background: #fafafa;
+} */
 </style>

+ 8 - 5
src/views/production-safety/productionSafetySystem/safetyOrganizationSystemManagement/safetyOrganizationSystemManagement.vue

@@ -5,11 +5,11 @@
     </header>
     <main class="safety-platform-container__main flex">
       <div class="nav">
-        <el-button type="primary" :icon="Plus" @click="addTeam('parent')"> 添加组织 </el-button>
+        <el-button type="primary" :icon="Plus" @click="addTeam('parent')"> 添加组织</el-button>
         
         <div class="collapse-wrapper">
-            <!-- 组织树 -->
-            <el-collapse v-model="activeName" accordion v-if="fetchSafetyOrganizationList.length > 0">
+            <!-- 组织树v-model="activeName"-->
+            <el-collapse  accordion v-if="fetchSafetyOrganizationList.length > 0">
                 <CollapseItem
                     v-for="item in fetchSafetyOrganizationList"
                     :key="item.id"
@@ -56,7 +56,7 @@
 </template>
 
 <script setup lang="ts">
-  import { onMounted, reactive, ref, defineComponent } from 'vue';
+  import { onMounted, reactive, ref, provide } from 'vue';
   import { ElMessage, ElMessageBox } from 'element-plus';
   import BasicTable from '@/components/BasicTable.vue';
   import useTableConfig from '@/hooks/useTableConfigHook';
@@ -98,6 +98,8 @@ const position = ref('left')
   const fetchSafetyOrganizationList = ref<any[]>([]);
 
   const activeName = ref('');
+  // 给组件递归时使用
+//   provide('activeName', activeName)
 
   const level = ref(1)
   // 日期范围(用于日期选择器)
@@ -226,7 +228,7 @@ const formatTreeData = (tree)=> {
       // 默认选择第一个组织
       if(res[0].orgId){
         treeNodePreview(res[0])
-        activeName.value = res[0].orgId
+        activeName.value = String(res[0].orgId)
         tableQuery.queryParam.classifyName = res[0].orgId
       }
 
@@ -296,6 +298,7 @@ const formatTreeData = (tree)=> {
   const querySafetyTeamData = (value) => {
     // console.log('查询', value);
     tableQuery.queryParam.classifyName = value.orgId;
+    activeName.value = String(value.orgId)
     treeNodePreview(value)
   };
 

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

@@ -2,7 +2,7 @@
  * @Author: liuJie
  * @Date: 2026-01-28 11:03:32
  * @LastEditors: liuJie
- * @LastEditTime: 2026-03-01 20:07:59
+ * @LastEditTime: 2026-03-31 11:02:13
  * @Describe: file describe
  */
 import type { TableColumnProps } from '@/types/basic-table';
@@ -69,7 +69,7 @@ export const WORK_PLAN_TABLE_COLUMNS: TableColumnProps[] = [
     label: '培训计划名称',
     prop: 'trainingPlanName',
     align: 'left',
-    minWidth: '200px',
+    minWidth: '220px',
     showOverflowTooltip: true,
   },
   {

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

@@ -332,4 +332,7 @@ import BreadcrumbBack from '@/components/BreadcrumbBack.vue';
     flex-shrink: 0;
     background-color: white;
   }
+  .select-box{
+    justify-content: flex-start;
+  }
 </style>

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

@@ -75,7 +75,6 @@
           label="上传附件"
           :file-list="attachmentFileList"
           :disabled="isViewMode"
-          :maxCount="1"
           @uploadSuccess="handleAttachmentUploadSuccess"
           @preview="handlePreview"
         />

+ 5 - 1
src/views/production-safety/productionSafetySystem/securityOrganizationalStructure/securityOrganizationalStructure.vue

@@ -1,7 +1,7 @@
 <template>
   <div class="safety-platform-container">
     <header class="safety-platform-container__header">
-      <div class="breadcrumb-title"> 安全组织体系架构 </div>
+      <div class="breadcrumb-title"> 安全组织体系管理 </div>
     </header>
     <main class="safety-platform-container__main flex platform-main">
       <div class="nav">
@@ -196,6 +196,7 @@ const position = ref('left')
     },
   });
   const safetyOrgUser = reactive({
+    id: 0,
     userNum: '',
     depResp: ''
   })
@@ -212,6 +213,8 @@ const position = ref('left')
     const res = await handleValidate()
     if (!res) return;
     try {
+        console.log(safetyOrgUser, 'canshu')
+        safetyOrgUser.id = Number(safetyOrgUser.id)
         await safetyOrgUserSave(safetyOrgUser)
         ElMessage.success('保存成功');
     } catch (error) {
@@ -223,6 +226,7 @@ const position = ref('left')
     try {
         const res = await safetyOrgUserDetail(id)
         Object.assign(safetyOrgUser, {
+            id,
             userNum: res.userNum,
             depResp: res.depResp
         })