| | |
| | | }, |
| | | // 导出记录 |
| | | 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); |
| | | }) |
| | |
| | | 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 => { |
| | |
| | | let url = 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); |
| | | } |
| | | }, |
| | | // 撤销 |