西安二信号机操作调整

This commit is contained in:
fan 2020-04-29 15:24:17 +08:00
parent 7e790a3bdb
commit ec7be523ba
3 changed files with 104 additions and 27 deletions

View File

@ -84,7 +84,6 @@ class ESigPost extends Group {
.start(); .start();
this.ver.hide(); this.ver.hide();
this.hor.hide(); this.hor.hide();
console.log('222222222222222', this.triangle);
} }
/* 关闭闪烁三角形并还原灯柱 */ /* 关闭闪烁三角形并还原灯柱 */
removeTerminalOptional() { removeTerminalOptional() {

View File

@ -65,7 +65,6 @@ export default {
watch: { watch: {
'$store.state.menuOperation.requestList': function (list) { '$store.state.menuOperation.requestList': function (list) {
this.tempData = []; this.tempData = [];
console.log(list, '================');
if (list && list.length) { if (list && list.length) {
list.forEach(item => { list.forEach(item => {
if (item.device && item.device.code) { if (item.device && item.device.code) {

View File

@ -142,8 +142,8 @@ export default {
}, },
{ {
label: '引导信号', label: '引导信号',
handler: this.undeveloped, handler: this.guideSignal,
cmdType: CMD.Signal.CMD_SIGNAL_UNBLOCK cmdType: CMD.Signal.CMD_SIGNAL_ROUTE_GUIDE
}, },
{ {
label: '设备标签', label: '设备标签',
@ -215,6 +215,11 @@ export default {
} else { } else {
this.doClose(); this.doClose();
} }
},
'$store.state.menuOperation.selectedCount': function (val) {
if (this.selected._type === 'Signal') {
this.arrangementRoute();
}
} }
}, },
methods: { methods: {
@ -361,10 +366,28 @@ export default {
}, },
// //
cancelTrainRoute() { cancelTrainRoute() {
commitOperate(menuOperate.Signal.cancelTrainRoute, {signalCode:this.selected.code}, 0).then(({valid, operate})=>{ const step = {
if (valid) { code: `${this.selected.code}`,
this.$refs.routeControl.doShow(operate, this.selected); operation: OperationEvent.Signal.cancelTrainRoute.menu.operation,
param: {
signalCode: this.selected.code
} }
};
this.$store.dispatch('training/nextNew', step).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.resetRouteSignal();
this.$store.dispatch('menuOperation/pushRequestList', {
device: this.selected,
operation: { code: OperationEvent.Signal.arrangementRoute.menu.operation, name: '取消进路'},
cmdType: CMD.Signal.CMD_SIGNAL_CANCEL_ROUTE,
param: step.param
});
} else {
this.$refs.noticeInfo.doShow(step);
}
}).catch(() => {
this.$refs.noticeInfo.doShow(step);
}); });
}, },
// //
@ -391,38 +414,94 @@ export default {
} }
}); });
}, },
//
guideSignal() {
const step = {
code: this.selected.code,
operation: OperationEvent.Signal.guide.menu.operation,
param: {
signalCode: this.selected.code
}
};
this.$store.dispatch('training/nextNew', step).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.$store.dispatch('menuOperation/pushRequestList', {
device: this.selected,
operation: { code: OperationEvent.Signal.guide.menu.operation, name: '引导信号'},
cmdType: CMD.Signal.CMD_SIGNAL_ROUTE_GUIDE,
param: step.param
});
}
}).catch(() => {
this.$refs.noticeInfo.doShow(step);
});
},
// //
humanControl() { humanControl() {
commitOperate(menuOperate.Signal.humanControl, {signalCode:this.selected.code}, 0).then(({valid, operate})=>{ const routeCodeList = [];
if (valid) { this.routeList.forEach(item => {
this.$refs.routeHandControl.doShow(operate, this.selected, this.getRouteList(this.selected)); if (item.startSignalCode === this.selected.code) {
routeCodeList.push(item.code);
} }
}); });
const step = {
code: `${this.selected.code}`,
operation: OperationEvent.Signal.humanControl.menu.operation,
param: {
signalCode: this.selected.code,
routeCodeList: routeCodeList
}
};
this.$store.dispatch('training/nextNew', step).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.$store.dispatch('menuOperation/pushRequestList', {
device: this.selected,
operation: { code: OperationEvent.Signal.humanControl.menu.operation, name: '关闭自动进路'},
cmdType: CMD.Signal.CMD_SIGNAL_CLOSE_AUTO_SETTING,
param: step.param
});
} else {
this.$refs.noticeInfo.doShow(step);
}
}).catch(() => {
this.$refs.noticeInfo.doShow(step);
});
}, },
// //
atsAutoControl() { atsAutoControl() {
commitOperate(menuOperate.Signal.atsAutoControl, {signalCode:this.selected.code}, 0).then(({valid, operate})=>{ const routeCodeList = [];
if (valid) { this.routeList.forEach(item => {
this.$refs.routeHandControl.doShow(operate, this.selected, this.getRouteList(this.selected)); if (item.startSignalCode === this.selected.code) {
routeCodeList.push(item.code);
} }
}); });
}, const step = {
// code: `${this.selected.code}`,
singalPassModel() { operation: OperationEvent.Signal.atsAutoControl.menu.operation,
commitOperate(menuOperate.Signal.setAutoInterlock, {signalCode:this.selected.code}, 0).then(({valid, operate})=>{ param: {
if (valid) { signalCode: this.selected.code,
this.$refs.routeControl.doShow(operate, this.selected); routeCodeList: routeCodeList
}
});
},
//
singalCancelPassModel() {
commitOperate(menuOperate.Signal.cancelAutoInterlock, {signalCode:this.selected.code}, 0).then(({valid, operate})=>{
if (valid) {
this.$refs.routeControl.doShow(operate, this.selected);
} }
};
this.$store.dispatch('training/nextNew', step).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.$store.dispatch('menuOperation/pushRequestList', {
device: this.selected,
operation: { code: OperationEvent.Signal.atsAutoControl.menu.operation, name: '开放自动进路'},
cmdType: CMD.Signal.CMD_SIGNAL_OPEN_AUTO_SETTING,
param: step.param
});
} else {
this.$refs.noticeInfo.doShow(step);
}
}).catch(() => {
this.$refs.noticeInfo.doShow(step);
}); });
}, },
// //
detail() { detail() {
commitOperate(menuOperate.Signal.detail, {signalCode:this.selected.code}, 0).then(({valid, operate})=>{ commitOperate(menuOperate.Signal.detail, {signalCode:this.selected.code}, 0).then(({valid, operate})=>{