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