Procházet zdrojové kódy

fix:修复责任书签署模块功能

sunqijun před 1 měsícem
rodič
revize
2f49833c5f

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

@@ -93,6 +93,7 @@
           <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="deptName" width="180" />
           <el-table-column label="分组名称" prop="userGroupName" width="150" />
           <el-table-column label="计划完成时间" prop="planEndTime" width="150" />
           <el-table-column fixed="right" min-width="200" label="操作">

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

@@ -97,6 +97,7 @@
               {{ scope.row.status == 1 ? '-' : scope.row.signedRatio }}
             </template>
           </el-table-column>
+          <el-table-column label="责任人所在部门" prop="deptName" width="180" />
           <el-table-column label="分组名称" prop="userGroupName" width="150">
             <template #default="scope">
               {{ scope.row.status == 1 ? '-' : scope.row.userGroupName }}

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

@@ -14,7 +14,7 @@
     <div class="main">
       <el-form :inline="true">
         <el-form-item>
-          <el-input v-model="queryParams.queryParam.nameFunction" placeholder="搜索功能名称" />
+          <el-input v-model="queryParams.queryParam.nameFunction" placeholder="搜索楼宇/区域" />
         </el-form-item>
         <!-- <el-form-item>
           <el-select v-model="queryParams.queryParam.status" clearable placeholder="状态" style="width: 170px">

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

@@ -121,6 +121,19 @@
           </div>
         </template>
         <template v-else>
+          <h4>问题描述</h4>
+          <div class="detail-ct">
+            <div class="row">
+              <div class="col">
+                <div class="label">问题描述:</div>
+                <div class="value value-s1" style="display: block;min-height: auto;">
+                  <el-form-item prop="feedbackContent" style="margin-bottom:0">
+                    <el-input placeholder="请输入问题描述" v-model="formData.feedbackContent" />
+                  </el-form-item>
+                </div>
+              </div>
+            </div>
+          </div>
           <h4>材料上传</h4>
           <div class="detail-ct">
             <div class="row">
@@ -198,6 +211,7 @@
     planEndTime: null,
     rejection: '',
     status: null,
+    feedbackContent: ''
   });
 
   const rules = reactive({
@@ -207,6 +221,12 @@
         message: '请上传签署材料',
       },
     ],
+    feedbackContent: [
+      {
+        required: true,
+        message: '请输入反馈问题描述',
+      },
+    ],
   });
   const showAlertBar = computed(() => {
     if (!formData.rejection) {
@@ -241,6 +261,7 @@
         }
         const params = {
           id: route.query.id,
+          feedbackContent: formData.feedbackContent || undefined,
           updateType: isSignsUpload.value ? 0 : 1,
           signsUpload: isSignsUpload.value ? JSON.stringify(signsUpload) : undefined,
           feedback: !isSignsUpload.value ? JSON.stringify(feedback) : undefined,

+ 34 - 27
src/views/production-safety/implement-safety-duty/view-recipients.vue

@@ -42,14 +42,14 @@
               start-placeholder="开始时间"
               end-placeholder="结束时间"
               style="width: 230px"
+              value-format="YYYY-MM-DD"
             />
           </el-form-item>
         </el-form>
-
         <div>
-          <!-- <el-button type="primary" @click="handleExport">导出 </el-button> -->
-          <el-button type="primary" @click="queryTableList">查询</el-button>
-          <el-button @click="handleRestParams">重置</el-button>
+            <el-button type="primary" @click="queryTableList">查询</el-button>
+            <el-button @click="handleRestParams">重置</el-button>
+            <el-button @click="handleExport">导出 </el-button>
         </div>
       </div>
 
@@ -60,6 +60,7 @@
           <el-table-column label="类别名称" prop="departmentName" width="200"/>
           <el-table-column label="分组名称" prop="userGroupName" width="200"/>
           <el-table-column label="责任人姓名" prop="responsiblePersonName" width="200"/>
+          <el-table-column label="责任人所在部门" prop="deptName" width="200" />
           <el-table-column label="是否并签" prop="signConfigName" width="200"/>
           <el-table-column label="责任书文档" width="200">
             <template #default="scope">
@@ -210,6 +211,20 @@
     });
   };
 
+//    const handleExport = async () => {
+//     try {
+//       const response = await safetyResponsibilityAdminExportIssuedObject(queryParams.queryParam);
+//       if (response) {
+//         const fileName = `下发对象数据_${new Date().toISOString().split('T')[0]}.xlsx`;
+//         downloadByData(response, fileName);
+//         ElMessage.success('导出成功');
+//       }
+//     } catch (e:any) {
+//       console.error('导出下发对象失败:', e);
+//       ElMessage.error('导出失败,请重试');
+//     }
+//   };
+
   // 预览
   const previewOnlineRef = ref<InstanceType<typeof PreviewOnline>>();
   const previewOnline = (url: string | undefined, type: keyof typeof FILE_TYPE_ICON) => {
@@ -218,24 +233,20 @@
     }
   };
 
-  // const handleExport = () => {
-  //   safetyResponsibilityAdminExportIssuedObject({
-  //     ...omit(queryParams.queryParam, 'date'),
-  //     adminId: Number(queryParams.queryParam.adminId),
-  //     startTime: queryParams.queryParam.date?.[0]
-  //       ? dayjs(queryParams.queryParam.date?.[0]).format('YYYY-MM-DD')
-  //       : undefined,
-  //     endTime: queryParams.queryParam.date?.[1]
-  //       ? dayjs(queryParams.queryParam.date?.[1]).format('YYYY-MM-DD')
-  //       : undefined,
-  //   }).then((res) => {
-  //     if (!res) {
-  //       throw new Error('下载文件失败');
-  //     }
-  //     downloadByData(res, `${Date.now()}.xlsx`);
-  //     ElMessage.success('导出文件成功');
-  //   });
-  // };
+  const handleExport = async () => {
+    await safetyResponsibilityAdminExportIssuedObject({
+      ...omit(queryParams.queryParam, 'date'),
+      adminId: Number(queryParams.queryParam.adminId),
+      startTime: queryParams.queryParam.date?.[0],
+      endTime: queryParams.queryParam.date?.[1]
+    }).then((res) => {
+      if (!res) {
+        throw new Error('下载文件失败');
+      }
+      downloadByData(res, `下发对象数据_${new Date().toISOString().split('T')[0]}.xlsx`);
+      ElMessage.success('导出文件成功');
+    });
+  };
   const handleConfirmDeleteRow = (scope) => {
     safetyResponsibilityAdminDeleteIssuedObject(scope.row.id).then(() => {
       ElMessage.success('删除成功!');
@@ -248,12 +259,8 @@
       queryParam: {
         ...omit(queryParams.queryParam, 'date'),
         adminId: queryParams.queryParam.adminId,
-        startTime: queryParams.queryParam.date?.[0]
-          ? dayjs(queryParams.queryParam.date?.[0]).format('YYYY-MM-DD')
-          : undefined,
+        startTime: queryParams.queryParam.date?.[0],
         endTime: queryParams.queryParam.date?.[1]
-          ? dayjs(queryParams.queryParam.date?.[1]).format('YYYY-MM-DD')
-          : undefined,
       },
     }).then((res) => {