diff --git a/src/views/business/study/comp/jhbd/Bj.vue b/src/views/business/study/comp/jhbd/Bj.vue index 97d98d0..4321a9c 100644 --- a/src/views/business/study/comp/jhbd/Bj.vue +++ b/src/views/business/study/comp/jhbd/Bj.vue @@ -41,8 +41,8 @@ - + @@ -181,7 +181,7 @@ export default { }, templateData: {}, studyType: null, - studyFormType:null + studyFormType: null } }, computed: { @@ -195,7 +195,7 @@ export default { onPlanCallback(data) { console.log("data:" + JSON.stringify(data)) console.log("formdata:" + JSON.stringify(this.$refs.templateTable.getFilledFormData())) - if (data.type == 'fieldChanged' ) { + if (data.type == 'fieldChanged') { studyFormPlan_updateBdnr( { id: this.form.id, @@ -235,9 +235,14 @@ export default { }) }, selectTemplateChange(val) { + if (this.$i18n.locale === 'zh_CN') { + this.form.templateMc = val.name + this.form.bdmc = val.name + } else { + this.form.templateMc = val.nameEn + this.form.bdmc = val.nameEn + } this.form.bdnr = val.content - this.form.bdmc = val.name - this.form.templateMc = val.name this.form.templateSn = val.sn this.templateData = deepClone(this.form) }, @@ -250,10 +255,10 @@ export default { id: null, studyId: null, bdbh: null, - bdmc: '试验物质配制计划表', + bdmc: this.$i18n.locale === 'zh_CN'?'试验物质配制计划表':'试验物质配制计划表', bdsm: null, templateId: 1, - templateMc: '试验物质配制计划表', + templateMc: this.$i18n.locale === 'zh_CN'?'试验物质配制计划表':'试验物质配制计划表', templateSn: 'SYWZPZJHB', bdnr: null, fzrsh: null, @@ -267,8 +272,8 @@ export default { }, edit(row) { this.reset() - this.studyType = row.studyType||null - this.studyFormType = row.studyFormType||null + this.studyType = row.studyType || null + this.studyFormType = row.studyFormType || null this.form.qmyy = this.$t('page.business.study.studyFormPlan.cjjl') if (row && row.id) { this.showIndex = 2 @@ -285,9 +290,9 @@ export default { this.showIndex = 1 this.form = _.merge({}, this.form, row) this.templateData = deepClone(this.form) - let name=this.studyType==1?'试验':(this.studyType==5?'非试验表单':'麻精药表单') - let nameEn=this.studyType==1?'Study':(this.studyType==5?'Non-study':'ontrolled Drug') - this.saveSimpleLog({jcmc:'计划表单新增',jcmcEn:'Plan Table Create',name:name,nameEn:nameEn}) + let name = this.studyType == 1 ? '试验' : (this.studyType == 5 ? '非试验表单' : '麻精药表单') + let nameEn = this.studyType == 1 ? 'Study' : (this.studyType == 5 ? 'Non-study' : 'ontrolled Drug') + this.saveSimpleLog({ jcmc: '计划表单新增', jcmcEn: 'Plan Table Create', name: name, nameEn: nameEn }) this.open = true } }, diff --git a/src/views/business/study/comp/sqbd/Bj.vue b/src/views/business/study/comp/sqbd/Bj.vue index d1eeb23..0221741 100644 --- a/src/views/business/study/comp/sqbd/Bj.vue +++ b/src/views/business/study/comp/sqbd/Bj.vue @@ -41,8 +41,8 @@ - + @@ -181,7 +181,7 @@ export default { }, templateData: {}, studyType: null, - studyFormType:null + studyFormType: null } }, computed: { @@ -236,9 +236,14 @@ export default { }) }, selectTemplateChange(val) { - this.form.bdmc = val.name + if (this.$i18n.locale === 'zh_CN') { + this.form.templateMc = val.name + this.form.bdmc = val.name + } else { + this.form.templateMc = val.nameEn + this.form.bdmc = val.nameEn + } this.form.bdnr = val.content - this.form.templateMc = val.name this.form.templateSn = val.sn this.templateData = deepClone(this.form) }, @@ -251,10 +256,10 @@ export default { id: null, studyId: null, bdbh: null, - bdmc: '麻精药领取申请单', + bdmc: this.$i18n.locale === 'zh_CN'?'麻精药领取申请单':'麻精药领取申请单', bdsm: null, templateId: 2, - templateMc: '麻精药领取申请单', + templateMc: this.$i18n.locale === 'zh_CN'?'麻精药领取申请单':'麻精药领取申请单', templateSn: 'MJYLQSQD', bdnr: null, fzrsh: null, @@ -270,8 +275,8 @@ export default { }, edit(row) { this.reset() - this.studyType = row.studyType||null - this.studyFormType = row.studyFormType||null + this.studyType = row.studyType || null + this.studyFormType = row.studyFormType || null if (row && row.id) { this.showIndex = 2 this.$modal.loading() @@ -287,9 +292,9 @@ export default { this.showIndex = 1 this.form = _.merge({}, this.form, row) this.templateData = deepClone(this.form) - let name=this.studyType==1?'试验':(this.studyType==5?'非试验表单':'麻精药表单') - let nameEn=this.studyType==1?'Study':(this.studyType==5?'Non-study':'ontrolled Drug') - this.saveSimpleLog({jcmc:'领取申请单新增',jcmcEn:'Material Application Table Create',name:name,nameEn:nameEn}) + let name = this.studyType == 1 ? '试验' : (this.studyType == 5 ? '非试验表单' : '麻精药表单') + let nameEn = this.studyType == 1 ? 'Study' : (this.studyType == 5 ? 'Non-study' : 'ontrolled Drug') + this.saveSimpleLog({ jcmc: '领取申请单新增', jcmcEn: 'Material Application Table Create', name: name, nameEn: nameEn }) this.open = true } }, diff --git a/src/views/business/study/comp/tbbd/Bj.vue b/src/views/business/study/comp/tbbd/Bj.vue index c9bf17e..a54afc0 100644 --- a/src/views/business/study/comp/tbbd/Bj.vue +++ b/src/views/business/study/comp/tbbd/Bj.vue @@ -177,7 +177,8 @@
{{ item.bh }}
- +
@@ -607,7 +608,7 @@ export default { this.showIndex = 1 this.$modal.loading() study_info({ id: params.studyId }).then(response => { - this.form = _.merge({}, this.form, { studySubjectId:params.studySubjectId,studyId: params.studyId, resourceStudy: response.data.resource, sftb: 1 }) + this.form = _.merge({}, this.form, { studySubjectId: params.studySubjectId, studyId: params.studyId, resourceStudy: response.data.resource, sftb: 1 }) this.templateData = deepClone(this.form) const obj = Object.assign({}, this.$route, { title: this.$t('page.business.study.studyFormFill.xzbd') }) this.$tab.updatePage(obj); @@ -764,8 +765,13 @@ export default { }, selectTemplateChange(val) { this.form.bdnr = val.content - this.form.templateMc = val.name - this.form.bdmc = val.name + if (this.$i18n.locale === 'zh_CN') { + this.form.templateMc = val.name + this.form.bdmc = val.name + } else { + this.form.templateMc = val.nameEn + this.form.bdmc = val.nameEn + } this.form.templateSn = val.sn }, cancel() { diff --git a/src/views/business/study/comp/ytbd/Bj.vue b/src/views/business/study/comp/ytbd/Bj.vue index 085ff65..8635ad9 100644 --- a/src/views/business/study/comp/ytbd/Bj.vue +++ b/src/views/business/study/comp/ytbd/Bj.vue @@ -42,7 +42,8 @@ + :name="form.templateMc" :studyType="studyType" :selectedDeptId="selectedDeptId" + :studyFormType="studyFormType" @change="selectTemplateChange" /> @@ -89,8 +90,12 @@ - {{ $t('page.business.study.studyFormPre.yes') }} - {{ $t('page.business.study.studyFormPre.no') }} + {{ + $t('page.business.study.studyFormPre.yes') + }} + {{ + $t('page.business.study.studyFormPre.no') + }} @@ -155,7 +160,7 @@ export default { open: false, openSubmit: false, permitForSecectUser: '', - selectedDeptId:null, + selectedDeptId: null, rulesApprove: { qmrmm: [{ required: true, @@ -187,8 +192,8 @@ export default { }, templateData: {}, - studyType:null, - studyFormType:null, + studyType: null, + studyFormType: null, } }, computed: { @@ -202,7 +207,7 @@ export default { onPreCallback(data) { console.log("data:" + JSON.stringify(data)) console.log("formdata:" + JSON.stringify(this.$refs.templateTable.getFilledFormData())) - if (data.type == 'fieldChanged' ) { + if (data.type == 'fieldChanged') { studyFormPre_updateBdnr( { id: this.form.id, @@ -234,8 +239,13 @@ export default { }, selectTemplateChange(val) { this.form.bdnr = val.content - this.form.templateMc = val.name - this.form.bdmc = val.name + if ( this.$i18n.locale === 'zh_CN') { + this.form.templateMc = val.name + this.form.bdmc = val.name + } else { + this.form.templateMc = val.nameEn + this.form.bdmc = val.nameEn + } this.form.templateSn = val.sn this.templateData = deepClone(this.form) }, @@ -266,9 +276,9 @@ export default { edit(row) { this.reset() this.permitForSecectUser = row.permitForSecectUser - this.studyType = row.studyType||null - this.studyFormType = row.studyFormType||null - this.selectedDeptId=row.selectedDeptId||null + this.studyType = row.studyType || null + this.studyFormType = row.studyFormType || null + this.selectedDeptId = row.selectedDeptId || null if (row && row.id) { this.showIndex = 2 this.$modal.loading() @@ -288,9 +298,9 @@ export default { this.templateData = deepClone(this.form) const obj = Object.assign({}, this.$route, { title: this.$t('page.business.study.studyFormFill.xzbd') }) this.$tab.updatePage(obj); - let name=this.studyType==1?'试验':(this.studyType==5?'非试验表单':'麻精药表单') - let nameEn=this.studyType==1?'Study':(this.studyType==5?'Non-study':'ontrolled Drug') - this.saveSimpleLog({jcmc:'预填表单新增',jcmcEn:'Preset Create',name:name,nameEn:nameEn}) + let name = this.studyType == 1 ? '试验' : (this.studyType == 5 ? '非试验表单' : '麻精药表单') + let nameEn = this.studyType == 1 ? 'Study' : (this.studyType == 5 ? 'Non-study' : 'ontrolled Drug') + this.saveSimpleLog({ jcmc: '预填表单新增', jcmcEn: 'Preset Create', name: name, nameEn: nameEn }) this.open = true } },