阅片单元问题配置问题名称中英文问题

uat_us
DESKTOP-6C3NK6N\WXS 2024-07-31 11:17:32 +08:00
parent 4b6c589881
commit ab65a9f1c7
2 changed files with 18 additions and 5 deletions

View File

@ -47,7 +47,7 @@
</el-form-item> </el-form-item>
<!-- 问题名称 --> <!-- 问题名称 -->
<el-form-item <el-form-item
v-if="(form.Type !== 'group' && !isLook) || (isLook && $i18n.locale !== 'en')" v-if="(form.Type !== 'group' && $i18n.locale !== 'en' )"
:label="$t('trials:readingUnit:qsList:title:qsName')" :label="$t('trials:readingUnit:qsList:title:qsName')"
prop="QuestionName" prop="QuestionName"
> >
@ -57,7 +57,7 @@
</el-form-item> </el-form-item>
<!-- 问题名称(En) --> <!-- 问题名称(En) -->
<el-form-item <el-form-item
v-if="(form.Type !== 'group' && !isLook) || (isLook && $i18n.locale !== 'zh')" v-if="(form.Type !== 'group' && $i18n.locale !== 'zh')"
:label="$t('trials:readingUnit:qsList:title:qsNameEn')" :label="$t('trials:readingUnit:qsList:title:qsNameEn')"
prop="QuestionEnName" prop="QuestionEnName"
> >
@ -791,6 +791,8 @@ export default {
], ],
QuestionName: [{required: true, message: this.$t('common:ruleMessage:specify'), trigger: ['blur', 'change']}, QuestionName: [{required: true, message: this.$t('common:ruleMessage:specify'), trigger: ['blur', 'change']},
{max: 50, message: `${this.$t('common:ruleMessage:maxLength')} 50`}], {max: 50, message: `${this.$t('common:ruleMessage:maxLength')} 50`}],
QuestionEnName:[{required: true, message: this.$t('common:ruleMessage:specify'), trigger: ['blur', 'change']},
{max: 50, message: `${this.$t('common:ruleMessage:maxLength')} 50`}],
TypeValue: [{required: true, message: this.$t('common:ruleMessage:specify'), trigger: ['blur', 'change']}, TypeValue: [{required: true, message: this.$t('common:ruleMessage:specify'), trigger: ['blur', 'change']},
{validator: validateTypeVal, trigger: ['blur', 'change']}, {validator: validateTypeVal, trigger: ['blur', 'change']},
{max: 200, message: `${this.$t('common:ruleMessage:maxLength')} 200`}], {max: 200, message: `${this.$t('common:ruleMessage:maxLength')} 200`}],
@ -974,6 +976,11 @@ export default {
this.$refs.qsForm.validate(valid => { this.$refs.qsForm.validate(valid => {
if (!valid) return if (!valid) return
this.loading = true this.loading = true
if(this.form.QuestionName && !this.form.QuestionEnName){
this.form.QuestionEnName = this.form.QuestionName;
}else if(!this.form.QuestionName && this.form.QuestionEnName){
this.form.QuestionName = this.form.QuestionEnName;
}
var params = Object.assign({}, this.form) var params = Object.assign({}, this.form)
params.TrialId = this.$route.query.trialId params.TrialId = this.$route.query.trialId
params.ReadingCriterionPageId = this.data.ReadingCriterionPageId params.ReadingCriterionPageId = this.data.ReadingCriterionPageId

View File

@ -35,7 +35,7 @@
/> />
</el-form-item> </el-form-item>
<el-form-item <el-form-item
v-if="form.Type !== 'group'" v-if="form.Type !== 'group'&& $i18n.locale !== 'en'"
:label="$t('trials:readingUnit:qsList:title:qsName')" :label="$t('trials:readingUnit:qsList:title:qsName')"
prop="QuestionName" prop="QuestionName"
> >
@ -44,7 +44,7 @@
/> />
</el-form-item> </el-form-item>
<el-form-item <el-form-item
v-if="form.Type !== 'group'" v-if="form.Type !== 'group'&& $i18n.locale !== 'zh'"
:label="$t('trials:readingUnit:qsList:title:qsNameEn')" :label="$t('trials:readingUnit:qsList:title:qsNameEn')"
prop="QuestionEnName" prop="QuestionEnName"
> >
@ -553,7 +553,8 @@ export default {
], ],
QuestionName: [{ required: true, message: this.$t('common:ruleMessage:specify'), trigger: 'blur' }, QuestionName: [{ required: true, message: this.$t('common:ruleMessage:specify'), trigger: 'blur' },
{ max: 200, message: `${this.$t('common:ruleMessage:maxLength')} 200` }], { max: 200, message: `${this.$t('common:ruleMessage:maxLength')} 200` }],
QuestionEnName:[{required: true, message: this.$t('common:ruleMessage:specify'), trigger: ['blur', 'change']},
{max: 50, message: `${this.$t('common:ruleMessage:maxLength')} 50`}],
TypeValue: [{ required: true, message: this.$t('common:ruleMessage:specify'), trigger: 'blur' }, TypeValue: [{ required: true, message: this.$t('common:ruleMessage:specify'), trigger: 'blur' },
{ validator: validateTypeVal, trigger: 'blur' }, { validator: validateTypeVal, trigger: 'blur' },
{ max: 200, message: `${this.$t('common:ruleMessage:maxLength')} 200` }], { max: 200, message: `${this.$t('common:ruleMessage:maxLength')} 200` }],
@ -695,6 +696,11 @@ export default {
this.$refs.tableQsForm.validate(valid => { this.$refs.tableQsForm.validate(valid => {
if (!valid) return if (!valid) return
this.loading = true this.loading = true
if(this.form.QuestionName && !this.form.QuestionEnName){
this.form.QuestionEnName = this.form.QuestionName;
}else if(!this.form.QuestionName && this.form.QuestionEnName){
this.form.QuestionName = this.form.QuestionEnName;
}
var params = Object.assign({}, this.form) var params = Object.assign({}, this.form)
params.TrialId = this.$route.query.trialId params.TrialId = this.$route.query.trialId
params.ReadingQuestionId = this.readingQuestionId params.ReadingQuestionId = this.readingQuestionId