宁波一号线 新建列车代码调整
This commit is contained in:
parent
9115155865
commit
42668b6086
@ -13,14 +13,30 @@
|
|||||||
<el-form ref="form" size="small" label-width="80px" :model="addModel" :rules="rules">
|
<el-form ref="form" size="small" label-width="80px" :model="addModel" :rules="rules">
|
||||||
<div style="width: 96%;">
|
<div style="width: 96%;">
|
||||||
<el-form-item label="车 组 号:" label-width="95px" prop="trainCode">
|
<el-form-item label="车 组 号:" label-width="95px" prop="trainCode">
|
||||||
<el-input v-model="addModel.trainCode" />
|
<!-- <el-input v-model="addModel.trainCode" /> -->
|
||||||
|
<el-select v-model="addModel.trainCode" filterable>
|
||||||
|
<el-option
|
||||||
|
v-for="train in trainList"
|
||||||
|
:key="train.groupNumber"
|
||||||
|
:label="train.groupNumber"
|
||||||
|
:value="train.code"
|
||||||
|
/>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="车 次 号:" label-width="95px" prop="tripNumber">
|
||||||
|
<!-- <el-input v-model="addModel.tripNumber" /> -->
|
||||||
|
<el-select v-model="addModel.tripNumber" @change="tripNumberChange">
|
||||||
|
<el-option
|
||||||
|
v-for="tripNum in tripNumberList"
|
||||||
|
:key="tripNum"
|
||||||
|
:label="tripNum"
|
||||||
|
:value="tripNum"
|
||||||
|
/>
|
||||||
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="服 务 号:" label-width="95px" prop="serverNumber">
|
<el-form-item label="服 务 号:" label-width="95px" prop="serverNumber">
|
||||||
<el-input v-model="addModel.serverNumber" />
|
<el-input v-model="addModel.serverNumber" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="车 次 号:" label-width="95px" prop="tripNumber">
|
|
||||||
<el-input v-model="addModel.tripNumber" />
|
|
||||||
</el-form-item>
|
|
||||||
</div>
|
</div>
|
||||||
</el-form>
|
</el-form>
|
||||||
<el-row justify="center" class="button-group">
|
<el-row justify="center" class="button-group">
|
||||||
@ -37,6 +53,7 @@
|
|||||||
<script>
|
<script>
|
||||||
import { mapGetters } from 'vuex';
|
import { mapGetters } from 'vuex';
|
||||||
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
||||||
|
import { getTripNumberList, getServiceNumbersByTripNum } from '@/api/simulation';
|
||||||
import CMD from '@/scripts/cmdPlugin/CommandEnum';
|
import CMD from '@/scripts/cmdPlugin/CommandEnum';
|
||||||
|
|
||||||
|
|
||||||
@ -49,21 +66,22 @@ export default {
|
|||||||
return {
|
return {
|
||||||
trainNoList: [],
|
trainNoList: [],
|
||||||
selected: null,
|
selected: null,
|
||||||
|
tripNumberList: [],
|
||||||
addModel: {
|
addModel: {
|
||||||
trainCode: '', // 车组号
|
trainCode: '', // 车组号
|
||||||
serverNumber: '', // 服务号
|
serviceNumber: '', // 服务号
|
||||||
tripNumber: '' // 车次号
|
tripNumber: '' // 车次号
|
||||||
},
|
},
|
||||||
|
|
||||||
rules: {
|
rules: {
|
||||||
trainCode: [
|
trainCode: [
|
||||||
{ required: true, message: '请输入车组号', trigger: 'blur' }
|
{ required: true, message: '请输入车组号', trigger: 'change' }
|
||||||
],
|
],
|
||||||
serverNumber: [
|
serviceNumber: [
|
||||||
{ required: true, message: '请输入服务号', trigger: 'change' }
|
{ required: true, message: '请输入服务号', trigger: 'blur' }
|
||||||
],
|
],
|
||||||
tripNumber: [
|
tripNumber: [
|
||||||
{ required: true, message: '请输入车次号', trigger: 'blur' }
|
{ required: true, message: '请输入车次号', trigger: 'change' }
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
dialogShow: false,
|
dialogShow: false,
|
||||||
@ -72,7 +90,9 @@ export default {
|
|||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
...mapGetters('map', [
|
...mapGetters('map', [
|
||||||
'stationStandList'
|
'trainList',
|
||||||
|
'stationStandList',
|
||||||
|
'trainWindowSectionCode'
|
||||||
]),
|
]),
|
||||||
show() {
|
show() {
|
||||||
return this.dialogShow && !this.$store.state.menuOperation.break;
|
return this.dialogShow && !this.$store.state.menuOperation.break;
|
||||||
@ -93,12 +113,30 @@ export default {
|
|||||||
});
|
});
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
tripNumberChange(tripNumber) {
|
||||||
|
getServiceNumbersByTripNum(this.$route.query.group, tripNumber).then(resp => {
|
||||||
|
this.serviceNumber = resp.data;
|
||||||
|
});
|
||||||
|
},
|
||||||
doShow(operate, selected) {
|
doShow(operate, selected) {
|
||||||
this.selected = selected;
|
this.selected = selected;
|
||||||
// 如果不是断点激活,则需要对初始值进行初始化
|
// 如果不是断点激活,则需要对初始值进行初始化
|
||||||
// if (!this.dialogShow) {
|
// if (!this.dialogShow) {
|
||||||
|
|
||||||
// }
|
// }
|
||||||
|
this.addModel = {
|
||||||
|
trainCode:'',
|
||||||
|
tripNumber:'',
|
||||||
|
serviceNumber:''
|
||||||
|
};
|
||||||
|
getTripNumberList(this.$route.query.group).then(resp => {
|
||||||
|
this.tripNumberList = [];
|
||||||
|
resp.data.forEach(item => {
|
||||||
|
if (!this.tripNumberList.includes(item)) {
|
||||||
|
this.tripNumberList.push(item);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
});
|
||||||
this.dialogShow = true;
|
this.dialogShow = true;
|
||||||
this.$nextTick(function () {
|
this.$nextTick(function () {
|
||||||
this.$store.dispatch('training/emitTipFresh');
|
this.$store.dispatch('training/emitTipFresh');
|
||||||
@ -109,7 +147,7 @@ export default {
|
|||||||
this.dialogShow = false;
|
this.dialogShow = false;
|
||||||
this.$store.dispatch('training/emitTipFresh');
|
this.$store.dispatch('training/emitTipFresh');
|
||||||
this.$store.dispatch('map/setTrainWindowShow', false);
|
this.$store.dispatch('map/setTrainWindowShow', false);
|
||||||
this.mouseCancelState(this.selected);
|
// this.mouseCancelState(this.selected);
|
||||||
},
|
},
|
||||||
commit() {
|
commit() {
|
||||||
this.$refs['form'].validate((valid) => {
|
this.$refs['form'].validate((valid) => {
|
||||||
|
Loading…
Reference in New Issue
Block a user