大铁 调度台 添加运行计划 删除运行计划 指令添加 代码调整

This commit is contained in:
joylink_cuiweidong 2022-06-28 16:18:57 +08:00
parent ffd1ab06b8
commit ab24f99392
6 changed files with 375 additions and 12 deletions

View File

@ -617,6 +617,16 @@ export const menuOperate = {
setRoute: {
operation: OperationEvent.CTCCommand.setRoute.menu.operation,
cmdType: CMD.CTC.CTC_SET_ROUTE
},
// 大铁 调度台 添加运行计划
addDispatcherLogerRp: {
operation: OperationEvent.CTCCommand.addDispatcherLogerRp.menu.operation,
cmdType: CMD.CTC.CTC_ZONE_SAVE_RUN_PLAN
},
// 大铁 调度台 删除运行计划
deleteDispatcherLogerRp:{
operation: OperationEvent.CTCCommand.deleteDispatcherLogerRp.menu.operation,
cmdType: CMD.CTC.CTC_ZONE_DELETE_RUN_PLAN
}
}

View File

@ -4,13 +4,121 @@
class="chengdou-03__systerm train-set-plan"
:title="title"
:visible.sync="show"
width="560px"
width="670px"
:before-close="doClose"
:z-index="2000"
:modal="false"
:close-on-click-modal="false"
>
{{ 111 }}
<el-form id="AddDispatcherForm" ref="form" :model="model" label-width="80px" :rules="rules">
<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">
<el-input v-model="model.arriveTripNumber" style="width:160px" :disabled="!model.startRunPlan" />
</el-form-item>
<el-form-item label="出发车次:" prop="departTripNumber" style="margin-left: 66px;">
<el-input v-model="model.departTripNumber" style="width:160px" :disabled="!model.endRunPlan" />
</el-form-item>
<el-form-item label="接车口:" prop="arriveDirectionCode">
<el-select v-model="model.arriveDirectionCode" placeholder="" style="width:180px" :disabled="!model.startRunPlan">
<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;">
<el-select v-model="model.departDirectionCode" placeholder="" style="width:180px" :disabled="!model.endRunPlan">
<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">
<el-select v-model="model.arriveSectionCode" placeholder="" style="width:160px" :disabled="!model.startRunPlan">
<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;">
<el-select v-model="model.departSectionCode" placeholder="" style="width:160px" :disabled="!model.endRunPlan">
<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">
<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" />
</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;">
<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" />
</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>
<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>
@ -25,11 +133,42 @@
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
import {menuOperate, commitOperate} from '@/jmapNew/theme/components/utils/menuOperate';
export default {
name: 'ModifyTripNumber',
name: 'AddDispatcherLogerRunplan',
data() {
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();
}
};
return {
dialogShow: false,
loading: false,
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' }
],
model:{
// runPlanCode:'', //
stationCode:'', //
@ -51,14 +190,22 @@ export default {
electrical:false, // true,false
passenger:false, // true,false
keyTrains:false, // true,false
military:false, // true,false
// keyTrains:false, // true,false
// military:false, // true,false
trackDiscordant:false, //
entryOutDiscordant:false, //
transfinite:'NO' // NO TRANSFINITE_SUPER TRANSFINITE_ONE_LEVEL TRANSFINITE_TWO_LEVEL
},
rules: {
arriveTripNumber:[
{ required: true, validator: validateTripNumber, trigger: 'blur' }
],
departTripNumber:[
{ required: true, validator: validateTripNumber, trigger: 'blur' }
]
}
};
},
@ -70,14 +217,16 @@ export default {
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
},
domIdConfirm() {
return this.dialogShow ? OperationEvent.CTCCommand.modifyTripNumber.menu.domId : '';
return this.dialogShow ? OperationEvent.CTCCommand.addDispatcherLogerRp.menu.domId : '';
},
title() {
return '增加阶段计划车次';
}
},
methods: {
doShow(row) {
doShow({filterSectionMap, mapStationDirectionMap}) {
this.mapStationDirectionList = Object.values(mapStationDirectionMap);
this.filterSectionList = Object.values(filterSectionMap);
this.dialogShow = true;
this.$nextTick(function () {
this.$store.dispatch('training/emitTipFresh');
@ -93,13 +242,25 @@ export default {
this.$store.dispatch('training/emitTipFresh');
},
commit() {
// this.loading = true;
this.$refs.form.validate((valid) => {
if (valid) {
this.loading = true;
this.model.stationCode = this.$store.state.training.roleDeviceCode;
commitOperate(menuOperate.CTC.addDispatcherLogerRp, {planParam:this.model}, 3).then(({valid})=>{
if (valid) {
this.doClose();
}
}).catch(() => {
this.doClose();
this.$emit('noticeInfo');
});
}
});
},
cancel() {
const operate = {
operation: OperationEvent.Command.cancel.menu.operation
};
this.$emit('clearRpRow');
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
if (valid) {
this.doClose();
@ -110,3 +271,45 @@ export default {
}
};
</script>
<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>

View File

@ -0,0 +1,109 @@
<template>
<el-dialog
v-dialogDrag
class="chengdou-03__systerm train-set-plan"
:title="title"
:visible.sync="show"
width="280px"
:before-close="doClose"
:z-index="2000"
:modal="false"
:close-on-click-modal="false"
>
<div style="text-align: center;">
确定删除该条行车计划
</div>
<el-row justify="center" class="button-group" style="margin-top:20px">
<el-col :span="8" :offset="2">
<el-button :id="domIdConfirm" type="primary" :loading="loading" @click="commit">确定</el-button>
</el-col>
<el-col :span="8" :offset="3">
<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';
export default {
name: 'DeleteDispatcherLoger',
data() {
return {
dialogShow: false,
loading: false,
model:{
stationCode:'',
runPlanCode:''
}
};
},
computed: {
show() {
return this.dialogShow && !this.$store.state.menuOperation.break;
},
domIdCancel() {
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
},
domIdConfirm() {
return this.dialogShow ? OperationEvent.CTCCommand.deleteRunplan.menu.domId : '';
},
title() {
return '警告';
}
},
methods: {
doShow(row) {
// stationCode
// const param = {stationCode:this.currentRow.stationCode, runPlanCode:this.currentRow.runPlanCode};
// commitOperate(menuOperate.CTC.deleteTrainFixedPath, param, 3).then(({valid})=>{
// if (valid) {
// that.$message.success('');
// }
// }).catch(() => {
// that.$message.error('');
// });
// 4. CTC_ZONE_DELETE_RUN_PLAN stationCode runPlanCode
this.model.stationCode = row.stationCode;
this.model.runPlanCode = row.runPlanCode;
this.dialogShow = true;
this.$nextTick(function () {
this.$store.dispatch('training/emitTipFresh');
});
},
doClose() {
this.loading = false;
this.dialogShow = false;
this.$store.dispatch('training/emitTipFresh');
},
commit() {
this.loading = true;
commitOperate(menuOperate.CTC.deleteDispatcherLogerRp, this.model, 2).then(({valid})=>{
this.loading = false;
this.$emit('clearRpRow');
if (valid) {
this.doClose();
}
}).catch(() => {
this.loading = false;
this.$emit('clearRpRow');
this.doClose();
this.$emit('noticeInfo');
});
},
cancel() {
const operate = {
operation: OperationEvent.Command.cancel.menu.operation
};
this.$emit('clearRpRow');
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
if (valid) {
this.doClose();
}
}).catch(() => { this.doClose(); });
}
}
};
</script>

View File

@ -120,19 +120,23 @@
</el-table>
</div>
<add-dispatcher-loger-runplan ref="addDispatcherLogerRunplan" @noticeInfo="noticeInfo" />
<delete-dispatcher-loger ref="deleteDispatcherLoger" @clearRpRow="clearRpRow" @noticeInfo="noticeInfo" />
<notice-info ref="noticeInfo" pop-class="chengdou-03__systerm" />
</div>
</template>
<script>
import {menuOperate, commitOperate} from '@/jmapNew/theme/components/utils/menuOperate';
import NoticeInfo from '@/jmapNew/theme/components/menus/childDialog/noticeInfo';
import { copyAssign } from '@/utils/index';
import AddDispatcherLogerRunplan from './addDispatcherLogerRunplan';
import DeleteDispatcherLoger from './dialog/deleteDispatcherLoger';
import { mapGetters } from 'vuex';
export default {
name:'DispatcherLoger',
components: {
NoticeInfo,
AddDispatcherLogerRunplan
AddDispatcherLogerRunplan,
DeleteDispatcherLoger
},
data() {
return {
@ -190,9 +194,16 @@ export default {
},
sendRunplan() {
},
clearRpRow() {
this.currentRow = null;
this.$refs.dispatcherLogerContentTable.setCurrentRow();
},
deleteRunplan() {
if (this.currentRow) {
const param = {stationCode:this.currentRow.stationCode, runPlanCode:this.currentRow.runPlanCode};
this.$refs.deleteDispatcherLoger.doShow(param);
}
},
addRunplan() {
this.$refs.addDispatcherLogerRunplan.doShow({
@ -201,6 +212,10 @@ export default {
});
},
selectedTripNumber(row, column, cell, event) {
this.currentRow = row;
},
noticeInfo() {
this.$refs.noticeInfo.doShow();
}
}
};

View File

@ -405,6 +405,18 @@ export default {
CTC_COVER_RUN_PLAN_LIST_TO_EDIT_AREA:{value: 'CTC_COVER_RUN_PLAN_LIST_TO_EDIT_AREA', label: '导入列车固定径路'},
CTC_REMOVE_RUN_PLAN_FROM_EDIT_AREA:{value: 'CTC_REMOVE_RUN_PLAN_FROM_EDIT_AREA', label: '删除列车固定径路'},
CTC_RELEASE_RUN_PLAN_TO_SIMULATION:{value: 'CTC_RELEASE_RUN_PLAN_TO_SIMULATION', label: '运行计划发布至CTC'},
CTC_SET_ROUTE:{value: 'CTC_SET_ROUTE', label: 'CTC办理进路'}
CTC_SET_ROUTE:{value: 'CTC_SET_ROUTE', label: 'CTC办理进路'},
CTC_ZONE_SAVE_RUN_PLAN:{value:'CTC_ZONE_SAVE_RUN_PLAN', label: '调度台添加行车计划'},
CTC_ZONE_DELETE_RUN_PLAN:{value:'CTC_ZONE_DELETE_RUN_PLAN', label: '调度台删除行车计划'},
CTC_ZONE_RELEASE_STATION_RUN_PLAN:{value:'CTC_ZONE_RELEASE_STATION_RUN_PLAN', label: '调度台发布车站的行车计划'},
CTC_STATION_SIGN_RUN_PLAN:{value:'CTC_STATION_SIGN_RUN_PLAN', label: '车站签收阶段计划'},
CTC_ZONE_SAVE_TRACK_SECTION:{value:'CTC_ZONE_SAVE_TRACK_SECTION', label: '调度台行车计划修改股道'},
CTC_ZONE_SAVE_TRIP_NUMBER:{value:'CTC_ZONE_SAVE_TRIP_NUMBER', label: '调度台行车计划修改车次'},
CTC_ZONE_SAVE_PLAN_TIME:{value:'CTC_ZONE_SAVE_PLAN_TIME', label: '调度台行车计划修改到达计划时间'},
CTC_ZONE_SAVE_DIRECTION:{value:'CTC_ZONE_SAVE_DIRECTION', label: '调度台行车计划修改到出入口'},
CTC_ZONE_SAVE_STATION:{value:'CTC_ZONE_SAVE_STATION', label: '调度台行车计划修改到发车站'}
//
}
};

View File

@ -3785,6 +3785,20 @@ export const OperationEvent = {
operation: '1127',
domId: '_Tips-CTC-setRoute-Menu{TOP}'
}
},
// 大铁 调度台 添加运行计划
addDispatcherLogerRp: {
menu: {
operation: '1128',
domId: '_Tips-CTC-addDispatcherLogerRp-Menu{TOP}'
}
},
// 大铁 调度台 删除运行计划
deleteDispatcherLogerRp: {
menu: {
operation: '1129',
domId: '_Tips-CTC-addDispatcherLogerRp-Menu{TOP}'
}
}
}