From a778d5e53e74b2170e37607b2536a957dbc1d664 Mon Sep 17 00:00:00 2001
From: yj <2077506045@qq.com>
Date: 星期一, 25 十一月 2024 13:59:58 +0800
Subject: [PATCH] 合并本地修改

---
 src/views/exam/paper/finish.vue |   53 +++++++++++++++++++++++++++++++++++++++++++++++------
 1 files changed, 47 insertions(+), 6 deletions(-)

diff --git a/src/views/exam/paper/finish.vue b/src/views/exam/paper/finish.vue
index 3ec605e..b0ff0d9 100644
--- a/src/views/exam/paper/finish.vue
+++ b/src/views/exam/paper/finish.vue
@@ -4,9 +4,18 @@
       <el-header class="align-center" style="height: 0px; margin: 8%;">
       </el-header>
       <el-main class="align-center">
-        <H1 v-if="content!==null && content.trim()!==''">{{content}}</H1>
-        <H1 v-else>{{$t('finishMsg')}}</H1>
-        <el-button type="danger" v-if ="downDisable" @click="downReport" round>{{$t('down')}}</el-button>
+        <H2 v-if="content!==null && content.trim()!==''">{{content}}</H2>
+        <H2 v-else>{{$t('finishMsg')}}</H2>
+        <el-button type="danger" @click="closePage" round>{{$t('close')}}</el-button>
+        <!-- 鏂板涓嬭浇鎶ュ憡鎻愮ず璇� -->
+        <H2 v-if ="downDisable">{{$t('finishPersonalityDownInfo')}}</H2>
+        <el-button type="success" 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>-->
+        <!--  -->
+        <H2 v-if ="type == 'CIAQ'">{{$t('finishViewReportInfo')}}</H2>
+        <el-button type="danger" v-if ="type == 'CIAQ'" @click="viewReportH5" round>{{$t('view')}}</el-button>
       </el-main>
     </el-container>
   </div>
@@ -20,8 +29,11 @@
       name: this.$route.query.name,
       content: this.$route.query.content,
       tokenId: this.$route.query.tokenId,
+      type: this.$route.query.type,
       downDisable: false,
-      downUrl: ''
+      viewDisable: false,
+      downUrl: '',
+      viewUrl: ''
     }
   },
   created () {
@@ -32,11 +44,21 @@
         _this.downDisable = true
         // 璁剧疆涓嬭浇璺緞
         _this.downUrl = '/api/exam/paper/download?fileName=' + re.msg + '&delete=false'
-        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 () {
 
@@ -44,10 +66,29 @@
   beforeDestroy () {
   },
   methods: {
+
     // 涓嬭浇鎶ュ憡
     downReport: function () {
       let _this = this
       window.open(_this.downUrl)
+    },
+    // 鍏抽棴椤甸潰
+    closePage: function () {
+      window.close()
+    },
+    // 棰勮鎶ュ憡
+    viewReport: function () {
+      let _this = this
+      _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: {

--
Gitblit v1.9.1