From d2a06b827fdcf4b274c503c25b3c21fd727ccbbc Mon Sep 17 00:00:00 2001
From: gaoluyang <2820782392@qq.com>
Date: 星期五, 07 三月 2025 10:18:45 +0800
Subject: [PATCH] 文件下载全局修改

---
 src/views/CNAS/systemManagement/documentRecords/regularReviewsRecord.vue |  120 +----------------------------------------------------------
 1 files changed, 3 insertions(+), 117 deletions(-)

diff --git a/src/views/CNAS/systemManagement/documentRecords/regularReviewsRecord.vue b/src/views/CNAS/systemManagement/documentRecords/regularReviewsRecord.vue
index 7c738f8..a2195e4 100644
--- a/src/views/CNAS/systemManagement/documentRecords/regularReviewsRecord.vue
+++ b/src/views/CNAS/systemManagement/documentRecords/regularReviewsRecord.vue
@@ -31,9 +31,6 @@
         <div class="table">
           <lims-table :tableData="tableData" :column="column" :page="page" :tableLoading="tableLoading"
             :height="'calc(100vh - 290px)'" @pagination="pagination"></lims-table>
-          <!-- <ValueTable ref="ValueTable" :url="$api.manageRecordIntervals.pageManageRecordIntervals"
-            :delUrl="$api.manageRecordIntervals.delManageRecordIntervals" :componentData="componentData"
-            :upUrl="$api.manageRecordIssueRecycle.doManageRecordIssueRecycle" :key="upIndex" /> -->
         </div>
       </el-tab-pane>
       <el-tab-pane label="鍘嗗彶璁板綍" name="鍘嗗彶璁板綍" style="height: 100%;">
@@ -54,8 +51,6 @@
         <div class="table">
           <lims-table :tableData="tableData0" :column="column0" :page="page0" :tableLoading="tableLoading"
             :height="'calc(100vh - 290px)'" @pagination="pagination0"></lims-table>
-          <!-- <ValueTable ref="ValueTable0" :url="$api.manageRecordIntervals.pageManageRecordIntervalsTotal"
-            :componentData="componentData0" :key="upIndex" /> -->
         </div>
       </el-tab-pane>
     </el-tabs>
@@ -134,7 +129,6 @@
 <script>
 import limsTable from "@/components/Table/lims-table.vue";
 import filePreview from '@/components/Preview/filePreview.vue'
-import { getToken } from "@/utils/auth";
 import {
   exportOutManageRecordIntervals,
   addManageRecordIntervals,
@@ -165,110 +159,6 @@
       lookDialogVisible: false,
       noCheckLoading: false,
       checkLoading: false,
-      componentData: {
-        entity: {
-          documentName: null,
-          documentCode: null,
-          orderBy: {
-            field: 'id',
-            order: 'desc'
-          }
-        },
-        isIndex: true,
-        showSelect: false,
-        select: false,
-        // selectMethod: 'handleChangeTask',
-        do: [{
-          id: 'handleEdit',
-          font: '淇敼',
-          type: 'text',
-          method: 'handleEdit',
-          field: [],
-        }, {
-          id: 'delete',
-          font: '鍒犻櫎',
-          type: 'text',
-          method: 'doDiy',
-        }],
-        tagField: {
-          // documentType:{
-          //   select: []
-          // },
-          // receiveUserName:{
-          //   select: []
-          // },
-        },
-        selectField: {
-          // documentType:{
-          //   select: []
-          // },
-          // receiveUserName:{
-          //   select: []
-          // },
-        },
-        addUpload: ['signatoryUrl'],
-        requiredAdd: [],
-        requiredUp: [],
-        datePicker: ['receiveDate'],
-        noHead: ['signedUserName', 'signedDate', 'departLims'],//涓嶅弬涓庢柊澧炵紪杈戠殑瀛楁
-        needSort: [],
-        inputType: ''
-      },
-      componentData0: {
-        entity: {
-          year: null,
-          orderBy: {
-            field: 'id',
-            order: 'desc'
-          }
-        },
-        isIndex: true,
-        showSelect: false,
-        select: false,
-        do: [{
-          id: 'handleLook',
-          font: '鏌ョ湅',
-          type: 'text',
-          method: 'handleLook',
-          disabFun: (row, index) => {
-            return !row.url
-          }
-        }, {
-          id: 'handleDown0',
-          font: '涓嬭浇',
-          type: 'text',
-          method: 'handleDown0',
-          disabFun: (row, index) => {
-            return !row.url
-          }
-        },
-        {
-          id: 'handleSubmit',
-          font: '鎻愪氦',
-          type: 'text',
-          method: 'handleSubmit',
-          disabFun: (row, index) => {
-            return !!row.submitUserName
-          }
-        }, {
-          id: 'handleApproval',
-          font: '鎵瑰噯',
-          type: 'text',
-          method: 'handleApproval',
-          disabFun: (row, index) => {
-            return !row.submitUserName || !!row.ratifyUserName
-          }
-        }],
-        tagField: {},
-        selectField: {},
-        requiredAdd: [],
-        requiredUp: [],
-        needSort: [],
-        inputType: ''
-      },
-      entityCopy: {},
-      entityCopy0: {},
-      upIndex: 0,
       addInfo: {},
       title: '鏂板',
       addInfo: {},
@@ -455,10 +345,7 @@
       this.outLoading = true
       exportOutManageRecordIntervals(this.queryParams).then(res => {
         this.outLoading = false
-        if (res.code == 201) return this.$message.error('瀵煎嚭澶辫触')
-        this.$message.success('瀵煎嚭鎴愬姛')
-        let url = this.javaApi + 'word/' + res.message
-        this.$download.saveAs(url, "鏂囦欢瀹氭湡瀹℃煡璁板綍");
+        this.$download.downloadFileFromUrl(res.message, "鏂囦欢瀹氭湡瀹℃煡璁板綍");
       })
     },
     getList() {
@@ -541,7 +428,7 @@
       this.upLoading = false;
       if (response.code == 200) {
         this.$message.success('涓婁紶鎴愬姛');
-        this.refreshTable()()
+        this.refreshTable()
       } else {
         this.$message.error('涓婁紶澶辫触');
       }
@@ -654,8 +541,7 @@
       }
     },
     handleDown0(row) {
-      let url = this.javaApi + '/word/' + row.url
-      this.$download.saveAs(url, "鎵�鏈夋枃浠跺畾鏈熸鏌ヨ褰�");
+      this.$download.downloadFileFromUrl(row.url, "鎵�鏈夋枃浠跺畾鏈熸鏌ヨ褰�");
     },
     // 鎻愪氦
     handleSubmit(row) {

--
Gitblit v1.9.3