[测评系统]--前端(用户答题页面)
linzhijie
2023-04-25 b79e4f19491338a53f31aa358081d19d4b6d23e8
src/views/exam/paper/finish.vue
@@ -28,7 +28,8 @@
      type: this.$route.query.type,
      downDisable: false,
      viewDisable: false,
      downUrl: ''
      downUrl: '',
      viewUrl: ''
    }
  },
  created () {
@@ -39,6 +40,18 @@
        _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)
@@ -56,10 +69,10 @@
      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: {