西安二信号机操作调整

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();
this.ver.hide();
this.hor.hide();
console.log('222222222222222', this.triangle);
}
/* 关闭闪烁三角形并还原灯柱 */
removeTerminalOptional() {

View File

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

View File

@ -142,8 +142,8 @@ export default {
},
{
label: '引导信号',
handler: this.undeveloped,
cmdType: CMD.Signal.CMD_SIGNAL_UNBLOCK
handler: this.guideSignal,
cmdType: CMD.Signal.CMD_SIGNAL_ROUTE_GUIDE
},
{
label: '设备标签',
@ -215,6 +215,11 @@ export default {
} else {
this.doClose();
}
},
'$store.state.menuOperation.selectedCount': function (val) {
if (this.selected._type === 'Signal') {
this.arrangementRoute();
}
}
},
methods: {
@ -361,10 +366,28 @@ export default {
},
//
cancelTrainRoute() {
commitOperate(menuOperate.Signal.cancelTrainRoute, {signalCode:this.selected.code}, 0).then(({valid, operate})=>{
if (valid) {
this.$refs.routeControl.doShow(operate, this.selected);
const step = {
code: `${this.selected.code}`,
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() {
commitOperate(menuOperate.Signal.humanControl, {signalCode:this.selected.code}, 0).then(({valid, operate})=>{
if (valid) {
this.$refs.routeHandControl.doShow(operate, this.selected, this.getRouteList(this.selected));
const routeCodeList = [];
this.routeList.forEach(item => {
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() {
commitOperate(menuOperate.Signal.atsAutoControl, {signalCode:this.selected.code}, 0).then(({valid, operate})=>{
if (valid) {
this.$refs.routeHandControl.doShow(operate, this.selected, this.getRouteList(this.selected));
const routeCodeList = [];
this.routeList.forEach(item => {
if (item.startSignalCode === this.selected.code) {
routeCodeList.push(item.code);
}
});
},
//
singalPassModel() {
commitOperate(menuOperate.Signal.setAutoInterlock, {signalCode:this.selected.code}, 0).then(({valid, operate})=>{
if (valid) {
this.$refs.routeControl.doShow(operate, this.selected);
}
});
},
//
singalCancelPassModel() {
commitOperate(menuOperate.Signal.cancelAutoInterlock, {signalCode:this.selected.code}, 0).then(({valid, operate})=>{
if (valid) {
this.$refs.routeControl.doShow(operate, this.selected);
const step = {
code: `${this.selected.code}`,
operation: OperationEvent.Signal.atsAutoControl.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.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() {
commitOperate(menuOperate.Signal.detail, {signalCode:this.selected.code}, 0).then(({valid, operate})=>{