From eb0a11ecf1f876518779cf8bd3f368ed2fa13293 Mon Sep 17 00:00:00 2001
From: spring <2396852758@qq.com>
Date: 星期一, 03 三月 2025 16:38:06 +0800
Subject: [PATCH] Merge branch 'dev' of http://114.132.189.42:9002/r/lims-ruoyi-before into dev

---
 src/views/business/productOrder/index.vue |   30 ++++++++++--------------------
 1 files changed, 10 insertions(+), 20 deletions(-)

diff --git a/src/views/business/productOrder/index.vue b/src/views/business/productOrder/index.vue
index 757f49d..8fd2812 100644
--- a/src/views/business/productOrder/index.vue
+++ b/src/views/business/productOrder/index.vue
@@ -64,7 +64,7 @@
     <div class="table">
       <lims-table :tableData="tableData" :column="column"
                   :isSelection="true" :handleSelectionChange="selectMethod"
-                  @pagination="pagination" :height="'calc(100vh - 280px)'" key="tableData"
+                  @pagination="pagination" :height="'calc(100vh - 280px)'" :key="upIndex"
                   :page="page" :tableLoading="tableLoading"></lims-table>
     </div>
     <div>
@@ -329,6 +329,7 @@
         orderType: '',
         state: '',
       },
+      upIndex: 0,
       tableData: [],
       tableLoading: false,
       column: [
@@ -753,6 +754,7 @@
       const params = {...this.entity, state: this.tabList[this.tabIndex].value}
       this.tableLoading = true
       selectInsOrderParameter(params).then(res => {
+        this.upIndex++
         this.tableLoading = false
         if (res.code === 200) {
           this.tableData = res.data.records
@@ -865,14 +867,10 @@
     },
     // 瀵煎嚭璁板綍
     downLoad () {
-      rawAllInsOrderExport({...this.entity, responseType: "blob"}).then(res => {
+      rawAllInsOrderExport({...this.entity}).then(res => {
         this.$message.success('瀵煎嚭鎴愬姛')
-        const blob = new Blob([res],{ type: 'application/octet-stream' });
-        const url = URL.createObjectURL(blob);
-        const link = document.createElement('a');
-        link.href = url;
-        link.download = '濮旀墭妫�娴嬩俊鎭鍑�' + '.xlsx';
-        link.click();
+        let url = this.javaApi + '/word/' + res.data
+        this.$download.saveAs(url, '濮旀墭妫�娴嬩俊鎭鍑�.xlsx');
       }).catch(err => {
         console.log('err---', err);
       })
@@ -984,13 +982,10 @@
           let url = '';
           if(res.data.type==1){
             url = this.javaApi+'/img/'+res.data.fileUrl
-            file.downloadIamge(url,row.fileName)
+            this.$download.saveAs(url, row.fileName);
           }else{
             url = this.javaApi+'/word/'+res.data.fileUrl
-            const link = document.createElement('a');
-            link.href = url;
-            link.download = row.fileName;
-            link.click();
+            this.$download.saveAs(url, row.fileName);
           }
         }
       }).catch(error => {
@@ -999,14 +994,9 @@
     },
     // 涓嬭浇鎶ュ憡
     download(row) {
-      let url = row.urlS?row.urlS:row.url;
+      let url = this.javaApi+'/word/' + row.urlS?row.urlS:row.url;
       if(url){
-        url = url.split('.')[0]+'.pdf'
-        const link = document.createElement('a');
-        link.href = this.javaApi + url;
-        link.target = '_blank';
-        document.body.appendChild(link);
-        link.click();
+        this.$download.saveAs(url, this.downLoadInfo.fileName);
       }
     },
     // 鎾ら攢

--
Gitblit v1.9.3