| | |
| | | <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> |
| | | <!-- <H1 v-if ="viewDisable">{{$t('finishViewReportInfo')}}</H1>--> |
| | | <!-- <el-button type="danger" v-if ="viewDisable" @click="viewReport" round>{{$t('view')}}</el-button>--> |
| | | <!-- --> |
| | | <H1 v-if ="type == 'CIAQ' && isMobile()">{{$t('finishViewReportInfo')}}</H1> |
| | | <el-button type="danger" v-if ="type == 'CIAQ' && isMobile()" @click="viewReportH5" round>{{$t('view')}}</el-button> |
| | | </el-main> |
| | | </el-container> |
| | | </div> |
| | |
| | | } |
| | | }) |
| | | |
| | | // 查询报告文件名 |
| | | examPaperApi.selectTesterReportUrl(_this.tokenId).then(re => { |
| | | if (re.code === 0) { |
| | | _this.viewDisable = true |
| | | // 设置预览路径 |
| | | _this.viewUrl = re.msg |
| | | console.log(re) |
| | | } else { |
| | | console.log(re) |
| | | } |
| | | }) |
| | | // CIAQ PDF预览Url |
| | | // examPaperApi.selectTesterReportUrl(_this.tokenId).then(re => { |
| | | // if (re.code === 0) { |
| | | // _this.viewDisable = true |
| | | // // 设置预览路径 |
| | | // _this.viewUrl = re.msg |
| | | // console.log(re) |
| | | // } else { |
| | | // console.log(re) |
| | | // } |
| | | // }) |
| | | }, |
| | | mounted () { |
| | | |
| | |
| | | // 预览报告 |
| | | viewReport: function () { |
| | | let _this = this |
| | | _this.$router.push({ path: '/pdf/view', query: { fileUrl: _this.viewUrl } }) |
| | | _this.$router.push({ path: '/report/view', query: { fileUrl: _this.viewUrl } }) |
| | | }, |
| | | // 预览报告(H5) |
| | | viewReportH5: function () { |
| | | let _this = this |
| | | _this.$router.push({ path: '/report/h5', query: { tokenId: _this.tokenId } }) |
| | | }, |
| | | isMobile () { |
| | | let flag = navigator.userAgent.match(/(phone|pad|pod|iPhone|iPod|ios|iPad|Android|Mobile|BlackBerry|IEMobile|MQQBrowser|JUC|Fennec|wOSBrowser|BrowserNG|WebOS|Symbian|Windows Phone)/i) |
| | | return flag |
| | | } |
| | | }, |
| | | computed: { |