删除注释,信号机流程完成

This commit is contained in:
zyy 2020-01-03 16:01:57 +08:00
parent 308f82c14e
commit 28e0617c87
3 changed files with 25 additions and 25 deletions

View File

@ -27,7 +27,7 @@ import MenuContextHandler from '@/scripts/cmdPlugin/MenuContextHandler';
import { mapGetters } from 'vuex';
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
import { DeviceMenu, OperateMode } from '@/scripts/ConstDic';
import { querySignalStatus } from '@/api/simulation';
// import { querySignalStatus } from '@/api/simulation';
export default {
name: 'SignalMenu',
@ -258,10 +258,11 @@ export default {
this.$store.dispatch('training/nextNew', step).then(({ valid }) => {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
if (valid) {
querySignalStatus(this.group, {signalCode: this.selected.code}).then(resp => {
const tempData = resp.data;
this.$refs.routeSelection.doShow(step.operation, this.selected, tempData);
});
// querySignalStatus(this.group, {signalCode: this.selected.code}).then(resp => {
// const tempData = resp.data;
const tempData = [];
this.$refs.routeSelection.doShow(step.operation, this.selected, tempData);
// });
}
}).catch(() => {
this.$refs.noticeInfo.doShow(step);
@ -368,10 +369,11 @@ export default {
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
querySignalStatus(this.group, {signalCode: `${this.selected.code}`}).then(resp => {
const tempData = resp.data;
this.$refs.routeHandControl.doShow(operate, this.selected, tempData);
});
// querySignalStatus(this.group, {signalCode: `${this.selected.code}`}).then(resp => {
// const tempData = resp.data;
const tempData = [];
this.$refs.routeHandControl.doShow(operate, this.selected, tempData);
// });
}
});
},
@ -388,10 +390,11 @@ export default {
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
querySignalStatus(this.group, {signalCode: `${this.selected.code}`}).then(resp => {
const tempData = resp.data;
this.$refs.routeHandControl.doShow(operate, this.selected, tempData);
});
// querySignalStatus(this.group, {signalCode: `${this.selected.code}`}).then(resp => {
// const tempData = resp.data;
const tempData = [];
this.$refs.routeHandControl.doShow(operate, this.selected, tempData);
// });
}
});
},
@ -425,10 +428,11 @@ export default {
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
querySignalStatus(this.group, {signalCode: `${this.selected.code}`}).then(resp => {
const tempData = resp.data;
this.$refs.routeDetail.doShow(operate, this.selected, tempData);
});
// querySignalStatus(this.group, {signalCode: `${this.selected.code}`}).then(resp => {
// const tempData = resp.data;
const tempData = [];
this.$refs.routeDetail.doShow(operate, this.selected, tempData);
// });
}
});
}

View File

@ -86,16 +86,13 @@ class MenuContextHandler {
covert(menuList) {
const selected = this.getCurrentStateObject();
let menu = [];
console.log(selected, 'selected');
const control = this.getStationControl(selected);
console.log(control, 'control');
if (control) {
if ( this.getPrdType() != '') {
const type = State2SimulationMap[this.getPrdType()];
// const status = State2ControlMap[control.status]; // 缺少车站控制模式字段
const status = State2ControlMap['01']; // 缺少车站控制模式字段
menu = [...menuList[type]];
console.log(menu, 'menu');
if (menu.constructor === Array) {
menu.forEach(elem => {
if (elem.type === 'separator') {
@ -120,7 +117,6 @@ class MenuContextHandler {
}
}
}
console.log(menu, '=========212');
return menu;
// if (menuList.constructor === Array) {

View File

@ -211,10 +211,10 @@ export default {
}
},
async loadSystemTime() {
const rest = await runDiagramGetTime(this.group);
if (rest && rest.code == 200) {
this.$store.dispatch('training/setInitTime', +new Date(`${new Date().getFullYear()} ${timeFormat(rest.data)}`));
}
// const rest = await runDiagramGetTime(this.group);
// if (rest && rest.code == 200) {
// this.$store.dispatch('training/setInitTime', +new Date(`${new Date().getFullYear()} ${timeFormat(rest.data)}`));
// }
},
change3dname() {
if (this.$route.query.prdType == '04') {