大铁项目 行车日志 删除行车日志操作 代码调整
This commit is contained in:
parent
36069ec68e
commit
23d72e7962
@ -543,6 +543,16 @@ export const menuOperate = {
|
|||||||
batchModifyTrackSection:{
|
batchModifyTrackSection:{
|
||||||
operation: OperationEvent.CTCCommand.batchModifyTrackSection.menu.operation,
|
operation: OperationEvent.CTCCommand.batchModifyTrackSection.menu.operation,
|
||||||
cmdType: CMD.CTC.CTC_BATCH_MODIFY_RUN_PLAN
|
cmdType: CMD.CTC.CTC_BATCH_MODIFY_RUN_PLAN
|
||||||
|
},
|
||||||
|
// 移除行车日志
|
||||||
|
deleteRunplan:{
|
||||||
|
operation: OperationEvent.CTCCommand.deleteRunplan.menu.operation,
|
||||||
|
cmdType: CMD.CTC.CTC_REMOVE_RUN_PLAN
|
||||||
|
},
|
||||||
|
// 修改行车计划的邻站信息
|
||||||
|
modifyAdjacentStation:{
|
||||||
|
operation: OperationEvent.CTCCommand.modifyAdjacentStation.menu.operation,
|
||||||
|
cmdType: CMD.CTC.CTC_MODIFY_ADJACENT_STATION
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
104
src/jmapNew/theme/datie_02/menus/dialog/deleteRunplan.vue
Normal file
104
src/jmapNew/theme/datie_02/menus/dialog/deleteRunplan.vue
Normal file
@ -0,0 +1,104 @@
|
|||||||
|
<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">
|
||||||
|
<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>
|
||||||
|
<notice-info ref="noticeInfo" pop-class="chengdou-03__systerm" />
|
||||||
|
</el-dialog>
|
||||||
|
</template>
|
||||||
|
<script>
|
||||||
|
import NoticeInfo from '@/jmapNew/theme/components/menus/childDialog/noticeInfo';
|
||||||
|
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
||||||
|
import {menuOperate, commitOperate} from '@/jmapNew/theme/components/utils/menuOperate';
|
||||||
|
export default {
|
||||||
|
name: 'DeleteRunplan',
|
||||||
|
components: {
|
||||||
|
NoticeInfo
|
||||||
|
},
|
||||||
|
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) {
|
||||||
|
// 4.移除行车日志 CTC_REMOVE_RUN_PLAN 参数:stationCode 车站编码 runPlanCode 运行编码
|
||||||
|
this.model.stationCode = row.stationCode;
|
||||||
|
this.model.runPlanCode = row.code;
|
||||||
|
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.deleteRunplan, 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.$refs.noticeInfo.doShow();
|
||||||
|
});
|
||||||
|
},
|
||||||
|
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>
|
@ -148,7 +148,7 @@ export default {
|
|||||||
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
|
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
|
||||||
},
|
},
|
||||||
domIdConfirm() {
|
domIdConfirm() {
|
||||||
return this.dialogShow ? OperationEvent.Train.updateTrip.confirm.domId : '';
|
return this.dialogShow ? OperationEvent.CTCCommand.batchModifyTrackSection.menu.domId : '';
|
||||||
},
|
},
|
||||||
title() {
|
title() {
|
||||||
return '发送计划';
|
return '发送计划';
|
||||||
|
@ -396,9 +396,9 @@
|
|||||||
<div class="eachRpMenu">为终到车</div>
|
<div class="eachRpMenu">为终到车</div>
|
||||||
<div class="eachRpSep" />
|
<div class="eachRpSep" />
|
||||||
<div class="eachRpMenu">上报速报信息</div>
|
<div class="eachRpMenu">上报速报信息</div>
|
||||||
<div class="eachRpMenu">修改车次号</div>
|
<div class="eachRpMenu" @click="modifyTripNumber">修改车次号</div>
|
||||||
<div class="eachRpMenu">修改相关邻站</div>
|
<div class="eachRpMenu" @click="modifyAdjacentStation">修改相关邻站</div>
|
||||||
<div class="eachRpMenu">删除</div>
|
<div class="eachRpMenu" @click="deleteRunplan">删除</div>
|
||||||
<div class="eachRpSep" />
|
<div class="eachRpSep" />
|
||||||
<div class="eachRpMenu">清楚闪烁</div>
|
<div class="eachRpMenu">清楚闪烁</div>
|
||||||
<div class="eachRpMenu">全体信息</div>
|
<div class="eachRpMenu">全体信息</div>
|
||||||
@ -462,7 +462,8 @@
|
|||||||
|
|
||||||
</div>
|
</div>
|
||||||
<send-runplan ref="sendRunplan" @closeFlash="closeFlash" />
|
<send-runplan ref="sendRunplan" @closeFlash="closeFlash" />
|
||||||
<!-- -->
|
<modify-adjacent-station ref="modifyAdjacentStation" />
|
||||||
|
<delete-runplan ref="deleteRunplan" @clearRpRow="clearRpRow" />
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
@ -479,11 +480,15 @@ import Rpb from '@/assets/ctc_icon/rpb.png';
|
|||||||
import Rpwp from '@/assets/ctc_icon/rpwp.png';
|
import Rpwp from '@/assets/ctc_icon/rpwp.png';
|
||||||
import Rph from '@/assets/ctc_icon/rph.png';
|
import Rph from '@/assets/ctc_icon/rph.png';
|
||||||
import SendRunplan from './dialog/sendRunplan';
|
import SendRunplan from './dialog/sendRunplan';
|
||||||
|
import DeleteRunplan from './dialog/deleteRunplan';
|
||||||
|
import ModifyAdjacentStation from './dialog/modifyAdjacentStation';
|
||||||
import { mapGetters } from 'vuex';
|
import { mapGetters } from 'vuex';
|
||||||
export default {
|
export default {
|
||||||
name:'RunplanPane',
|
name:'RunplanPane',
|
||||||
components: {
|
components: {
|
||||||
SendRunplan
|
SendRunplan,
|
||||||
|
DeleteRunplan,
|
||||||
|
ModifyAdjacentStation
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
@ -609,11 +614,11 @@ export default {
|
|||||||
if (column.property == 'tripNumber') {
|
if (column.property == 'tripNumber') {
|
||||||
if (this.currentRow && this.currentRow.code == row.code) {
|
if (this.currentRow && this.currentRow.code == row.code) {
|
||||||
this.rpMenuPopShow = true;
|
this.rpMenuPopShow = true;
|
||||||
const offsetTop = cell.offsetTop;
|
const offsetTop = cell.offsetTop - document.querySelector('#runplanContentTable .el-table__body-wrapper').scrollTop;
|
||||||
this.rpMenuPopTop = offsetTop - 202 > 0 ? offsetTop - 380 > 0 ? offsetTop - 202 + 100 : offsetTop - 202 + 190 : offsetTop + 180;
|
this.rpMenuPopTop = offsetTop - 202 > 0 ? offsetTop - 380 > 0 ? offsetTop - 202 + 100 : offsetTop - 202 + 190 : offsetTop + 180;
|
||||||
} else {
|
} else {
|
||||||
this.currentRow = row;
|
this.currentRow = row;
|
||||||
// this.rpMenuPopShow = false;
|
this.rpMenuPopShow = false;
|
||||||
}
|
}
|
||||||
console.log(this.currentRow);
|
console.log(this.currentRow);
|
||||||
} else {
|
} else {
|
||||||
@ -624,11 +629,31 @@ export default {
|
|||||||
},
|
},
|
||||||
handleCurrentChange(val) {
|
handleCurrentChange(val) {
|
||||||
},
|
},
|
||||||
closeRpMenu() {
|
clearRpRow() {
|
||||||
this.currentRow = null;
|
this.currentRow = null;
|
||||||
this.$refs.runplanContentTable.setCurrentRow();
|
this.$refs.runplanContentTable.setCurrentRow();
|
||||||
|
},
|
||||||
|
closeRpMenu() {
|
||||||
|
this.clearRpRow();
|
||||||
this.rpMenuPopShow = false;
|
this.rpMenuPopShow = false;
|
||||||
|
},
|
||||||
|
// 修改车次号
|
||||||
|
modifyTripNumber() {
|
||||||
|
|
||||||
|
},
|
||||||
|
// 修改相关邻站
|
||||||
|
modifyAdjacentStation(event) {
|
||||||
|
event.stopPropagation();
|
||||||
|
this.rpMenuPopShow = false;
|
||||||
|
this.$refs.modifyAdjacentStation.doShow(this.currentRow);
|
||||||
|
},
|
||||||
|
// 删除
|
||||||
|
deleteRunplan(event) {
|
||||||
|
event.stopPropagation();
|
||||||
|
this.rpMenuPopShow = false;
|
||||||
|
this.$refs.deleteRunplan.doShow(this.currentRow);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
@ -390,6 +390,8 @@ export default {
|
|||||||
CTC_ASSIST_PRESS_RESTORE:{value: 'ASSIST_PRESS_RESTORE', label: '复原'},
|
CTC_ASSIST_PRESS_RESTORE:{value: 'ASSIST_PRESS_RESTORE', label: '复原'},
|
||||||
CTC_ASSIST_PRESS_ACCIDENT:{value: 'ASSIST_PRESS_ACCIDENT', label: '事故'},
|
CTC_ASSIST_PRESS_ACCIDENT:{value: 'ASSIST_PRESS_ACCIDENT', label: '事故'},
|
||||||
CTC_MODIFY_TRACK_SECTION:{value: 'CTC_MODIFY_TRACK_SECTION', label: '修改股道'},
|
CTC_MODIFY_TRACK_SECTION:{value: 'CTC_MODIFY_TRACK_SECTION', label: '修改股道'},
|
||||||
CTC_BATCH_MODIFY_RUN_PLAN:{value: 'CTC_BATCH_MODIFY_RUN_PLAN', label: '批量修改股道'}
|
CTC_BATCH_MODIFY_RUN_PLAN:{value: 'CTC_BATCH_MODIFY_RUN_PLAN', label: '批量修改股道'},
|
||||||
|
CTC_REMOVE_RUN_PLAN:{value: 'CTC_REMOVE_RUN_PLAN', label: '移除行车日志'},
|
||||||
|
CTC_MODIFY_ADJACENT_STATION:{value: 'CTC_MODIFY_ADJACENT_STATION', label: '修改邻站信息'}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
@ -3667,19 +3667,34 @@ export const OperationEvent = {
|
|||||||
domId: '_Tips-CTC-AssistPressAccident-Menu{TOP}'
|
domId: '_Tips-CTC-AssistPressAccident-Menu{TOP}'
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
// 修改股道
|
||||||
modifyTrackSection:{
|
modifyTrackSection:{
|
||||||
menu: {
|
menu: {
|
||||||
operation: '1110',
|
operation: '1110',
|
||||||
domId: '_Tips-CTC-modifyTrackSection-Menu{TOP}'
|
domId: '_Tips-CTC-modifyTrackSection-Menu{TOP}'
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
// 批量修改股道
|
||||||
batchModifyTrackSection:{
|
batchModifyTrackSection:{
|
||||||
menu: {
|
menu: {
|
||||||
operation: '1111',
|
operation: '1111',
|
||||||
domId: '_Tips-CTC-batchModifyTrackSection-Menu{TOP}'
|
domId: '_Tips-CTC-batchModifyTrackSection-Menu{TOP}'
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
// 移除行车日志
|
||||||
|
deleteRunplan:{
|
||||||
|
menu: {
|
||||||
|
operation: '1112',
|
||||||
|
domId: '_Tips-CTC-deleteRunplan-Menu{TOP}'
|
||||||
|
}
|
||||||
|
},
|
||||||
|
// 修改行车计划的邻站信息
|
||||||
|
modifyAdjacentStation:{
|
||||||
|
menu: {
|
||||||
|
operation: '1113',
|
||||||
|
domId: '_Tips-CTC-modifyAdjacentStation-Menu{TOP}'
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
};
|
};
|
||||||
|
Loading…
Reference in New Issue
Block a user