大铁项目 车务管理终端 列车固定径路增加/修改 代码调整

This commit is contained in:
joylink_cuiweidong 2022-08-23 16:24:11 +08:00
parent 806f20dc9f
commit 624a3a11f9
8 changed files with 120 additions and 78 deletions

View File

@ -754,7 +754,7 @@ export const menuOperate = {
// 增加列车固定径路
addTrainFixedPath:{
operation: OperationEvent.CTCCommand.addTrainFixedPath.menu.operation,
cmdType: CMD.CTC.CTC_ADD_RUN_PLAN_LIST_TO_EDIT_AREA
cmdType: CMD.CTC.CTC_REGULAR_TRAIN_LINE_EDIT
},
// 导入列车固定径路
importTrainFixedPath:{

View File

@ -442,7 +442,7 @@ export default {
CTC_LOG_SET_TRANSFINITE:{value: 'CTC_LOG_SET_TRANSFINITE', label: '设置超限'},
CTC_LOG_SAVE_RUN_PLAN:{value: 'CTC_LOG_SAVE_RUN_PLAN', label: '保存运行计划'},
CTC_ADD_RUN_PLAN_LIST_TO_EDIT_AREA:{value: 'CTC_ADD_RUN_PLAN_LIST_TO_EDIT_AREA', label: '增加列车固定径路'},
// CTC_ADD_RUN_PLAN_LIST_TO_EDIT_AREA:{value: 'CTC_ADD_RUN_PLAN_LIST_TO_EDIT_AREA', label: '增加列车固定径路'},
CTC_COVER_RUN_PLAN_LIST_TO_EDIT_AREA:{value: 'CTC_COVER_RUN_PLAN_LIST_TO_EDIT_AREA', label: '导入列车固定径路'},
CTC_REGULAR_TRAIN_LINE_CLEAR:{value: 'REGULAR_TRAIN_LINE_CLEAR', label: '清空列车固定径路'},
CTC_REGULAR_TRAIN_LINE_DELETE:{value: 'REGULAR_TRAIN_LINE_DELETE', label: '删除列车固定径路'},
@ -455,6 +455,7 @@ export default {
CTC_STATION_IO_GATE_PUBLISH:{value: 'STATION_IO_GATE_PUBLISH', label: '出入口发布生效区'},
CTC_STATION_IO_GATE_LIST:{value: 'STATION_IO_GATE_LIST', label: '获取出入口列表'},
CTC_STATION_IO_GATE_EDIT:{value: 'STATION_IO_GATE_EDIT', label: '修改出入口'},
CTC_REGULAR_TRAIN_LINE_EDIT:{value: 'REGULAR_TRAIN_LINE_EDIT', label: '增加列车固定径路'},
CTC_SET_ROUTE:{value: 'CTC_SET_ROUTE', label: 'CTC办理进路'},

View File

@ -22,8 +22,8 @@
/>
</el-select>
</el-form-item>
<el-form-item label="股道:" prop="trackSectionCode">
<el-select v-model="addModel.trackSectionCode" placeholder="" style="width:145px">
<el-form-item label="股道:" prop="masterCode">
<el-select v-model="addModel.masterCode" placeholder="" style="width:145px">
<el-option
v-for="item in filterSectionList"
:key="item.code"
@ -32,30 +32,30 @@
/>
</el-select>
</el-form-item>
<el-form-item label="到达车次:" prop="arriveTripNumber">
<el-input v-model="addModel.arriveTripNumber" style="width:145px" />
<el-form-item label="到达车次:" prop="arriveTipNum">
<el-input v-model="addModel.arriveTipNum" style="width:145px" />
</el-form-item>
<el-form-item label="到达时间:" prop="arriveTime">
<el-time-picker v-model="addModel.arriveTime" value-format="HH:mm" format="HH:mm" style="width:145px" />
</el-form-item>
<el-form-item label="出发车次:" prop="departTripNumber">
<el-input v-model="addModel.departTripNumber" style="width:145px" />
<el-form-item label="出发车次:" prop="leaveTipNum">
<el-input v-model="addModel.leaveTipNum" style="width:145px" />
</el-form-item>
<el-form-item label="出发时间:" prop="departTime">
<el-time-picker v-model="addModel.departTime" value-format="HH:mm" format="HH:mm" style="width:145px" />
<el-form-item label="出发时间:" prop="leaveTime">
<el-time-picker v-model="addModel.leaveTime" value-format="HH:mm" format="HH:mm" style="width:145px" />
</el-form-item>
<el-form-item label="入口:" prop="arriveDirectionCode">
<el-select v-model="addModel.arriveDirectionCode" placeholder="" style="width:145px">
<el-form-item label="入口:" prop="enterDirCode">
<el-select v-model="addModel.enterDirCode" placeholder="" style="width:145px" @change="changeEnterDirCode">
<el-option
v-for="item in mapStationDirectionList"
v-for="item in enterDirList"
:key="item.code"
:label="item.name"
:value="item.code"
/>
</el-select>
</el-form-item>
<el-form-item label="后方车站:" prop="arriveStationCode">
<el-select v-model="addModel.arriveStationCode" placeholder="" style="width:145px">
<el-form-item label="后方车站:" prop="backStationCode">
<el-select v-model="addModel.backStationCode" placeholder="" style="width:145px" disabled>
<el-option
v-for="item in stationList"
:key="item.code"
@ -64,18 +64,18 @@
/>
</el-select>
</el-form-item>
<el-form-item label="出口:" prop="departDirectionCode">
<el-select v-model="addModel.departDirectionCode" placeholder="" style="width:145px">
<el-form-item label="出口:" prop="outDirCode">
<el-select v-model="addModel.outDirCode" placeholder="" style="width:145px" @change="changeOutDirCode">
<el-option
v-for="item in mapStationDirectionList"
v-for="item in outDirList"
:key="item.code"
:label="item.name"
:value="item.code"
/>
</el-select>
</el-form-item>
<el-form-item label="前方车站:" prop="departStationCode">
<el-select v-model="addModel.departStationCode" placeholder="" style="width:145px">
<el-form-item label="前方车站:" prop="fontStationCode">
<el-select v-model="addModel.fontStationCode" placeholder="" style="width:145px" disabled>
<el-option
v-for="item in stationList"
:key="item.code"
@ -142,19 +142,24 @@ export default {
return {
dialogShow: false,
loading: false,
mapStationDirectionList:[],
title:'',
// mapStationDirectionList:[],
mapStationDirectionMap:{},
enterDirList:[], //
outDirList:[],
filterSectionList:[],
addModel:{
stationCode:'', //
trackSectionCode:'', //
arriveTripNumber:'', //
departTripNumber:'', //
code:'', //
stationCode:'', // code
masterCode:'', // code
arriveTipNum:'', //
leaveTipNum:'', //
arriveTime:'', //
departTime:'', //
arriveDirectionCode:'', //
departDirectionCode:'', //
arriveStationCode:'', //
departStationCode:'', //
leaveTime:'', //
enterDirCode:'', //
outDirCode:'', //
fontStationCode:'', //
backStationCode:'', //
appendData:{ //
ZHUANGXIE:false, //
LIEJIAN:false, //
@ -180,11 +185,11 @@ export default {
// { required: true, message: '', trigger: 'blur' },
// { required: true, message: '', trigger: 'change' }
// ],
arriveTripNumber:[
arriveTipNum:[
{ required: true, validator: validateTripNumber, trigger: 'blur' }
// message: ''
],
departTripNumber:[
leaveTipNum:[
{ required: true, validator: validateTripNumber, trigger: 'blur' }
]
// message: ''
@ -227,35 +232,57 @@ export default {
},
domIdConfirm() {
return this.dialogShow ? OperationEvent.CTCCommand.addTrainFixedPath.menu.domId : '';
},
title() {
return '列车固定径路';
}
},
methods:{
doShow({stationCode, filterSectionMap, mapStationDirectionMap}) {
this.mapStationDirectionList = Object.values(mapStationDirectionMap);
doShow({stationCode, filterSectionMap, mapStationDirectionMap, row}) {
this.mapStationDirectionMap = mapStationDirectionMap;
const mapStationDirectionList = Object.values(mapStationDirectionMap);
this.enterDirList = mapStationDirectionList.filter(stationDirection=>{
return stationDirection.runStatus == 'R';
});
this.outDirList = mapStationDirectionList.filter(stationDirection=>{
return stationDirection.runStatus == 'D';
});
if (row) {
this.addModel = Object.assign({}, row);
this.title = '修改列车固定径路';
} else {
this.title = '增加列车固定径路';
this.addModel.stationCode = stationCode;
}
this.filterSectionList = Object.values(filterSectionMap);
this.dialogShow = true;
this.addModel.stationCode = stationCode;
this.$nextTick(function () {
this.$store.dispatch('training/emitTipFresh');
});
},
changeEnterDirCode(code) {
const mapStationDirection = this.mapStationDirectionMap[code];
this.addModel.backStationCode = mapStationDirection.relativeStationCode;
},
changeOutDirCode(code) {
const mapStationDirection = this.mapStationDirectionMap[code];
this.addModel.fontStationCode = mapStationDirection.relativeStationCode;
},
doClose() {
this.loading = false;
this.dialogShow = false;
this.addModel = {
stationCode:'', //
trackSectionCode:'', //
arriveTripNumber:'', //
departTripNumber:'', //
code:'', //
stationCode:'', // code
masterCode:'', // code
arriveTipNum:'', //
leaveTipNum:'', //
arriveTime:'', //
departTime:'', //
arriveDirectionCode:'', //
departDirectionCode:'', //
arriveStationCode:'', //
departStationCode:'', //
leaveTime:'', //
enterDirCode:'', //
outDirCode:'', //
fontStationCode:'', //
backStationCode:'', //
// 使logicDataNewDraftMapStationDirectionList
// 1.runStatus R=D=,NO=2.relativeStationCode
// codecodecode
appendData:{ //
ZHUANGXIE:false, //
LIEJIAN:false, //
@ -283,10 +310,12 @@ export default {
this.$refs.form.validate((valid) => {
if (valid) {
this.loading = true;
const param = {stationCode:this.addModel.stationCode, runPlanParamList:[this.addModel]};
const param = Object.assign({}, this.addModel);
if (this.title == '增加列车固定径路') { delete param.code; }
commitOperate(menuOperate.CTC.addTrainFixedPath, param, 3).then(({valid})=>{
if (valid) {
this.doClose();
this.$emit('refresh');
}
}).catch(() => {
this.doClose();

View File

@ -133,6 +133,7 @@ export default {
commitOperate(menuOperate.CTC.modifyStationDirection, param, 3).then(({valid})=>{
if (valid) {
this.$message.success('更新成功!');
this.$emit('refresh');
this.doClose();
}
}).catch(() => {

View File

@ -74,7 +74,7 @@
</el-table>
</div>
</div>
<direction-information ref="directionInformation" @noticeInfo="noticeInfo" />
<direction-information ref="directionInformation" @noticeInfo="noticeInfo" @refresh="handleData" />
</div>
</template>
<script>
@ -120,10 +120,10 @@ export default {
},
loadStationData(stationCode) {
this.currentStationCode = stationCode;
this.handleData(stationCode);
this.handleData();
},
handleData(stationCode) {
commitOperate(menuOperate.CTC.getStationDirection, { stationCode: stationCode }, 3).then(({valid, response}) => {
handleData() {
commitOperate(menuOperate.CTC.getStationDirection, { stationCode: this.currentStationCode }, 3).then(({valid, response}) => {
if (valid) {
this.tableData = response.data;
}

View File

@ -145,7 +145,7 @@ waterSupply: false -->
</div>
</div>
<!-- -->
<track-information ref="trackInformation" @noticeInfo="noticeInfo" />
<track-information ref="trackInformation" @noticeInfo="noticeInfo" @refresh="handleData" />
</div>
</template>
<script>
@ -227,10 +227,10 @@ export default {
this.filterSectionMap[section.code] = {code:section.code, name:section.name};
}
});
this.handleData(stationCode);
this.handleData();
},
handleData(stationCode) {
commitOperate(menuOperate.CTC.getStationTrack, { stationCode: stationCode }, 3).then(({valid, response}) => {
handleData() {
commitOperate(menuOperate.CTC.getStationTrack, { stationCode: this.currentStationCode }, 3).then(({valid, response}) => {
if (valid) {
this.tableData = response.data;
}

View File

@ -250,6 +250,7 @@ export default {
commitOperate(menuOperate.CTC.modifyStationTrack, Object.assign({stationCode:this.stationCode}, this.model), 3).then(({valid})=>{
if (valid) {
this.$message.success('更新成功!');
this.$emit('refresh');
this.doClose();
}
}).catch(() => {

View File

@ -7,14 +7,14 @@
<div class="trainFixedPathR">
<div class="trainFixedPathRMenu">
<div class="trainFixedPathRMenuL">
<el-button class="trainFixedPathButton" size="small" @click="addRunplan">增加</el-button>
<el-button class="trainFixedPathButton" size="small" @click="addTrainFxPath">增加</el-button>
<el-button class="trainFixedPathButton" size="small">批量增加</el-button>
<el-button class="trainFixedPathButton" size="small">基本图导入</el-button>
<el-button class="trainFixedPathButton" size="small">基本图申请</el-button>
<el-button class="trainFixedPathButton" size="small">其他站导入</el-button>
<el-button class="trainFixedPathButton" size="small" @click="deleteRunplan">删除</el-button>
<el-button class="trainFixedPathButton" size="small" @click="clearRunplan">全部清空</el-button>
<el-button class="trainFixedPathButton" size="small">修改</el-button>
<el-button class="trainFixedPathButton" size="small" @click="deleteTrainFxPath">删除</el-button>
<el-button class="trainFixedPathButton" size="small" @click="clearTrainFxPath">全部清空</el-button>
<el-button class="trainFixedPathButton" size="small" @click="modifyTrainFxPath">修改</el-button>
<el-button class="trainFixedPathButton" size="small">查找</el-button>
<el-button class="trainFixedPathButton" size="small">导出excel</el-button>
<el-button class="trainFixedPathButton" size="small">流程批量设置</el-button>
@ -92,8 +92,8 @@
width="75"
>
<template slot-scope="scope">
<div v-if="scope.row.trackSectionCode">
{{ filterSectionMap[scope.row.trackSectionCode].name }}
<div v-if="scope.row.masterCode">
{{ filterSectionMap[scope.row.masterCode].name }}
</div>
</template>
</el-table-column>
@ -104,8 +104,8 @@
width="110"
>
<template slot-scope="scope">
<div v-if="scope.row.departStationCode">
{{ stationMap[scope.row.departStationCode].name }}
<div v-if="scope.row.backStationCode">
{{ stationMap[scope.row.backStationCode].name }}
</div>
</template>
</el-table-column>
@ -116,8 +116,8 @@
width="155"
>
<template slot-scope="scope">
<div v-if="scope.row.arriveDirectionCode">
{{ mapStationDirectionData[scope.row.arriveDirectionCode].name }}
<div v-if="scope.row.enterDirCode">
{{ mapStationDirectionData[scope.row.enterDirCode].name }}
</div>
</template>
</el-table-column>
@ -128,8 +128,8 @@
width="155"
>
<template slot-scope="scope">
<div v-if="scope.row.departDirectionCode">
{{ mapStationDirectionData[scope.row.departDirectionCode].name }}
<div v-if="scope.row.outDirCode">
{{ mapStationDirectionData[scope.row.outDirCode].name }}
</div>
</template>
</el-table-column>
@ -140,8 +140,8 @@
width="110"
>
<template slot-scope="scope">
<div v-if="scope.row.arriveStationCode">
{{ stationMap[scope.row.arriveStationCode].name }}
<div v-if="scope.row.fontStationCode">
{{ stationMap[scope.row.fontStationCode].name }}
</div>
</template>
</el-table-column>
@ -316,7 +316,7 @@
</el-table>
</div>
</div>
<add-runplan ref="addRunplan" @noticeInfo="noticeInfo" />
<add-runplan ref="trainFxPath" @noticeInfo="noticeInfo" @refresh="handleData" />
</div>
</template>
<script>
@ -377,16 +377,26 @@ export default {
this.filterSectionMap[section.code] = {code:section.code, name:section.name};
}
});
this.handleData(stationCode);
this.handleData();
},
addRunplan() {
this.$refs.addRunplan.doShow({
addTrainFxPath() {
this.$refs.trainFxPath.doShow({
stationCode:this.currentStationCode,
filterSectionMap:this.filterSectionMap,
mapStationDirectionMap:this.mapStationDirectionData
});
},
deleteRunplan() {
modifyTrainFxPath() {
if (this.currentRow) {
this.$refs.trainFxPath.doShow({
stationCode:this.currentStationCode,
filterSectionMap:this.filterSectionMap,
mapStationDirectionMap:this.mapStationDirectionData,
row:this.currentRow
});
}
},
deleteTrainFxPath() {
if (this.currentRow) {
const that = this;
this.$confirm('确定删除该条列车路径数据?', '警告', {
@ -407,7 +417,7 @@ export default {
}).catch(e => {});
}
},
clearRunplan() {
clearTrainFxPath() {
const that = this;
this.$confirm('确定清空该站的所有列车路径数据?', '警告', {
confirmButtonText: '确定',
@ -500,8 +510,8 @@ export default {
coverTime(time) {
return time ? time.split(':').splice(0, 2).join(':') : '';
},
handleData(stationCode) {
commitOperate(menuOperate.CTC.getTrainFixedPath, { stationCode: stationCode }, 3).then(({valid, response}) => {
handleData() {
commitOperate(menuOperate.CTC.getTrainFixedPath, { stationCode: this.currentStationCode }, 3).then(({valid, response}) => {
if (valid) {
this.tableData = response.data;
}