From 8fd9e43b8ae22e64c62afee56c24df682f8c47c9 Mon Sep 17 00:00:00 2001 From: zhuo <2089219845@qq.com> Date: 星期日, 16 三月 2025 15:57:54 +0800 Subject: [PATCH] 成品下单下载为pdf --- src/InspectionWorker.worker.js | 1 - src/components/Excel/luckysheet.vue | 2 -- src/views/business/productOrder/index.vue | 9 +++++++-- src/components/Preview/filePreview.vue | 1 - 4 files changed, 7 insertions(+), 6 deletions(-) diff --git a/src/InspectionWorker.worker.js b/src/InspectionWorker.worker.js index 9f6d11c..59ac692 100644 --- a/src/InspectionWorker.worker.js +++ b/src/InspectionWorker.worker.js @@ -30,7 +30,6 @@ let currentInsItem = null; // 鎺ユ敹鍒颁富绾跨▼澶勭悊閫昏緫鐨勬秷鎭� self.onmessage = function (event) { - console.log(2222, event); // 淇濆瓨涓荤嚎绋嬩紶杩囨潵鐨勫�� const data = JSON.parse(event.data); if (currentTable != data.currentTable) { diff --git a/src/components/Excel/luckysheet.vue b/src/components/Excel/luckysheet.vue index c8bded9..a955096 100644 --- a/src/components/Excel/luckysheet.vue +++ b/src/components/Excel/luckysheet.vue @@ -69,10 +69,8 @@ methods: { templateWrite() { var option = {}; - console.log(2222, this.data); if (this.data != null && this.data != "") { option = JSON.parse(this.data); - console.log(11111, option); } else { let rowlen = {}; let columnlen = {}; diff --git a/src/components/Preview/filePreview.vue b/src/components/Preview/filePreview.vue index 8588bc6..7633c5e 100644 --- a/src/components/Preview/filePreview.vue +++ b/src/components/Preview/filePreview.vue @@ -96,7 +96,6 @@ if (state) { this.imgUrl = this.fileUrl.replaceAll('word', 'img') } - console.log(11111, this.imgUrl) return state; }, isPdf() { diff --git a/src/views/business/productOrder/index.vue b/src/views/business/productOrder/index.vue index 5bcd383..5ca78c6 100644 --- a/src/views/business/productOrder/index.vue +++ b/src/views/business/productOrder/index.vue @@ -1004,8 +1004,13 @@ // 涓嬭浇鎶ュ憡 download(row) { let url = row.urlS ? row.urlS : row.url; - if (url) { - this.$download.saveAs(url, row.entrustCode); + 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(); } }, // 鎾ら攢 -- Gitblit v1.9.3