Bläddra i källkod

fix: 修改参数信息,修复时间问题

xiaweibo 1 månad sedan
förälder
incheckning
2d7254be88

+ 2 - 1
src/api/production-safety/responsibility-implementation/index.ts

@@ -976,11 +976,12 @@ export function dangerWorkSaveApproval(params) {
  * 导出风险清单
  * @returns Promise<any> 导出的风险清单数据
  */
-export function exportRiskList () {
+export function exportRiskList (queryParam) {
   return http.request({
     url: '/safetyRisk/list/exportRiskList',
     method: 'post',
     responseType: 'blob',
+    data: queryParam,
   }, {
     isTransformResponse: false,
   });

+ 3 - 3
src/views/production-safety/hiddenTroubleInvestigationAndGovernance/hiddenTroubleCategoryManagement/hiddenTroubleCategoryManagement.vue

@@ -13,9 +13,6 @@
             <el-button plain class="search-table-container--button" @click="handleImport">
               导入
             </el-button>
-            <el-button plain class="search-table-container--button" @click="handleDownload">
-              导出
-            </el-button>
           </div>
 
           <div class="act-search">
@@ -54,6 +51,9 @@
             <section class="search-btn">
               <el-button type="primary" @click="handleSearch">查询</el-button>
               <el-button @click="handleReset">重置</el-button>
+              <el-button plain @click="handleDownload">
+                导出
+              </el-button>
             </section>
           </div>
         </header>

+ 3 - 2
src/views/production-safety/productionSafetySystem/collegeFileManagement/components/collegeFileManagementDetail.vue

@@ -29,9 +29,9 @@
               <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 link type="primary" @click.stop="downloadFile(file.fileUrl, file.fileName)"
                 >下载</el-button
-              > -->
+              >
             </div>
           </div>
         </div>
@@ -89,6 +89,7 @@
   import type { FileItem } from '@/components/UploadFiles/types';
   import { formatAttachmentList } from '@/components/UploadFiles/utils';
   import PreviewOnline from '@/views/disaster/components/PreviewOnline.vue';
+  import { downloadFile } from '@/views/disaster/utils';
 
   const router = useRouter();
   const route = useRoute();

+ 7 - 2
src/views/production-safety/productionSafetySystem/safetyOrganizationSystemManagement/safetyOrganizationSystemManagement.vue

@@ -369,8 +369,13 @@ const position = ref('left')
   };
   // 时间查询
   const onchangeDateRange = () => {
-    tableQuery.queryParam.startTime = dateRange.value[0];
-    tableQuery.queryParam.endTime = dateRange.value[1];
+    if (dateRange.value && Array.isArray(dateRange.value) && dateRange.value.length === 2) {
+      tableQuery.queryParam.startTime = dateRange.value[0] || '';
+      tableQuery.queryParam.endTime = dateRange.value[1] || '';
+    } else {
+      tableQuery.queryParam.startTime = '';
+      tableQuery.queryParam.endTime = '';
+    }
     getTableData();
   };
   const handleSearch = () => {

+ 1 - 1
src/views/production-safety/risk-identification-and-control/risk-manage/list.vue

@@ -296,7 +296,7 @@
 
   const handleDownload = async () => {
     try {
-      const response = await exportRiskList();
+      const response = await exportRiskList(queryParams.queryParam);
       if (response) {
         const fileName = `风险清单管理_${new Date().toISOString().split('T')[0]}.xlsx`;
         downloadByData(response, fileName);