pictureList 显示调整

This commit is contained in:
fan 2022-09-07 09:50:59 +08:00
parent b09e2f003c
commit b1419ef839
2 changed files with 4 additions and 3 deletions

View File

@ -409,6 +409,7 @@ class Jlmap {
const code = elem.code; const code = elem.code;
const type = elem._type; const type = elem._type;
const oDevice = this.mapDevice[code] || deviceFactory(type, elem, this.showConfig); const oDevice = this.mapDevice[code] || deviceFactory(type, elem, this.showConfig);
oDevice._pictureHide = false;
this.$painter.update(oDevice); this.$painter.update(oDevice);
}); });
this.$painter.$transformHandle.revisibleAll(); this.$painter.$transformHandle.revisibleAll();
@ -435,11 +436,11 @@ class Jlmap {
const device = this.mapDevice[item]; const device = this.mapDevice[item];
if (device && device._type !== deviceType.Switch && device._type !== deviceType.Train) { if (device && device._type !== deviceType.Switch && device._type !== deviceType.Train) {
const pictureDevice = store.getters['map/getPictureDeviceByCode'](item); const pictureDevice = store.getters['map/getPictureDeviceByCode'](item);
device._dispose = pictureDevice ? pictureDevice.pictureHide : false; device._pictureHide = pictureDevice ? pictureDevice.pictureHide : false;
this.$painter.updatePicture(device); this.$painter.updatePicture(device);
try { try {
if (device._type === deviceType.Section && device.type === '03') { if (device._type === deviceType.Section && device.type === '03') {
this.mapDevice[device.switch.code]._dispose = pictureDevice ? pictureDevice.pictureHide : false; this.mapDevice[device.switch.code]._pictureHide = pictureDevice ? pictureDevice.pictureHide : false;
this.computedSwitch(device.switch); this.computedSwitch(device.switch);
this.$painter.updatePicture(this.mapDevice[device.switch.code]); this.$painter.updatePicture(this.mapDevice[device.switch.code]);
} }

View File

@ -166,7 +166,7 @@ class Painter {
updatePicture(device) { updatePicture(device) {
if (device) { if (device) {
try { try {
if (device._dispose) { if (device._pictureHide) {
this.delete(device); this.delete(device);
} else { } else {
device.instance && this.mapInstanceLevel[device._type].remove(device.instance); device.instance && this.mapInstanceLevel[device._type].remove(device.instance);