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 = 难解决问题情况