Commit 283000d8 authored by 军师中郎将's avatar 军师中郎将

1 大屏地图上图 居民用户 优化,只点击 居民用户以后才显示和隐藏

parent 2ce7977a
...@@ -45,7 +45,6 @@ export class EditorMap { ...@@ -45,7 +45,6 @@ export class EditorMap {
//用户列表图层 //用户列表图层
detectorUserlabelsLayer = null; detectorUserlabelsLayer = null;
detectorUserlabelsLayerint = 0;
constructor(contaienr, config = {}, vue) { constructor(contaienr, config = {}, vue) {
this.map = new AMap.Map(contaienr, { this.map = new AMap.Map(contaienr, {
...@@ -794,6 +793,7 @@ export class EditorMap { ...@@ -794,6 +793,7 @@ export class EditorMap {
} }
// 设备以及公司过滤 // 设备以及公司过滤
allfilter(companyArr, typeArr) { allfilter(companyArr, typeArr) {
debugger
for (let pipeItem in this.pipeArr) { for (let pipeItem in this.pipeArr) {
this.pipeArr[pipeItem].forEach((pipe) => { this.pipeArr[pipeItem].forEach((pipe) => {
const data = pipe.getExtData(); const data = pipe.getExtData();
...@@ -822,14 +822,13 @@ export class EditorMap { ...@@ -822,14 +822,13 @@ export class EditorMap {
} }
}); });
} }
if (this.detectorUserlabelsLayer != null) {
if (this.detectorUserlabelsLayerint === 0) { // 判断是否需要显示 居民用户
const detectorUserHas = typeArr.indexOf(6) >= 0;
if (detectorUserHas) {
this.detectorUserlabelsLayer.show(); this.detectorUserlabelsLayer.show();
this.detectorUserlabelsLayerint = 1;
} else { } else {
this.detectorUserlabelsLayer.hide(); this.detectorUserlabelsLayer.hide();
this.detectorUserlabelsLayerint = 0;
}
} }
} }
// 普通调用方法 // 普通调用方法
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment