北京线 车次窗 新建列车代码调整

This commit is contained in:
joylink_cuiweidong 2020-02-12 18:57:02 +08:00
parent fa233a7031
commit 5721f17cf9
2 changed files with 49 additions and 53 deletions

View File

@ -1,13 +1,16 @@
<template>
<el-dialog class="beijing-01__systerm stand-stop-time" :title="title" :visible.sync="show" width="340px" :before-close="doClose"
:zIndex="2000" :modal="false" :close-on-click-modal="false" v-dialogDrag>
<el-form size="small" label-width="80px" :model="addModel" :rules="rules" ref="form">
<div style="width: 96%;display:flex;flex-dorection:row">
<!-- <el-form-item label="车 组 号:" label-width="95px" prop="tripNumber">
<el-input v-model="addModel.tripNumber" disabled></el-input>
</el-form-item> -->
<el-form-item label="车 次 号:" label-width="95px" prop="trainSource">
<el-input v-model="addModel.trainSource" :id="domIdTrainSource" @change="handerTrainSource"></el-input>
<el-form ref="form" size="small" label-width="80px" :model="addModel" :rules="rules">
<div style="width: 96%;">
<el-form-item label="车 组 号:" label-width="95px" prop="trainCode">
<el-input v-model="addModel.trainCode" />
</el-form-item>
<el-form-item label="服 务 号:" label-width="95px" prop="serverNumber">
<el-input v-model="addModel.serverNumber" />
</el-form-item>
<el-form-item label="车 次 号:" label-width="95px" prop="tripNumber">
<el-input v-model="addModel.tripNumber" />
</el-form-item>
</div>
</el-form>
@ -24,8 +27,8 @@
<script>
import { mapGetters } from 'vuex';
import { MapDeviceType, OperationEvent } from '@/scripts/ConstDic';
import { mouseCancelState } from '../utils/menuItemStatus';
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
import CMD from '@/scripts/cmdPlugin/CommandEnum';
export default {
// name: 'TrainMove',
@ -37,32 +40,24 @@
trainNoList: [],
selected: null,
addModel: {
tripNumber: '',
trainSource: '',
stationStandSource: '',
trainGoal: '',
stationStandGoal: '',
trainCode: '', //
serverNumber: '', //
tripNumber: '' //
},
rules: {
// tripNumber: [
// { required: true, message: '', trigger: 'blur' }
// ],
trainSource: [
{ required: true, message: '请输入车次号', trigger: 'blur' }
trainCode: [
{ required: true, message: '请输入车组号', trigger: 'blur' }
],
// stationStandSource: [
// { required: true, message: '', trigger: 'change' }
// ],
// trainGoal: [
// { required: true, message: '', trigger: 'blur' }
// ],
// stationStandGoal: [
// { required: true, message: '', trigger: 'change' }
// ],
serverNumber: [
{ required: true, message: '请输入服务号', trigger: 'change' }
],
tripNumber: [
{ required: true, message: '请输入车次号', trigger: 'blur' }
]
},
dialogShow: false,
loading: false,
loading: false
}
},
computed: {
@ -78,12 +73,8 @@
domIdConfirm() {
return this.dialogShow ? OperationEvent.Train.moveTrainId.menu.domId : '';
},
domIdTrainSource() {
// return this.dialogShow ? OperationEvent.Train.trainSource.menu.domId : '';
return this.dialogShow ? OperationEvent.Train.setPlanTrainId.menu.domId : '';
},
title() {
return '添加计划车'
return '创建计划车'
}
},
mounted() {
@ -114,14 +105,18 @@
this.$refs['form'].validate((valid) => {
if (valid) {
let operate = {
send: true,
type: MapDeviceType.Train.type,
// operation: OperationEvent.Train.moveTrainId.menu.operation,
operation: OperationEvent.Train.addPlanTrainId.menu.operation,
over: true,
operation: OperationEvent.Train.createPlanTrain.menu.operation,
cmdType: CMD.TrainWindow.CMD_Train_Init_Plan,
param: {
trainCode: this.addModel.trainCode, //
serverNumber: this.addModel.serverNumber, //
tripNumber: this.addModel.tripNumber //
}
}
this.loading = true;
this.$store.dispatch('training/next', operate).then(({ valid }) => {
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
this.loading = false;
if (valid) {
this.doClose();

View File

@ -21,7 +21,7 @@ import PopMenu from '@/components/PopMenu';
import NoticeInfo from './dialog/childDialog/childDialog/noticeInfo';
import { mapGetters } from 'vuex';
import { OperateMode } from '@/scripts/ConstDic';
import { MapDeviceType, OperationEvent, DeviceMenu } from '@/scripts/ConstDic';
import { MapDeviceType, DeviceMenu } from '@/scripts/ConstDic';
import { MenuDisabledState, menuConvert, trainMenuFiltration } from './utils/menuItemStatus';
import TrainDelete from './dialog/trainDelete';
import TrainDefine from './dialog/trainDefine';
@ -35,6 +35,7 @@ import TrainSetHead from './dialog/trainSetHead';
import TrainSetWork from './dialog/trainSetWork';
import TrainFlag from './dialog/trainFlag';
import { mouseCancelState } from './utils/menuItemStatus';
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
import MenuContextHandler from '@/scripts/cmdPlugin/MenuContextHandler';
import CMD from '@/scripts/cmdPlugin/CommandEnum';
@ -504,7 +505,7 @@ export default {
code: this.selected.code,
operation: OperationEvent.Train.createPlanTrain.menu.operation,
param: {
trainWindowCode: this.selected.code
sectionCode: this.$store.state.map.trainWindowSectionCode
}
};
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {