调整成都一号线 请求堆栈 取消请求流程

This commit is contained in:
zyy 2020-01-10 11:27:43 +08:00
parent 2b56d3f636
commit fa643db9db
6 changed files with 37 additions and 20 deletions

View File

@ -46,7 +46,8 @@ export default {
tableStyle: {
'border-bottom': 'none',
'border-right': 'none'
}
},
row: {}
};
},
computed: {
@ -70,13 +71,14 @@ export default {
const station = this.$store.getters['map/getDeviceByCode'](item.device.stationCode);
const param = {
station: `CP ${station.name}`,
operation: `${item.device.name} ${item.operation}`
operation: `${item.device.name} ${item.operation.name}`,
operateCode: item.operation.code,
deviceCode: item.device.code
};
this.tempData.push(param);
}
});
}
console.log(this.tempData);
}
},
mounted() {
@ -86,8 +88,12 @@ export default {
this.unfold = !this.unfold;
},
clickEvent(row, event, column) {
if (row.canSetting) {
console.log(row);
this.row = row;
},
cancel() {
if (this.row && this.row.deviceCode) {
console.log(this.row);
this.$store.dispatch('menuOperation/spliceRequestList', this.row);
}
}
}

View File

@ -222,7 +222,7 @@ export default {
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: '轨道封锁'});
this.$store.dispatch('menuOperation/pushRequestList', {device: this.selected, operation: { code: OperationEvent.Section.lock.menu.operation, name: '轨道封锁'}});
}
});
},
@ -238,7 +238,7 @@ export default {
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: '轨道封锁解除'});
this.$store.dispatch('menuOperation/pushRequestList', {device: this.selected, operation: { code: OperationEvent.Section.unlock.menu.operation, name: '轨道封锁解除'}});
}
});
},

View File

@ -315,7 +315,7 @@ export default {
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: '始端/终端选择'});
this.$store.dispatch('menuOperation/pushRequestList', { device: this.selected, operation: { code: OperationEvent.Signal.arrangementRoute.menu.operation, name: '始端/终端选择'}});
}
}).catch(() => {
this.$refs.noticeInfo.doShow(step);
@ -334,7 +334,7 @@ export default {
this.$store.dispatch('training/nextNew', step).then(({ valid, response }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.$store.dispatch('menuOperation/pushRequestList', {device: this.selected, operation: '引导信号'});
this.$store.dispatch('menuOperation/pushRequestList', {device: this.selected, operation: { code: OperationEvent.Signal.guide.menu.operation, name: '引导信号'}});
}
});
},
@ -351,7 +351,7 @@ export default {
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: '取消进路'});
this.$store.dispatch('menuOperation/pushRequestList', {device: this.selected, operation: { code: OperationEvent.Signal.cancelTrainRoute.menu.operation, name: '取消进路'}});
}
});
},
@ -368,7 +368,7 @@ export default {
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: '终端信号机封锁' });
this.$store.dispatch('menuOperation/pushRequestList', { device: this.selected, operation: { code: OperationEvent.Signal.lock.menu.operation, name: '终端信号机封锁'}});
}
}).catch(() => {
this.$refs.noticeInfo.doShow(step);
@ -387,7 +387,7 @@ export default {
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: '终端信号机解封'});
this.$store.dispatch('menuOperation/pushRequestList', { device: this.selected, operation: { code: OperationEvent.Signal.unlock.menu.operation, name: '终端信号机解封'}});
}
});
},
@ -421,7 +421,7 @@ export default {
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: '开放自动进路'});
this.$store.dispatch('menuOperation/pushRequestList', { device: this.selected, operation: { code: OperationEvent.Signal.atsAutoControl.menu.operation, name: '开放自动进路'}});
}
});
},

View File

@ -17,7 +17,7 @@ import PlatformDwell from './dialog/platformDwell';
import { mapGetters } from 'vuex';
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
import { OperateMode } from '@/scripts/ConstDic';
import Handler from '@/scripts/cmdPlugin/Handler';
// import Handler from '@/scripts/cmdPlugin/Handler';
import CMD from '@/scripts/cmdPlugin/CommandEnum';
import MenuContextHandler from '@/scripts/cmdPlugin/MenuContextHandler';
@ -198,7 +198,7 @@ export default {
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: OperationEvent.StationStand.setJumpStop.menu.operation});
this.$store.dispatch('menuOperation/pushRequestList', { device: this.selected, operation: { code: OperationEvent.StationStand.setJumpStop.menu.operation, name: '设置跳停'}});
// this.$refs.standControl.doShow(step, this.selected);
}
});
@ -216,7 +216,7 @@ export default {
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: OperationEvent.StationStand.cancelJumpStop.menu.operation });
this.$store.dispatch('menuOperation/pushRequestList', { device: this.selected, operation: { code: OperationEvent.StationStand.cancelJumpStop.menu.operation, name: '取消跳停'}});
// this.$refs.standControl.doShow(step, this.selected);
}
});

View File

@ -213,7 +213,7 @@ export default {
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.$store.dispatch('menuOperation/pushRequestList', { device: this.selected, operation: '道岔单锁' } );
this.$store.dispatch('menuOperation/pushRequestList', { device: this.selected, operation: { code: OperationEvent.Switch.lock.menu.operation, name: '道岔单锁'}} );
// this.$refs.switchControl.doShow(operate, this.selected);
}
});
@ -230,7 +230,7 @@ export default {
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.$store.dispatch('menuOperation/pushRequestList', { device: this.selected, operation: '道岔单解' });
this.$store.dispatch('menuOperation/pushRequestList', { device: this.selected, operation: { code: OperationEvent.Switch.unlock.menu.operation, name: '道岔单解'}});
// this.$refs.switchControl.doShow(operate, this.selected);
}
});
@ -247,7 +247,7 @@ export default {
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.$store.dispatch('menuOperation/pushRequestList', { device: this.selected, operation: '道岔定位'});
this.$store.dispatch('menuOperation/pushRequestList', { device: this.selected, operation: { code: OperationEvent.Switch.locate.menu.operation, name: '道岔定位'}});
// this.$refs.switchControl.doShow(operate, this.selected);
}
});
@ -264,7 +264,7 @@ export default {
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.$store.dispatch('menuOperation/pushRequestList', { device: this.selected, operation: '道岔反位' });
this.$store.dispatch('menuOperation/pushRequestList', { device: this.selected, operation: { code: OperationEvent.Switch.reverse.menu.operation, name: '道岔反位'}});
// this.$refs.switchControl.doShow(operate, this.selected);
}
});

View File

@ -107,6 +107,13 @@ const menuOperation = {
pushRequestList: (state, request) => {
state.requestList.push(request);
},
spliceRequestList: (state, row) => {
state.requestList.forEach((item, index) => {
if (item.device.code == row.deviceCode && item.operation.code == row.operateCode) {
state.requestList.splice(index, 1);
}
});
},
resetRequestList: (state) => {
state.requestList = [];
}
@ -186,6 +193,10 @@ const menuOperation = {
pushRequestList: ({ commit }, request) => {
commit('pushRequestList', request);
},
spliceRequestList: ({ commit }, request) => {
commit('spliceRequestList', request);
}
}
};