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