From bc0ab53799cc25a79ab173772c209f9722257425 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=86=8A=E9=A3=9E?= Date: Mon, 29 Jan 2024 10:43:41 +0800 Subject: [PATCH] =?UTF-8?q?SPM=E6=9F=A5=E7=9C=8B=E9=98=85=E7=89=87?= =?UTF-8?q?=E4=BA=BA=E7=AE=80=E5=8E=86=E4=B8=AD=E8=8B=B1=E6=96=87=E5=88=87?= =?UTF-8?q?=E6=8D=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/blindResumeInfo/info.vue | 16 +++++++++++++++- src/views/resumeInfo/index.vue | 2 ++ 2 files changed, 17 insertions(+), 1 deletion(-) diff --git a/src/views/blindResumeInfo/info.vue b/src/views/blindResumeInfo/info.vue index 3d560852..05b3d9a8 100644 --- a/src/views/blindResumeInfo/info.vue +++ b/src/views/blindResumeInfo/info.vue @@ -51,6 +51,7 @@ import Credentials from './components/Credentials' import Resume from './components/Resume' import Agreements from './components/Agreements' import Comment from './components/Comment' +import {mapMutations} from "vuex"; export default { components: { StatusInfo, BasicInfo, Employment, Specialty, EducationTraining, ResearchPublication, TrialExperience, Credentials, Resume, Agreements, Comment }, data() { @@ -78,13 +79,26 @@ export default { doctorId: '' } }, + watch: { + isEnglish(v) { + if (v === true) { + this.$i18n.locale = 'en' + this.setLanguage('en') + this.$updateDictionary() + } else { + this.$i18n.locale = 'zh' + this.setLanguage('zh') + this.$updateDictionary() + } + } + }, mounted() { this.isEnglish = !!((this.$route.query.isEnglish === true || this.$route.query.isEnglish === 'true')) this.doctorId = this.$route.query.doctorId this.initForm() }, methods: { - + ...mapMutations({ setLanguage: 'lang/setLanguage' }), initStatus() { if (this.doctorInfo.AuditView) { const res = this.doctorInfo.AuditView diff --git a/src/views/resumeInfo/index.vue b/src/views/resumeInfo/index.vue index 19f15711..945b06ed 100644 --- a/src/views/resumeInfo/index.vue +++ b/src/views/resumeInfo/index.vue @@ -64,6 +64,7 @@ import Credentials from './components/Credentials' import Resume from './components/Resume' import Agreements from './components/Agreements' import Comment from './components/Comment' +import {mapMutations} from "vuex"; export default { components: { StatusInfo, BasicInfo, Employment, Specialty, EducationTraining, ResearchPublication, TrialExperience, Credentials, Resume, Agreements, Comment }, data() { @@ -111,6 +112,7 @@ export default { this.initForm() }, methods: { + ...mapMutations({ setLanguage: 'lang/setLanguage' }), initStatus() { if (this.doctorInfo.AuditView) { const res = this.doctorInfo.AuditView