Merge branch 'test' of git.code.tencent.com:lian-cbtc/jl-client into yly_eg2d

This commit is contained in:
yuan 2021-07-09 10:32:21 +08:00
commit eb7b59078a

View File

@ -10,17 +10,8 @@
:modal="false"
:close-on-click-modal="false"
>
<el-form
ref="form"
size="small"
label-width="120px"
:model="formModel"
:rules="rulesComputed"
>
<el-form-item
:label="this.$t('menu.groupNumber') + this.$t('global.colon')"
prop="groupNumber"
>
<el-form ref="form" size="small" label-width="120px" :model="formModel" :rules="rulesComputed">
<el-form-item :label="this.$t('menu.groupNumber') + this.$t('global.colon')" prop="groupNumber">
<el-select
:id="domIdTrainNumber"
v-model="formModel.groupNumber"
@ -45,20 +36,14 @@
>
<el-radio :label="'PLAN'">{{ $t("menu.planTrain") }}</el-radio>
<el-radio :label="'HEAD'">{{ $t("menu.headCodeTrain") }}</el-radio>
<el-radio :label="'MANUAL'" style="margin-top:5px;">{{
$t("menu.artificialTrain")
}}</el-radio>
<el-radio :label="'MANUAL'" style="margin-top:5px;">{{ $t("menu.artificialTrain") }}</el-radio>
</el-radio-group>
</el-form-item>
<!-- 表号 -->
<el-form-item v-if="formModel.type == 'PLAN'" prop="serviceNumber">
<span slot="label">{{ $t("menu.serviceNumber") + "" }}</span>
<el-input
:id="domIdServerNo"
v-model="formModel.serviceNumber"
:disabled="serverNoIsDisabled"
/>
<el-input :id="domIdServerNo" v-model="formModel.serviceNumber" :disabled="serverNoIsDisabled" />
</el-form-item>
<!-- 车次号 -->
@ -89,18 +74,8 @@
:label="this.$t('menu.category') + this.$t('global.colon')"
prop="category"
>
<el-select
:id="domIdTrainNumber"
v-model="formModel.category"
filterable
:disabled="true"
>
<el-option
v-for="item in categoryList"
:key="item.value"
:label="item.name"
:value="item.value"
/>
<el-select :id="domIdTrainNumber" v-model="formModel.category" filterable :disabled="true">
<el-option v-for="item in categoryList" :key="item.value" :label="item.name" :value="item.value" />
</el-select>
</el-form-item>
</el-form>
@ -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"
};
}