| | |
| | | clickFun: (row) => { |
| | | this.download(row); |
| | | }, |
| | | disabled: (row) => !this.canDownloadReport(row), |
| | | showHide: (row) => { |
| | | return this.tabIndex === 2 || this.tabIndex === 3 || this.tabIndex === 7 |
| | | } |
| | |
| | | }) |
| | | }, |
| | | // 下载报告 |
| | | canDownloadReport(row) { |
| | | return !!(row && row.reportId && (row.urlS || row.url)) |
| | | }, |
| | | download(row) { |
| | | let url = row.urlS ? row.urlS : row.url; |
| | | if (!url) { |
| | | this.$message.warning('该委托单暂无可下载的报告') |
| | | if (!this.canDownloadReport(row)) { |
| | | return |
| | | } |
| | | let url = row.urlS ? row.urlS : row.url; |
| | | url = url.split('.')[0] + '.pdf' |
| | | const link = document.createElement('a'); |
| | | link.href = this.javaApi + url; |