海外标准入库 - 1和4 - 把海外标准入库的中文名称设置成非必填

This commit is contained in:
yanyizhou
2021-12-28 19:32:30 +08:00
parent f9e8abe014
commit 1336553e5f
2 changed files with 20 additions and 1 deletions
@@ -1836,9 +1836,11 @@ export default {
/** val === '1' (国外) val === '0' 国内 */
// 国内英文名称不必填 国外必填 ,标准性质国内不体现
if (val === '1') {
this.rules.standName[0].required = false
this.rules.standEnName[0].required = true;
this.rules.standNature[0].required = false
} else {
this.rules.standName[0].required = true
this.rules.standNature[0].required = true
this.rules.standEnName[0].required = false;
}
@@ -26,7 +26,7 @@
<el-row :gutter="24">
<el-col :span="12">
<el-form-item label="标准来源" prop="standInData" class="add-form-item form-item-disabled">
<el-radio-group v-model="form.standInData">
<el-radio-group v-model="form.standInData" @change="standInChange">
<el-radio label="0">国内标准入库</el-radio>
<el-radio label="1">海外标准入库</el-radio>
</el-radio-group>
@@ -1692,6 +1692,23 @@ export default {
},
},
methods: {
// 标准来源改变事件
standInChange(val) {
this.verifySarStandard = false
/** val === '1' (国外) val === '0' 国内 */
// 国内英文名称不必填 国外必填 ,标准性质国内不体现
if (val === '1') {
this.rules.standName[0].required = false
this.rules.standNature[0].required = false
this.rules.standEnName[0].required = true;
} else {
this.rules.standName[0].required = true
this.rules.standNature[0].required = true
this.rules.standEnName[0].required = false;
}
this.standardSearchForm.standType = val === '0' ? 'INLAND' : 'FOREIGN'
},
getBusStandFileByAttId(attId) {
return new Promise((resolve, reject) => {
getBusStandFileByAttId({