Forráskód Böngészése

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

sunqijun 1 hónapja
szülő
commit
5b9bf978f0
14 módosított fájl, 134 hozzáadás és 32 törlés
  1. 12 0
      src/api/safety-system-construction-work-plan/index.ts
  2. 1 0
      src/views/production-safety/implement-safety-duty/create-responsibility-agree.vue
  3. 0 1
      src/views/production-safety/implement-safety-duty/responsibility-agree-manage-dept.vue
  4. 15 3
      src/views/production-safety/implement-safety-duty/responsibility-notice-manage-admin/list.vue
  5. 29 11
      src/views/production-safety/implement-safety-duty/responsibility-notice-manage-admin/notice-view.vue
  6. 14 0
      src/views/production-safety/implement-safety-duty/responsibility-notice-manage-admin/review.vue
  7. 1 0
      src/views/production-safety/implement-safety-duty/responsibility-notice-manage-dept/feedback.vue
  8. 2 2
      src/views/production-safety/implement-safety-duty/responsibility-notice-manage-dept/list.vue
  9. 17 7
      src/views/production-safety/productionSafetySystem/safetySystemConstructionWorkPlanManagement/components/safetySystemConstructionWorkPlanManagementDetail.vue
  10. 1 1
      src/views/production-safety/productionSafetySystem/safetySystemConstructionWorkPlanManagement/configs/tables.ts
  11. 1 2
      src/views/production-safety/productionSafetySystem/safetySystemConstructionWorkPlanManagement/safetySystemConstructionWorkPlanManagement.vue
  12. 4 1
      src/views/production-safety/productionSafetySystem/safetySystemConstructionWorkPlanManagement/safetySystemConstructionWorkPlanManagementViewSender.vue
  13. 29 4
      src/views/production-safety/productionSafetySystem/safetySystemConstructionWorkPlanManagementDept/components/safetySystemConstructionWorkPlanManagementDeptDetail.vue
  14. 8 0
      src/views/production-safety/safetyTrainingAndEducation/educationTrainingPlanManagementDept/educationTrainingPlanManagementDept.vue

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

@@ -113,6 +113,7 @@ export interface ViewSenderQueryPageResponse {
   planId: number;
   plannedComplateTime: string;
   responsibleDeptName: string;
+  responsibleDeptNames: string;
   status: number;
   statusName?: any;
   trainingPlanName: string;
@@ -164,11 +165,22 @@ export function updateWorkPlan(data: UpdateWorkPlanRequest) {
 export function queryWorkPlanDetail(id: number) {
   return http.request<SaveWorkPlanRequest>({
     url: `${ADMIN_BASE}/queryDetail`,
+    // url: `/safetyWorkPlan/workPlanSendObj/queryDetail?id=${id}`,
     method: 'get',
     params: { id },
   });
 }
 
+/**
+ * 查询部门安全体系建设工作计划详情
+ */
+export function queryWorkPlanDepartmentDetail(id: number) {
+  return http.request<SaveWorkPlanRequest>({
+    url: `/safetyWorkPlan/workPlanSendObj/queryDetail?id=${id}`,
+    method: 'get',
+  });
+}
+
 /**
  * 删除安全体系建设工作计划
  */

+ 1 - 0
src/views/production-safety/implement-safety-duty/create-responsibility-agree.vue

@@ -32,6 +32,7 @@
             :maxCount="1"
             @uploadSuccess="handleUploadSuccess"
             :fileList="formValue.attachment"
+            :desc="'支持格式:.rar .zip .doc .docx .doc .pdf .png .jpg .jpeg .mp4 .xlsx .pptx,单个文件不能超过20MB'"
           />
         </el-form-item>
 

+ 0 - 1
src/views/production-safety/implement-safety-duty/responsibility-agree-manage-dept.vue

@@ -23,7 +23,6 @@
           </el-form-item>
           <el-form-item label="状态">
             <el-select v-model="queryParams.queryParam.status" clearable placeholder="状态" style="width: 170px">
-              <el-option :value="1" label="未下发" />
               <el-option :value="2" label="待签署" />
               <el-option :value="3" label="待反馈材料" />
               <el-option :value="4" label="待审核" />

+ 15 - 3
src/views/production-safety/implement-safety-duty/responsibility-notice-manage-admin/list.vue

@@ -70,9 +70,21 @@
           <el-table-column label="责任通知名称" prop="responsibilityName" width="180" />
           <el-table-column label="状态" prop="statusName" width="100" />
           <!-- <el-table-column label="类型" prop="safetyAreaName" width="180" /> -->
-          <el-table-column label="下发数" prop="issuedQuantity" width="120" />
-          <el-table-column label="反馈人数" prop="signedQuantity" width="120" />
-          <el-table-column label="反馈比例" prop="signedRatio" width="120" />
+          <el-table-column label="下发数" prop="issuedQuantity" width="120">
+            <template #default="scope">
+              {{ scope.row.status === 1 ? '-' : scope.row.issuedQuantity }}
+            </template>
+          </el-table-column>
+          <el-table-column label="反馈人数" prop="signedQuantity" width="120">
+            <template #default="scope">
+              {{ scope.row.status === 1 ? '-' : scope.row.signedQuantity }}
+            </template>
+          </el-table-column>
+          <el-table-column label="反馈比例" prop="signedRatio" width="120">
+            <template #default="scope">
+              {{ scope.row.status === 1 ? '-' : scope.row.signedRatio }}
+            </template>
+          </el-table-column>
           <el-table-column label="责任通知文档" prop="attachment" width="250">
             <template #default="scope">
               <!-- <div

+ 29 - 11
src/views/production-safety/implement-safety-duty/responsibility-notice-manage-admin/notice-view.vue

@@ -31,16 +31,9 @@
               <el-option :value="6" label="已作废" />
             </el-select>
           </el-form-item> -->
-          <el-form-item label="区域类型">
-            <el-select v-model="queryParams.queryParam.type" clearable placeholder="选择区域类型" style="width: 170px">
-              <el-option :value="1" label="公共区域" />
-              <el-option :value="2" label="非公共区域" />
-            </el-select>
-          </el-form-item>
-
-          <el-form-item label="分组名称">
-            <el-select v-model="queryParams.queryParam.userGroupId" placeholder="分组名称" style="width: 170px">
-              <el-option v-for="group in groupList" :key="group.id" :label="group.name" :value="group.id" />
+          <el-form-item label="通知区域">
+            <el-select v-model="queryParams.queryParam.safetyAreaId" clearable placeholder="选择通知区域" style="width: 170px">
+                <el-option v-for="group in areaCheckListQueryList" :key="group.id" :label="group.nameFunction" :value="group.id" />
             </el-select>
           </el-form-item>
           <el-form-item label="计划日期">
@@ -53,6 +46,9 @@
               style="width: 230px"
             />
           </el-form-item>
+            <el-form-item label="关键词">
+            <el-input v-model="queryParams.queryParam.keyWord" placeholder="关键词内容" style="width: 170px"></el-input>
+          </el-form-item>
         </el-form>
 
         <div>
@@ -66,7 +62,7 @@
         <el-table :data="tableData.data">
           <el-table-column label="责任通知名称" prop="responsibilityName" width="180" />
           <el-table-column label="状态" prop="statusName" width="100" />
-          <el-table-column label="类别名称" prop="safetyAreaTypeName" />
+          <el-table-column label="类" prop="safetyAreaTypeName" />
 
           <el-table-column label="通知区域" prop="safetyAreaName" />
           <el-table-column label="安全责任人" prop="responsiblePersonName" />
@@ -130,6 +126,7 @@
     safetyNoticeAdminExportIssuedObject,
     safetyResponsibilityAdminDeleteIssuedObject,
     safetyNoticeAdminScrap,
+    areaCheckListQueryPage,
   } from '@/api/production-safety/responsibility-implementation';
   import { downloadByData } from '@/utils/file/download';
   import { unformatAttachment } from '@/components/UploadFiles/utils';
@@ -148,9 +145,17 @@
       status: '',
       date: '',
       type: route.query.type || '',
+      safetyAreaId: '',
+      keyWord: '',
     },
   });
 
+  const queryParamsTow = reactive<any>({
+    pageNumber: 1,
+    pageSize: 9999,
+    queryParam: {},
+  });
+
   const detailData = reactive({
     createdAt: '',
     createdByName: '',
@@ -163,6 +168,8 @@
     total: 0,
   });
 
+  const areaCheckListQueryList = ref<any>([]);
+
   const handleQueryUserGroupPage = () => {
     queryUserGroupPage({
       pageNumber: 1,
@@ -255,11 +262,19 @@
         status: '',
         date: '',
         userGroupId: '',
+        safetyAreaId: '',
+        keyWord: '',
       },
     });
     queryTableList();
   };
 
+  const areaCheckListPost = () => {
+    areaCheckListQueryPage(queryParamsTow).then((res) => {
+      areaCheckListQueryList.value = res.records;
+    });
+  };
+
   watch(
     () => activeTab.value,
     (a) => {
@@ -280,6 +295,9 @@
     await handleQueryUserGroupPage();
 
     queryTableList();
+
+    areaCheckListPost();
+
   });
 </script>
 

+ 14 - 0
src/views/production-safety/implement-safety-duty/responsibility-notice-manage-admin/review.vue

@@ -1,6 +1,7 @@
 <template>
   <div class="safety-platform-container">
     <header class="safety-platform-container__header">
+      <div class="back"><BreadcrumbBack /> 安全责任通知管理审核 </div>
       <div class="detail-content">
         <span>类型:{{ formData?.departmentName }} </span>
         <span>创建人:{{ formData?.createdByName }} </span>
@@ -67,6 +68,18 @@
               </div>
             </div>
           </div>
+          <div class="row">
+            <div class="col">
+              <div class="label">责任通知内容:</div>
+              <div class="value value-s1">
+                <div class="file-list">
+                  <div class="file-item">
+                    <div v-html="formData.content"></div>
+                  </div>
+                </div>
+              </div>
+            </div>
+          </div>
         </div>
 
         <h4>材料上传</h4>
@@ -206,6 +219,7 @@
             attachment: unformatAttachment(res.attachment),
             signsUpload: unformatAttachment(res.signsUpload),
             feedback: unformatAttachment(res.feedback),
+            content: res.content,
           });
         }
       });

+ 1 - 0
src/views/production-safety/implement-safety-duty/responsibility-notice-manage-dept/feedback.vue

@@ -280,6 +280,7 @@
             attachment: unformatAttachment(res.attachment),
             signsUpload: unformatAttachment(res.signsUpload),
             feedback: unformatAttachment(res.feedback),
+            content: res.content,
           });
         }
       });

+ 2 - 2
src/views/production-safety/implement-safety-duty/responsibility-notice-manage-dept/list.vue

@@ -23,7 +23,7 @@
           </el-form-item>
           <el-form-item label="状态">
             <el-select v-model="queryParams.queryParam.status" clearable placeholder="状态" style="width: 170px">
-              <el-option :value="1" label="未下发" />
+              <!-- <el-option :value="1" label="未下发" /> -->
               <el-option :value="2" label="待反馈" />
               <el-option :value="3" label="待审核" />
               <el-option :value="4" label="已完成" />
@@ -66,7 +66,7 @@
         <el-table :data="tableData.data">
           <el-table-column label="责任通知名称" prop="responsibilityName" />
           <el-table-column label="状态" prop="statusName" width="100" />
-          <!-- <el-table-column label="类型" prop="safetyAreaName" width="130" /> -->
+          <el-table-column label="类型" prop="safetyAreaName" width="130" />
           <!-- <el-table-column label="下发数" prop="issuedQuantity" width="120" />
           <el-table-column label="反馈人数" prop="signedQuantity" width="120" />
           <el-table-column label="反馈比例" prop="signedRatio" width="120" /> -->

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

@@ -70,13 +70,22 @@
         />
       </el-form-item>
       <el-form-item label="附件上传:" v-if="isViewMode" prop="fileUrl" :required="isViewMode">
-        <UploadFiles
-          label="上传附件"
-          :file-list="attachmentFileList"
-          :maxCount="1"
-          @uploadSuccess="handleAttachmentUploadSuccess"
-          @preview="handlePreview"
-        />
+        <div class="file-list" v-if="form.fileUrl && form.fileUrl.length != 0">
+          <div class="file-item" v-for="file in form.fileUrl" :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.stop="downloadFile(file.fileUrl, file.fileName)"
+                >下载</el-button
+              >
+            </div>
+          </div>
+        </div>
+        <div v-else>
+          暂无附件
+        </div>
       </el-form-item>
     </el-form>
   </main>
@@ -261,6 +270,7 @@
           ...res,
           cooperateDeptIds: cooperateDeptIdsArray,
           responsibleDeptIds: responsibleDeptIdsArray,
+          fileUrl: JSON.parse(res.fileUrl || '[]'),
         });
       }
       // cloneRuleFormData();

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

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

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

@@ -85,6 +85,7 @@
                 <!-- 1-未下发、2-待反馈、3-已完成 4- 已作废 -->
                 <!-- 未下发(1):编辑、删除、下发 -->
                 <template v-if="Number(scope.row.status) === 1">
+                  <ActionButton text="查看" @click="handleView(scope.row.id)" />
                   <ActionButton text="编辑" @click="handleEdit(scope.row.id)" />
                   <ActionButton
                     text="删除"
@@ -98,7 +99,6 @@
 
                 <!-- (2)待反馈-->
                 <template v-else-if="Number(scope.row.status) === 2">
-                  <ActionButton text="查看" @click="handleView(scope.row.id)" />
                   <ActionButton text="查看发送对象" @click="handleViewRecipients(scope.row.id)" />
                   <ActionButton
                     text="作废"
@@ -118,7 +118,6 @@
                     }"
                     @confirm="handleDelete(scope.row.id)"
                   />
-                  <ActionButton text="查看" @click="handleView(scope.row.id)" />
                   <ActionButton text="发送查看对象" @click="handleViewRecipients(scope.row.id)" />
                 </template>
               </div>

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

@@ -219,6 +219,9 @@ import BreadcrumbBack from '@/components/BreadcrumbBack.vue';
       }
       const res = await queryViewSender(tableQuery);
       if (res) {
+        res.records.forEach((item) => {
+          item.responsibleDeptNames = item.responsibleDeptName;
+        });
         tableData.value = res.records;
         pagination.total = res.totalRow;
       }
@@ -274,7 +277,7 @@ import BreadcrumbBack from '@/components/BreadcrumbBack.vue';
     router.push({
       name: 'SafetySystemConstructionWorkPlanManagementDeptItem',
       query: {
-        id: currentId.value,
+        id: row.id,
         planId: row.planId,
         operate: 'work-plan-dept-view',
       },

+ 29 - 4
src/views/production-safety/productionSafetySystem/safetySystemConstructionWorkPlanManagementDept/components/safetySystemConstructionWorkPlanManagementDeptDetail.vue

@@ -69,8 +69,9 @@
           :disabled="true"
         />
       </el-form-item>
-      <el-form-item label="附件上传:" prop="fileUrl" :required="isViewMode">
+      <el-form-item label="附件上传:" prop="fileUrl" required >
         <UploadFiles
+          v-if="isEditMode"
           label="上传附件"
           :file-list="attachmentFileList"
           :disabled="isViewMode"
@@ -78,8 +79,22 @@
           @uploadSuccess="handleAttachmentUploadSuccess"
           @preview="handlePreview"
         />
+        <div class="file-list" v-else>
+          <div class="file-item" v-for="file in form.fileUrl" :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.stop="downloadFile(file.fileUrl, file.fileName)"
+                >下载</el-button
+              >
+            </div>
+          </div>
+        </div>
       </el-form-item>
     </el-form>
+    <PreviewOnline ref="previewOnlineRef" />
   </main>
   <footer class="safety-platform-container__footer">
     <el-button @click="router.back()">返回</el-button>
@@ -97,7 +112,7 @@
   import { FORM_RULES } from '../configs/form';
   import {
     issueWorkPlanDept,
-    queryWorkPlanDetail,
+    queryWorkPlanDepartmentDetail,
     type SaveWorkPlanRequest,
   } from '@/api/safety-system-construction-work-plan';
   import UploadFiles from '@/components/UploadFiles/UploadFiles.vue';
@@ -106,6 +121,8 @@
   import PreviewOnline from '@/views/disaster/components/PreviewOnline.vue';
   import { DeptTree } from '@/types/dept/type';
   import { getAllDepartments } from '@/api/auth/dept';
+  import { downloadFile } from '@/views/disaster/utils';
+
   const router = useRouter();
   const route = useRoute();
 
@@ -212,6 +229,13 @@
       previewOnlineRef.value?.open(url, fileType);
     }
   };
+
+  const previewOnline = (url: string | undefined, type) => {
+    if (url) {
+      previewOnlineRef.value?.open(url, type);
+    }
+  };
+
   //  时间格式化
   const formatDate = (date) => {
     if (!date) return '';
@@ -249,10 +273,10 @@
   };
 
   const getDetail = async () => {
-    const id = currentPlanId.value;
+    const id = currentId.value;
     if (!id) return;
     try {
-      const res = await queryWorkPlanDetail(id);
+      const res = await queryWorkPlanDepartmentDetail(id);
       if (res) {
         // 映射接口字段到表单字段
         const cooperateDeptIdsArray = parseDeptIds(res.cooperateDeptIds);
@@ -261,6 +285,7 @@
           ...res,
           cooperateDeptIds: cooperateDeptIdsArray,
           responsibleDeptIds: responsibleDeptIdsArray,
+          fileUrl: JSON.parse(res.fileUrl || '[]'),
         });
       }
       // cloneRuleFormData();

+ 8 - 0
src/views/production-safety/safetyTrainingAndEducation/educationTrainingPlanManagementDept/educationTrainingPlanManagementDept.vue

@@ -276,6 +276,14 @@
 
   };
   const saveSummary = async()=>{
+    if(!fileList.value.length){
+      ElMessage.error('请先上传材料');
+      return;
+    }
+    if(!form.trainingSummary){
+      ElMessage.error('请输入小结内容');
+      return;
+    }
     try {
       await updateEducationTrainingPlanCourseSummary(form);
       ElMessage.success('更新小结成功');