| | |
| | | type: this.$route.query.type, |
| | | downDisable: false, |
| | | viewDisable: false, |
| | | downUrl: '' |
| | | downUrl: '', |
| | | viewUrl: '' |
| | | } |
| | | }, |
| | | created () { |
| | |
| | | _this.downDisable = true |
| | | // 设置下载路径 |
| | | _this.downUrl = '/api/exam/paper/download?fileName=' + re.msg + '&delete=false' |
| | | console.log(re) |
| | | } else { |
| | | console.log(re) |
| | | } |
| | | }) |
| | | |
| | | // 查询报告文件名 |
| | | examPaperApi.selectTesterReportUrl(_this.tokenId).then(re => { |
| | | if (re.code === 0) { |
| | | _this.viewDisable = true |
| | | // 设置预览路径 |
| | | _this.viewUrl = re.msg |
| | | console.log(re) |
| | | } else { |
| | | console.log(re) |
| | |
| | | let _this = this |
| | | window.open(_this.downUrl) |
| | | }, |
| | | // 下载报告 |
| | | // 预览报告 |
| | | viewReport: function () { |
| | | let _this = this |
| | | _this.$router.push({ path: '/pdf/view', query: { fileUrl: _this.downUrl } }) |
| | | _this.$router.push({ path: '/pdf/view', query: { fileUrl: _this.viewUrl } }) |
| | | } |
| | | }, |
| | | computed: { |