Переглянути джерело

fix: 优化安全体系建设工作计划管理查看和反馈功能

sunqijun 2 місяців тому
батько
коміт
1e91c7ae74

+ 31 - 1
src/views/production-safety/implement-safety-duty/agree-document-review.vue

@@ -173,6 +173,7 @@
                             <div class="value value-s1">
                                 <el-form-item prop="feedback">
                                     <UploadFiles label="上传附件"
+                                        disabled
                                         @upload-success="(fileList) => handleUploadSuccess('feedback', fileList)"
                                         :fileList="formData.feedback" />
                                 </el-form-item>
@@ -458,7 +459,35 @@ h4 {
     border-right: 1px solid rgb(220, 223, 230);
     background-color: rgb(245, 247, 250);
 }
+.file-list {
+    display: flex;
+    flex-direction: column;
+    gap: 10px;
+
+    .file-item {
+        display: flex;
+        justify-content: space-between;
+        align-items: center;
+        padding: 10px;
+        // border: 1px solid rgb(220, 223, 230);
+
+        .file-item--name {
+            font-size: 14px;
+            color: #606266;
+        }
+
+        .file-item--footer {
+            display: flex;
+            align-items: center;
+            gap: 10px;
 
+            .info {
+                font-size: 12px;
+                color: #9099a4;
+            }
+        }
+    }
+}
 // :deep(.breadcrumb .title) {
 //   margin-left: 0;
 // }
@@ -483,4 +512,5 @@ h4 {
 // //   flex: 1;
 // //   overflow: hidden;
 // //   overflow-y: auto;
-// // }</style>
+// // }
+</style>

+ 1 - 1
src/views/production-safety/implement-safety-duty/responsibility-notice-manage-admin/components/SelectNotifyArea.vue

@@ -29,7 +29,7 @@
                     <el-table-column type="selection" :reserve-selection="true" width="55" />
 
                     <el-table-column type="index" label="序号" width="80" />
-                    <el-table-column label="楼宇/区域" prop="buildingNo" width="180" />
+                    <el-table-column label="楼宇/区域" prop="buildingArea" width="180" />
                     <el-table-column label="楼层/房号" prop="floorRoomNo" width="180" />
                     <el-table-column label="名称/功能" prop="nameFunction" width="120" />
                     <el-table-column label="安全责任所/中心" prop="safetyResponsibleCenter" width="200" />

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

@@ -79,7 +79,7 @@
                 <!-- 1-未下发、2-待反馈、3-已完成 4- 已作废 -->
                 <!-- (2)待反馈-->
                 <template v-if="Number(scope.row.status) === 2">
-                  <ActionButton text="查看" @click="handleView()" />
+                  <ActionButton text="查看" @click="handleView(scope.row)" />
                   <ActionButton text="作废" @click="handleViewInvalid(scope.row.id)" />
                 </template>
 
@@ -92,7 +92,7 @@
                     }"
                     @confirm="handleDelete(scope.row.id)"
                   />
-                  <ActionButton text="查看" @click="handleView()" />
+                  <ActionButton text="查看" @click="handleView(scope.row)" />
                 </template>
               </div>
             </template>
@@ -270,11 +270,12 @@ import BreadcrumbBack from '@/components/BreadcrumbBack.vue';
     }
   };
   // 查看
-  const handleView = () => {
+  const handleView = (row) => {
     router.push({
       name: 'SafetySystemConstructionWorkPlanManagementDeptItem',
       query: {
         id: currentId.value,
+        planId: row.planId,
         operate: 'work-plan-dept-view',
       },
     });

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

@@ -109,9 +109,11 @@
   const router = useRouter();
   const route = useRoute();
 
-  const operate = computed(() => (route.query.operate as string) || 'work-plan-dept-view');
+
   const currentId = computed(() => Number(route.query.id));
+  const currentPlanId = computed(() => Number(route.query.planId));
 
+  const operate = computed(() => (route.query.operate as string) || 'work-plan-dept-view');
   const isEditMode = computed(() => operate.value === 'work-plan-dept-issue');
   const isViewMode = computed(() => operate.value === 'work-plan-dept-view');
 
@@ -246,10 +248,10 @@
   };
 
   const getDetail = async () => {
-    console.log(currentId.value, 'currentId.value');
-    if (!currentId.value) return;
+    const id = currentPlanId.value;
+    if (!id) return;
     try {
-      const res = await queryWorkPlanDetail(currentId.value);
+      const res = await queryWorkPlanDetail(id);
       if (res) {
         // 映射接口字段到表单字段
         const cooperateDeptIdsArray = parseDeptIds(res.cooperateDeptIds);
@@ -275,17 +277,6 @@
         // 处理附件格式
         form.fileUrl = JSON.parse(form.fileUrl)[0].url;
       }
-      // const basePayload = {
-      //     workContent: form.workContent,
-      //     categoryName: form.categoryName,
-      //     trainingPlanName: form.trainingPlanName,
-      //     executGroupIds: '',
-      //     plannedComplateTime: formatDate(form.plannedComplateTime),
-      //     cooperateDeptIds: form.cooperateDeptIds.toString(),
-      //     responsibleDeptIds: form.responsibleDeptIds.toString(),
-      //     fileUrl: form.fileUrl,
-      // };
-      // console.log(basePayload, 'basePayload')
       if (isEditMode.value && currentId.value) {
         await issueWorkPlanDept({
           id: currentId.value,

+ 8 - 6
src/views/production-safety/productionSafetySystem/safetySystemConstructionWorkPlanManagementDept/safetySystemConstructionWorkPlanManagementDept.vue

@@ -79,12 +79,12 @@
             <template #action="scope">
               <div class="action-container--div" style="justify-content: left">
                 <template v-if="Number(scope.row.status) === 2">
-                  <ActionButton text="反馈" @click="handleIssue(scope.row.id)" />
+                  <ActionButton text="反馈" @click="handleIssue(scope.row)" />
                 </template>
 
                 <!-- 已完成(3):删除、查看 -->
                 <template v-else>
-                  <ActionButton text="查看" @click="handleView(scope.row.id)" />
+                  <ActionButton text="查看" @click="handleView(scope.row)" />
                 </template>
               </div>
             </template>
@@ -204,22 +204,24 @@
   };
 
   // 查看
-  const handleView = (id: number) => {
+  const handleView = (row: any) => {
     router.push({
       name: 'SafetySystemConstructionWorkPlanManagementDeptItem',
       query: {
-        id,
+        id: row.id,
+        planId: row.planId,
         operate: 'work-plan-dept-view',
       },
     });
   };
 
   // 反馈
-  const handleIssue = async (id: number) => {
+  const handleIssue = async (row: any) => {
     router.push({
       name: 'SafetySystemConstructionWorkPlanManagementDeptItem',
       query: {
-        id,
+        id: row.id,
+        planId: row.planId,
         operate: 'work-plan-dept-issue',
       },
     });