From d8fc3ec09f864dc336b649f66a2c62345da12629 Mon Sep 17 00:00:00 2001
From: yj <2077506045@qq.com>
Date: 星期三, 08 五月 2024 18:02:19 +0800
Subject: [PATCH] 答题LOGO自定义功能
---
src/views/exam/paper/personality.vue | 52 ++++++++++++++++++++++++++++++++++++++++++++--------
1 files changed, 44 insertions(+), 8 deletions(-)
diff --git a/src/views/exam/paper/personality.vue b/src/views/exam/paper/personality.vue
index d6806a0..9c28327 100644
--- a/src/views/exam/paper/personality.vue
+++ b/src/views/exam/paper/personality.vue
@@ -16,14 +16,14 @@
<div class="align-center"><span style="font-size: small; float: left">{{$t('examinee')}}{{memberName}}</span><span style="margin-top: 0px;padding-right: 11%">鈼弡{form.name}}鈼�</span></div>
<hr style="border : 1px dashed #b3d8ff;" />
<el-form-item :key="itemOrder" label-width="1px">
- <QuestionEdit @callNextSubject="nextSubject" :qType="questionItem.questionType" :question="questionItem"
+ <QuestionEdit @callSelected="callSelected" @callNextSubject="nextSubject" :qType="questionItem.questionType" :question="questionItem"
:answer="answer.answerItems[questionItem.itemOrder-1]" :qLabel="itemOrder+'/'+itemSize"/>
</el-form-item>
<hr style="border : 0.5px dashed #b3d8ff;" />
<div style="color: red;font-size: smaller">{{$t('pleaseAnswerCarefully')}}</div>
<el-row class="do-align-center" v-if="order < problemLength">
- <el-button @click="preSubject" type="warning" v-if ="preDisable" round>{{$t('lastQuestion')}}</el-button>
- <el-button @click="nextSubject" type="primary" v-if ="nextDisable" round>{{$t('nextQuestion')}}</el-button>
+ <el-button @click="preSubject" type="warning" v-if ="preDisable" :disabled="preDisable2" round>{{$t('lastQuestion')}}</el-button>
+ <el-button @click="nextSubject" type="primary" v-if ="nextDisable" :disabled="nextDisable2" round>{{$t('nextQuestion')}}</el-button>
</el-row>
<el-row class="do-align-center" v-else>
<el-button @click="preSubject" type="warning" v-if ="preDisable" round>{{$t('lastQuestion')}}</el-button>
@@ -88,7 +88,9 @@
submitDisable: true,
doTime: 0,
preDisable: false,
+ preDisable2: false,
nextDisable: false,
+ nextDisable2: false,
partOrder: 0,
parts: [],
guideTitle: '',
@@ -142,12 +144,10 @@
_this.initAnswer()
_this.formLoading = false
_this.memberName = _this.form.memberName
-
examPaperApi.selectTokenId(_this.memberToken).then(re => {
_this.answered = re.response.examItemOrderAndContentList
_this.doTime = re.response.doTime
_this.timeReduce()
-
if (_this.answered !== null) {
_this.answered.forEach(it => {
_this.answer.answerItems[parseInt(it.itemOrder) - 1].content = it.content
@@ -187,11 +187,26 @@
).catch(e => {
})
}
+
},
mounted () {
},
beforeDestroy () {
window.clearInterval(this.timer)
+ },
+ watch: {
+ guideDescirption: function (newVal, oldVal) {
+ // 澶勭悊鎸囧璇紝鏇存崲鍙橀噺
+ if (newVal) {
+ if (this.form) {
+ let productType = this.form.productType
+ if (productType === 'API_Fan') {
+ newVal = newVal.replace('%%company%%', this.form.reportCompany)
+ this.guideDescirption = newVal
+ }
+ }
+ }
+ }
},
methods: {
formatSeconds (theTime) {
@@ -314,6 +329,8 @@
},
nextSubject: function () {
let _this = this
+ _this.preDisable2 = true
+ _this.nextDisable2 = true
_this.isShowGuide(false)
let nowPartOrder = _this.partOrder
// 璁剧疆涓婁竴棰樼殑缁撴潫鏃堕棿
@@ -344,6 +361,7 @@
}
this.answer.answerItems[_this.order].readOnly = true
let answerSubmit = _this.getSubmitAnswerValue(nowPartOrder)
+
// 宸茬粡绛斿埌浜嗘渶鍚庝竴棰樹簡,涓嶇敤鑷姩璺冲埌涓嬩竴棰�
if (this.order + 1 > this.problemLength) {
this.submitDisable = false
@@ -375,12 +393,21 @@
} else {
this.nextQuestionOrder(nowPartOrder)
}
+ _this.preDisable2 = false
+ _this.nextDisable2 = false
}).catch(e => {
if (_this.isNotEmpty(loading)) {
loading.close()
}
_this.reloadPage(e)
+ _this.preDisable2 = false
+ _this.nextDisable2 = false
})
+ },
+ callSelected: function () {
+ let _this = this
+ _this.preDisable2 = true
+ _this.nextDisable2 = true
},
getSubmitAnswerValue (nowPartOrder) {
let _this = this
@@ -400,6 +427,7 @@
},
preSubject () {
let _this = this
+ _this.nextDisable2 = false
_this.isShowGuide(false)
if (_this.order > 0) {
// 娓呯┖鏈鐨勯�夋嫨
@@ -449,7 +477,16 @@
} else {
_this.answer.verifyStatus = 1
_this.answer.finish = 1
- _this.submitAnswer(_this.$t('finishPersonalityInfo'))
+ if (this.form) {
+ let productType = this.form.productType
+ if (productType === 'API_Fan') {
+ _this.submitAnswer(_this.$t('finishPersonalityInfo_apifan'))
+ } else {
+ _this.submitAnswer(_this.$t('finishPersonalityInfo'))
+ }
+ } else {
+ _this.submitAnswer(_this.$t('finishPersonalityInfo'))
+ }
}
},
startDo: function () {
@@ -472,11 +509,10 @@
loading.close()
if (re.code === 1) {
// 鐗规畩澶勭悊 LAQ娴嬭瘯鍖� MAQ+CAQ
- if (_this.form.name === 'LAQ') {
+ if (_this.form.name.indexOf('LAQ') !== -1) {
console.log('绛斿畬棰�,鐪嬬湅瑕佷笉瑕佸幓CAQ1')
examPaperApi.select(_this.memberToken, _this.langType).then(re => {
_this.form = re.response
- console.log(_this.form)
_this.$router.push({ path: '/guide/index', query: { formDo: _this.form } })
}).catch(e => {
_this.$message.error(_this.$t('noquestionMsg'))
--
Gitblit v1.9.1