| | |
| | | finishSubmit: 'You have completed the work behavior questionnaire, and the data has been successfully uploaded to the server and saved. Thank you.', |
| | | selectData: 'Date', |
| | | startDo: 'Next', |
| | | openJobDesc: '问卷作答说明', |
| | | openJobDesc: 'Job Description', |
| | | startDo_apifan: 'Start the Test', |
| | | second: ' second ', |
| | | min: ' minute ', |
| | |
| | | finishSubmit: 'You have completed the work behavior questionnaire, and the data has been successfully uploaded to the server and saved. Thank you.', |
| | | selectData: 'Date', |
| | | startDo: 'Start the Test', |
| | | openJobDesc: '问卷作答说明', |
| | | openJobDesc: 'Job Description', |
| | | startDo_apifan: 'Start the Test', |
| | | second: ' second ', |
| | | min: ' minute ', |
| | |
| | | } |
| | | }, |
| | | created () { |
| | | const langType = localStorage.getItem('langType') |
| | | if (langType) { |
| | | const langType = this.$route.query.langType |
| | | if (langType && (langType === 'Chinese' || langType === 'English' || langType === 'Thai')) { |
| | | this.setLangType(langType) |
| | | } else { |
| | | localStorage.setItem('langType', this.langType) |
| | | this.setLangType('English') |
| | | } |
| | | }, |
| | | beforeDestroy () { |
| | | localStorage.removeItem('langType') |
| | | }, |
| | | beforeUpdate () { |
| | | }, |
| | |
| | | _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')) |
| | | }) |
| | |
| | | submitLangOption: function () { |
| | | let _this = this |
| | | _this.setLangType(_this.langSelectValue) |
| | | _this.$router.push({ path: '/demography/fill/index', query: { demographyMenber: _this.memberToken, isStart: false } }) |
| | | _this.$router.push({ path: '/demography/fill/index', query: { demographyMenber: _this.memberToken, isStart: false, langType: _this.langType } }) |
| | | window.clearInterval(this.timer) |
| | | }, |
| | | getLangAndRportTemplateId () { |
| | |
| | | demographyApi.queryLangList(_this.memberToken, _this.reportTemplateId).then(function (result) { |
| | | if (result && result.code === 1) { |
| | | _this.langTypes = result.response |
| | | console.log("longTypes", _this.langTypes) |
| | | } |
| | | } |
| | | ).catch(e => { |
| | |
| | | }, |
| | | created () { |
| | | // 清除本地存储的语言选项 |
| | | localStorage.removeItem('langType') |
| | | let _this = this |
| | | _this.getLangType() |
| | | // 记录登陆日志 |
| | |
| | | } else { |
| | | _this.setLogo(re.response.logoUrl) |
| | | } |
| | | console.log(re.response) |
| | | _this.setProductType(re.response.productType) |
| | | if (re.response.finish === 1) { |
| | | _this.$router.push({ path: '/exam/finish', query: { name: '', content: _this.$t('finishMsg'), tokenId: _this.paraMemberToken } }) |
| | |
| | | reParam => { |
| | | if (reParam.code !== 1) { |
| | | // 职业兴趣报告特殊化处理 只有中文 |
| | | if (_this.doUrl === 'career_interests' || _this.doUrl === 'job') { |
| | | if (_this.doUrl === 'career_interests') { |
| | | _this.$i18n.locale = 'zh' |
| | | _this.setLangType('Chinese') |
| | | _this.$router.push({ path: '/demography/fill/index', query: { demographyMenber: _this.memberToken, isStart: false } }) |
| | | _this.$router.push({ path: '/demography/fill/index', query: { demographyMenber: _this.memberToken, isStart: false, langType: 'Chinese' } }) |
| | | return |
| | | } |
| | | |
| | |
| | | if (_this.reportTemplateType === 'API_Fan') { |
| | | _this.$i18n.locale = 'zh' |
| | | _this.setLangType('Chinese') |
| | | _this.$router.push({ path: '/demography/fill/logo', query: { demographyMenber: _this.memberToken, isStart: false } }) |
| | | _this.$router.push({ path: '/demography/fill/logo', query: { demographyMenber: _this.memberToken, isStart: false, langType: 'Chinese' } }) |
| | | return |
| | | } |
| | | |
| | |
| | | if (reParam.response[0].langType === 'Chinese') { |
| | | this.$i18n.locale = 'zh' |
| | | _this.setLangType('Chinese') |
| | | } else if (reParam.response[0].langType === 'Thai') { |
| | | _this.setLangType('Thai') |
| | | this.$i18n.locale = 'th' |
| | | } else { |
| | | _this.setLangType('English') |
| | | this.$i18n.locale = 'en' |
| | |
| | | let answered = re.response.examItemOrderAndContentList |
| | | if (answered === null) { |
| | | examPaperApi.select(_this.memberToken, _this.langType).then(re => { |
| | | // _this.setFormDo(re.response) |
| | | _this.formDo = re.response |
| | | _this.setDoUrl(re.response.questionTemplateId) |
| | | _this.$router.push({ path: '/guide/index', query: { formDo: _this.formDo } }) |
| | | // _this.$router.push({ path: '/guide/index' }) |
| | | }).catch(e => { |
| | | _this.$message.error(_this.$t('noquestionMsg')) |
| | | }) |
| | | } else { |
| | | // 否则清除fromDo |
| | | _this.$router.push({ path: '/exam/' + _this.doUrl }) |
| | | } |
| | | }).catch(e => { |
| | |
| | | ...mapMutations('user', ['setLangType']), |
| | | ...mapMutations('user', ['getLangType']), |
| | | ...mapMutations('user', ['setLogo']), |
| | | ...mapMutations('user', ['setFormDo']), |
| | | ...mapMutations('exam', ['setProductType']) |
| | | |
| | | }, |