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/personality.vue | 49 ++++++++++++++++++++++++++++++++++++++-----------
1 files changed, 38 insertions(+), 11 deletions(-)
diff --git a/src/views/exam/paper/personality.vue b/src/views/exam/paper/personality.vue
index 9c28327..7563f2a 100644
--- a/src/views/exam/paper/personality.vue
+++ b/src/views/exam/paper/personality.vue
@@ -99,16 +99,18 @@
memberName: '',
itemSize: '', // 棰樼洰闀垮害
startDoDisable: true,
- ismobile: false
+ ismobile: false,
+ hasShownSubmitTip: false // 鏍囧織鏄惁宸茬粡鏄剧ず杩囨彁浜ゆ彁绀�
}
},
created: function () {
+ // this.getFormDo()
let _this = this
_this.ismobile = /ipad|iphone|midp|rv:1.2.3.4|ucweb|android|windows ce|windows mobile/.test(navigator.userAgent.toLowerCase())
// 澶氳瑷�
_this.setLangFlag(false)
- _this.form = this.$route.query.formDo
- if (_this.form !== {} && _this.form !== undefined) {
+ _this.form = undefined
+ if (_this.form && _this.form !== {} && _this.form !== undefined) {
_this.formLoading = true
_this.remainTime = _this.form.suggestTime * 60
_this.problemLength = _this.form.titleItems[0].questionItems.length - 1
@@ -133,6 +135,10 @@
// 鍔犺浇棰樼洰
examPaperApi.select(_this.memberToken, _this.langType).then(re => {
_this.form = re.response
+ // // 娴嬭瘯妯″紡锛氬彧淇濈暀鍓�3閬撻
+ // if (_this.form.titleItems[0].questionItems.length > 3) {
+ // _this.form.titleItems[0].questionItems = _this.form.titleItems[0].questionItems.slice(0, 3)
+ // }
_this.remainTime = re.response.suggestTime * 60
_this.problemLength = _this.form.titleItems[0].questionItems.length - 1
_this.titleItemsLength = _this.form.titleItems.length
@@ -187,7 +193,6 @@
).catch(e => {
})
}
-
},
mounted () {
},
@@ -359,6 +364,17 @@
return
}
}
+
+ // 妫�鏌ユ槸鍚︽槸鏈�鍚庝竴棰樹笖宸茬瓟瀹岋紝寮瑰嚭鎻愮ず妗�
+ if (_this.order === _this.answer.answerItems.length - 1 && _this.isContentNotEmpty(_this.order)) {
+ if (!_this.hasShownSubmitTip) {
+ _this.hasShownSubmitTip = true
+ _this.$alert(_this.$t('submit_tip'), _this.$t('prompt'), {
+ confirmButtonText: _this.$t('determine'),
+ customClass: 'submit-tip-dialog'
+ })
+ }
+ }
this.answer.answerItems[_this.order].readOnly = true
let answerSubmit = _this.getSubmitAnswerValue(nowPartOrder)
@@ -477,16 +493,20 @@
} else {
_this.answer.verifyStatus = 1
_this.answer.finish = 1
+ let text = _this.$t('finishPersonalityInfo')
+ if (_this.isMobile()) {
+ text = _this.$t('finishPersonalityInfo_mobile')
+ }
if (this.form) {
let productType = this.form.productType
if (productType === 'API_Fan') {
- _this.submitAnswer(_this.$t('finishPersonalityInfo_apifan'))
- } else {
- _this.submitAnswer(_this.$t('finishPersonalityInfo'))
+ text = _this.$t('finishPersonalityInfo_apifan')
+ if (_this.isMobile()) {
+ text = _this.$t('finishPersonalityInfo_apifan_mobile')
+ }
}
- } else {
- _this.submitAnswer(_this.$t('finishPersonalityInfo'))
}
+ _this.submitAnswer(text)
}
},
startDo: function () {
@@ -510,9 +530,9 @@
if (re.code === 1) {
// 鐗规畩澶勭悊 LAQ娴嬭瘯鍖� MAQ+CAQ
if (_this.form.name.indexOf('LAQ') !== -1) {
- console.log('绛斿畬棰�,鐪嬬湅瑕佷笉瑕佸幓CAQ1')
examPaperApi.select(_this.memberToken, _this.langType).then(re => {
_this.form = re.response
+ this.setFormDo(_this.form)
_this.$router.push({ path: '/guide/index', query: { formDo: _this.form } })
}).catch(e => {
_this.$message.error(_this.$t('noquestionMsg'))
@@ -577,8 +597,13 @@
let _this = this
return _this.form.titleItems[0].questionItems[_this.order].partOrder !== _this.form.titleItems[0].questionItems[_this.order - 1].partOrder
},
+ isMobile: function () {
+ return window.innerWidth < 1025
+ },
...mapMutations('user', ['setLangType']),
- ...mapMutations('user', ['setLangFlag'])
+ ...mapMutations('user', ['setLangFlag']),
+ ...mapMutations('user', ['getFormDo']),
+ ...mapMutations('user', ['setFormDo'])
},
computed: {
...mapGetters('enumItem', ['enumFormat']),
@@ -586,6 +611,7 @@
...mapState('user', { memberToken: state => state.memberToken }),
...mapState('user', { langType: state => state.langType }),
...mapState('user', { langFlag: state => state.langFlag }),
+ ...mapState('user', { formDo: state => state.formDo }),
...mapState('exam', { doUrl: state => state.doUrl })
}
}
@@ -615,4 +641,5 @@
z-index: 1000;
bottom: 0px;
}
+
</style>
--
Gitblit v1.9.1