修改代码
This commit is contained in:
parent
a6e8f1376f
commit
de30f91aed
@ -144,7 +144,9 @@ class Jlmap {
|
||||
setCenter(deviceCode) {
|
||||
const device = this.mapDevice[deviceCode];
|
||||
if (device && device.instance) {
|
||||
console.log(device);
|
||||
var rect = createBoundingRect(device.instance);
|
||||
console.log(rect);
|
||||
var dcenter = calculateDCenter(rect, { width: this.$zr.getWidth(), height: this.$zr.getHeight() });
|
||||
this.setOptions(dcenter);
|
||||
}
|
||||
|
@ -86,6 +86,7 @@ export default {
|
||||
deviceSelect(selected) {
|
||||
if (selected && selected._type.toUpperCase() == 'CheckBox'.toUpperCase()) {
|
||||
this.clearModelList();
|
||||
let count = 0;
|
||||
this.seclectDeviceList.forEach(item => {
|
||||
if (item._type == 'Section') {
|
||||
this.modelList[0].list.push(item);
|
||||
@ -94,7 +95,13 @@ export default {
|
||||
} else if (item._type == 'Signal') {
|
||||
this.modelList[2].list.push(item);
|
||||
}
|
||||
if (item.stationCode == this.seclectDeviceList[0].stationCode) {
|
||||
count++;
|
||||
}
|
||||
});
|
||||
if (count == this.seclectDeviceList.length) {
|
||||
this.stationCode = this.seclectDeviceList[0].stationCode;
|
||||
}
|
||||
}
|
||||
},
|
||||
clearModelList() {
|
||||
|
Loading…
Reference in New Issue
Block a user