From c4f975e32ea55ec7aca63317f8864cec8d6977c8 Mon Sep 17 00:00:00 2001
From: yj <2077506045@qq.com>
Date: 星期五, 14 十一月 2025 10:20:27 +0800
Subject: [PATCH] 人格、智力、工作、职业兴趣问卷增加提交提示功能,选完最后一题弹出提示窗口。
---
src/views/demography/index.vue | 23 ++++++++++++++++++-----
1 files changed, 18 insertions(+), 5 deletions(-)
diff --git a/src/views/demography/index.vue b/src/views/demography/index.vue
index ae83ec7..0b0b52a 100644
--- a/src/views/demography/index.vue
+++ b/src/views/demography/index.vue
@@ -107,18 +107,29 @@
paramsInfo: {},
parasInfos: [],
parasInfoIds: {},
- formDo: {},
+ // formDo: {},
submitDisable: false,
isStart: this.$route.query.isStart === 'true'
}
},
created () {
+ const langType = this.$route.query.langType
+ if (langType && (langType === 'Chinese' || langType === 'English' || langType === 'Thai')) {
+ this.setLangType(langType)
+ } else {
+ this.setLangType('English')
+ }
+ },
+ beforeDestroy () {
+ },
+ beforeUpdate () {
+ },
+ updated () {
},
methods: {
submitDemography: function () {
let _this = this
_this.submitDisable = true
- console.log( this.$refs.demographyMenber)
this.$refs.demographyMenber.validate(vaild => {
if (vaild) {
_this.parasInfos = []
@@ -140,13 +151,13 @@
demographyApi.submitDemography(_this.memberToken, _this.langType, _this.parasInfos).then(function (result) {
if (result && result.code === 1) {
examPaperApi.select(_this.memberToken, _this.langType).then(re => {
- _this.formDo = re.response
+ _this.setFormDo(re.response)
_this.setDoUrl(re.response.questionTemplateId)
if (_this.isStart) {
_this.$router.push({ path: '/exam/' + _this.doUrl })
return
}
- _this.$router.push({ path: '/guide/index', query: { formDo: _this.formDo } });
+ _this.$router.push({ path: '/guide/index', query: { formDo: _this.formDo } })
}).catch(e => {
_this.$message.error(_this.$t('noquestionMsg'))
})
@@ -192,7 +203,9 @@
})
},
...mapMutations('user', ['setMemberTocken']),
- ...mapMutations('exam', ['setDoUrl'])
+ ...mapMutations('exam', ['setDoUrl']),
+ ...mapMutations('user', ['setLangType']),
+ ...mapMutations('user', ['setFormDo'])
},
computed: {
...mapState('user', { memberToken: state => state.memberToken }),
--
Gitblit v1.9.1