根据设备code高亮 地图对应的设备
This commit is contained in:
parent
30fc3132d3
commit
882bb44fb2
@ -320,31 +320,35 @@ export default {
|
||||
this.enabledTab = 'Section';
|
||||
} else {
|
||||
this.enabledTab = type;
|
||||
if (this.oldDevice && this.oldDevice.instance && typeof this.oldDevice.instance.drawSelected === 'function') {
|
||||
if (this.isSwitchSection) {
|
||||
if (this.oldDevice._type == 'Section' && this.oldDevice.type == '04') {
|
||||
this.oldDevice.relevanceSectionList.forEach(item => {
|
||||
const sectionModel = this.$store.getters['map/getDeviceByCode'](item);
|
||||
sectionModel.instance.drawSelected(false);
|
||||
});
|
||||
this.isSwitchSection = false;
|
||||
}
|
||||
}
|
||||
this.oldDevice.instance.drawSelected(false);
|
||||
}
|
||||
if (device && device.instance && typeof device.instance.drawSelected === 'function' ) {
|
||||
if (device._type == 'Section' && device.type == '04') {
|
||||
this.isSwitchSection = true;
|
||||
device.relevanceSectionList.forEach(item => {
|
||||
const sectionModel = this.$store.getters['map/getDeviceByCode'](item);
|
||||
sectionModel.instance.drawSelected(true);
|
||||
});
|
||||
}
|
||||
device.instance.drawSelected(true);
|
||||
}
|
||||
this.oldDevice = device;
|
||||
this.deviceHighLight(device);
|
||||
}
|
||||
},
|
||||
// 高亮设备
|
||||
deviceHighLight(device) {
|
||||
if (this.oldDevice && this.oldDevice.instance && typeof this.oldDevice.instance.drawSelected === 'function') {
|
||||
if (this.isSwitchSection) {
|
||||
if (this.oldDevice._type == 'Section' && this.oldDevice.type == '04') {
|
||||
this.oldDevice.relevanceSectionList.forEach(item => {
|
||||
const sectionModel = this.$store.getters['map/getDeviceByCode'](item);
|
||||
sectionModel.instance.drawSelected(false);
|
||||
});
|
||||
this.isSwitchSection = false;
|
||||
}
|
||||
}
|
||||
this.oldDevice.instance.drawSelected(false);
|
||||
}
|
||||
if (device && device.instance && typeof device.instance.drawSelected === 'function' ) {
|
||||
if (device._type == 'Section' && device.type == '04') {
|
||||
this.isSwitchSection = true;
|
||||
device.relevanceSectionList.forEach(item => {
|
||||
const sectionModel = this.$store.getters['map/getDeviceByCode'](item);
|
||||
sectionModel.instance.drawSelected(true);
|
||||
});
|
||||
}
|
||||
device.instance.drawSelected(true);
|
||||
}
|
||||
this.oldDevice = device;
|
||||
},
|
||||
esqTab(type) {
|
||||
this.esqType = type;
|
||||
},
|
||||
@ -383,6 +387,9 @@ export default {
|
||||
},
|
||||
setCenter(code) {
|
||||
this.$emit('setCenter', code);
|
||||
// 高亮
|
||||
const model = this.$store.getters['map/getDeviceByCode'](code);
|
||||
this.deviceHighLight(model);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
@ -192,7 +192,6 @@ export default {
|
||||
deviceChange(code) {
|
||||
this.$emit('setCenter', code);
|
||||
this.deviceSelect(this.$store.getters['map/getDeviceByCode'](code));
|
||||
this.edit();
|
||||
},
|
||||
hover(field) {
|
||||
this.field = field === this.field ? '' : field;
|
||||
|
@ -253,7 +253,6 @@ export default {
|
||||
deviceChange(code) {
|
||||
this.$emit('setCenter', code);
|
||||
this.deviceSelect(this.$store.getters['map/getDeviceByCode'](code));
|
||||
this.edit();
|
||||
},
|
||||
hover(field) {
|
||||
this.field = field === this.field ? '' : field;
|
||||
|
Loading…
Reference in New Issue
Block a user