2022-06-27 16:19:52 +08:00
|
|
|
|
<template>
|
|
|
|
|
<el-dialog
|
|
|
|
|
v-dialogDrag
|
|
|
|
|
class="chengdou-03__systerm train-set-plan"
|
|
|
|
|
:title="title"
|
|
|
|
|
:visible.sync="show"
|
2022-06-28 16:18:57 +08:00
|
|
|
|
width="670px"
|
2022-06-27 16:19:52 +08:00
|
|
|
|
:before-close="doClose"
|
|
|
|
|
:z-index="2000"
|
|
|
|
|
:modal="false"
|
|
|
|
|
:close-on-click-modal="false"
|
|
|
|
|
>
|
2022-06-28 16:18:57 +08:00
|
|
|
|
<el-form id="AddDispatcherForm" ref="form" :model="model" label-width="80px" :rules="rules">
|
2022-06-29 10:59:16 +08:00
|
|
|
|
<el-form-item label="车站:" prop="stationCode" style="width: 100%;">
|
|
|
|
|
<el-select v-model="model.stationCode" placeholder="" style="width:180px">
|
|
|
|
|
<el-option
|
|
|
|
|
v-for="item in stationList"
|
|
|
|
|
:key="item.code"
|
|
|
|
|
:label="item.name"
|
|
|
|
|
:value="item.code"
|
|
|
|
|
/>
|
|
|
|
|
</el-select>
|
|
|
|
|
</el-form-item>
|
2022-06-28 16:18:57 +08:00
|
|
|
|
<el-form-item label="列车类型:" prop="trainType">
|
|
|
|
|
<el-select v-model="model.trainType" placeholder="" style="width:180px">
|
|
|
|
|
<el-option
|
|
|
|
|
v-for="item in trainTypeList"
|
|
|
|
|
:key="item.code"
|
|
|
|
|
:label="item.name"
|
|
|
|
|
:value="item.code"
|
|
|
|
|
/>
|
|
|
|
|
</el-select>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
<el-form-item label="运行类型:" prop="runType" style="margin-left: 45px;">
|
|
|
|
|
<el-select v-model="model.runType" placeholder="" style="width:180px">
|
|
|
|
|
<el-option
|
|
|
|
|
v-for="item in runTypeList"
|
|
|
|
|
:key="item.code"
|
|
|
|
|
:label="item.name"
|
|
|
|
|
:value="item.code"
|
|
|
|
|
/>
|
|
|
|
|
</el-select>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
<el-form-item label="到达车次:" prop="arriveTripNumber">
|
2022-06-29 15:53:51 +08:00
|
|
|
|
<el-input v-model="model.arriveTripNumber" style="width:160px" :disabled="model.startRunPlan" />
|
2022-06-28 16:18:57 +08:00
|
|
|
|
</el-form-item>
|
|
|
|
|
<el-form-item label="出发车次:" prop="departTripNumber" style="margin-left: 66px;">
|
2022-06-29 15:53:51 +08:00
|
|
|
|
<el-input v-model="model.departTripNumber" style="width:160px" :disabled="model.endRunPlan" />
|
2022-06-28 16:18:57 +08:00
|
|
|
|
</el-form-item>
|
|
|
|
|
<el-form-item label="接车口:" prop="arriveDirectionCode">
|
2022-06-29 15:53:51 +08:00
|
|
|
|
<el-select v-model="model.arriveDirectionCode" placeholder="" style="width:180px" :disabled="model.startRunPlan">
|
2022-06-28 16:18:57 +08:00
|
|
|
|
<el-option
|
|
|
|
|
v-for="item in mapStationDirectionList"
|
|
|
|
|
:key="item.code"
|
|
|
|
|
:label="item.name"
|
|
|
|
|
:value="item.code"
|
|
|
|
|
/>
|
|
|
|
|
</el-select>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
<el-form-item label="发车口:" prop="departDirectionCode" style="margin-left:45px;">
|
2022-06-29 15:53:51 +08:00
|
|
|
|
<el-select v-model="model.departDirectionCode" placeholder="" style="width:180px" :disabled="model.endRunPlan">
|
2022-06-28 16:18:57 +08:00
|
|
|
|
<el-option
|
|
|
|
|
v-for="item in mapStationDirectionList"
|
|
|
|
|
:key="item.code"
|
|
|
|
|
:label="item.name"
|
|
|
|
|
:value="item.code"
|
|
|
|
|
/>
|
|
|
|
|
</el-select>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
<el-form-item label="接车股道:" prop="arriveSectionCode">
|
2022-06-29 15:53:51 +08:00
|
|
|
|
<el-select v-model="model.arriveSectionCode" placeholder="" style="width:160px" :disabled="model.startRunPlan">
|
2022-06-28 16:18:57 +08:00
|
|
|
|
<el-option
|
|
|
|
|
v-for="item in filterSectionList"
|
|
|
|
|
:key="item.code"
|
|
|
|
|
:label="item.name"
|
|
|
|
|
:value="item.code"
|
|
|
|
|
/>
|
|
|
|
|
</el-select>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
<el-form-item label="发车股道:" prop="departSectionCode" style="margin-left: 67px;">
|
2022-06-29 15:53:51 +08:00
|
|
|
|
<el-select v-model="model.departSectionCode" placeholder="" style="width:160px" :disabled="model.endRunPlan">
|
2022-06-28 16:18:57 +08:00
|
|
|
|
<el-option
|
|
|
|
|
v-for="item in filterSectionList"
|
|
|
|
|
:key="item.code"
|
|
|
|
|
:label="item.name"
|
|
|
|
|
:value="item.code"
|
|
|
|
|
/>
|
|
|
|
|
</el-select>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
<el-form-item label="到达时间:" prop="arrivePlanTime">
|
2022-06-29 15:53:51 +08:00
|
|
|
|
<el-date-picker v-model="model.arrivePlanTime" type="datetime" :disabled="model.startRunPlan" value-format="yyyy-MM-dd HH:mm" format="yyyy-MM-dd HH:mm" style="width:160px" />
|
2022-06-28 16:18:57 +08:00
|
|
|
|
</el-form-item>
|
|
|
|
|
<el-form-item label="" prop="startRunPlan" class="noMargin" style="margin-left:10px;">
|
|
|
|
|
<el-checkbox v-model="model.startRunPlan">始发</el-checkbox>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
<el-form-item label="出发时间:" prop="departPlanTime" style="margin-left:10px;">
|
2022-06-29 15:53:51 +08:00
|
|
|
|
<el-date-picker v-model="model.departPlanTime" type="datetime" :disabled="model.endRunPlan" value-format="yyyy-MM-dd HH:mm" format="yyyy-MM-dd HH:mm" style="width:160px" />
|
2022-06-28 16:18:57 +08:00
|
|
|
|
</el-form-item>
|
|
|
|
|
<el-form-item label="" prop="endRunPlan" class="noMargin" style="margin-left:10px;">
|
|
|
|
|
<el-checkbox v-model="model.endRunPlan">终到</el-checkbox>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
<el-form-item label="" prop="electrical" class="noMargin" style="margin-left:80px;">
|
|
|
|
|
<el-checkbox v-model="model.electrical">电力</el-checkbox>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
<el-form-item label="" prop="passenger" class="noMargin" style="margin-left:10px;">
|
|
|
|
|
<el-checkbox v-model="model.passenger">办理客运</el-checkbox>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
<el-form-item label="" prop="transfinite" style="margin-left:20px;" class="noMargin">
|
|
|
|
|
<el-select v-model="model.transfinite" placeholder="" style="width:110px">
|
|
|
|
|
<el-option
|
|
|
|
|
v-for="item in transfiniteList"
|
|
|
|
|
:key="item.code"
|
|
|
|
|
:label="item.name"
|
|
|
|
|
:value="item.code"
|
|
|
|
|
/>
|
|
|
|
|
</el-select>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
<br>
|
|
|
|
|
<el-form-item label="" prop="trackDiscordant" style="margin-left:80px;width: 220px;" class="noMargin">
|
|
|
|
|
<el-checkbox v-model="model.trackDiscordant">运行股道与基本径路不一致</el-checkbox>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
<el-form-item label="" prop="entryOutDiscordant" style="margin-left:90px;width: 220px;" class="noMargin">
|
|
|
|
|
<el-checkbox v-model="model.entryOutDiscordant">出入口与基本径路不一致</el-checkbox>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
<!-- trackDiscordant -->
|
|
|
|
|
<!-- 运行股道与基本径路不一致 -->
|
|
|
|
|
<!-- entryOutDiscordant -->
|
|
|
|
|
<!-- 出入口与基本径路不一致 -->
|
|
|
|
|
<!-- keyTrains
|
|
|
|
|
重点列车 -->
|
|
|
|
|
</el-form>
|
2022-06-27 16:19:52 +08:00
|
|
|
|
<el-row justify="center" style="margin-top:10px">
|
|
|
|
|
<el-col :span="7" :offset="5">
|
|
|
|
|
<el-button :id="domIdConfirm" type="primary" :loading="loading" @click="commit">确定</el-button>
|
|
|
|
|
</el-col>
|
|
|
|
|
<el-col :span="7" :offset="2">
|
|
|
|
|
<el-button :id="domIdCancel" @click="cancel">取 消</el-button>
|
|
|
|
|
</el-col>
|
|
|
|
|
</el-row>
|
|
|
|
|
</el-dialog>
|
|
|
|
|
</template>
|
|
|
|
|
<script>
|
|
|
|
|
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
|
|
|
|
import {menuOperate, commitOperate} from '@/jmapNew/theme/components/utils/menuOperate';
|
2022-06-29 10:59:16 +08:00
|
|
|
|
import { mapGetters } from 'vuex';
|
2022-06-27 16:19:52 +08:00
|
|
|
|
export default {
|
2022-06-28 16:18:57 +08:00
|
|
|
|
name: 'AddDispatcherLogerRunplan',
|
2022-06-27 16:19:52 +08:00
|
|
|
|
data() {
|
2022-06-28 16:18:57 +08:00
|
|
|
|
var validateTripNumber = (rule, value, callback) => {
|
|
|
|
|
if (value) {
|
|
|
|
|
const judge = /^[a-zA-Z0-9]*[\d]$/.test(value);
|
|
|
|
|
if (judge) {
|
|
|
|
|
if (value.toString().length > 6 || value.toString().length < 2) {
|
|
|
|
|
callback('车次长度2-6位');
|
|
|
|
|
} else {
|
|
|
|
|
callback();
|
|
|
|
|
}
|
|
|
|
|
} else {
|
|
|
|
|
callback('字母+数字,最后一位数字');
|
|
|
|
|
}
|
|
|
|
|
} else {
|
|
|
|
|
// callback('请输入车次');
|
|
|
|
|
callback();
|
|
|
|
|
}
|
|
|
|
|
};
|
2022-06-27 16:19:52 +08:00
|
|
|
|
return {
|
|
|
|
|
dialogShow: false,
|
|
|
|
|
loading: false,
|
2022-06-28 16:18:57 +08:00
|
|
|
|
mapStationDirectionList:[],
|
|
|
|
|
filterSectionList:[],
|
|
|
|
|
trainTypeList:[
|
|
|
|
|
{name:'跨局快速旅客列车', code:'FAST_PASSENGER_TRAIN' }
|
|
|
|
|
],
|
|
|
|
|
runTypeList:[
|
|
|
|
|
{name:'快速旅客列车', code:'FAST_PASSENGER_TRAIN' }
|
|
|
|
|
],
|
|
|
|
|
transfiniteList:[
|
|
|
|
|
{name:'不超限', code:'NO' },
|
|
|
|
|
{name:'超级超限', code:'TRANSFINITE_SUPER' },
|
|
|
|
|
{name:'一级超限', code:'TRANSFINITE_ONE_LEVEL' },
|
|
|
|
|
{name:'二级超限', code:'TRANSFINITE_TWO_LEVEL' }
|
|
|
|
|
],
|
2022-06-27 16:19:52 +08:00
|
|
|
|
model:{
|
|
|
|
|
// runPlanCode:'', // 新增没有
|
|
|
|
|
stationCode:'', // 车站编码
|
|
|
|
|
// groupNumber:'', // 班别:目前没有
|
|
|
|
|
arriveSectionCode:'', // 到达股道
|
|
|
|
|
arrivePlanTime:'', // 到达计划时间
|
|
|
|
|
arriveTripNumber:'', // 到达车次
|
|
|
|
|
arriveStationCode:'', // 到达车站
|
|
|
|
|
arriveDirectionCode:'', // 到达方向编码(到达口)
|
|
|
|
|
|
|
|
|
|
departSectionCode:'', // 发车股道
|
|
|
|
|
departPlanTime:'', // 发车计划时间
|
|
|
|
|
departTripNumber:'', // 发车车次
|
|
|
|
|
departStationCode:'', // 发车车站
|
|
|
|
|
departDirectionCode:'', // 发向方向编码(发车口)
|
|
|
|
|
|
|
|
|
|
startRunPlan:false, // 始发计划 true,false
|
|
|
|
|
endRunPlan:false, // 终到计划 true,false
|
|
|
|
|
|
|
|
|
|
electrical:false, // 电力 true,false
|
|
|
|
|
passenger:false, // 客运 true,false
|
2022-06-28 16:18:57 +08:00
|
|
|
|
// keyTrains:false, // 重点列车 true,false
|
|
|
|
|
// military:false, // 是否军用 true,false
|
2022-06-27 16:19:52 +08:00
|
|
|
|
|
|
|
|
|
trackDiscordant:false, // 运行股道与基本径路不一致
|
|
|
|
|
entryOutDiscordant:false, // 出入口与基本径路不一致
|
|
|
|
|
|
|
|
|
|
transfinite:'NO' // 超限等级 NO:不超限 TRANSFINITE_SUPER:超级超限 TRANSFINITE_ONE_LEVEL:一级超限 TRANSFINITE_TWO_LEVEL:二级超限
|
|
|
|
|
|
2022-06-28 16:18:57 +08:00
|
|
|
|
},
|
|
|
|
|
rules: {
|
2022-06-29 10:59:16 +08:00
|
|
|
|
stationCode:[
|
|
|
|
|
{ required: true, message: '请选择车站', trigger: 'blur' },
|
|
|
|
|
{ required: true, message: '请选择车站', trigger: 'change' }
|
|
|
|
|
],
|
2022-06-28 16:18:57 +08:00
|
|
|
|
arriveTripNumber:[
|
|
|
|
|
{ required: true, validator: validateTripNumber, trigger: 'blur' }
|
|
|
|
|
],
|
|
|
|
|
departTripNumber:[
|
|
|
|
|
{ required: true, validator: validateTripNumber, trigger: 'blur' }
|
|
|
|
|
]
|
2022-06-27 16:19:52 +08:00
|
|
|
|
}
|
|
|
|
|
};
|
|
|
|
|
},
|
|
|
|
|
computed: {
|
2022-06-29 10:59:16 +08:00
|
|
|
|
...mapGetters('map', [
|
|
|
|
|
'stationList'
|
|
|
|
|
]),
|
2022-06-27 16:19:52 +08:00
|
|
|
|
show() {
|
|
|
|
|
return this.dialogShow && !this.$store.state.menuOperation.break;
|
|
|
|
|
},
|
|
|
|
|
domIdCancel() {
|
|
|
|
|
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
|
|
|
|
|
},
|
|
|
|
|
domIdConfirm() {
|
2022-06-28 16:18:57 +08:00
|
|
|
|
return this.dialogShow ? OperationEvent.CTCCommand.addDispatcherLogerRp.menu.domId : '';
|
2022-06-27 16:19:52 +08:00
|
|
|
|
},
|
|
|
|
|
title() {
|
|
|
|
|
return '增加阶段计划车次';
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
methods: {
|
2022-06-29 13:53:35 +08:00
|
|
|
|
doShow({filterSectionList, mapStationDirectionMap}) {
|
2022-06-28 16:18:57 +08:00
|
|
|
|
this.mapStationDirectionList = Object.values(mapStationDirectionMap);
|
2022-06-29 13:53:35 +08:00
|
|
|
|
this.filterSectionList = filterSectionList;
|
2022-06-27 16:19:52 +08:00
|
|
|
|
this.dialogShow = true;
|
|
|
|
|
this.$nextTick(function () {
|
|
|
|
|
this.$store.dispatch('training/emitTipFresh');
|
|
|
|
|
});
|
|
|
|
|
},
|
|
|
|
|
doClose() {
|
|
|
|
|
this.loading = false;
|
|
|
|
|
this.dialogShow = false;
|
|
|
|
|
this.model = {
|
2022-06-28 17:23:52 +08:00
|
|
|
|
stationCode:'', // 车站编码
|
|
|
|
|
arriveSectionCode:'', // 到达股道
|
|
|
|
|
arrivePlanTime:'', // 到达计划时间
|
2022-06-27 16:19:52 +08:00
|
|
|
|
arriveTripNumber:'', // 到达车次
|
2022-06-28 17:23:52 +08:00
|
|
|
|
arriveStationCode:'', // 到达车站
|
|
|
|
|
arriveDirectionCode:'', // 到达方向编码(到达口)
|
|
|
|
|
departSectionCode:'', // 发车股道
|
|
|
|
|
departPlanTime:'', // 发车计划时间
|
|
|
|
|
departTripNumber:'', // 发车车次
|
|
|
|
|
departStationCode:'', // 发车车站
|
|
|
|
|
departDirectionCode:'', // 发向方向编码(发车口)
|
|
|
|
|
|
|
|
|
|
startRunPlan:false, // 始发计划 true,false
|
|
|
|
|
endRunPlan:false, // 终到计划 true,false
|
|
|
|
|
|
|
|
|
|
electrical:false, // 电力 true,false
|
|
|
|
|
passenger:false, // 客运 true,false
|
|
|
|
|
trackDiscordant:false, // 运行股道与基本径路不一致
|
|
|
|
|
entryOutDiscordant:false, // 出入口与基本径路不一致
|
|
|
|
|
|
|
|
|
|
transfinite:'NO' // 超限等级 NO:不超限 TRANSFINITE_SUPER:超级超限 TRANSFINITE_ONE_LEVEL:一级超限 TRANSFINITE_TWO_LEVEL:二级超限
|
2022-06-27 16:19:52 +08:00
|
|
|
|
};
|
|
|
|
|
this.$store.dispatch('training/emitTipFresh');
|
|
|
|
|
},
|
|
|
|
|
commit() {
|
2022-06-28 16:18:57 +08:00
|
|
|
|
this.$refs.form.validate((valid) => {
|
|
|
|
|
if (valid) {
|
|
|
|
|
this.loading = true;
|
2022-06-29 13:53:35 +08:00
|
|
|
|
commitOperate(menuOperate.CTC.addDispatcherLogerRp, {planParam:this.model}, 3).then(({valid, response})=>{
|
2022-06-28 16:18:57 +08:00
|
|
|
|
if (valid) {
|
2022-06-29 13:53:35 +08:00
|
|
|
|
this.$emit('addDisLoger', response.data);
|
2022-06-28 16:18:57 +08:00
|
|
|
|
this.doClose();
|
|
|
|
|
}
|
|
|
|
|
}).catch(() => {
|
|
|
|
|
this.doClose();
|
|
|
|
|
this.$emit('noticeInfo');
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
});
|
2022-06-27 16:19:52 +08:00
|
|
|
|
},
|
|
|
|
|
cancel() {
|
|
|
|
|
const operate = {
|
|
|
|
|
operation: OperationEvent.Command.cancel.menu.operation
|
|
|
|
|
};
|
|
|
|
|
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
|
|
|
|
if (valid) {
|
|
|
|
|
this.doClose();
|
|
|
|
|
}
|
|
|
|
|
}).catch(() => { this.doClose(); });
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
};
|
|
|
|
|
</script>
|
2022-06-28 16:18:57 +08:00
|
|
|
|
<style lang="scss">
|
|
|
|
|
.chengdou-03__systerm .el-dialog #AddDispatcherForm .el-form-item label{
|
|
|
|
|
padding-right:5px;
|
|
|
|
|
line-height:30px;
|
|
|
|
|
}
|
|
|
|
|
.chengdou-03__systerm .el-dialog #AddDispatcherForm .el-form-item{
|
|
|
|
|
margin-bottom:20px;
|
|
|
|
|
}
|
|
|
|
|
#AddDispatcherForm .el-form-item__content{
|
|
|
|
|
line-height:30px;
|
|
|
|
|
}
|
|
|
|
|
#AddDispatcherForm{
|
|
|
|
|
display: flex;
|
|
|
|
|
flex-direction: row;
|
|
|
|
|
flex-wrap: wrap;
|
|
|
|
|
}
|
|
|
|
|
#AddDispatcherForm .el-input__inner {
|
|
|
|
|
height: 22px !important;
|
|
|
|
|
line-height: 22px !important;
|
|
|
|
|
}
|
|
|
|
|
#AddDispatcherForm span.el-input__suffix .el-input__icon{
|
|
|
|
|
height:22px;
|
|
|
|
|
line-height:22px;
|
|
|
|
|
}
|
|
|
|
|
#AddDispatcherForm span.el-input__prefix .el-input__icon{
|
|
|
|
|
line-height:22px;
|
|
|
|
|
display:none;
|
|
|
|
|
}
|
|
|
|
|
#AddDispatcherForm .el-form-item.noMargin .el-form-item__content{
|
|
|
|
|
margin-left:0px !important;
|
|
|
|
|
}
|
|
|
|
|
#AddDispatcherForm .el-form-item.noMargin .el-checkbox__label{
|
|
|
|
|
padding-left: 5px;
|
|
|
|
|
vertical-align: top;
|
|
|
|
|
line-height: 30px;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
#AddDispatcherForm .el-input--prefix .el-input__inner{
|
|
|
|
|
padding-left:10px;
|
|
|
|
|
padding-right: 26px;
|
|
|
|
|
}
|
|
|
|
|
</style>
|