代码调整

This commit is contained in:
joylink_cuiweidong 2021-07-29 14:06:25 +08:00
parent 62977147c5
commit 5deb4cc9ab

View File

@ -153,17 +153,19 @@ export default {
if (display) {
const codeList = [...display.switchStationCodeList];
let relStationCodeList = [];
let ciStaionCode = '';
codeList.sort((a, b) => {
const stationA = this.$store.getters['map/getDeviceByCode'](a);
const stationB = this.$store.getters['map/getDeviceByCode'](b);
if (stationA.relStationCodeList && stationA.relStationCodeList.length > 0 && relStationCodeList.length <= 0) {
relStationCodeList = [...stationA.relStationCodeList];
ciStaionCode = stationA.code;
relStationCodeList.push(stationA.code);
}
return stationA.kmRange - stationB.kmRange;
});
const currentStation = this.$store.getters['map/getDeviceByCode'](roleDeviceCode);
const currentNode = {label: currentStation.name, children: []};
const ciStaion = this.$store.getters['map/getDeviceByCode'](ciStaionCode);
const currentNode = {label: ciStaion.name, children: []};
codeList.forEach(code=>{
let node;
const station = this.$store.getters['map/getDeviceByCode'](code);