Merge branch 'test' of https://git.code.tencent.com/lian-cbtc/jl-client into test
This commit is contained in:
commit
664e174fcf
@ -86,6 +86,9 @@ export default {
|
||||
selectedObj: null,
|
||||
oldClickObj: null, // 上一次点击对象
|
||||
route: null, // 进路对象
|
||||
atpRoute:null,
|
||||
groundRoute:null,
|
||||
guideRoute:null,
|
||||
centralizedStationList: new Array(15).fill({}),
|
||||
ciStationParamList: [],
|
||||
// startVirtual: false,
|
||||
@ -194,14 +197,28 @@ export default {
|
||||
},
|
||||
clickCommand(row) {
|
||||
this.clearAllMenuShow();
|
||||
const setList = ['ATP进路', '联锁进路', '引导进路'];
|
||||
const cancleList = ['取消ATP', '取消联锁', '取消引导'];
|
||||
const routeList = [this.atpRoute, this.groundRoute, this.guideRoute];
|
||||
const setIndex = setList.indexOf(row.name);
|
||||
const cancleIndex = cancleList.indexOf(row.name);
|
||||
let currentIndex = -1;
|
||||
const step = {};
|
||||
if (setIndex >= 0) { currentIndex = setIndex; }
|
||||
if (cancleIndex >= 0) { currentIndex = cancleIndex; }
|
||||
if (currentIndex >= 0) {
|
||||
this.route = routeList[currentIndex];
|
||||
this.tempData.push(this.route);
|
||||
step.param = {
|
||||
routeCode: this.route.code
|
||||
};
|
||||
}
|
||||
if (this.tempData.length) {
|
||||
row.show = true;
|
||||
this.operate = row.operate.operation;
|
||||
this.cmdType = row.cmdType;
|
||||
this.canCommand = false;
|
||||
const step = {
|
||||
operation: this.operate
|
||||
};
|
||||
step.operation = this.operate;
|
||||
this.$store.dispatch('training/nextNew', step).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
@ -275,24 +292,45 @@ export default {
|
||||
this.centralizedStationList[index] = swicth;
|
||||
});
|
||||
this.tempData = [];
|
||||
this.tempData.push(this.route);
|
||||
this.param = {
|
||||
routeCode: this.route.code
|
||||
};
|
||||
// this.tempData.push(this.route);
|
||||
// this.param = {
|
||||
// routeCode: this.route.code
|
||||
// };
|
||||
},
|
||||
// 校验上次点击信号机
|
||||
checkSignal() {
|
||||
this.route = null;
|
||||
this.atpRoute = null;
|
||||
this.groundRoute = null;
|
||||
this.guideRoute = null;
|
||||
this.atp = false;
|
||||
this.ground = false;
|
||||
this.guide = false;
|
||||
this.routeList.forEach(item => {
|
||||
if (item.startSignalCode == this.oldClickObj.code && item.endSignalCode == this.selectedObj.code) {
|
||||
if (!this.atp) {
|
||||
if (item.atp) {
|
||||
this.atpRoute = item;
|
||||
}
|
||||
this.atp = item.atp;
|
||||
}
|
||||
if (!this.ground) {
|
||||
if (item.ground) {
|
||||
this.groundRoute = item;
|
||||
}
|
||||
this.ground = item.ground;
|
||||
}
|
||||
if (!this.guide) {
|
||||
if (item.guide) {
|
||||
this.guideRoute = item;
|
||||
}
|
||||
this.guide = item.guide;
|
||||
this.route = item;
|
||||
}
|
||||
// this.route = {};
|
||||
this.initRouteMenus();
|
||||
}
|
||||
});
|
||||
if (this.route && this.route.code) {
|
||||
if (this.atpRoute || this.groundRoute || this.guideRoute) {
|
||||
this.handleRouteMenu();
|
||||
this.deviceHighLight(this.selectedObj, true);
|
||||
this.oldDevice = this.selectedObj;
|
||||
|
Loading…
Reference in New Issue
Block a user