Sfoglia il codice sorgente

fix: 修改安全体系建设工作计划管理发送对象作废接口

xiaweibo 1 mese fa
parent
commit
29c2e372b9

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

@@ -663,6 +663,7 @@ interface ChecklistTemplatePageRes {
   total: number;
   totalPage: number;
   records: ChecklistTemplatePageItem[];
+  totalRow: number;
 }
 
 /** 检查单模版实体(用于名称下拉等场景,后端返回 WebResult<List<ChecklistTemplate>>) */

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

@@ -212,6 +212,13 @@ export function cancelWorkPlan(id: number) {
   });
 }
 
+export function newCancelWorkPlan(id: number) {
+  return http.request<number | void>({
+    url: `/safetyWorkPlan/workPlanSendObj/invalid?id=${id}`,
+    method: 'post',
+  });
+}
+
 /**
  * @description: 查看发送对象列表
  */

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

@@ -155,7 +155,7 @@
           updateUserName: item.updateUserName,
           updatedAt: (item as any).updatedAt,
         }));
-        pagination.total = res.total ?? 0;
+        pagination.total = res.totalRow ?? 0;
       }
     } catch (e) {
       console.error('获取检查单模版列表失败:', e);

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

@@ -122,7 +122,7 @@ import BreadcrumbBack from '@/components/BreadcrumbBack.vue';
   import {
     queryViewSender,
     deleteWorkPlanDept,
-    cancelWorkPlan,
+    newCancelWorkPlan,
     queryWorkPlanDetail,
     type SaveWorkPlanRequest,
   } from '@/api/safety-system-construction-work-plan';
@@ -287,7 +287,7 @@ import BreadcrumbBack from '@/components/BreadcrumbBack.vue';
   // 作废
   const handleViewInvalid = async (id: number) => {
     try {
-      await cancelWorkPlan(id);
+      await newCancelWorkPlan(id);
       ElMessage.success('作废成功');
       getTableData();
     } catch (e) {