调整自动折返非空校验

This commit is contained in:
fan 2020-03-11 15:50:47 +08:00
parent 95e2832cec
commit 3273724484

View File

@ -217,6 +217,15 @@ export default {
},
setShowSecond(flag) {
this.showSecond = flag;
if (flag) {
this.rules.turnBackRoute2Name = [{ required: true, message: '请选择折返进路2', trigger: 'blur' }];
this.rules.basicRoute2Name = [{ required: true, message: '请选择基础进路2', trigger: 'blur'}];
this.rules.reentryTrack2Code = [{ required: true, message: '请选择折返区段2', trigger: 'change'}];
} else {
delete this.rules.turnBackRoute2Name;
delete this.rules.basicRoute2Name;
delete this.rules.reentryTrack2Code;
}
},
buildModel(code) {
const model = Object.assign({}, this.addModel);
@ -271,6 +280,7 @@ export default {
this.addModel.code = '';
this.$refs.form.resetFields();
this.isSave = true;
this.showSecond = false;
}
},
setRouteCode(data, type) {