diff --git a/src/jmapNew/theme/components/menus/dialog/trainControl.vue b/src/jmapNew/theme/components/menus/dialog/trainControl.vue index 9018a69b2..afdd1ef5d 100644 --- a/src/jmapNew/theme/components/menus/dialog/trainControl.vue +++ b/src/jmapNew/theme/components/menus/dialog/trainControl.vue @@ -10,17 +10,8 @@ :modal="false" :close-on-click-modal="false" > - - + + {{ $t("menu.planTrain") }} {{ $t("menu.headCodeTrain") }} - {{ - $t("menu.artificialTrain") - }} + {{ $t("menu.artificialTrain") }} {{ $t("menu.serviceNumber") + ":" }} - + @@ -89,18 +74,8 @@ :label="this.$t('menu.category') + this.$t('global.colon')" prop="category" > - - + + @@ -181,11 +156,11 @@ export default { { required: !(this.formModel.type === "HEAD" && this.popClass === "xian-01__systerm"), message: "请输入车次号", - trigger: "blur" + trigger: "change" }, - { validator: validateTripNum, trigger: "blur" } + { validator: validateTripNum, trigger: "change" } ], - destinationCode: [{ required: true, message: "请输入目的地号", trigger: "blur" }] + destinationCode: [{ required: true, message: "请输入目的地号", trigger: "change" }] }; }, serverNoIsDisabled() { @@ -290,11 +265,7 @@ export default { }, watch: { "formModel.tripNumber": function(val) { - if ( - this.popClass !== "foshan-01__systerm" && - val.length === 4 && - this.formModel.type !== "HEAD" - ) { + if (this.popClass !== "foshan-01__systerm" && val.length === 4 && this.formModel.type !== "HEAD") { this.trainNoChange(val); } else if (this.popClass !== "foshan-01__systerm" && this.formModel.type !== "HEAD") { this.formModel = { @@ -302,8 +273,8 @@ export default { tripNumber: val, type: this.formModel.type, serviceNumber: "", - targetCode: "", - category: "MM" + category: "MM", + destinationCode: "" }; } else if ( this.popClass === "foshan-01__systerm" && @@ -313,36 +284,30 @@ export default { ) { this.trainNoChange(val, this.formModel.serviceNumber); } else if (this.popClass === "foshan-01__systerm" && this.formModel.type !== "HEAD") { - const serviceNumber = this.formModel.serviceNumber; - const destinationCode = this.formModel.destinationCode; + let serviceNumber = this.formModel.serviceNumber; + let destinationCode = this.formModel.destinationCode; this.formModel = { groupNumber: this.formModel.groupNumber, destinationCode: destinationCode, tripNumber: val, type: this.formModel.type, serviceNumber: serviceNumber, - targetCode: "", category: "MM" }; } }, "formModel.serviceNumber": function(val) { - if ( - this.popClass === "foshan-01__systerm" && - val.length === 3 && - this.formModel.tripNumber.length === 2 - ) { + if (this.popClass === "foshan-01__systerm" && val.length === 3 && this.formModel.tripNumber.length === 2) { this.trainNoChange(this.formModel.tripNumber, val); } else if (this.popClass === "foshan-01__systerm") { - const tripNumber = this.formModel.tripNumber; - const destinationCode = this.formModel.destinationCode; + let tripNumber = this.formModel.tripNumber; + let destinationCode = this.formModel.destinationCode; this.formModel = { groupNumber: this.formModel.groupNumber, tripNumber: tripNumber, destinationCode: destinationCode, type: this.formModel.type, serviceNumber: val, - targetCode: "", category: "MM" }; }