From c34fe6f588045e527bccfd4c67b9764b2a141ea2 Mon Sep 17 00:00:00 2001 From: chenrui <1187576398@qq.com> Date: 星期三, 26 二月 2025 15:24:41 +0800 Subject: [PATCH] 设施和环境条件代码迁移 --- src/views/business/productOrder/index.vue | 57 +++++++++++++++++++++++++-------------------------------- 1 files changed, 25 insertions(+), 32 deletions(-) diff --git a/src/views/business/productOrder/index.vue b/src/views/business/productOrder/index.vue index ad315e7..135973f 100644 --- a/src/views/business/productOrder/index.vue +++ b/src/views/business/productOrder/index.vue @@ -376,7 +376,7 @@ } else if (params == 3) { return '涓嶅垽瀹�' } else { - return '' + return null } }, formatType: (params) => { @@ -387,7 +387,7 @@ } else if (params == 3) { return '' } else { - return '' + return null } } }, @@ -499,6 +499,16 @@ }, showHide: (row) => { return this.tabIndex === 4 || this.tabIndex === 5 + } + }, + { + name: '鍘熷璁板綍', + type: 'text', + clickFun: (row) => { + this.viewInspectInfo(row); + }, + showHide: (row) => { + return this.tabIndex === 2 || this.tabIndex === 3 || this.tabIndex === 6 } }, ] @@ -855,14 +865,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); }) @@ -974,13 +980,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 => { @@ -989,22 +992,10 @@ }, // 涓嬭浇鎶ュ憡 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); } - }, - // 瀹℃牳 - handleVerify(row) { - // this.verifyDialogVisible = true; - this.active = 3; - this.currentId = row.id - this.examine = 1 }, // 鎾ら攢 handlEquash(row) { @@ -1066,8 +1057,6 @@ handlEquashCheck(row){ this.orderId = row.id this.revocationInsProductIds = row.revocationInsProductIds - this.componentDataDelete.showSelect= false - this.componentDataDelete.select= false this.deleteTilte = '鎾ら攢瀹℃牳' this.deleteDialogVisible = true; }, @@ -1166,7 +1155,7 @@ } }) } - let authorizedPerson = this.formData.authorizedPerson.length > 0 ? this.formData.authorizedPerson.join(',') : '' + let authorizedPerson = this.formData.authorizedPerson && this.formData.authorizedPerson.length > 0 ? this.formData.authorizedPerson.join(',') : '' delete this.formData.createTime delete this.formData.updateTime delete this.formData.createUser @@ -1175,7 +1164,11 @@ }, // 涓嬪崟 playOrder(num) { - this.$router.push({ path: "/productOrder/add", query: {examine: 0,active: num} }); + this.$router.push({ path: "/productOrder/add", query: {examine: 0,active: num, tabIndex: this.tabIndex} }); + }, + // 瀹℃牳 + handleVerify(row) { + this.$router.push({ path: "/productOrder/add", query: {examine: 1,active: 3, currentId: row.id} }); }, handleTab(m, i) { this.tabIndex = i; -- Gitblit v1.9.3