diff --git a/src/views/modules/visual/command/cpts/map.vue b/src/views/modules/visual/command/cpts/map.vue index cbcd444d3..d09c8da8f 100644 --- a/src/views/modules/visual/command/cpts/map.vue +++ b/src/views/modules/visual/command/cpts/map.vue @@ -201,32 +201,35 @@ export default { const polygon = [ ...srcGridData.children .filter((item) => item.coordinates.length > 0) - .map((item) => ({ - type: "Feature", - properties: { - // id: item.id, - // name: item.name, - // level: item.level, - center: [item.longitude, item.latitude], - ...item, - dotCount: gridCountData.find((item2) => item2.orgId == item.id) - ? gridCountData.find((item2) => item2.orgId == item.id).total - : "", - }, - geometry: { - type: "Polygon", - coordinates: [ - item.latitude - ? [[item.longitude, item.latitude]] - : spliceIntoChunks( - item.coordinates - .split(",") - .map((item) => parseFloat(item)), - 2 - ).filter((item) => item.length == 2), - ], - }, - })), + .map((item) => { + let countItem = gridCountData.find( + (item2) => item2.orgId == item.id + ); + console.log("countItem", countItem); + return { + type: "Feature", + properties: { + ...item, + center: [item.longitude, item.latitude], + dotCount: countItem + ? countItem.categoryName + ":" + countItem.total + : "", + }, + geometry: { + type: "Polygon", + coordinates: [ + item.latitude + ? [[item.longitude, item.latitude]] + : spliceIntoChunks( + item.coordinates + .split(",") + .map((item) => parseFloat(item)), + 2 + ).filter((item) => item.length == 2), + ], + }, + }; + }), ]; return { type: "FeatureCollection", features: polygon }; }, @@ -496,7 +499,7 @@ export default { .source(polygonDotData) .color("name", styleConfig.textColor) .shape("dotCount", "text") - .size(16) + .size(14) .style({ textAnchor: "center", // 文本相对锚点的位置 center|left|right|top|bottom|top-left textOffset: [0, -80], // 文本相对锚点的偏移量 [水平, 垂直] diff --git a/src/views/modules/visual/command/cpts/popup.vue b/src/views/modules/visual/command/cpts/popup.vue index ab50e8e08..b10e8d182 100644 --- a/src/views/modules/visual/command/cpts/popup.vue +++ b/src/views/modules/visual/command/cpts/popup.vue @@ -393,7 +393,7 @@
联系人: - {{ info.manageDistrict || "--" }} + {{ info.contacts || "--" }}
联系人电话: diff --git a/src/views/modules/visual/command/cpts/sidemenu-left.vue b/src/views/modules/visual/command/cpts/sidemenu-left.vue index c10bf9986..4c6758188 100644 --- a/src/views/modules/visual/command/cpts/sidemenu-left.vue +++ b/src/views/modules/visual/command/cpts/sidemenu-left.vue @@ -131,12 +131,6 @@ export default { mounted() { // this.requestList(); - this.currentKey = "event_tdnd"; - this.currentItem = { - categoryKey: "event_tdnd", - coverageType: "csgl", - placeType: "event", - }; }, methods: { @@ -155,6 +149,7 @@ export default { this.currentKey = ""; this.currentItem = { categoryKey: "", + categoryName: "", coverageType: "", placeType: "", }; @@ -185,6 +180,7 @@ export default { }); return item; }); + this.handleClickItem(this.menuList[0]); } else { this.$message.error(msg); } diff --git a/src/views/modules/visual/command/cpts/sidemenu.vue b/src/views/modules/visual/command/cpts/sidemenu.vue index 574c9047c..05efb55ea 100644 --- a/src/views/modules/visual/command/cpts/sidemenu.vue +++ b/src/views/modules/visual/command/cpts/sidemenu.vue @@ -247,6 +247,7 @@ export default { color: #ffffff; background-color: #041267; font-weight: bold; + box-shadow: 0 0 30px 5px inset #22f; } .info { diff --git a/src/views/modules/visual/command/index.vue b/src/views/modules/visual/command/index.vue index 4c1fbe043..bf861c991 100644 --- a/src/views/modules/visual/command/index.vue +++ b/src/views/modules/visual/command/index.vue @@ -392,6 +392,7 @@ export default { dotList2: [], categoryKeys2: [], coverageTypes2: [], + categoryNames2: [], dotIcoList2: { event_tdnd: require("@/assets/img/shuju/command/ico3/event_tdnd.png"), enterprise_patrol_unqualified: require("@/assets/img/shuju/command/ico3/enterprise_patrol_unqualified.png"), @@ -548,6 +549,8 @@ export default { this.coverageTypes2 = [obj.coverageType]; this.categoryKeys2 = [obj.categoryKey]; this.placeType2 = obj.placeType; + this.categoryNames2 = [obj.categoryName]; + console.log(obj) }, handleChangeMenu(list) { @@ -639,7 +642,12 @@ export default { const { data, code, msg } = await requestPost(url, params); if (code === 0) { - this.gridCountData = [...data]; + this.gridCountData = [ + ...data.map((item) => ({ + ...item, + categoryName: this.categoryNames2[0], + })), + ]; } else { this.$message.error(msg); }