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

This commit is contained in:
joylink_cuiweidong 2022-08-25 15:18:32 +08:00
parent 3971a33039
commit 86ae692f61
6 changed files with 48 additions and 17 deletions

View File

@ -750,11 +750,15 @@ export const menuOperate = {
operation: OperationEvent.CTCCommand.setEndRunplan.menu.operation,
cmdType: CMD.CTC.CTC_LOG_SET_END_RUN_PLAN
},
// 修改列车固定径路
modifyTrainFixedPath:{
operation: OperationEvent.CTCCommand.modifyTrainFixedPath.menu.operation,
cmdType: CMD.CTC.CTC_REGULAR_TRAIN_LINE_EDIT
},
// 增加列车固定径路
addTrainFixedPath:{
operation: OperationEvent.CTCCommand.addTrainFixedPath.menu.operation,
cmdType: CMD.CTC.CTC_REGULAR_TRAIN_LINE_EDIT
cmdType: CMD.CTC.CTC_REGULAR_TRAIN_LINE_SAVE
},
// 批量增加列车固定径路
batchTrainFixedPath:{

View File

@ -455,7 +455,9 @@ 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_REGULAR_TRAIN_LINE_EDIT:{value: 'REGULAR_TRAIN_LINE_EDIT', label: '修改列车固定径路'},
CTC_REGULAR_TRAIN_LINE_SAVE:{value: 'REGULAR_TRAIN_LINE_SAVE', label: '增加列车固定径路'},
CTC_REGULAR_TRAIN_LINE_BATCH:{value: 'REGULAR_TRAIN_LINE_BATCH', label: '批量增加列车固定径路'},
CTC_REGULAR_TRAIN_LINE_STATION_UPDATE:{value: 'REGULAR_TRAIN_LINE_STATION_UPDATE', label: '固定列车径路从生效区更新'},

View File

@ -4042,6 +4042,13 @@ export const OperationEvent = {
operation: '1161',
domId: '_Tips-CTC-loadUpdateStationTrainFixedPath-Menu{TOP}'
}
},
// 修改列车固定径路
modifyTrainFixedPath:{
menu: {
operation: '1161',
domId: '_Tips-CTC-loadUpdateStationTrainFixedPath-Menu{TOP}'
}
}
// CTC_ZONE_SAVE_TRIP_NUMBER
// CTC_ZONE_SAVE_STATION

View File

@ -144,6 +144,7 @@ export default {
loading: false,
title:'',
// mapStationDirectionList:[],
isAdd:false,
mapStationDirectionMap:{},
enterDirList:[], //
outDirList:[],
@ -231,7 +232,9 @@ export default {
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
},
domIdConfirm() {
return this.dialogShow ? OperationEvent.CTCCommand.addTrainFixedPath.menu.domId : '';
return this.dialogShow
? (this.isAdd ? OperationEvent.CTCCommand.addTrainFixedPath.menu.domId : OperationEvent.CTCCommand.modifyTrainFixedPath.menu.domId)
: '';
}
},
methods:{
@ -247,8 +250,10 @@ export default {
if (row) {
this.addModel = Object.assign({}, row);
this.title = '修改列车固定径路';
this.isAdd = false;
} else {
this.title = '增加列车固定径路';
this.isAdd = true;
this.addModel.stationCode = stationCode;
}
this.filterSectionList = Object.values(filterSectionMap);
@ -311,7 +316,8 @@ export default {
if (valid) {
this.loading = true;
const param = Object.assign({}, this.addModel);
if (this.title == '增加列车固定径路') { delete param.code; }
if (this.isAdd) {
delete param.code;
commitOperate(menuOperate.CTC.addTrainFixedPath, param, 3).then(({valid})=>{
if (valid) {
this.doClose();
@ -321,6 +327,18 @@ export default {
this.doClose();
this.$emit('noticeInfo');
});
} else {
commitOperate(menuOperate.CTC.modifyTrainFixedPath, param, 3).then(({valid})=>{
if (valid) {
this.doClose();
this.$emit('refresh');
}
}).catch(() => {
this.doClose();
this.$emit('noticeInfo');
});
}
}
});
},

View File

@ -68,6 +68,7 @@
</el-dialog>
</template>
<script>
// import { deepAssign } from '@/utils/index';
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
import {menuOperate, commitOperate} from '@/jmapNew/theme/components/utils/menuOperate';
export default {
@ -114,7 +115,7 @@ export default {
},
methods:{
doShow({row, stationCode}) {
this.model = Object.assign({}, row);
this.model = row;
this.stationCode = stationCode;
this.dialogShow = true;
this.$nextTick(function () {
@ -127,7 +128,7 @@ export default {
},
commit() {
this.loading = true;
const param = Object.assign({stationCode:this.stationCode}, this.model);
const param = Object.assign({stationCode:this.stationCode}, JSON.parse(JSON.stringify(this.model)));
delete param.ioName;
delete param.ioDirection;
commitOperate(menuOperate.CTC.modifyStationDirection, param, 3).then(({valid})=>{

View File

@ -402,7 +402,7 @@ export default {
stationCode:this.currentStationCode,
filterSectionMap:this.filterSectionMap,
mapStationDirectionMap:this.mapStationDirectionData,
row:this.currentRow
row:JSON.parse(JSON.stringify(this.currentRow))
});
}
},
@ -523,7 +523,6 @@ export default {
handleData() {
commitOperate(menuOperate.CTC.getTrainFixedPath, { stationCode: this.currentStationCode }, 3).then(({valid, response}) => {
if (valid) {
debugger;
this.tableData = response.data;
}
});