Browse Source

feat: 区域检查计划新增删除功能和检查功能,新增区域检查任务(部门端)模块

sunqijun 3 weeks ago
parent
commit
2aed297ddf
12 changed files with 370 additions and 261 deletions
  1. 45 1
      src/api/production-safety-system/index.ts
  2. 7 0
      src/views/production-safety/hiddenTroubleInvestigationAndGovernance/areaCheckPlanManagement/areaCheckPlanManagementItem.vue
  3. 2 2
      src/views/production-safety/hiddenTroubleInvestigationAndGovernance/areaCheckPlanManagementDept/areaCheckPlanManagementDeptItem.vue
  4. 77 137
      src/views/production-safety/hiddenTroubleInvestigationAndGovernance/areaCheckPlanManagementDept/components/areaCheckPlanManagementDeptDetail.vue
  5. 42 17
      src/views/production-safety/hiddenTroubleInvestigationAndGovernance/areaCheckPlanManagementDept/components/areaCheckPlanRecordDetailDept.vue
  6. 13 0
      src/views/production-safety/hiddenTroubleInvestigationAndGovernance/areaCheckPlanManagementDept/configs/status.ts
  7. 73 44
      src/views/production-safety/hiddenTroubleInvestigationAndGovernance/areaCheckPlanTaskDept/areaCheckPlanTaskDept.vue
  8. 66 27
      src/views/production-safety/hiddenTroubleInvestigationAndGovernance/areaCheckPlanTaskDept/components/areaCheckPlanRecordDetail.vue
  9. 9 0
      src/views/production-safety/hiddenTroubleInvestigationAndGovernance/areaCheckPlanTaskDept/configs/form.ts
  10. 2 5
      src/views/production-safety/hiddenTroubleInvestigationAndGovernance/areaCheckPlanTaskDept/configs/status.ts
  11. 28 23
      src/views/production-safety/hiddenTroubleInvestigationAndGovernance/areaCheckPlanTaskDept/configs/tables.ts
  12. 6 5
      src/views/production-safety/hiddenTroubleInvestigationAndGovernance/areaCheckPlanTaskDept/configs/types.ts

+ 45 - 1
src/api/production-safety-system/index.ts

@@ -1,5 +1,6 @@
 import { http } from '@/utils/http/axios';
 import type { QueryPageRequest, QueryPageResponse } from '@/types/basic-query';
+import { id } from 'element-plus/es/locale';
 
 /**
  * 生产安全体系文件基础接口
@@ -771,7 +772,7 @@ const LABEL_TO_FREQUENCY: Record<string, number> = {
 };
 
 /** 后端 API 返回的区域检查计划记录格式(与接口文档 DTO 对齐:*Name/*Code) */
-interface AreaCheckPlanManageApiRecord {
+export interface AreaCheckPlanManageApiRecord {
   id?: number; // 主键ID
   areaCheckPlanName?: string; // 区域检查计划名称
   checkPlace?: string; // 检查场所
@@ -1276,6 +1277,30 @@ export function queryAreaCheckPlanDetailPage(planId: number, query: { pageNumber
   });
 }
 
+/** 查询区域检查计划任务(部门) */
+export function queryAreaInspectionPlanTask(data) {
+  return http.request({
+    url: `/areaCheckPlanManageDept/queryAreaCheckPlanDetailPage`,
+    method: 'post',
+    data,
+  });
+}
+
+/**
+ * 导出区域检查计划任务(部门) 
+ * @returns Promise<any> 导出区域检查计划任务(部门) 数据
+ */
+export function exportRegionalInspectionPlanTaskDepartmentData (params: AreaCheckPlanQuery) {
+  return http.request({
+    url: '/areaCheckPlanManageDept/exportAreaCheckPlanDetail',
+    method: 'post',
+    responseType: 'blob',
+    data: params,
+  }, {
+    isTransformResponse: false,
+  });
+}
+
 /** 查询区域检查计划关联的检查记录分页(部门) */
 export function queryAreaCheckPlanDetailDeptPage(planId: number, query: Parameters<typeof queryAreaCheckPlanDetailPage>[1]) {
   const body = buildPageQuery(query);
@@ -1303,6 +1328,14 @@ export function deleteAreaCheckPlanDetailDept(id: number) {
   });
 }
 
+/** 删除区域检查计划(部门) 查看里面的检查记录*/
+export function deleteInspectionRecords(id: number) {
+  return http.request({
+    url: `/areaCheckPlanManageDept/deleteAreaCheckPlanDetail?id=${id}`,
+    method: 'delete',
+  });
+}
+
 /** 查看区域检查计划记录详情(含 areaCheckRecords 子项,与接口文档 AreaCheckPlanDetailRes 对齐) */
 export interface AreaCheckRecordDetail {
   id?: number;
@@ -1378,15 +1411,26 @@ export function queryAreaCheckRecordTemplateDept(id: number) {
   });
 }
 
+/** 区域检查计划管理(部门) - 开始任务检查的检查明细列表 */
+export function fetchDeptAreaCheckRecord(id: number) {
+  return http.request({
+    url: `areaCheckPlanManageDept/queryAreaCheckRecord?id=${id}`,
+    method: 'post',
+  });
+}
+
 /** 区域检查计划管理(部门) - 新增检查日志提交体 */
 export interface SaveAreaCheckPlanDetailDeptReq {
   areaPlanId: number; // 关联区域计划ID(外键对应 area_check_plan_manage.id)
   checkTime: string; // 检查时间
+  id?: number| null | string; // 检查记录ID(编辑时使用,新增时不传或传null)
+  checkedCompanyName?: string; // 被检查单位名称
   checkPersonName: string; // 检查人员名称
   checkPersonCode?: string; // 检查人员code
   checkAddress: string; // 检查地点
   overallCheckDesc: string; // 整体检查情况描述(300字)
   checkedPersonSign?: string; // 被检查人签字(PDF文件地址/KEY)
+  [key: string]: unknown;
   areaCheckRecords: Array<{
     id?: number;
     checkPlanId?: number;

+ 7 - 0
src/views/production-safety/hiddenTroubleInvestigationAndGovernance/areaCheckPlanManagement/areaCheckPlanManagementItem.vue

@@ -1,3 +1,10 @@
+<!--
+ * @Author: liuJie
+ * @Date: 2026-02-28 15:54:00
+ * @LastEditors: liuJie
+ * @LastEditTime: 2026-04-11 13:33:27
+ * @Describe: file describe
+-->
 <template>
   <div class="safety-platform-container">
     <header class="safety-platform-container__header">

+ 2 - 2
src/views/production-safety/hiddenTroubleInvestigationAndGovernance/areaCheckPlanManagementDept/areaCheckPlanManagementDeptItem.vue

@@ -29,9 +29,9 @@
   const headerTitle = computed(() => {
     switch (operateType.value) {
       case 'record-view':
-        return '检查记录查看';
+        return '查看检查记录信息';
       case 'record-add':
-        return '新增检查日志';
+        return '开始任务检查';
       case 'view':
         return '查看区域检查计划';
       default:

+ 77 - 137
src/views/production-safety/hiddenTroubleInvestigationAndGovernance/areaCheckPlanManagementDept/components/areaCheckPlanManagementDeptDetail.vue

@@ -139,7 +139,7 @@
         检查记录
       </div>
       <div style="margin-bottom: 20px;">
-        <el-button type="primary" @click="onAddRecord">新增检查日志</el-button>
+        <!-- <el-button type="primary" @click="onAddRecord">新增检查日志</el-button> -->
       </div>
       <div class="view-record-toolbar">
         <el-input
@@ -157,7 +157,19 @@
           value-format="YYYY-MM-DD"
           style="margin-right: 12px;max-width: 280px;"
         />
+        <div class="select-box--item" style="margin-right: 12px; width:160px;">
+            <el-select v-model="statusValue" placeholder="请选择状态" clearable>
+                <el-option
+                v-for="item in STATUS_OPTIONS"
+                :key="String(item.value)"
+                :label="item.label"
+                :value="item.value"
+                style="width: 200px;"
+                />
+            </el-select>
+        </div>
         <el-button type="primary" class="view-record-toolbar-btn" @click="onRecordSearch">查询</el-button>
+        <el-button @click="onReset">重置</el-button>
         <el-button @click="onRecordExport">导出</el-button>
 
       </div>
@@ -168,6 +180,9 @@
         @update:pageSize="handleRecordSizeChange"
         @update:pageNumber="handleRecordPageChange"
       >
+        <template #status="scope">
+          <span>{{ STATUS_LABEL[scope.row.status] || '-' }}</span>
+        </template>
         <template #unqualifiedItemNum="scope">
           <el-button
             type="primary"
@@ -205,7 +220,23 @@
           <span v-else> - </span>
         </template>
         <template #action="scope">
-          <el-button type="primary" link size="small" @click="onViewRecord(scope.row)">检查记录查看</el-button>
+            <ActionButton
+                text="删除"
+                :popconfirm="{
+                    title: '确定要删除?', 
+                }"
+                @confirm="onDeleteRecord(scope.row)"
+                />
+                <!-- 待检查时显示 -->
+            <ActionButton
+                text="检查"
+                v-if="Number(scope.row.status) === 1"
+                @click="onReviewDept(scope.row)"
+            />
+            <ActionButton
+                text="检查记录查看"
+                @click="onViewRecord(scope.row)"
+            />
         </template>
       </BasicTable>
     </section>
@@ -422,136 +453,6 @@
           />
         </el-form-item>
     </el-form>
-    <!-- <BasicForm
-      ref="sandHiddenDangerFormRefDept"
-      :formData="sandHiddenDangerFormDataDept"
-      :formRules="sandHiddenDangerFormRulesDept"
-      :formConfig="sandHiddenDangerFormConfigDept"
-    >
-      <template #typeId>
-        <el-form-item prop="typeId" style="width: 100%;">
-          <el-select
-            v-model="sandHiddenDangerFormDataDept.typeId"
-            placeholder="请选择隐患问题类别"
-            filterable
-            clearable
-            style="width: 100%"
-          >
-            <el-option
-              v-for="item in dangerTypeList"
-              :key="item.id"
-              :label="item.categoryName"
-              :value="item.id"
-            />
-          </el-select>
-        </el-form-item>
-      </template>
-      <template #rectificationDepartmentIds>
-        <el-form-item prop="rectificationDepartmentIds" style="width: 100%;">
-          <el-cascader
-            ref="cascaderDeptRef"
-            v-model="sandHiddenDangerFormDataDept.rectificationDepartmentIds"
-            :options="issueDeptTree"
-            :props="cascaderDeptProp"
-            :show-all-levels="false"
-            placeholder="请选择整改责任部门"
-            filterable
-            clearable
-            @change="onIssueDeptChange"
-          />
-        </el-form-item>
-      </template>
-      <template #rectificationResponsibleIds>
-        <el-form-item prop="rectificationResponsibleIds" style="width: 100%;">
-          <el-select
-            v-model="sandHiddenDangerFormDataDept.rectificationResponsibleIds"
-            placeholder="选择整改负责人"
-            filterable
-            clearable
-            style="width: 100%"
-          >
-            <el-option
-              v-for="user in issueUserList"
-              :key="user.id"
-              :label="user.realname ?? user.username"
-              :value="user.id"
-            />
-          </el-select>
-        </el-form-item>
-      </template>
-      <template #reviewDepartmentId>
-        <el-cascader
-          v-model="sandHiddenDangerFormDataDept.reviewDepartmentId"
-          :options="deptTree"
-          :props="cascaderDeptProp"
-          :show-all-levels="false"
-          placeholder="请选择复查人员所属部门"
-          filterable
-          clearable
-          style="width: 100%"
-        />
-      </template>
-      <template #reviewPerson>
-        <el-select
-          v-model="sandHiddenDangerFormDataDept.reviewPersonId"
-          placeholder="请选择复查人员"
-          clearable
-          filterable
-          style="width: 100%"
-        >
-          <el-option
-            v-for="u in reviewUserListDept"
-            :key="u.id"
-            :label="u.realname || u.username"
-            :value="u.id"
-          />
-        </el-select>
-      </template>
-      <template #isDrawLessonsPush>
-        <el-radio-group v-model="sandHiddenDangerFormDataDept.isDrawLessonsPush" @change="isDrawLessonsPushChange">
-          <el-radio :value="0">否</el-radio>
-          <el-radio :value="1">是</el-radio>
-        </el-radio-group>
-      </template>
-      <template #drawLessonsContent v-if="sandHiddenDangerFormDataDept.isDrawLessonsPush === 1">
-        <el-form-item label-width="136.5px" style="width:100%">
-            <el-input placeholder="如:上级检查、院内自查"  v-model="sandHiddenDangerFormDataDept.drawLessonsContent" />
-        </el-form-item>
-      </template>
-      <template #drawLessonsDepartmentId v-if="sandHiddenDangerFormDataDept.isDrawLessonsPush === 1"> 
-        <el-form-item prop="drawLessonsDepartmentIds" style="width: 100%" label="举一反三责任部门:">
-            <el-select
-                v-model="drawLessonsDeptIdsArrayDept"
-                placeholder="请选择举一反三责任部门,可多选"
-                clearable
-                filterable
-                multiple
-                collapse-tags
-                collapse-tags-tooltip
-                style="width: 100%"
-                @change="() => { sandHiddenDangerFormDataDept.drawLessonsDepartmentIds = drawLessonsDeptIdsArrayDept.join(','); }"
-                >
-                <el-option
-                    v-for="d in deptOptions"
-                    :key="d.id"
-                    :label="d.deptName"
-                    :value="d.id"
-                />
-                </el-select>
-        </el-form-item>
-        
-      </template>
-      <template #drawLessonsDeadline v-if="sandHiddenDangerFormDataDept.isDrawLessonsPush === 1">
-        <el-form-item prop="drawLessonsDeadline" label="举一反三时限:" style="width: 100%;">
-          <el-date-picker
-            v-model="sandHiddenDangerFormDataDept.drawLessonsDeadline"
-            type="date"
-            value-format="YYYY-MM-DD"
-            placeholder="请选择举一反三截止日期(选填)"
-          />
-        </el-form-item>
-      </template>
-    </BasicForm> -->
     <template #footer>
       <el-button @click="showSandConfirmDialogDept = false">取消</el-button>
       <el-button type="primary" :loading="sandConfirmLoadingDept" @click="confirmSandToHiddenDangerDept">
@@ -581,6 +482,7 @@
     queryUnqualifiedItemNumDeptPage,
     sandAreaCheckRecordToProductionHiddenDanger,
     exportAreaCheckInspectionRecord,
+    deleteInspectionRecords,
     type UnqualifiedItemNumRecord,
     type SandAreaCheckRecordToHiddenDangerReq,
   } from '@/api/production-safety-system';
@@ -589,7 +491,7 @@
   import { useFormConfigHook } from '@/hooks/useFormConfigHook';
   import { getAllDepartments } from '@/api/auth/dept';
   import type { DeptTree } from '@/types/dept/type';
-
+  import ActionButton from '@/components/ActionButton.vue';
   import { queryAvailableUserList } from '@/api/production-safety/responsibility-implementation';
   import { downloadByData } from '@/utils/file/download';
   import {
@@ -597,7 +499,7 @@
   } from '@/api/production-safety';
 
   import type { CascaderInstance } from 'element-plus'
-
+  import { STATUS_OPTIONS, STATUS_LABEL } from '../configs/status'
 
   const router = useRouter();
   const route = useRoute();
@@ -680,7 +582,8 @@
 
   const RECORD_TABLE_COLUMNS: TableColumnProps[] = [
     { label: '编号', type: 'index', align: 'center', width: '80px' },
-    { label: '检查时间', prop: 'checkTime', minWidth: '160px' },
+    { label: '完成(检查)时间', prop: 'checkTime', minWidth: '180px' },
+    { label: '状态', prop: 'status', slot: 'status', minWidth: '120px' },
     { label: '检查人员', prop: 'checkPerson', minWidth: '140px' },
     { label: '检查场所类别', prop: 'checkPlaceCategory', minWidth: '160px' },
     { label: '检查场所', prop: 'checkPlace', minWidth: '180px' },
@@ -689,7 +592,7 @@
     { label: '不合格项数', prop: 'unqualifiedItemNum', slot: 'unqualifiedItemNum', align: 'center', width: '160px' },
     { label: '整体检查情况描述', prop: 'overallCheckDesc', minWidth: '190px', showOverflowTooltip: true },
     { label: '被检查人签字', slot: 'sign', align: 'center', width: '180px' },
-    { label: '操作', slot: 'action', align: 'center', width: '180px', fixed: 'right' },
+    { label: '操作', slot: 'action', align: 'center', width: '220px', fixed: 'right' },
   ];
   const RECORD_TABLE_OPTIONS = {
     emptyText: '暂无检查记录',
@@ -705,6 +608,7 @@
 
   const recordSearchKeyword = ref('');
   const recordDateRange = ref<[string, string] | null>(null);
+  const statusValue = ref<number | null>(null);
   const inspectionRecordList = ref<Array<Record<string, unknown>>>([]);
 
   const paginatedRecordList = computed(() => inspectionRecordList.value);
@@ -871,6 +775,13 @@
     recordPagination.pageNumber = 1;
     loadRecordList();
   };
+  const onReset = () => {
+    recordSearchKeyword.value = '';
+    recordDateRange.value = null;
+    statusValue.value = null;
+    recordPagination.pageNumber = 1;
+    loadRecordList();
+  };
   const onRecordExport = async () => {
     try {
       const [start, end] = recordDateRange.value && recordDateRange.value.length === 2
@@ -1038,7 +949,23 @@
       return { fileUrl: part, fileName, fileType };
     });
   };
-
+  // 检查
+const onReviewDept = (row)=>{
+    const needOverallDesc = !viewDetail.value.needOverallDesc ? 0 : 1;
+     const needSigneeSign = !viewDetail.value.needSigneeSign ? 0 : 1;
+     router.push({
+        name: 'areaCheckPlanManagementDeptItem',
+        query: {
+          operate: 'area-check-plan-record-add',
+          planId: currentId.value,
+          recordId: row.id,
+          checkType: row.checkType,
+          areaPlanId: row.areaPlanId,
+          needOverallDesc,
+          needSigneeSign,
+        },
+     });
+}
   const onViewRecord = (row: Record<string, unknown>) => {
     const needOverallDesc = !viewDetail.value.needOverallDesc ? 0 : 1;
     const needSigneeSign = !viewDetail.value.needSigneeSign ? 0 : 1;
@@ -1054,6 +981,19 @@
     });
   };
 
+  const onDeleteRecord = async (row: Record<string, unknown>) => {
+    if (!row.id) return;
+    try {
+      await deleteInspectionRecords(Number(row.id));
+      ElMessage.success('删除成功');
+      loadRecordList();
+    } catch (e: any) {
+      console.error('删除检查记录失败:', e);
+      ElMessage.error(e?.message || e?.data || '删除失败,请稍后重试');
+    }
+
+  }
+
   const getDetail = async () => {
     if (!currentId.value) return;
     try {

+ 42 - 17
src/views/production-safety/hiddenTroubleInvestigationAndGovernance/areaCheckPlanManagementDept/components/areaCheckPlanRecordDetailDept.vue

@@ -2,7 +2,7 @@
   <main class="safety-platform-container__main">
     <el-form ref="formRef" :model="formData" :rules="isViewMode ? undefined : formRules" label-width="180px" class="check-record-form">
       <el-form-item label="被检查单位:" prop="inspectedUnit">
-        <el-input v-model="formData.inspectedUnit" :disabled="!isAddMode" placeholder="请输入被检查单位" clearable />
+        <el-input v-model="formData.inspectedUnit" :disabled="!isAddMode || checkType===1" placeholder="请输入被检查单位" clearable />
       </el-form-item>
       <el-form-item label="检查人员:" prop="inspector">
         <el-input v-model="formData.inspector" :disabled="!isAddMode" placeholder="请输入检查人员" clearable />
@@ -37,7 +37,6 @@
         <UploadFiles
           v-if="!isViewMode"
           label="上传文件"
-          :maxCount="1"
           :file-list="signFileList"
           :disabled="isViewMode"
           :allow-all-file-types="true"
@@ -99,7 +98,7 @@
 </template>
 
 <script setup lang="ts">
-  import { computed, onMounted, ref } from 'vue';
+  import { computed, onMounted, reactive, ref } from 'vue';
   import { useRoute, useRouter } from 'vue-router';
   import { ElMessage } from 'element-plus';
   import UploadFiles from '@/components/UploadFiles/UploadFiles.vue';
@@ -107,6 +106,7 @@
   import {
     queryAreaCheckPlanManageDeptDetail,
     queryAreaCheckRecordDept,
+    fetchDeptAreaCheckRecord,
     mapAreaCheckPlanApiRecordToUi,
     queryAreaCheckRecordTemplateDept,
     saveAreaCheckPlanDetailDept,
@@ -127,6 +127,8 @@
   const isViewMode = computed(() => operate.value === 'area-check-plan-record-view');
   const recordId = computed(() => Number(route.query.recordId));
   const planId = computed(() => Number(route.query.planId));
+  const checkType = computed(() => Number(route.query.checkType));
+  const areaPlanId = computed(() => Number(route.query.areaPlanId));
   const needOverallDesc = computed(() => route.query.needOverallDesc);
   const needSigneeSign = computed(() => route.query.needSigneeSign);
   const formRef = ref();
@@ -161,6 +163,7 @@
     checkStandard: string;
     checkResult: string;
     checkProblem: string;
+    id: number;
   }
 
   const checkItems = ref<CheckItem[]>([]);
@@ -211,7 +214,8 @@
       const uploadedFileList = await formatAttachmentList(signFileList.value);
 
       await saveAreaCheckPlanDetailDept({
-          areaPlanId: planId.value,
+          areaPlanId: checkItemData.areaPlanId || planId.value,
+          id: checkItemData.id, // 编辑时传记录ID,新增时后端自动生成无需传
           checkedCompanyName: formData.value.inspectedUnit,
           checkTime: formData.value.checkTime,
           checkPersonName: formData.value.inspector,
@@ -222,6 +226,7 @@
           areaCheckRecords: checkItems.value.map((item) => ({
           checkContent: item.checkContent || '',
           checkStandard: item.checkStandard || '',
+          id: item.id,
           // 新增检查日志时,检查结果和问题直接使用接口返回的数据
           checkResult: item.checkResult || '',
           checkProblem: item.checkProblem || '',
@@ -229,7 +234,7 @@
       });
       ElMessage.success('提交成功');
       router.back();
-    } catch (e) {
+    } catch (e:any) {
       console.error('新增检查日志提交失败:', e);
       ElMessage.error(e?.message || e?.data || '提交失败,请稍后重试');
     }
@@ -273,19 +278,28 @@
       checkItems.value = [];
     }
   };
-
-  const loadTemplateCheckItems = async () => {
-    // 使用部门模板接口获取“新增检查日志”的检查明细
+  interface CheckItemData {
+  areaPlanId: number;
+  id?: number;
+  [key: string]: unknown;
+  // 其他可能的字段...
+}
+  let checkItemData = reactive<CheckItemData>({
+    areaPlanId: 0
+})
+// 开始任务检查的检查明细列表
+  const loadCheckItems = async () => {
     if (!planId.value) {
       // 没有计划ID时,不展示任何检查明细
       checkItems.value = [];
       return;
     }
     try {
-      const res = await queryAreaCheckRecordTemplateDept(planId.value);
-      const list = ((res as { data?: AreaCheckRecordTemplateItem[] })?.data ?? res) || [];
+      const res = await fetchDeptAreaCheckRecord(planId.value);
+      const list = res.areaCheckRecords || [];
+      checkItemData = res
       if (Array.isArray(list) && list.length > 0) {
-        checkItems.value = list
+        checkItems.value = list;
       } else {
         // 模板为空时,不展示任何检查明细
         checkItems.value = [];
@@ -309,7 +323,7 @@
         signFile: '',
       };
       signFileList.value = [];
-      await loadTemplateCheckItems();
+      await loadCheckItems();
     } else {
       await loadRecordDetail();
     }
@@ -328,13 +342,18 @@
     try {
       const res = await queryAreaCheckPlanManageDeptDetail(currentId.value);
       viewDetailData.value = { ...res };
-      // 如果主责部门责任人ID包含当前登录人ID,则直接回填(被检查单位、 检查人员、检查时间、检查地点),且不可更改
-      let primaryResponsibleDeptPersonCode = res.primaryResponsibleDeptPersonCode?.split(',').map(Number)
-      if(primaryResponsibleDeptPersonCode?.includes(id)){
+      // 若是自查,则被检查单位默认就是本单位,不需要手动输入。
+      if(checkType.value === 1){
         authority.value = true
-        formData.value.inspectedUnit = res.primaryResponsibleDeptName || ''
-        formData.value.inspector = String(res.primaryResponsibleDeptPersonName) || ''
+        formData.value.inspectedUnit = res.responsibleDeptName || ''
       }
+      // 如果主责部门责任人ID包含当前登录人ID,则直接回填(被检查单位、 检查人员、检查时间、检查地点),且不可更改
+    //   let primaryResponsibleDeptPersonCode = res.primaryResponsibleDeptPersonCode?.split(',').map(Number)
+    //   if(primaryResponsibleDeptPersonCode?.includes(id)){
+    //     authority.value = true
+    //     formData.value.inspectedUnit = res.responsibleDeptName || ''
+    //     formData.value.inspector = String(res.primaryResponsibleDeptPersonName) || ''
+    //   }
     } catch (e) {
       console.error('获取详情失败:', e);
     }
@@ -393,4 +412,10 @@
       display: none;
     }
   }
+  :deep(.preview-img){
+    img{
+        max-width: 100%;
+        max-height: 80vh;
+    }
+  }
 </style>

+ 13 - 0
src/views/production-safety/hiddenTroubleInvestigationAndGovernance/areaCheckPlanManagementDept/configs/status.ts

@@ -13,3 +13,16 @@ export const AREA_CHECK_PLAN_STATUS_LABEL: Record<string, string> = {
   '2': '已完成',
   '3': '已作废',
 };
+
+export const STATUS_OPTIONS = [
+  { label: '全部', value: '' as const },
+  { label: '待检查', value: 1 },
+  { label: '已完成', value: 2 },
+  { label: '已作废', value: 3 },
+];
+
+export const STATUS_LABEL: Record<string, string> = {
+  '1': '待检查',
+  '2': '已完成',
+  '3': '已作废',
+};

+ 73 - 44
src/views/production-safety/hiddenTroubleInvestigationAndGovernance/areaCheckPlanTaskDept/areaCheckPlanTaskDept.vue

@@ -1,15 +1,11 @@
 <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">
       <div class="search-table-container">
         <header>
-          <!-- <div style="position: relative">
-            <el-button plain class="search-table-container--button" @click="handleImport"> 导入 </el-button>
-          </div> -->
-
           <div class="act-search">
             <section class="select-box">
               <div class="select-box--item">
@@ -65,10 +61,8 @@
             <template #status="scope">
               <span>{{ AREA_CHECK_PLAN_STATUS_LABEL[String(scope.row.status)] ?? '-' }}</span>
             </template>
-            <template #needOverallDesc="scope">
-              <span>{{
-               scope.row.status === 0 ? '-' : scope.row.needOverallDesc === true ? '是' : scope.row.needOverallDesc === false ? '否' : '-'
-              }}</span>
+            <template #frequency="scope">
+              <span>{{ FREQUENCY_TO_LABEL[scope.row.frequency] ?? '-' }}</span>
             </template>
             <template #sign="scope">
             <div class="file-list">
@@ -85,21 +79,24 @@
                   </div>
                 </div>
             </template>
-            <template #needSigneeSign="scope">
+            <template #checkItemTotal="scope">
               <span>{{
-                scope.row.status === 0 ? '-' : scope.row.needSigneeSign === true ? '是' : scope.row.needSigneeSign === false ? '否' : '-'
+                scope.row.checkItemTotal ? scope.row.checkItemTotal+'项' : '-'
               }}</span>
             </template>
-            <template #startDate="scope">
-              <span>{{ scope.row.startDate ?? '-' }}</span>
+            <template #qualifiedItemNum="scope">
+              <span>{{ scope.row.qualifiedItemNum ? scope.row.qualifiedItemNum+'项' : '-' }}</span>
             </template>
-            <template #endDate="scope">
-              <span>{{ scope.row.endDate ?? '-' }}</span>
+            <template #unqualifiedItemNum="scope">
+              <span>{{ scope.row.unqualifiedItemNum ? scope.row.unqualifiedItemNum+'项' : '-' }}</span>
             </template>
             <template #action="scope">
               <div class="action-container--div" style="justify-content: left">
-                <template v-if="Number(scope.row.status) === 0">
-                  <ActionButton text="查看" @click="handleView(scope.row.id)" />
+                 <template v-if="Number(scope.row.status) === 1">
+                  <ActionButton text="检查" @click="handleCheck(scope.row)" />
+                </template>
+                <template v-else>
+                  <ActionButton text="查看" @click="handleView(scope.row)" />
                 </template>
               </div>
             </template>
@@ -107,7 +104,7 @@
         </div>
       </div>
     </main>
-
+      <PreviewOnline ref="previewOnlineRef" />
   </div>
 </template>
 
@@ -124,13 +121,16 @@
     AREA_CHECK_PLAN_STATUS_OPTIONS,
     AREA_CHECK_PLAN_STATUS_LABEL,
   } from './configs/tables';
+  import { FREQUENCY_TO_LABEL } from './configs/form';
   import { useRouter } from 'vue-router';
   import type { QueryPageRequest } from '@/types/basic-query';
   import type { AreaCheckPlanQuery, AreaCheckPlanRecord } from './configs/types';
   import {
     queryAreaCheckPlanDetailPage,
+    queryAreaInspectionPlanTask,
     mapAreaCheckPlanApiRecordToUi,
     exportAreaCheckPlanAdministration,
+    exportRegionalInspectionPlanTaskDepartmentData,
   } from '@/api/production-safety-system';
   import { getAllDepartments } from '@/api/auth/dept';
   import type { DeptTree } from '@/types/dept/type';
@@ -141,8 +141,11 @@
   import urlJoin from 'url-join';
   import { downloadByData } from '@/utils/file/download';
   import { downloadFile } from '@/views/disaster/utils';
+  import PreviewOnline from '@/views/disaster/components/PreviewOnline.vue';
+import { useUserInfoHook } from '@/views/disaster/hooks';
+import { template } from 'lodash-es';
   const router = useRouter();
-
+  const { id } = useUserInfoHook();
   const basicTableRef = ref<InstanceType<typeof BasicTable>>();
   const { tableConfig, pagination } = useTableConfig(AREA_CHECK_PLAN_TABLE_COLUMNS, TABLE_OPTIONS);
   const tableData = ref<AreaCheckPlanRecord[]>([]);
@@ -151,10 +154,8 @@
   // 场所所属类别选项(示例数据,本页面不调用接口)
   const venueCategoryOptions = ref<Array<{ label: string; value: string }>>([]);
 
-
-
-
-
+    // 预览
+  const previewOnlineRef = ref<InstanceType<typeof PreviewOnline>>();
   const previewOnline = (url: string | undefined, type) => {
     if (url) {
       previewOnlineRef.value?.open(url, type);
@@ -162,20 +163,15 @@
   };
 
 
-
-
-
-
-
   const tableQuery = reactive<QueryPageRequest<AreaCheckPlanQuery>>({
     pageNumber: pagination.pageNumber,
     pageSize: pagination.pageSize,
     queryParam: {
       searchKey: '',
-      status: '' as AreaCheckPlanQuery['status'],
-      venueCategory: '',
       startDate: '',
       endDate: '',
+      status: '' as AreaCheckPlanQuery['status'],
+      userId: id // 当前登录人ID
     },
   });
 
@@ -190,19 +186,32 @@
     tableQuery.pageNumber = value;
     getTableData();
   };
+  // 判断是否有值, 如果有值就转换成JSON.parse
+  const safeJsonParse = (str) => {
+  // 判断是否有有效值
+  if (str === null || str === undefined || str.trim() === '') {
+    return [];
+  }
+
+  try {
+    return JSON.parse(str);
+  } catch (e) {
+    console.warn('JSON 解析失败:', e);
+    return [];
+  }
+}
 
   async function getTableData() {
     tableConfig.loading = true;
     try {
-      const res = await queryAreaCheckPlanDetailPage({
-        pageNumber: tableQuery.pageNumber,
-        pageSize: tableQuery.pageSize,
-        queryParam: tableQuery.queryParam,
-      });
-      const raw = (res as { data?: { records?: unknown[]; totalRow?: number } })?.data ?? res;
-      const list = raw?.records ?? [];
-      tableData.value = list.map((r: unknown) => mapAreaCheckPlanApiRecordToUi(r));
-      pagination.total = raw?.totalRow ?? 0;
+      const res = await queryAreaInspectionPlanTask(tableQuery);
+      const list = res?.records ?? [];
+      tableData.value = list.map(item=>{
+        // 附件转换格式
+          item.checkedPersonSign = safeJsonParse(item.checkedPersonSign);
+          return item;
+      })
+      pagination.total = res?.totalRow ?? 0;
     } catch (e) {
       console.error('查询区域检查计划列表失败:', e);
       tableData.value = [];
@@ -228,7 +237,6 @@
   const handleReset = () => {
     tableQuery.queryParam.searchKey = '';
     tableQuery.queryParam.status = '';
-    tableQuery.queryParam.venueCategory = '';
     tableQuery.queryParam.startDate = '';
     tableQuery.queryParam.endDate = '';
     dateRange.value = null;
@@ -237,19 +245,34 @@
 
 
 
-  const handleView = (id: number) => {
+  const handleView = (row) => {
     router.push({
-      name: 'areaCheckPlanTaskItem',
-      query: { id, operate: 'area-check-plan-view' },
+      name: 'areaCheckPlanTaskDeptItem',
+      query: { 
+        recordId: row.id, 
+        planId: row.areaPlanId,
+        checkType: row.checkType, 
+        operate: 'area-check-plan-view' 
+      },
     });
   };
 
+  const handleCheck = (row: any) => {
+    router.push({
+      name: 'areaCheckPlanTaskDeptItem',
+      query: { 
+        recordId: row.id,
+        planId: row.areaPlanId,
+        checkType: row.checkType, // 传递检查类型,后续根据检查类型区分检查项来源
+        operate: 'area-check-plan-create' },
+    });
+  };
 
 
 
   const handleDownload = async () => {
     try {
-      const response = await exportAreaCheckPlanAdministration(tableQuery.queryParam);
+      const response = await exportRegionalInspectionPlanTaskDepartmentData(tableQuery.queryParam);
       if (response) {
         const fileName = `区域检查计划任务_${new Date().toISOString().split('T')[0]}.xlsx`;
         downloadByData(response, fileName);
@@ -304,4 +327,10 @@
   @use '@/styles/page-main-layout.scss' as *;
   @use '@/styles/basic-table-action.scss' as *;
   @use '@/views/traffic/violation/style/act-search-table.scss' as *;
+  :deep(.preview-img){
+    img{
+        max-width: 100%;
+        max-height: 80vh;
+    }
+  }
 </style>

+ 66 - 27
src/views/production-safety/hiddenTroubleInvestigationAndGovernance/areaCheckPlanTaskDept/components/areaCheckPlanRecordDetail.vue

@@ -2,7 +2,7 @@
   <main class="safety-platform-container__main">
     <el-form ref="formRef" :model="formData" :rules="isViewMode ? undefined : formRules" label-width="180px" class="check-record-form">
       <el-form-item label="被检查单位:" prop="inspectedUnit">
-        <el-input v-model="formData.inspectedUnit" :disabled="!isAddMode" placeholder="请输入被检查单位" clearable />
+        <el-input v-model="formData.inspectedUnit" :disabled="!isAddMode || checkType===1" placeholder="请输入被检查单位" clearable />
       </el-form-item>
       <el-form-item label="检查人员:" prop="inspector">
         <el-input v-model="formData.inspector" :disabled="!isAddMode" placeholder="请输入检查人员" clearable />
@@ -22,7 +22,7 @@
       <el-form-item label="检查地点:" prop="checkPlace">
         <el-input v-model="formData.checkPlace" :disabled="!isAddMode" placeholder="请输入检查地点" clearable />
       </el-form-item>
-      <el-form-item v-if="needOverallDesc === '1'" label="整体检查情况描述:" prop="overallDesc" :required="needOverallDesc === '1' && isAddMode">
+      <el-form-item v-if="viewDetailData.needOverallDesc === 1" label="整体检查情况描述:" prop="overallDesc" :required="viewDetailData.needOverallDesc === 1 && isAddMode">
         <el-input
           v-model="formData.overallDesc"
           type="textarea"
@@ -33,11 +33,10 @@
           :placeholder="isAddMode ? '请输入整体检查情况描述(限300字)' : '整体检查情况描述(限300字)'"
         />
       </el-form-item>
-      <el-form-item v-if="needSigneeSign === '1'" label="被检查人签字文件:" prop="signFile" :required="needSigneeSign === '1' && isAddMode">
+      <el-form-item v-if="viewDetailData.needSigneeSign === 1" label="被检查人签字文件:" prop="signFile" :required="viewDetailData.needSigneeSign === 1 && isAddMode">
         <UploadFiles
           v-if="!isViewMode"
           label="上传文件"
-          :maxCount="1"
           :file-list="signFileList"
           :disabled="isViewMode"
           :allow-all-file-types="true"
@@ -99,7 +98,7 @@
 </template>
 
 <script setup lang="ts">
-  import { computed, onMounted, ref } from 'vue';
+  import { computed, onMounted, reactive, ref } from 'vue';
   import { useRoute, useRouter } from 'vue-router';
   import { ElMessage } from 'element-plus';
   import UploadFiles from '@/components/UploadFiles/UploadFiles.vue';
@@ -107,6 +106,7 @@
   import {
     queryAreaCheckPlanManageDeptDetail,
     queryAreaCheckRecordDept,
+    fetchDeptAreaCheckRecord,
     mapAreaCheckPlanApiRecordToUi,
     queryAreaCheckRecordTemplateDept,
     saveAreaCheckPlanDetailDept,
@@ -123,12 +123,15 @@
   const { id } = useUserInfoHook()
 
   const operate = computed(() => (route.query.operate as string) || '');
-  const isAddMode = computed(() => operate.value === 'area-check-plan-record-add');
-  const isViewMode = computed(() => operate.value === 'area-check-plan-record-view');
+  const isAddMode = computed(() => operate.value === 'area-check-plan-create');
+  const isViewMode = computed(() => operate.value === 'area-check-plan-view');
   const recordId = computed(() => Number(route.query.recordId));
   const planId = computed(() => Number(route.query.planId));
-  const needOverallDesc = computed(() => route.query.needOverallDesc);
-  const needSigneeSign = computed(() => route.query.needSigneeSign);
+  const checkType = computed(() => Number(route.query.checkType));
+  const areaPlanId = computed(() => Number(route.query.areaPlanId));
+//   const needOverallDesc = computed(() => route.query.needOverallDesc);
+//   const needSigneeSign = computed(() => route.query.needSigneeSign);
+  const viewDetailData = ref<Record<string, unknown>>({});
   const formRef = ref();
   const formData = ref({
     inspectedUnit: '',
@@ -145,12 +148,12 @@
     checkTime: [{ required: true, message: '请选择检查时间', trigger: 'change' }],
     checkPlace: [{ required: true, message: '请输入检查地点', trigger: 'blur' }],
     overallDesc: [{ 
-      required: needOverallDesc.value === '1', 
+      required: viewDetailData.value.needOverallDesc === 1, 
       message: '请输入整体检查情况描述', 
       trigger: 'blur' 
     }],
     signFile: [{ 
-      required: needSigneeSign.value === '1', 
+      required: viewDetailData.value.needSigneeSign === 1, 
       message: '请上传被检查人签字文件', 
       trigger: 'change' 
     }],
@@ -161,6 +164,7 @@
     checkStandard: string;
     checkResult: string;
     checkProblem: string;
+    id: number;
   }
 
   const checkItems = ref<CheckItem[]>([]);
@@ -211,7 +215,8 @@
       const uploadedFileList = await formatAttachmentList(signFileList.value);
 
       await saveAreaCheckPlanDetailDept({
-          areaPlanId: planId.value,
+          areaPlanId: checkItemData.areaPlanId || planId.value,
+          id: checkItemData.id, // 编辑时传记录ID,新增时后端自动生成无需传
           checkedCompanyName: formData.value.inspectedUnit,
           checkTime: formData.value.checkTime,
           checkPersonName: formData.value.inspector,
@@ -222,6 +227,7 @@
           areaCheckRecords: checkItems.value.map((item) => ({
           checkContent: item.checkContent || '',
           checkStandard: item.checkStandard || '',
+          id: item.id,
           // 新增检查日志时,检查结果和问题直接使用接口返回的数据
           checkResult: item.checkResult || '',
           checkProblem: item.checkProblem || '',
@@ -229,12 +235,25 @@
       });
       ElMessage.success('提交成功');
       router.back();
-    } catch (e) {
+    } catch (e:any) {
       console.error('新增检查日志提交失败:', e);
       ElMessage.error(e?.message || e?.data || '提交失败,请稍后重试');
     }
   };
+  // 判断是否有值, 如果有值就转换成JSON.parse
+  const safeJsonParse = (str) => {
+  // 判断是否有有效值
+  if (str === null || str === undefined || str.trim() === '') {
+    return [];
+  }
 
+  try {
+    return JSON.parse(str);
+  } catch (e) {
+    console.warn('JSON 解析失败:', e);
+    return [];
+  }
+}
   const loadRecordDetail = async () => {
     if (recordId.value) {
       try {
@@ -249,7 +268,7 @@
           overallDesc: String(r?.overallCheckDesc ?? ''),
           signFile: JSON.stringify(convertSignFileToFileItems(String(r?.checkedPersonSign ?? ''))),
         };
-        signFileList.value = JSON.parse(r.checkedPersonSign || '[]');
+        signFileList.value = safeJsonParse(r?.checkedPersonSign);
         const records = (r?.areaCheckRecords ?? []) as Array<Record<string, unknown>>;
         checkItems.value = records.map((item) => ({
           checkContent: (item.checkContent ?? '') as string,
@@ -273,19 +292,28 @@
       checkItems.value = [];
     }
   };
-
-  const loadTemplateCheckItems = async () => {
-    // 使用部门模板接口获取“新增检查日志”的检查明细
+  interface CheckItemData {
+  areaPlanId: number;
+  id?: number;
+  [key: string]: unknown;
+  // 其他可能的字段...
+}
+  let checkItemData = reactive<CheckItemData>({
+    areaPlanId: 0
+})
+// 开始任务检查的检查明细列表
+  const loadCheckItems = async () => {
     if (!planId.value) {
       // 没有计划ID时,不展示任何检查明细
       checkItems.value = [];
       return;
     }
     try {
-      const res = await queryAreaCheckRecordTemplateDept(planId.value);
-      const list = ((res as { data?: AreaCheckRecordTemplateItem[] })?.data ?? res) || [];
+      const res = await fetchDeptAreaCheckRecord(planId.value);
+      const list = res.areaCheckRecords || [];
+      checkItemData = res
       if (Array.isArray(list) && list.length > 0) {
-        checkItems.value = list
+        checkItems.value = list;
       } else {
         // 模板为空时,不展示任何检查明细
         checkItems.value = [];
@@ -309,7 +337,7 @@
         signFile: '',
       };
       signFileList.value = [];
-      await loadTemplateCheckItems();
+      await loadCheckItems();
     } else {
       await loadRecordDetail();
     }
@@ -320,7 +348,7 @@
       previewOnlineRef.value?.open(url, type);
     }
   };
-  const viewDetailData = ref<Record<string, unknown>>({});
+
   const authority = ref(false)
   const currentId = computed(() => Number(route.query.planId));
   const getDetail = async () => {
@@ -328,13 +356,18 @@
     try {
       const res = await queryAreaCheckPlanManageDeptDetail(currentId.value);
       viewDetailData.value = { ...res };
-      // 如果主责部门责任人ID包含当前登录人ID,则直接回填(被检查单位、 检查人员、检查时间、检查地点),且不可更改
-      let primaryResponsibleDeptPersonCode = res.primaryResponsibleDeptPersonCode?.split(',').map(Number)
-      if(primaryResponsibleDeptPersonCode?.includes(id)){
+      // 若是自查,则被检查单位默认就是本单位,不需要手动输入。
+      if(checkType.value === 1){
         authority.value = true
-        formData.value.inspectedUnit = res.primaryResponsibleDeptName || ''
-        formData.value.inspector = String(res.primaryResponsibleDeptPersonName) || ''
+        formData.value.inspectedUnit = res.responsibleDeptName || ''
       }
+      // 如果主责部门责任人ID包含当前登录人ID,则直接回填(被检查单位、 检查人员、检查时间、检查地点),且不可更改
+    //   let primaryResponsibleDeptPersonCode = res.primaryResponsibleDeptPersonCode?.split(',').map(Number)
+    //   if(primaryResponsibleDeptPersonCode?.includes(id)){
+    //     authority.value = true
+    //     formData.value.inspectedUnit = res.responsibleDeptName || ''
+    //     formData.value.inspector = String(res.primaryResponsibleDeptPersonName) || ''
+    //   }
     } catch (e) {
       console.error('获取详情失败:', e);
     }
@@ -393,4 +426,10 @@
       display: none;
     }
   }
+  :deep(.preview-img){
+    img{
+        max-width: 100%;
+        max-height: 80vh;
+    }
+  }
 </style>

+ 9 - 0
src/views/production-safety/hiddenTroubleInvestigationAndGovernance/areaCheckPlanTaskDept/configs/form.ts

@@ -10,6 +10,15 @@ export const CHECK_FREQUENCY_OPTIONS = [
   { label: '每年', value: '每年' },
 ];
 
+/** 检查频次映射:0=每日 1=每周 2=每月 3=每季度 4=每半年 5=每年 */
+export const FREQUENCY_TO_LABEL: Record<number, string> = {
+  0: '每日',
+  1: '每周',
+  2: '每月',
+  3: '每季度',
+  4: '每半年',
+  5: '每年',
+};
 /** 检查单模版类别选项(单选):1-安全管理检查单 2-关键业务活动专项检查单 3-日常安全检查单 */
 export const CHECKLIST_CATEGORY_OPTIONS = [
   { label: '安全管理检查单', value: '安全管理检查单' },

+ 2 - 5
src/views/production-safety/hiddenTroubleInvestigationAndGovernance/areaCheckPlanTaskDept/configs/status.ts

@@ -1,15 +1,12 @@
-// 区域检查计划状态配置(管理员与部门一致):0=未下发 1=进行中 2=已完成 3=已作废
 export const AREA_CHECK_PLAN_STATUS_OPTIONS = [
   { label: '全部', value: '' as const },
-//   { label: '未下发', value: 0 },
-  { label: '进行中', value: 1 },
+  { label: '待检查', value: 1 },
   { label: '已完成', value: 2 },
   { label: '已作废', value: 3 },
 ];
 
 export const AREA_CHECK_PLAN_STATUS_LABEL: Record<string, string> = {
-  '0': '未下发',
-  '1': '进行中',
+  '1': '待检查',
   '2': '已完成',
   '3': '已作废',
 };

+ 28 - 23
src/views/production-safety/hiddenTroubleInvestigationAndGovernance/areaCheckPlanTaskDept/configs/tables.ts

@@ -20,85 +20,90 @@ export const AREA_CHECK_PLAN_TABLE_COLUMNS: TableColumnProps[] = [
   {
     label: '完成(检查)时间',
     prop: 'checkTime',
-    align: 'left',
+    align: 'center',
     minWidth: '180px',
     showOverflowTooltip: true,
   },
   {
     label: '状态',
-    prop: 'checkVenue',
-    align: 'left',
+    prop: 'status',
+    slot: 'status',
+    align: 'center',
     minWidth: '120px',
     showOverflowTooltip: true,
   },
   {
     label: '检查人员',
-    prop: 'checkPerson',
-    align: 'left',
+    prop: 'checkPersonName',
+    align: 'center',
     minWidth: '120px',
     showOverflowTooltip: true,
   },
-  {
-    label: '检查场所类别',
-    prop: 'checkPlaceCategory',
-    align: 'left',
-    minWidth: '160px',
-    showOverflowTooltip: true,
-  },
+//   {
+//     label: '检查场所类别',
+//     prop: 'checkPlaceCategory',
+//     align: 'center',
+//     minWidth: '160px',
+//     showOverflowTooltip: true,
+//   },
   {
     label: '检查场所',
     prop: 'checkPlace',
-    align: 'left',
+    align: 'center',
     minWidth: '120px',
     showOverflowTooltip: true,
   },
   {
     label: '检查频次',
-    prop: 'planName',
-    align: 'left',
+    prop: 'frequency',
+    slot: 'frequency',
+    align: 'center',
     minWidth: '120px',
     showOverflowTooltip: true,
   },
   {
     label: '检查重点内容',
-    prop: 'primaryResponsibleDeptName',
-    slot: 'primaryResponsibleDeptName',
-    align: 'left',
+    prop: 'checkKeyContent',
+    align: 'center',
     width: '200px',
     showOverflowTooltip: true,
   },
   {
     label: '整体检查情况描述',
     prop: 'overallCheckDesc',
-    align: 'left',
+    align: 'center',
     minWidth: '200px',
     showOverflowTooltip: true,
   },
   {
     label: '被检查人签字',
     prop: 'sign',
-    align: 'left',
+    slot:'sign',
+    align: 'center',
     minWidth: '140px',
     showOverflowTooltip: true,
   },
   {
     label: '检查项总数',
     prop: 'checkItemTotal',
-    align: 'left',
+    slot: 'checkItemTotal',
+    align: 'center',
     minWidth: '160px',
     showOverflowTooltip: true,
   },
   {
     label: '合格项数',
     prop: 'qualifiedItemNum',
-    align: 'left',
+    slot: 'qualifiedItemNum',
+    align: 'center',
     minWidth: '160px',
     showOverflowTooltip: true,
   },
   {
     label: '不合格项数',
     prop: 'unqualifiedItemNum',
-    align: 'left',
+    slot: 'unqualifiedItemNum',
+    align: 'center',
     minWidth: '160px',
     showOverflowTooltip: true,
   },

+ 6 - 5
src/views/production-safety/hiddenTroubleInvestigationAndGovernance/areaCheckPlanTaskDept/configs/types.ts

@@ -43,9 +43,10 @@ export interface AreaCheckPlanRecord {
 }
 
 export interface AreaCheckPlanQuery {
-  keyword?: string;
+  searchKey?: string;
   status?: AreaCheckPlanStatus | '';
-  venueCategory?: string;
-  planStartTime?: string;
-  planEndTime?: string;
-}
+  startDate?: string;
+  endDate?: string;
+  userId?: number; // 当前登录人ID
+  [key: string]: unknown;
+}