parent
d7aec11a91
commit
9bad0d61a7
@ -54,7 +54,7 @@ export default class Arrow extends Group {
|
||||
}
|
||||
}
|
||||
setShowStation(stationCode) {
|
||||
if (store.getters['map/checkDeviceShow'](stationCode, this._code)) {
|
||||
if (!stationCode || store.getters['map/checkDeviceShow'](stationCode, this._code)) {
|
||||
this.show();
|
||||
this.isShowShape = true;
|
||||
this.setState(this.model);
|
||||
|
@ -173,7 +173,7 @@ export default class AutoTurnBack extends Group {
|
||||
}
|
||||
}
|
||||
setShowStation(stationCode) {
|
||||
if (store.getters['map/checkDeviceShow'](stationCode, this._code)) {
|
||||
if (!stationCode || store.getters['map/checkDeviceShow'](stationCode, this._code)) {
|
||||
this.isShowShape = true;
|
||||
this.showMode();
|
||||
} else {
|
||||
|
@ -138,7 +138,7 @@ export default class AutomacticRoute extends Group {
|
||||
}
|
||||
}
|
||||
setShowStation(stationCode) {
|
||||
if (store.getters['map/checkDeviceShow'](stationCode, this._code)) {
|
||||
if (!stationCode || store.getters['map/checkDeviceShow'](stationCode, this._code)) {
|
||||
this.isShowShape = true;
|
||||
this.showMode();
|
||||
} else {
|
||||
|
@ -142,7 +142,7 @@ export default class AxleReset extends Group {
|
||||
}
|
||||
}
|
||||
setShowStation(stationCode) {
|
||||
if (store.getters['map/checkDeviceShow'](stationCode, this._code)) {
|
||||
if (!stationCode || store.getters['map/checkDeviceShow'](stationCode, this._code)) {
|
||||
this.isShowShape = true;
|
||||
this.showMode();
|
||||
} else {
|
||||
|
@ -98,7 +98,7 @@ export default class DirectionRod extends Group {
|
||||
|
||||
}
|
||||
setShowStation(stationCode) {
|
||||
if (store.getters['map/checkDeviceShow'](stationCode, this._code)) {
|
||||
if (!stationCode || store.getters['map/checkDeviceShow'](stationCode, this._code)) {
|
||||
this.isShowShape = true;
|
||||
this.showMode();
|
||||
} else {
|
||||
|
@ -62,7 +62,7 @@ export default class FloodGate extends Group {
|
||||
}
|
||||
}
|
||||
setShowStation(stationCode) {
|
||||
if (store.getters['map/checkDeviceShow'](stationCode, this._code)) {
|
||||
if (!stationCode || store.getters['map/checkDeviceShow'](stationCode, this._code)) {
|
||||
this.isShowShape = true;
|
||||
this.showMode();
|
||||
} else {
|
||||
|
@ -149,7 +149,7 @@ export default class GuideLock extends Group {
|
||||
}
|
||||
}
|
||||
setShowStation(stationCode) {
|
||||
if (store.getters['map/checkDeviceShow'](stationCode, this._code)) {
|
||||
if (!stationCode || store.getters['map/checkDeviceShow'](stationCode, this._code)) {
|
||||
this.isShowShape = true;
|
||||
this.showMode();
|
||||
} else {
|
||||
|
@ -89,7 +89,7 @@ export default class LcControl extends Group {
|
||||
}
|
||||
setShowMode() {}
|
||||
setShowStation(stationCode) {
|
||||
if (store.getters['map/checkDeviceShow'](stationCode, this._code)) {
|
||||
if (!stationCode || store.getters['map/checkDeviceShow'](stationCode, this._code)) {
|
||||
this.control.show();
|
||||
this.isShowShape = true;
|
||||
this.setState(this.model);
|
||||
|
@ -94,7 +94,7 @@ export default class LimitControl extends Group {
|
||||
}
|
||||
setShowMode() {}
|
||||
setShowStation(stationCode) {
|
||||
if (store.getters['map/checkDeviceShow'](stationCode, this._code)) {
|
||||
if (!stationCode || store.getters['map/checkDeviceShow'](stationCode, this._code)) {
|
||||
this.control.show();
|
||||
this.isShowShape = true;
|
||||
this.setState(this.model);
|
||||
|
@ -106,7 +106,7 @@ export default class Line2 extends Group {
|
||||
}
|
||||
}
|
||||
setShowStation(stationCode) {
|
||||
if (store.getters['map/checkDeviceShow'](stationCode, this._code)) {
|
||||
if (!stationCode || store.getters['map/checkDeviceShow'](stationCode, this._code)) {
|
||||
this.segment && this.segment.show();
|
||||
this.viceSegment && this.viceSegment.show();
|
||||
this.isShowShape = true;
|
||||
|
@ -58,7 +58,7 @@ export default class OutFrame extends Group {
|
||||
}
|
||||
}
|
||||
setShowStation(stationCode) {
|
||||
if (store.getters['map/checkDeviceShow'](stationCode, this._code)) {
|
||||
if (!stationCode || store.getters['map/checkDeviceShow'](stationCode, this._code)) {
|
||||
this.box && this.box.show();
|
||||
this.isShowShape = true;
|
||||
this.setState(this.model);
|
||||
|
@ -136,7 +136,7 @@ export default class Line2 extends Group {
|
||||
}
|
||||
}
|
||||
setShowStation(stationCode) {
|
||||
if (store.getters['map/checkDeviceShow'](stationCode, this._code)) {
|
||||
if (!stationCode || store.getters['map/checkDeviceShow'](stationCode, this._code)) {
|
||||
this.eachChild((child) => {
|
||||
child.show();
|
||||
});
|
||||
|
@ -92,7 +92,7 @@ export default class Line2 extends Group {
|
||||
}
|
||||
}
|
||||
setShowStation(stationCode) {
|
||||
if (store.getters['map/checkDeviceShow'](stationCode, this._code)) {
|
||||
if (!stationCode || store.getters['map/checkDeviceShow'](stationCode, this._code)) {
|
||||
this.eachChild(item => {
|
||||
item.show();
|
||||
});
|
||||
|
@ -71,7 +71,7 @@ export default class Resource extends Group {
|
||||
}
|
||||
setShowMode() {}
|
||||
setShowStation(stationCode) {
|
||||
if (store.getters['map/checkDeviceShow'](stationCode, this._code)) {
|
||||
if (!stationCode || store.getters['map/checkDeviceShow'](stationCode, this._code)) {
|
||||
this.image && this.image.show();
|
||||
this.isShowShape = true;
|
||||
this.setState(this.model);
|
||||
|
@ -189,7 +189,7 @@ export default class Responder extends Group {
|
||||
}
|
||||
setShowMode() {}
|
||||
setShowStation(stationCode) {
|
||||
if (store.getters['map/checkDeviceShow'](stationCode, this._code)) {
|
||||
if (!stationCode || store.getters['map/checkDeviceShow'](stationCode, this._code)) {
|
||||
this.block && this.block.show();
|
||||
this.isShowShape = true;
|
||||
this.setState(this.model);
|
||||
|
@ -223,7 +223,7 @@ export default class SaidLamp extends Group {
|
||||
}
|
||||
}
|
||||
setShowStation(stationCode) {
|
||||
if (store.getters['map/checkDeviceShow'](stationCode, this._code)) {
|
||||
if (!stationCode || store.getters['map/checkDeviceShow'](stationCode, this._code)) {
|
||||
this.control && this.control.show();
|
||||
this.isShowShape = true;
|
||||
this.setState(this.model);
|
||||
|
@ -597,7 +597,7 @@ export default class Section extends Group {
|
||||
}
|
||||
}
|
||||
setShowStation(stationCode) {
|
||||
if (store.getters['map/checkDeviceShow'](stationCode, this._code)) {
|
||||
if (!stationCode || store.getters['map/checkDeviceShow'](stationCode, this._code)) {
|
||||
this.eachChild(item => {
|
||||
item.show();
|
||||
});
|
||||
|
@ -1189,7 +1189,7 @@ class Signal extends Group {
|
||||
}
|
||||
}
|
||||
setShowStation(stationCode) {
|
||||
if (store.getters['map/checkDeviceShow'](stationCode, this._code)) {
|
||||
if (!stationCode || store.getters['map/checkDeviceShow'](stationCode, this._code)) {
|
||||
this.eachChild(item => {
|
||||
item.show();
|
||||
});
|
||||
|
@ -132,7 +132,7 @@ export default class SignalButton extends Group {
|
||||
setShowMode() {
|
||||
}
|
||||
setShowStation(stationCode) {
|
||||
if (store.getters['map/checkDeviceShow'](stationCode, this._code)) {
|
||||
if (!stationCode || store.getters['map/checkDeviceShow'](stationCode, this._code)) {
|
||||
this.eachChild(item => {
|
||||
item.show();
|
||||
});
|
||||
|
@ -133,7 +133,7 @@ export default class SplitStation extends Group {
|
||||
}
|
||||
}
|
||||
setShowStation(stationCode) {
|
||||
if (store.getters['map/checkDeviceShow'](stationCode, this._code)) {
|
||||
if (!stationCode || store.getters['map/checkDeviceShow'](stationCode, this._code)) {
|
||||
this.eachChild(item => {
|
||||
item.show();
|
||||
});
|
||||
|
@ -784,7 +784,7 @@ export default class Station extends Group {
|
||||
}
|
||||
}
|
||||
setShowStation(stationCode) {
|
||||
if (store.getters['map/checkDeviceShow'](stationCode, this._code)) {
|
||||
if (!stationCode || store.getters['map/checkDeviceShow'](stationCode, this._code)) {
|
||||
if (this.model.visible) {
|
||||
this.eachChild(item => {
|
||||
item.show();
|
||||
|
@ -91,7 +91,7 @@ export default class StationCounter extends Group {
|
||||
}
|
||||
setShowMode() {}
|
||||
setShowStation(stationCode) {
|
||||
if (store.getters['map/checkDeviceShow'](stationCode, this._code)) {
|
||||
if (!stationCode || store.getters['map/checkDeviceShow'](stationCode, this._code)) {
|
||||
this.eachChild(item => {
|
||||
item.show();
|
||||
});
|
||||
|
@ -109,7 +109,7 @@ export default class StationDelayUnlock extends Group {
|
||||
}
|
||||
setShowMode() {}
|
||||
setShowStation(stationCode) {
|
||||
if (store.getters['map/checkDeviceShow'](stationCode, this._code)) {
|
||||
if (!stationCode || store.getters['map/checkDeviceShow'](stationCode, this._code)) {
|
||||
this.eachChild(item => {
|
||||
item.show();
|
||||
});
|
||||
|
@ -249,7 +249,7 @@ class StationStand extends Group {
|
||||
}
|
||||
}
|
||||
setShowStation(stationCode) {
|
||||
if (store.getters['map/checkDeviceShow'](stationCode, this._code) && this.model.visible) {
|
||||
if ((!stationCode || store.getters['map/checkDeviceShow'](stationCode, this._code)) && this.model.visible) {
|
||||
this.eachChild(item => {
|
||||
item.show();
|
||||
});
|
||||
|
@ -199,7 +199,7 @@ export default class StationTurnBack extends Group {
|
||||
}
|
||||
}
|
||||
setShowStation(stationCode) {
|
||||
if (store.getters['map/checkDeviceShow'](stationCode, this._code)) {
|
||||
if (!stationCode || store.getters['map/checkDeviceShow'](stationCode, this._code)) {
|
||||
this.eachChild(item => {
|
||||
item.show();
|
||||
});
|
||||
|
@ -811,7 +811,7 @@ export default class Switch extends Group {
|
||||
}
|
||||
}
|
||||
setShowStation(stationCode) {
|
||||
if (store.getters['map/checkDeviceShow'](stationCode, this._code)) {
|
||||
if (!stationCode || store.getters['map/checkDeviceShow'](stationCode, this._code)) {
|
||||
this.eachChild(item => {
|
||||
item.show();
|
||||
});
|
||||
|
@ -70,7 +70,7 @@ export default class Text2 extends Group {
|
||||
}
|
||||
}
|
||||
setShowStation(stationCode) {
|
||||
if (store.getters['map/checkDeviceShow'](stationCode, this._code)) {
|
||||
if (!stationCode || store.getters['map/checkDeviceShow'](stationCode, this._code)) {
|
||||
this.eachChild(item => {
|
||||
item.show();
|
||||
});
|
||||
|
@ -462,7 +462,7 @@ export default class Train extends Group {
|
||||
}
|
||||
}
|
||||
setShowStation(stationCode) {
|
||||
if (this.model.sectionModel && store.getters['map/checkDeviceShow'](stationCode, this.model.sectionModel.code)) {
|
||||
if ((this.model.sectionModel && store.getters['map/checkDeviceShow'](stationCode, this.model.sectionModel.code)) || !stationCode) {
|
||||
this.eachChild(item => {
|
||||
item.show();
|
||||
});
|
||||
|
@ -111,7 +111,7 @@ export default class ZcControl extends Group {
|
||||
}
|
||||
setShowMode() {}
|
||||
setShowStation(stationCode) {
|
||||
if (store.getters['map/checkDeviceShow'](stationCode, this._code)) {
|
||||
if (!stationCode || store.getters['map/checkDeviceShow'](stationCode, this._code)) {
|
||||
this.eachChild(item => {
|
||||
item.show();
|
||||
});
|
||||
|
@ -148,9 +148,7 @@ export default {
|
||||
const roleDeviceCode = this.$store.state.training.roleDeviceCode;
|
||||
const displayList = this.$store.state.map.map.displayList;
|
||||
const display = displayList.find(each=>{
|
||||
if (each.type === 'LOCAL') {
|
||||
return each.stationCodeList.includes(roleDeviceCode);
|
||||
}
|
||||
});
|
||||
if (display) {
|
||||
const codeList = [...display.switchStationCodeList];
|
||||
|
@ -671,11 +671,7 @@ const map = {
|
||||
if (state.map && state.map.displayList && state.map.displayList.length) {
|
||||
let flag = false;
|
||||
state.map.displayList.forEach(item => {
|
||||
if ( store.state.training.prdType === '01' && item.type === 'LOCAL' && item.stationCodeList.includes(stationCode) && item.elementList.includes(deviceCode)) {
|
||||
flag = true;
|
||||
} else if ( store.state.training.prdType === '02' && item.type === 'CENTER' && item.elementList.includes(deviceCode)) {
|
||||
flag = true;
|
||||
} else if ( store.state.training.prdType === '09' && item.type === 'DEPOT_IL' && item.elementList.includes(deviceCode)) {
|
||||
if (item.stationCodeList.includes(stationCode) && item.elementList.includes(deviceCode)) {
|
||||
flag = true;
|
||||
}
|
||||
});
|
||||
|
@ -142,12 +142,13 @@ export default {
|
||||
this.$emit('goDraw');
|
||||
},
|
||||
clear() {
|
||||
this.addModel = { type: 'CENTER', elementList: []};
|
||||
this.addModel = {elementList: []};
|
||||
},
|
||||
generateData() {
|
||||
this.loading = true;
|
||||
this.clear();
|
||||
this.tableData = [];
|
||||
const station = this.stationList.find(item => item.depot);
|
||||
|
||||
[...this.sectionList, ...this.signalList, ...this.stationStandList, ...this.switchList, ...this.automaticRouteButtonList,
|
||||
...this.axleCounterResetButtonList, ...this.cycleButtonList, ...this.indicatorLightList, ...this.lineList, ...this.outerFrameList,
|
||||
...this.responderList, ...this.tbStrategyList, ...this.tempSpeedLimitList, ...this.textList, ...this.totalGuideLockButtonVOList].forEach(item => {
|
||||
|
Loading…
Reference in New Issue
Block a user