From 5c30cdf6d08d5c70b4437ae951d03e5951f8d44f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=88=98=E7=AB=8B=E6=A0=87?= <2658037827@qq.com> Date: Wed, 13 Dec 2023 16:19:07 +0800 Subject: [PATCH] =?UTF-8?q?=E7=A6=81=E7=94=A8=E8=A1=97=E9=81=93=E6=97=B6?= =?UTF-8?q?=E7=82=B9=E5=87=BB=E7=BB=9F=E8=AE=A1=EF=BC=8C=E9=9D=9E=E8=A1=97?= =?UTF-8?q?=E9=81=93=E6=97=B6=E9=9A=90=E8=97=8F=E8=B5=84=E6=BA=90=E7=BB=9F?= =?UTF-8?q?=E8=AE=A1=E9=9A=90=E8=97=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/dataBoard/cpts/sjkb-map/index.vue | 20 ++++++++++++++------ src/views/dataBoard/overview/index.vue | 4 ++-- 2 files changed, 16 insertions(+), 8 deletions(-) diff --git a/src/views/dataBoard/cpts/sjkb-map/index.vue b/src/views/dataBoard/cpts/sjkb-map/index.vue index ab6f7e8dd..4bf3a89b2 100644 --- a/src/views/dataBoard/cpts/sjkb-map/index.vue +++ b/src/views/dataBoard/cpts/sjkb-map/index.vue @@ -134,10 +134,10 @@ export default { type: Object, default: () => ({}), }, - // level: { - // type: String, - // default: "", - // }, + level: { + type: String, + default: "", + }, // peopleType: { // type: String, // default: "staffAgency", @@ -931,8 +931,16 @@ export default { let pointData = data.map(item => item.data) pointData = pointData.reduce((a, b) => a.concat(b), []); - pointData = pointData.filter(item => item.num > 0 && !isNaN(item.latitude)&& !isNaN(item.longitude)) - console.log(pointData, 'pointData') + console.log(pointData, 'pointData11') + pointData = pointData.filter(item => { + if(item.num > 0 && !isNaN(item.latitude)&& !isNaN(item.longitude)) { + return true + } + }) + console.log(this.level,'this.level') + if (this.level != "street") { + pointData = pointData.filter(item => item.type != 'resources') + } numPointMarker1 = new PointLayer({ name: 'numPointMarker1', zIndex: 20, diff --git a/src/views/dataBoard/overview/index.vue b/src/views/dataBoard/overview/index.vue index e4b3e81d9..3b4aaa66f 100644 --- a/src/views/dataBoard/overview/index.vue +++ b/src/views/dataBoard/overview/index.vue @@ -421,14 +421,14 @@ export default { this.peopleType = this.currentLevel === "grid" ? "unit" : "staffAgency"; this.$refs.map.removeResourcesPoint(); console.log(this.currentLevel, 'level', orgId, this.currentLevel === 'agency' || this.currentLevel === 'community' || this.currentLevel === 'grid') - if (this.currentLevel === 'community' || this.currentLevel === 'grid') { + if (this.currentLevel !== 'street') { this.setResourcesPoint({agencyId: this.orgId}) } this.getMapCount() }); }, showMapDialog(data) { - if (data.type === "resources") { + if (data.type === "resources" || this.currentLevel === 'street') { this.clickAgencyItem(data) } else { // -- njjwtqk = 难解决问题情况