From e9d90e9ea68a2ee82869124ff092dc21f329f2b0 Mon Sep 17 00:00:00 2001
From: yj <2077506045@qq.com>
Date: 星期四, 27 十一月 2025 11:00:22 +0800
Subject: [PATCH] 移动端不显示关闭按钮与相应文字
---
src/views/exam/paper/guide.vue | 66 +++++++++++++++++++++++----------
1 files changed, 46 insertions(+), 20 deletions(-)
diff --git a/src/views/exam/paper/guide.vue b/src/views/exam/paper/guide.vue
index 4aca1bf..8b60709 100644
--- a/src/views/exam/paper/guide.vue
+++ b/src/views/exam/paper/guide.vue
@@ -1,14 +1,16 @@
<template>
- <div>
- <el-container class="app-item-contain">
+ <div v-loading.fullscreen.lock="!formDo">
+ <el-container class="app-item-contain" v-if="formDo">
<el-header class="align-center" style="height: 50px;padding: 1%;margin-top: 4%">
<H2 v-html="$t('guide')" v-if="formDo.questionTemplateId !== 'job' || formDo.questionTemplateId !== 'values'"></H2>
</el-header>
<el-main style="padding-top:0%">
- <div v-html="formDo.guide"></div>
+ <div v-html="formDo.guide">
+ </div>
<el-row class="do-align-center">
- <el-button @click="doExam" type="primary" round>{{$t('startDo')}}</el-button>
- <el-button v-if="formDo.questionTemplateId === 'job'" @click="openExplain" type="danger" round>鎵撳紑宀椾綅璇存槑</el-button>
+ <el-button v-if="formDo.questionTemplateId !== 'personality'" @click="doExam" type="primary" round>{{$t('startDo')}}</el-button>
+ <el-button v-if="formDo.questionTemplateId === 'job'" @click="openExplain" type="danger" round>{{$t('openJobDesc')}}</el-button>
+ <el-button v-if="formDo.questionTemplateId === 'personality'" @click="openExercise" type="primary" round>{{$t('exercise_start')}}</el-button>
</el-row>
</el-main>
</el-container>
@@ -16,28 +18,27 @@
</template>
<script>
-import { mapState } from 'vuex'
+import { mapState, mapMutations } from 'vuex'
import examPaperApi from '@/api/examPaper'
export default {
data () {
return {
- formDo: this.$route.query.formDo
+ // formDo: this.$route.query.formDo,
+ loading: false
}
},
created () {
+ this.getFormDo()
},
mounted () {
- console.log(this.formDo)
- // 鏇挎崲APIFan鎸囧璇腑鐨勫彉閲�
- if (this.formDo.productType === 'APIFan') {
- let guide = this.formDo.guide
- guide = guide.replace('%%fullName%%', this.formDo.memberName)
- guide = guide.replace('%%company%%', this.formDo.reportCompany)
- this.formDo.guide = guide
- }
+ // this.swapGuide()
},
beforeDestroy () {
- window.clearInterval(this.timer)
+ },
+ watch: {
+ 'formDo': function (newVal, oldVal) {
+ this.loading = false
+ }
},
methods: {
doExam: function () {
@@ -45,9 +46,11 @@
examPaperApi.updateTestMemberStatus(_this.memberToken).then(re => {
// LAQ鐗规畩澶勭悊
if (_this.formDo.name.indexOf('LAQ') !== -1) {
- _this.$router.push({ path: '/exam/' + _this.formDo.questionTemplateId, query: { formDo: _this.$route.query.formDo } })
+ // _this.$router.push({ path: '/exam/' + _this.formDo.questionTemplateId, query: { formDo: _this.formDo } })
+ _this.$router.push({ path: '/exam/' + _this.formDo.questionTemplateId })
} else {
- _this.$router.push({ path: '/exam/' + _this.doUrl, query: { formDo: _this.$route.query.formDo } })
+ // _this.$router.push({ path: '/exam/' + _this.doUrl, query: { formDo: _this.formDo } })
+ _this.$router.push({ path: '/exam/' + _this.doUrl })
}
}).catch(re => {
_this.$message.error(re.message + ' 鏇存柊鐘舵�佸け璐�')
@@ -56,11 +59,34 @@
openExplain: function () {
let _this = this
window.open(_this.formDo.jobDescriptionFile)
- }
+ },
+
+ // 鎵撳紑缁冧範椤甸潰
+ openExercise: function () {
+ let _this = this
+ // _this.$router.push({ path: '/exam/exercise', query: { formDo: _this.formDo } })
+ _this.$router.push({ path: '/exam/exercise' })
+ },
+
+ // 鏇挎崲guide鐨勫��
+ swapGuide: function () {
+ // 鏇挎崲APIFan鎸囧璇腑鐨勫彉閲�
+ if (this.formDo.productType === 'API_Fan') {
+ let guide = this.formDo.guide
+ guide = guide.replace('%%fullName%%', this.formDo.memberName)
+ guide = guide.replace('%%company%%', this.formDo.reportCompany)
+ this.formDo.guide = guide
+ }
+ },
+
+ ...mapMutations('user', ['getLangType']),
+ ...mapMutations('user', ['getFormDo'])
},
computed: {
...mapState('exam', { doUrl: state => state.doUrl }),
- ...mapState('user', { memberToken: state => state.memberToken })
+ ...mapState('user', { memberToken: state => state.memberToken }),
+ ...mapState('user', { langType: state => state.langType }),
+ ...mapState('user', { formDo: state => state.formDo })
}
}
</script>
--
Gitblit v1.9.1