Просмотр исходного кода

fix: 区域检查详细导出更新

xiaweibo 1 месяц назад
Родитель
Сommit
b82aa26839

+ 3 - 4
src/api/production-safety-system/index.ts

@@ -1526,12 +1526,11 @@ export function exportAreaCheckPlanList (params: AreaCheckPlanQuery) {
  * 导出区域检查计划清单
  * @returns Promise<any> 导出的区域检查计划清单数据
  */
-export function exportAreaCheckInspectionRecord (params: AreaCheckPlanQuery) {
+export function exportAreaCheckInspectionRecord (id:number) {
   return http.request({
-    url: '/areaCheckPlanManageDept/exportAreaCheckPlanDetail',
-    method: 'post',
+    url: '/areaCheckPlanManageDept/exportAreaCheckRecord?id=' + id,
+    method: 'get',
     responseType: 'blob',
-    data: params,
   }, {
     isTransformResponse: false,
   });

+ 1 - 9
src/views/production-safety/hiddenTroubleInvestigationAndGovernance/areaCheckPlanManagementDept/components/areaCheckPlanManagementDeptDetail.vue

@@ -674,15 +674,7 @@
   };
   const onRecordExport = async () => {
     try {
-      const [start, end] = recordDateRange.value && recordDateRange.value.length === 2
-        ? recordDateRange.value
-        : ['', ''];
-      const queryParam = {
-          searchKey: recordSearchKeyword.value || undefined,
-          startDate: start || undefined,
-          endDate: end || undefined,
-      };
-      const response = await exportAreaCheckInspectionRecord(queryParam);
+      const response = await exportAreaCheckInspectionRecord(currentId.value);
       if (response) {
         const fileName = `检查记录_${new Date().toISOString().split('T')[0]}.xlsx`;
         downloadByData(response, fileName);