修改 设置设备名称的设置方法
This commit is contained in:
parent
167e483b10
commit
b6baa2e420
@ -234,16 +234,12 @@ class Jlmap {
|
||||
this.$painter.delete(oDevice);
|
||||
} else {
|
||||
const nDevice = Object.assign(oDevice, this.hookHandle(elem));
|
||||
if (nDevice.id == '5888') {
|
||||
console.log(oDevice, nDevice);
|
||||
debugger;
|
||||
}
|
||||
this.$painter.update(nDevice);
|
||||
}
|
||||
});
|
||||
|
||||
// 状态后处理
|
||||
// this.postHandle(list);
|
||||
this.postHandle(list);
|
||||
|
||||
if (this.methods.stateUpdate instanceof Function) { this.methods.stateUpdate(list); }
|
||||
}
|
||||
|
@ -89,7 +89,6 @@ class EMouse extends Group {
|
||||
}
|
||||
|
||||
mouseover(e) {
|
||||
debugger;
|
||||
if (this.device.model.isSwitchSection && this.device.model.relSwitchCode) {
|
||||
const instance = this.getInstanceByCode(this.device.model.relSwitchCode);
|
||||
if (instance && instance.mouseEvent && instance.mouseEvent.mouseover) {
|
||||
|
@ -124,43 +124,33 @@ export default {
|
||||
},
|
||||
setDeviceDisplay() {
|
||||
let show = false;
|
||||
const deviceList = [];
|
||||
let deviceList = [];
|
||||
|
||||
// 区段边界设置
|
||||
const sectionList = this.$store.getters['map/sectionList'];
|
||||
let borderBorderShow = this.deviceLevels.indexOf(2) !== -1;
|
||||
let sectionList = this.$store.getters['map/sectionList'];
|
||||
if (sectionList && sectionList.length > 0) {
|
||||
sectionList.forEach(elem => {
|
||||
// 区段边界
|
||||
show = this.deviceLevels.indexOf(2) !== -1;
|
||||
elem.borderBorderShow = show;
|
||||
elem.type = deviceType.Section;
|
||||
deviceList.push(elem);
|
||||
deviceList.push(Object.assign(this.$jlmap.getDeviceByCode(elem.code), { borderBorderShow })); // 区段边界
|
||||
});
|
||||
}
|
||||
|
||||
// 车次窗设置
|
||||
const trainWindowList = this.$store.getters['map/trainWindowList'];
|
||||
let trainWindowShow = this.deviceLevels.indexOf(1) !== -1;
|
||||
let trainWindowList = this.$store.getters['map/trainWindowList'];
|
||||
if (trainWindowList && trainWindowList.length > 0) {
|
||||
trainWindowList.forEach(elem => {
|
||||
// 车次窗
|
||||
show = this.deviceLevels.indexOf(1) !== -1;
|
||||
elem.type = deviceType.Section;
|
||||
elem.trainWindowShow = show;
|
||||
deviceList.push(elem);
|
||||
deviceList.push(Object.assign(this.$jlmap.getDeviceByCode(elem.code), { trainWindowShow })); // 车次窗
|
||||
});
|
||||
}
|
||||
|
||||
// 联锁自动进路表示灯和ATS自动触发表示灯设置
|
||||
const signalList = this.$store.getters['map/signalList'];
|
||||
let linkageAutoRouteShow = this.deviceLevels.indexOf(3) !== -1;// 联锁自动进路表示灯
|
||||
let atsAutoTriggerShow = this.deviceLevels.indexOf(4) !== -1;// ATS自动触发表示灯
|
||||
let signalList = this.$store.getters['map/signalList'];
|
||||
if (signalList && signalList.length > 0) {
|
||||
signalList.forEach(elem => {
|
||||
// 联锁自动进路表示灯
|
||||
show = this.deviceLevels.indexOf(3) !== -1;
|
||||
elem.linkageAutoRouteShow = show;
|
||||
// ATS自动触发表示灯
|
||||
show = this.deviceLevels.indexOf(4) !== -1;
|
||||
elem.atsAutoTriggerShow = show;
|
||||
deviceList.push(elem);
|
||||
deviceList.push(Object.assign(this.$jlmap.getDeviceByCode(elem.code), { linkageAutoRouteShow, atsAutoTriggerShow }));
|
||||
});
|
||||
}
|
||||
|
||||
|
@ -147,111 +147,97 @@
|
||||
})
|
||||
},
|
||||
setNameDisplay() {
|
||||
let show = false;
|
||||
let deviceList = [];
|
||||
|
||||
//信号机
|
||||
show = this.nameLevels.indexOf(1) !== -1 ? true : false;
|
||||
let nameShow = this.nameLevels.indexOf(1) !== -1 ? true : false;
|
||||
let signalList = this.$store.getters['map/signalList'];
|
||||
if (signalList && signalList.length > 0) {
|
||||
signalList.forEach(elem => {
|
||||
elem.nameShow = show;
|
||||
deviceList.push(elem);
|
||||
deviceList.push(Object.assign(this.$jlmap.getDeviceByCode(elem.code), { nameShow }));
|
||||
})
|
||||
}
|
||||
|
||||
//按钮名称
|
||||
show = this.nameLevels.indexOf(3) !== -1 ? true : false;
|
||||
nameShow = this.nameLevels.indexOf(3) !== -1 ? true : false;
|
||||
|
||||
|
||||
//道岔
|
||||
nameShow = this.nameLevels.indexOf(7) !== -1 ? true : false; //道岔名称
|
||||
let switchSectionNameShow = this.nameLevels.indexOf(9) !== -1 ? true : false; //道岔轨名称
|
||||
let switchList = this.$store.getters['map/switchList'];
|
||||
if (switchList && switchList.length > 0) {
|
||||
switchList.forEach(elem => {
|
||||
//道岔名称
|
||||
show = this.nameLevels.indexOf(7) !== -1 ? true : false;
|
||||
elem.nameShow = show;
|
||||
//道岔轨名称
|
||||
show = this.nameLevels.indexOf(9) !== -1 ? true : false;
|
||||
elem.switchSectionNameShow = show;
|
||||
deviceList.push(elem);
|
||||
deviceList.push(Object.assign(this.$jlmap.getDeviceByCode(elem.code), { nameShow, switchSectionNameShow }));
|
||||
})
|
||||
}
|
||||
|
||||
//控制模式
|
||||
show = this.nameLevels.indexOf(8) !== -1 ? true : false;
|
||||
let indicatorShow = this.nameLevels.indexOf(8) !== -1 ? true : false;
|
||||
let control = this.$store.getters['map/stationControlList'];
|
||||
if (control && control.length > 0) {
|
||||
control.forEach(elem => {
|
||||
//标识灯名称
|
||||
elem.indicatorShow = show;
|
||||
deviceList.push(elem);
|
||||
deviceList.push(Object.assign(this.$jlmap.getDeviceByCode(elem.code), { indicatorShow })); //标识灯名称
|
||||
})
|
||||
}
|
||||
|
||||
//区段
|
||||
nameShow = false;
|
||||
let standTrackNameShow = false;
|
||||
let reentryTrackNameShow = false;
|
||||
let transferTrackNameShow = false;
|
||||
let sectionList = this.$store.getters['map/sectionList'];
|
||||
if (sectionList && sectionList.length > 0) {
|
||||
sectionList.forEach(elem => {
|
||||
if (elem.isSwitchSection && elem.parentCode) {
|
||||
//道岔轨的区段名称默认不显示
|
||||
elem.nameShow = false;
|
||||
nameShow = false;
|
||||
} else {
|
||||
if (elem.type === '01') {
|
||||
show = this.nameLevels.indexOf(11) !== -1 ? true : false;
|
||||
elem.nameShow = show;
|
||||
nameShow = this.nameLevels.indexOf(11) !== -1 ? true : false;
|
||||
} else if (elem.type === '02') {
|
||||
//股道轨名称
|
||||
show = this.nameLevels.indexOf(5) !== -1 ? true : false;
|
||||
elem.nameShow = show;
|
||||
nameShow = this.nameLevels.indexOf(5) !== -1 ? true : false;
|
||||
} else if (elem.type === '03') {
|
||||
//道岔区段名称
|
||||
show = this.nameLevels.indexOf(9) !== -1 ? true : false;
|
||||
elem.nameShow = show;
|
||||
nameShow = this.nameLevels.indexOf(9) !== -1 ? true : false;
|
||||
}
|
||||
}
|
||||
|
||||
//站台轨名称
|
||||
if (elem.isStandTrack) {
|
||||
show = this.nameLevels.indexOf(2) !== -1 ? true : false;
|
||||
elem.standTrackNameShow = show;
|
||||
standTrackNameShow = this.nameLevels.indexOf(2) !== -1 ? true : false;
|
||||
}
|
||||
|
||||
//折返轨名称
|
||||
if (elem.isReentryTrack) {
|
||||
show = this.nameLevels.indexOf(4) !== -1 ? true : false;
|
||||
elem.reentryTrackNameShow = show;
|
||||
reentryTrackNameShow = this.nameLevels.indexOf(4) !== -1 ? true : false;
|
||||
}
|
||||
|
||||
//转换轨名称
|
||||
if (elem.isTransferTrack) {
|
||||
show = this.nameLevels.indexOf(6) !== -1 ? true : false;
|
||||
elem.transferTrackNameShow = show;
|
||||
transferTrackNameShow = this.nameLevels.indexOf(6) !== -1 ? true : false;
|
||||
}
|
||||
|
||||
deviceList.push(elem);
|
||||
|
||||
deviceList.push(Object.assign(this.$jlmap.getDeviceByCode(elem.code), { nameShow, standTrackNameShow, reentryTrackNameShow, transferTrackNameShow }));
|
||||
})
|
||||
}
|
||||
|
||||
//停车点
|
||||
show = this.nameLevels.indexOf(10) !== -1 ? true : false;
|
||||
let destCodeShow = this.nameLevels.indexOf(10) !== -1 ? true : false;
|
||||
let stopPointList = this.$store.getters['map/stopPointList'];
|
||||
if (stopPointList && stopPointList.length > 0) {
|
||||
stopPointList.forEach(elem => {
|
||||
//目的地名称
|
||||
elem.destCodeShow = show;
|
||||
deviceList.push(elem);
|
||||
deviceList.push(Object.assign(this.$jlmap.getDeviceByCode(elem.code), { destCodeShow }));
|
||||
})
|
||||
}
|
||||
|
||||
//车站
|
||||
show = this.nameLevels.indexOf(12) !== -1 ? true : false;
|
||||
let kmPostShow = this.nameLevels.indexOf(12) !== -1 ? true : false;
|
||||
let stationList = this.$store.getters['map/stationList'];
|
||||
if (stationList && stationList.length > 0) {
|
||||
stationList.forEach(elem => {
|
||||
//公里标
|
||||
elem.kmPostShow = show;
|
||||
deviceList.push(elem);
|
||||
deviceList.push(Object.assign(this.$jlmap.getDeviceByCode(elem.code), { kmPostShow })); //公里标
|
||||
})
|
||||
}
|
||||
|
||||
|
@ -155,16 +155,16 @@
|
||||
})
|
||||
},
|
||||
setTrainDispaly() {
|
||||
let updatList = [];
|
||||
let trainList = this.$store.getters['training/viewTrainList'];
|
||||
if (trainList && trainList.length > 0) {
|
||||
let planFormat = this.trainNameFormatBy(this.planMode);
|
||||
let nameFormat = this.trainNameFormatBy(this.planMode);
|
||||
let nameFontSize = this.fontSize;
|
||||
trainList.forEach(elem => {
|
||||
elem.nameFormat = planFormat;
|
||||
elem.nameFontSize = nameFontSize;
|
||||
updatList.forEach(elem => {
|
||||
deviceList.push(Object.assign(this.$jlmap.getDeviceByCode(elem.code), { nameFormat, nameFontSize })); // 车次窗
|
||||
});
|
||||
|
||||
this.$store.dispatch('map/updateMapDevices', trainList);
|
||||
this.$store.dispatch('map/updateMapDevices', updatList);
|
||||
}
|
||||
},
|
||||
trainNameFormatBy(mode) {
|
||||
|
@ -125,44 +125,33 @@ export default {
|
||||
},
|
||||
setDeviceDisplay() {
|
||||
let show = false;
|
||||
const deviceList = [];
|
||||
let deviceList = [];
|
||||
|
||||
// 区段边界设置
|
||||
const sectionList = this.$store.getters['map/sectionList'];
|
||||
let borderBorderShow = this.deviceLevels.indexOf(2) !== -1;
|
||||
let sectionList = this.$store.getters['map/sectionList'];
|
||||
if (sectionList && sectionList.length > 0) {
|
||||
sectionList.forEach(elem => {
|
||||
// 区段边界
|
||||
show = this.deviceLevels.indexOf(2) !== -1;
|
||||
elem._type = deviceType.Section;
|
||||
elem.borderBorderShow = show;
|
||||
deviceList.push(elem);
|
||||
deviceList.push(Object.assign(this.$jlmap.getDeviceByCode(elem.code), { borderBorderShow })); // 区段边界
|
||||
});
|
||||
}
|
||||
|
||||
// 车次窗设置
|
||||
const trainWindowList = this.$store.getters['map/trainWindowList'];
|
||||
let trainWindowShow = this.deviceLevels.indexOf(1) !== -1;
|
||||
let trainWindowList = this.$store.getters['map/trainWindowList'];
|
||||
if (trainWindowList && trainWindowList.length > 0) {
|
||||
trainWindowList.forEach(elem => {
|
||||
// 车次窗
|
||||
show = this.deviceLevels.indexOf(1) !== -1;
|
||||
elem._type = deviceType.TrainWindow;
|
||||
elem.trainWindowShow = show;
|
||||
deviceList.push(elem);
|
||||
deviceList.push(Object.assign(this.$jlmap.getDeviceByCode(elem.code), { trainWindowShow })); // 车次窗
|
||||
});
|
||||
}
|
||||
|
||||
// 联锁自动进路表示灯和ATS自动触发表示灯设置
|
||||
const signalList = this.$store.getters['map/signalList'];
|
||||
let linkageAutoRouteShow = this.deviceLevels.indexOf(3) !== -1;// 联锁自动进路表示灯
|
||||
let atsAutoTriggerShow = this.deviceLevels.indexOf(4) !== -1;// ATS自动触发表示灯
|
||||
let signalList = this.$store.getters['map/signalList'];
|
||||
if (signalList && signalList.length > 0) {
|
||||
signalList.forEach(elem => {
|
||||
elem._type = deviceType.Signal;
|
||||
// 联锁自动进路表示灯
|
||||
show = this.deviceLevels.indexOf(3) !== -1;
|
||||
elem.linkageAutoRouteShow = show;
|
||||
// ATS自动触发表示灯
|
||||
show = this.deviceLevels.indexOf(4) !== -1;
|
||||
elem.atsAutoTriggerShow = show;
|
||||
deviceList.push(elem);
|
||||
deviceList.push(Object.assign(this.$jlmap.getDeviceByCode(elem.code), { linkageAutoRouteShow, atsAutoTriggerShow }));
|
||||
});
|
||||
}
|
||||
|
||||
|
@ -147,112 +147,97 @@
|
||||
})
|
||||
},
|
||||
setNameDisplay() {
|
||||
let show = false;
|
||||
let deviceList = [];
|
||||
|
||||
//信号机
|
||||
show = this.nameLevels.indexOf(1) !== -1 ? true : false;
|
||||
let nameShow = this.nameLevels.indexOf(1) !== -1 ? true : false;
|
||||
let signalList = this.$store.getters['map/signalList'];
|
||||
if (signalList && signalList.length > 0) {
|
||||
signalList.forEach(elem => {
|
||||
elem.nameShow = show;
|
||||
deviceList.push(elem);
|
||||
deviceList.push(Object.assign(this.$jlmap.getDeviceByCode(elem.code), { nameShow }));
|
||||
})
|
||||
}
|
||||
|
||||
//按钮名称
|
||||
show = this.nameLevels.indexOf(3) !== -1 ? true : false;
|
||||
nameShow = this.nameLevels.indexOf(3) !== -1 ? true : false;
|
||||
|
||||
|
||||
//道岔
|
||||
nameShow = this.nameLevels.indexOf(7) !== -1 ? true : false; //道岔名称
|
||||
let switchSectionNameShow = this.nameLevels.indexOf(9) !== -1 ? true : false; //道岔轨名称
|
||||
let switchList = this.$store.getters['map/switchList'];
|
||||
if (switchList && switchList.length > 0) {
|
||||
switchList.forEach(elem => {
|
||||
//道岔名称
|
||||
show = this.nameLevels.indexOf(7) !== -1 ? true : false;
|
||||
elem.nameShow = show;
|
||||
//道岔轨名称
|
||||
show = this.nameLevels.indexOf(9) !== -1 ? true : false;
|
||||
elem.switchSectionNameShow = show;
|
||||
deviceList.push(elem);
|
||||
deviceList.push(Object.assign(this.$jlmap.getDeviceByCode(elem.code), { nameShow, switchSectionNameShow }));
|
||||
})
|
||||
}
|
||||
|
||||
//控制模式
|
||||
show = this.nameLevels.indexOf(8) !== -1 ? true : false;
|
||||
let indicatorShow = this.nameLevels.indexOf(8) !== -1 ? true : false;
|
||||
let control = this.$store.getters['map/stationControlList'];
|
||||
if (control && control.length > 0) {
|
||||
control.forEach(elem => {
|
||||
//标识灯名称
|
||||
elem.indicatorShow = show;
|
||||
deviceList.push(elem);
|
||||
deviceList.push(Object.assign(this.$jlmap.getDeviceByCode(elem.code), { indicatorShow })); //标识灯名称
|
||||
})
|
||||
}
|
||||
|
||||
//区段
|
||||
nameShow = false;
|
||||
let standTrackNameShow = false;
|
||||
let reentryTrackNameShow = false;
|
||||
let transferTrackNameShow = false;
|
||||
let sectionList = this.$store.getters['map/sectionList'];
|
||||
if (sectionList && sectionList.length > 0) {
|
||||
sectionList.forEach(elem => {
|
||||
if (elem.isSwitchSection && elem.parentCode) {
|
||||
//道岔轨的区段名称默认不显示
|
||||
elem.nameShow = false;
|
||||
nameShow = false;
|
||||
} else {
|
||||
if (elem.type === '01') {
|
||||
show = this.nameLevels.indexOf(11) !== -1 ? true : false;
|
||||
elem.nameShow = show;
|
||||
nameShow = this.nameLevels.indexOf(11) !== -1 ? true : false;
|
||||
} else if (elem.type === '02') {
|
||||
//股道轨名称
|
||||
show = this.nameLevels.indexOf(5) !== -1 ? true : false;
|
||||
elem.nameShow = show;
|
||||
nameShow = this.nameLevels.indexOf(5) !== -1 ? true : false;
|
||||
} else if (elem.type === '03') {
|
||||
//道岔区段名称
|
||||
show = this.nameLevels.indexOf(9) !== -1 ? true : false;
|
||||
elem.nameShow = show;
|
||||
nameShow = this.nameLevels.indexOf(9) !== -1 ? true : false;
|
||||
}
|
||||
}
|
||||
|
||||
//站台轨名称
|
||||
if (elem.isStandTrack) {
|
||||
show = this.nameLevels.indexOf(2) !== -1 ? true : false;
|
||||
elem.standTrackNameShow = show;
|
||||
standTrackNameShow = this.nameLevels.indexOf(2) !== -1 ? true : false;
|
||||
}
|
||||
|
||||
//折返轨名称
|
||||
if (elem.isReentryTrack) {
|
||||
show = this.nameLevels.indexOf(4) !== -1 ? true : false;
|
||||
elem.reentryTrackNameShow = show;
|
||||
reentryTrackNameShow = this.nameLevels.indexOf(4) !== -1 ? true : false;
|
||||
}
|
||||
|
||||
//转换轨名称
|
||||
if (elem.isTransferTrack) {
|
||||
show = this.nameLevels.indexOf(6) !== -1 ? true : false;
|
||||
elem.transferTrackNameShow = show;
|
||||
transferTrackNameShow = this.nameLevels.indexOf(6) !== -1 ? true : false;
|
||||
}
|
||||
|
||||
deviceList.push(elem);
|
||||
|
||||
deviceList.push(Object.assign(this.$jlmap.getDeviceByCode(elem.code), { nameShow, standTrackNameShow, reentryTrackNameShow, transferTrackNameShow }));
|
||||
})
|
||||
}
|
||||
|
||||
//停车点
|
||||
show = this.nameLevels.indexOf(10) !== -1 ? true : false;
|
||||
let destCodeShow = this.nameLevels.indexOf(10) !== -1 ? true : false;
|
||||
let stopPointList = this.$store.getters['map/stopPointList'];
|
||||
if (stopPointList && stopPointList.length > 0) {
|
||||
stopPointList.forEach(elem => {
|
||||
//目的地名称
|
||||
elem.destCodeShow = show;
|
||||
deviceList.push(elem);
|
||||
deviceList.push(Object.assign(this.$jlmap.getDeviceByCode(elem.code), { destCodeShow }));
|
||||
})
|
||||
}
|
||||
|
||||
//车站
|
||||
show = this.nameLevels.indexOf(12) !== -1 ? true : false;
|
||||
let kmPostShow = this.nameLevels.indexOf(12) !== -1 ? true : false;
|
||||
let stationList = this.$store.getters['map/stationList'];
|
||||
if (stationList && stationList.length > 0) {
|
||||
stationList.forEach(elem => {
|
||||
//公里标
|
||||
elem.kmPostShow = show;
|
||||
deviceList.push(elem);
|
||||
|
||||
deviceList.push(Object.assign(this.$jlmap.getDeviceByCode(elem.code), { kmPostShow })); //公里标
|
||||
})
|
||||
}
|
||||
|
||||
|
@ -155,16 +155,16 @@
|
||||
})
|
||||
},
|
||||
setTrainDispaly() {
|
||||
let updatList = [];
|
||||
let trainList = this.$store.getters['training/viewTrainList'];
|
||||
if (trainList && trainList.length > 0) {
|
||||
let planFormat = this.trainNameFormatBy(this.planMode);
|
||||
let nameFormat = this.trainNameFormatBy(this.planMode);
|
||||
let nameFontSize = this.fontSize;
|
||||
trainList.forEach(elem => {
|
||||
elem.nameFormat = planFormat;
|
||||
elem.nameFontSize = nameFontSize;
|
||||
updatList.forEach(elem => {
|
||||
deviceList.push(Object.assign(this.$jlmap.getDeviceByCode(elem.code), { nameFormat, nameFontSize })); // 车次窗
|
||||
});
|
||||
|
||||
this.$store.dispatch('map/updateMapDevices', trainList);
|
||||
this.$store.dispatch('map/updateMapDevices', updatList);
|
||||
}
|
||||
},
|
||||
trainNameFormatBy(mode) {
|
||||
|
@ -93,7 +93,7 @@ export default {
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
},
|
||||
cancel() {
|
||||
const operate = {
|
||||
let operate = {
|
||||
type: this.operate.type,
|
||||
operation: OperationEvent.Command.cancel.menu.operation
|
||||
};
|
||||
@ -105,7 +105,7 @@ export default {
|
||||
});
|
||||
},
|
||||
commit() {
|
||||
const operate = {
|
||||
let operate = {
|
||||
over: true,
|
||||
type: this.operate.type,
|
||||
operation: OperationEvent.Command.close.confirm.operation,
|
||||
@ -125,44 +125,33 @@ export default {
|
||||
},
|
||||
setDeviceDisplay() {
|
||||
let show = false;
|
||||
const deviceList = [];
|
||||
let deviceList = [];
|
||||
|
||||
// 区段边界设置
|
||||
const sectionList = this.$store.getters['map/sectionList'];
|
||||
let borderBorderShow = this.deviceLevels.indexOf(2) !== -1;
|
||||
let sectionList = this.$store.getters['map/sectionList'];
|
||||
if (sectionList && sectionList.length > 0) {
|
||||
sectionList.forEach(elem => {
|
||||
// 区段边界
|
||||
show = this.deviceLevels.indexOf(2) !== -1;
|
||||
elem._type = deviceType.Section;
|
||||
elem.borderBorderShow = show;
|
||||
deviceList.push(elem);
|
||||
deviceList.push(Object.assign(this.$jlmap.getDeviceByCode(elem.code), { borderBorderShow })); // 区段边界
|
||||
});
|
||||
}
|
||||
|
||||
// 车次窗设置
|
||||
const trainWindowList = this.$store.getters['map/trainWindowList'];
|
||||
let trainWindowShow = this.deviceLevels.indexOf(1) !== -1;
|
||||
let trainWindowList = this.$store.getters['map/trainWindowList'];
|
||||
if (trainWindowList && trainWindowList.length > 0) {
|
||||
trainWindowList.forEach(elem => {
|
||||
// 车次窗
|
||||
show = this.deviceLevels.indexOf(1) !== -1;
|
||||
elem._type = deviceType.TrainWindow;
|
||||
elem.trainWindowShow = show;
|
||||
deviceList.push(elem);
|
||||
deviceList.push(Object.assign(this.$jlmap.getDeviceByCode(elem.code), { trainWindowShow })); // 车次窗
|
||||
});
|
||||
}
|
||||
|
||||
// 联锁自动进路表示灯和ATS自动触发表示灯设置
|
||||
const signalList = this.$store.getters['map/signalList'];
|
||||
let linkageAutoRouteShow = this.deviceLevels.indexOf(3) !== -1;// 联锁自动进路表示灯
|
||||
let atsAutoTriggerShow = this.deviceLevels.indexOf(4) !== -1;// ATS自动触发表示灯
|
||||
let signalList = this.$store.getters['map/signalList'];
|
||||
if (signalList && signalList.length > 0) {
|
||||
signalList.forEach(elem => {
|
||||
elem._type = deviceType.Signal;
|
||||
// 联锁自动进路表示灯
|
||||
show = this.deviceLevels.indexOf(3) !== -1;
|
||||
elem.linkageAutoRouteShow = show;
|
||||
// ATS自动触发表示灯
|
||||
show = this.deviceLevels.indexOf(4) !== -1;
|
||||
elem.atsAutoTriggerShow = show;
|
||||
deviceList.push(elem);
|
||||
deviceList.push(Object.assign(this.$jlmap.getDeviceByCode(elem.code), { linkageAutoRouteShow, atsAutoTriggerShow }));
|
||||
});
|
||||
}
|
||||
|
||||
|
@ -147,112 +147,97 @@
|
||||
})
|
||||
},
|
||||
setNameDisplay() {
|
||||
let show = false;
|
||||
let deviceList = [];
|
||||
|
||||
//信号机
|
||||
show = this.nameLevels.indexOf(1) !== -1 ? true : false;
|
||||
let nameShow = this.nameLevels.indexOf(1) !== -1 ? true : false;
|
||||
let signalList = this.$store.getters['map/signalList'];
|
||||
if (signalList && signalList.length > 0) {
|
||||
signalList.forEach(elem => {
|
||||
elem.nameShow = show;
|
||||
deviceList.push(elem);
|
||||
deviceList.push(Object.assign(this.$jlmap.getDeviceByCode(elem.code), { nameShow }));
|
||||
})
|
||||
}
|
||||
|
||||
//按钮名称
|
||||
show = this.nameLevels.indexOf(3) !== -1 ? true : false;
|
||||
nameShow = this.nameLevels.indexOf(3) !== -1 ? true : false;
|
||||
|
||||
|
||||
//道岔
|
||||
nameShow = this.nameLevels.indexOf(7) !== -1 ? true : false; //道岔名称
|
||||
let switchSectionNameShow = this.nameLevels.indexOf(9) !== -1 ? true : false; //道岔轨名称
|
||||
let switchList = this.$store.getters['map/switchList'];
|
||||
if (switchList && switchList.length > 0) {
|
||||
switchList.forEach(elem => {
|
||||
//道岔名称
|
||||
show = this.nameLevels.indexOf(7) !== -1 ? true : false;
|
||||
elem.nameShow = show;
|
||||
//道岔轨名称
|
||||
show = this.nameLevels.indexOf(9) !== -1 ? true : false;
|
||||
elem.switchSectionNameShow = show;
|
||||
deviceList.push(elem);
|
||||
deviceList.push(Object.assign(this.$jlmap.getDeviceByCode(elem.code), { nameShow, switchSectionNameShow }));
|
||||
})
|
||||
}
|
||||
|
||||
//控制模式
|
||||
show = this.nameLevels.indexOf(8) !== -1 ? true : false;
|
||||
let indicatorShow = this.nameLevels.indexOf(8) !== -1 ? true : false;
|
||||
let control = this.$store.getters['map/stationControlList'];
|
||||
if (control && control.length > 0) {
|
||||
control.forEach(elem => {
|
||||
//标识灯名称
|
||||
elem.indicatorShow = show;
|
||||
deviceList.push(elem);
|
||||
deviceList.push(Object.assign(this.$jlmap.getDeviceByCode(elem.code), { indicatorShow })); //标识灯名称
|
||||
})
|
||||
}
|
||||
|
||||
//区段
|
||||
nameShow = false;
|
||||
let standTrackNameShow = false;
|
||||
let reentryTrackNameShow = false;
|
||||
let transferTrackNameShow = false;
|
||||
let sectionList = this.$store.getters['map/sectionList'];
|
||||
if (sectionList && sectionList.length > 0) {
|
||||
sectionList.forEach(elem => {
|
||||
if (elem.isSwitchSection && elem.parentCode) {
|
||||
//道岔轨的区段名称默认不显示
|
||||
elem.nameShow = false;
|
||||
nameShow = false;
|
||||
} else {
|
||||
if (elem.type === '01') {
|
||||
show = this.nameLevels.indexOf(11) !== -1 ? true : false;
|
||||
elem.nameShow = show;
|
||||
nameShow = this.nameLevels.indexOf(11) !== -1 ? true : false;
|
||||
} else if (elem.type === '02') {
|
||||
//股道轨名称
|
||||
show = this.nameLevels.indexOf(5) !== -1 ? true : false;
|
||||
elem.nameShow = show;
|
||||
nameShow = this.nameLevels.indexOf(5) !== -1 ? true : false;
|
||||
} else if (elem.type === '03') {
|
||||
//道岔区段名称
|
||||
show = this.nameLevels.indexOf(9) !== -1 ? true : false;
|
||||
elem.nameShow = show;
|
||||
nameShow = this.nameLevels.indexOf(9) !== -1 ? true : false;
|
||||
}
|
||||
}
|
||||
|
||||
//站台轨名称
|
||||
if (elem.isStandTrack) {
|
||||
show = this.nameLevels.indexOf(2) !== -1 ? true : false;
|
||||
elem.standTrackNameShow = show;
|
||||
standTrackNameShow = this.nameLevels.indexOf(2) !== -1 ? true : false;
|
||||
}
|
||||
|
||||
//折返轨名称
|
||||
if (elem.isReentryTrack) {
|
||||
show = this.nameLevels.indexOf(4) !== -1 ? true : false;
|
||||
elem.reentryTrackNameShow = show;
|
||||
reentryTrackNameShow = this.nameLevels.indexOf(4) !== -1 ? true : false;
|
||||
}
|
||||
|
||||
//转换轨名称
|
||||
if (elem.isTransferTrack) {
|
||||
show = this.nameLevels.indexOf(6) !== -1 ? true : false;
|
||||
elem.transferTrackNameShow = show;
|
||||
transferTrackNameShow = this.nameLevels.indexOf(6) !== -1 ? true : false;
|
||||
}
|
||||
|
||||
deviceList.push(elem);
|
||||
|
||||
deviceList.push(Object.assign(this.$jlmap.getDeviceByCode(elem.code), { nameShow, standTrackNameShow, reentryTrackNameShow, transferTrackNameShow }));
|
||||
})
|
||||
}
|
||||
|
||||
//停车点
|
||||
show = this.nameLevels.indexOf(10) !== -1 ? true : false;
|
||||
let destCodeShow = this.nameLevels.indexOf(10) !== -1 ? true : false;
|
||||
let stopPointList = this.$store.getters['map/stopPointList'];
|
||||
if (stopPointList && stopPointList.length > 0) {
|
||||
stopPointList.forEach(elem => {
|
||||
//目的地名称
|
||||
elem.destCodeShow = show;
|
||||
deviceList.push(elem);
|
||||
deviceList.push(Object.assign(this.$jlmap.getDeviceByCode(elem.code), { destCodeShow }));
|
||||
})
|
||||
}
|
||||
|
||||
//车站
|
||||
show = this.nameLevels.indexOf(12) !== -1 ? true : false;
|
||||
let kmPostShow = this.nameLevels.indexOf(12) !== -1 ? true : false;
|
||||
let stationList = this.$store.getters['map/stationList'];
|
||||
if (stationList && stationList.length > 0) {
|
||||
stationList.forEach(elem => {
|
||||
//公里标
|
||||
elem.kmPostShow = show;
|
||||
deviceList.push(elem);
|
||||
|
||||
deviceList.push(Object.assign(this.$jlmap.getDeviceByCode(elem.code), { kmPostShow })); //公里标
|
||||
})
|
||||
}
|
||||
|
||||
|
@ -155,16 +155,16 @@
|
||||
})
|
||||
},
|
||||
setTrainDispaly() {
|
||||
let updatList = [];
|
||||
let trainList = this.$store.getters['training/viewTrainList'];
|
||||
if (trainList && trainList.length > 0) {
|
||||
let planFormat = this.trainNameFormatBy(this.planMode);
|
||||
let nameFormat = this.trainNameFormatBy(this.planMode);
|
||||
let nameFontSize = this.fontSize;
|
||||
trainList.forEach(elem => {
|
||||
elem.nameFormat = planFormat;
|
||||
elem.nameFontSize = nameFontSize;
|
||||
updatList.push(Object.assign(this.$jlmap.getDeviceByCode(elem.code), { nameFormat, nameFontSize }));
|
||||
});
|
||||
|
||||
this.$store.dispatch('map/updateMapDevices', trainList);
|
||||
this.$store.dispatch('map/updateMapDevices', updatList);
|
||||
}
|
||||
},
|
||||
trainNameFormatBy(mode) {
|
||||
|
@ -115,45 +115,35 @@
|
||||
})
|
||||
},
|
||||
setDeviceDisplay() {
|
||||
let show = false;
|
||||
let deviceList = [];
|
||||
|
||||
//区段边界设置
|
||||
let borderBorderShow = this.deviceLevels.indexOf(2) !== -1 ? true : false;
|
||||
let sectionList = this.$store.getters['map/sectionList'];
|
||||
if (sectionList && sectionList.length > 0) {
|
||||
sectionList.forEach(elem => {
|
||||
elem._type = deviceType.Section;
|
||||
//区段边界
|
||||
show = this.deviceLevels.indexOf(2) !== -1 ? true : false;
|
||||
elem.borderBorderShow = show;
|
||||
deviceList.push(elem);
|
||||
deviceList.push(Object.assign(this.$jlmap.getDeviceByCode(elem.code), {borderBorderShow }));
|
||||
});
|
||||
}
|
||||
|
||||
//车次窗设置
|
||||
let trainWindowShow = this.deviceLevels.indexOf(1) !== -1 ? true : false;
|
||||
let trainWindowList = this.$store.getters['map/trainWindowList'];
|
||||
if (trainWindowList && trainWindowList.length > 0) {
|
||||
trainWindowList.forEach(elem => {
|
||||
elem._type = deviceType.TrainWindow;
|
||||
//车次窗
|
||||
show = this.deviceLevels.indexOf(1) !== -1 ? true : false;
|
||||
elem.trainWindowShow = show;
|
||||
deviceList.push(elem);
|
||||
deviceList.push(Object.assign(this.$jlmap.getDeviceByCode(elem.code), {trainWindowShow }));
|
||||
});
|
||||
}
|
||||
|
||||
//联锁自动进路表示灯和ATS自动触发表示灯设置
|
||||
let linkageAutoRouteShow = this.deviceLevels.indexOf(3) !== -1 ? true : false; //联锁自动进路表示灯
|
||||
let atsAutoTriggerShow = this.deviceLevels.indexOf(4) !== -1 ? true : false; //ATS自动触发表示灯
|
||||
let signalList = this.$store.getters['map/signalList'];
|
||||
if (signalList && signalList.length > 0) {
|
||||
signalList.forEach(elem => {
|
||||
elem._type = deviceType.Signal;
|
||||
//联锁自动进路表示灯
|
||||
show = this.deviceLevels.indexOf(3) !== -1 ? true : false;
|
||||
elem.linkageAutoRouteShow = show;
|
||||
//ATS自动触发表示灯
|
||||
show = this.deviceLevels.indexOf(4) !== -1 ? true : false;
|
||||
elem.atsAutoTriggerShow = show;
|
||||
deviceList.push(elem);
|
||||
deviceList.push(Object.assign(this.$jlmap.getDeviceByCode(elem.code), { linkageAutoRouteShow, atsAutoTriggerShow }));
|
||||
})
|
||||
}
|
||||
|
||||
|
@ -126,7 +126,7 @@ export default {
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
},
|
||||
cancel() {
|
||||
const operate = {
|
||||
let operate = {
|
||||
type: this.operate.type,
|
||||
operation: OperationEvent.Command.cancel.menu.operation
|
||||
};
|
||||
@ -138,7 +138,7 @@ export default {
|
||||
});
|
||||
},
|
||||
commit() {
|
||||
const operate = {
|
||||
let operate = {
|
||||
over: true,
|
||||
type: this.operate.type,
|
||||
operation: OperationEvent.Command.close.confirm.operation,
|
||||
@ -157,106 +157,90 @@ export default {
|
||||
});
|
||||
},
|
||||
setNameDisplay() {
|
||||
let show = false;
|
||||
const deviceList = [];
|
||||
let deviceList = [];
|
||||
|
||||
// 信号机
|
||||
show = this.nameLevels.indexOf(1) !== -1;
|
||||
const signalList = this.$store.getters['map/signalList'];
|
||||
let nameShow = this.nameLevels.indexOf(1) !== -1;
|
||||
let signalList = this.$store.getters['map/signalList'];
|
||||
if (signalList && signalList.length > 0) {
|
||||
signalList.forEach(elem => {
|
||||
elem._type = deviceType.Signal;
|
||||
elem.nameShow = show;
|
||||
deviceList.push(elem);
|
||||
deviceList.push(Object.assign(this.$jlmap.getDeviceByCode(elem.code), { nameShow }));
|
||||
});
|
||||
}
|
||||
|
||||
// 按钮名称
|
||||
show = this.nameLevels.indexOf(3) !== -1;
|
||||
let show = this.nameLevels.indexOf(3) !== -1;
|
||||
|
||||
// 道岔
|
||||
const switchList = this.$store.getters['map/switchList'];
|
||||
nameShow = this.nameLevels.indexOf(7) !== -1; // 道岔名称
|
||||
let switchSectionNameShow = this.nameLevels.indexOf(9) !== -1; // 道岔轨名称
|
||||
let switchList = this.$store.getters['map/switchList'];
|
||||
if (switchList && switchList.length > 0) {
|
||||
switchList.forEach(elem => {
|
||||
elem._type = deviceType.Switch;
|
||||
// 道岔名称
|
||||
show = this.nameLevels.indexOf(7) !== -1;
|
||||
elem.nameShow = show;
|
||||
// 道岔轨名称
|
||||
show = this.nameLevels.indexOf(9) !== -1;
|
||||
elem.switchSectionNameShow = show;
|
||||
deviceList.push(elem);
|
||||
deviceList.push(Object.assign(this.$jlmap.getDeviceByCode(elem.code), {nameShow, switchSectionNameShow }));
|
||||
});
|
||||
}
|
||||
|
||||
// 控制模式
|
||||
show = this.nameLevels.indexOf(8) !== -1;
|
||||
const control = this.$store.getters['map/stationControlList'];
|
||||
let indicatorShow = this.nameLevels.indexOf(8) !== -1;
|
||||
let control = this.$store.getters['map/stationControlList'];
|
||||
if (control && control.length > 0) {
|
||||
control.forEach(elem => {
|
||||
elem._type = deviceType.StationControl;
|
||||
// 标识灯名称
|
||||
elem.indicatorShow = show;
|
||||
deviceList.push(elem);
|
||||
deviceList.push(Object.assign(this.$jlmap.getDeviceByCode(elem.code), { indicatorShow }));
|
||||
});
|
||||
}
|
||||
|
||||
// 区段
|
||||
const sectionList = this.$store.getters['map/sectionList'];
|
||||
nameShow = false;
|
||||
let standTrackNameShow = false;
|
||||
let reentryTrackNameShow = false;
|
||||
let transferTrackNameShow = false;
|
||||
let sectionList = this.$store.getters['map/sectionList'];
|
||||
if (sectionList && sectionList.length > 0) {
|
||||
sectionList.forEach(elem => {
|
||||
elem._type = deviceType.Section;
|
||||
if (elem.isSwitchSection && elem.parentCode) {
|
||||
// 道岔轨的区段名称默认不显示
|
||||
elem.nameShow = false;
|
||||
nameShow = false;
|
||||
} else {
|
||||
if (elem.type === '01') {
|
||||
// 计轴区段名称
|
||||
show = this.nameLevels.indexOf(11) !== -1;
|
||||
elem.nameShow = show;
|
||||
nameShow = this.nameLevels.indexOf(11) !== -1;
|
||||
} else if (elem.type === '02') {
|
||||
// 股道轨名称
|
||||
show = this.nameLevels.indexOf(5) !== -1;
|
||||
elem.nameShow = show;
|
||||
nameShow = this.nameLevels.indexOf(5) !== -1;
|
||||
} else if (elem.type === '03') {
|
||||
// 道岔区段名称
|
||||
show = this.nameLevels.indexOf(9) !== -1;
|
||||
elem.nameShow = show;
|
||||
nameShow = this.nameLevels.indexOf(9) !== -1;
|
||||
}
|
||||
}
|
||||
|
||||
// 站台轨名称
|
||||
if (elem.isStandTrack) {
|
||||
show = this.nameLevels.indexOf(2) !== -1;
|
||||
elem.standTrackNameShow = show;
|
||||
standTrackNameShow = this.nameLevels.indexOf(2) !== -1;
|
||||
}
|
||||
|
||||
// 折返轨名称
|
||||
if (elem.isReentryTrack) {
|
||||
show = this.nameLevels.indexOf(4) !== -1;
|
||||
elem.reentryTrackNameShow = show;
|
||||
reentryTrackNameShow = this.nameLevels.indexOf(4) !== -1;
|
||||
}
|
||||
|
||||
// 转换轨名称
|
||||
if (elem.isTransferTrack) {
|
||||
show = this.nameLevels.indexOf(6) !== -1;
|
||||
elem.transferTrackNameShow = show;
|
||||
transferTrackNameShow = this.nameLevels.indexOf(6) !== -1;
|
||||
}
|
||||
|
||||
deviceList.push(elem);
|
||||
deviceList.push(Object.assign(this.$jlmap.getDeviceByCode(elem.code), { nameShow, standTrackNameShow, reentryTrackNameShow, transferTrackNameShow }));
|
||||
});
|
||||
}
|
||||
|
||||
// 车站
|
||||
show = this.nameLevels.indexOf(12) !== -1;
|
||||
const stationList = this.$store.getters['map/stationList'];
|
||||
let kmPostShow = this.nameLevels.indexOf(12) !== -1;
|
||||
let stationList = this.$store.getters['map/stationList'];
|
||||
if (stationList && stationList.length > 0) {
|
||||
stationList.forEach(elem => {
|
||||
elem._type = deviceType.Station;
|
||||
// 公里标
|
||||
elem.kmPostShow = show;
|
||||
deviceList.push(elem);
|
||||
|
||||
deviceList.push(Object.assign(this.$jlmap.getDeviceByCode(elem.code), { kmPostShow })); // 公里标
|
||||
});
|
||||
}
|
||||
|
||||
|
@ -156,17 +156,16 @@
|
||||
})
|
||||
},
|
||||
setTrainDispaly() {
|
||||
let updatlist = [];
|
||||
let trainList = this.$store.getters['training/viewTrainList'];
|
||||
if (trainList && trainList.length > 0) {
|
||||
let planFormat = this.trainNameFormatBy(this.planMode);
|
||||
let nameFormat = this.trainNameFormatBy(this.planMode);
|
||||
let nameFontSize = this.fontSize;
|
||||
trainList.forEach(elem => {
|
||||
elem._type = deviceType.Train;
|
||||
elem.nameFormat = planFormat;
|
||||
elem.nameFontSize = nameFontSize;
|
||||
updatlist.push(Object.assign(this.$jlmap.getDeviceByCode(elem.code), {nameFormat, nameFontSize }));
|
||||
});
|
||||
|
||||
this.$store.dispatch('map/updateMapDevices', trainList);
|
||||
this.$store.dispatch('map/updateMapDevices', updatlist);
|
||||
}
|
||||
},
|
||||
trainNameFormatBy(mode) {
|
||||
|
Loading…
Reference in New Issue
Block a user