林致杰
2023-04-25 f312c93d1886b599b37889d226691476145c0c23
src/views/exam/paper/finish.vue
@@ -9,6 +9,9 @@
        <!-- 新增下载报告提示语 -->
        <H1 v-if ="downDisable">{{$t('finishPersonalityDownInfo')}}</H1>
        <el-button type="danger" v-if ="downDisable" @click="downReport" round>{{$t('down')}}</el-button>
        <!-- 新增预览提示语 -->
        <H1 v-if ="viewDisable">{{$t('finishViewReportInfo')}}</H1>
        <el-button type="danger" v-if ="viewDisable" @click="viewReport" round>{{$t('view')}}</el-button>
      </el-main>
    </el-container>
  </div>
@@ -22,7 +25,9 @@
      name: this.$route.query.name,
      content: this.$route.query.content,
      tokenId: this.$route.query.tokenId,
      type: this.$route.query.type,
      downDisable: false,
      viewDisable: false,
      downUrl: ''
    }
  },
@@ -50,6 +55,11 @@
    downReport: function () {
      let _this = this
      window.open(_this.downUrl)
    },
    // 下载报告
    viewReport: function () {
      let _this = this
      _this.$router.push({ path: '/pdf/view', query: { fileUrl: _this.downUrl } })
    }
  },
  computed: {