根据设备code高亮 地图对应的设备

This commit is contained in:
joylink_cuiweidong 2019-12-19 15:52:36 +08:00
parent 30fc3132d3
commit 882bb44fb2
3 changed files with 30 additions and 25 deletions

View File

@ -320,6 +320,11 @@ export default {
this.enabledTab = 'Section';
} else {
this.enabledTab = type;
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') {
@ -343,7 +348,6 @@ export default {
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);
}
}
};

View File

@ -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;

View File

@ -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;