From d2b73ebe589e4df8b23abf862ea4fad470fb6b2a Mon Sep 17 00:00:00 2001 From: qingzhengli <1204552371@qq.com> Date: Mon, 1 Apr 2024 11:39:22 +0800 Subject: [PATCH] =?UTF-8?q?fix=20=E7=BC=A9=E7=95=A5=E5=9B=BE=E5=8C=85?= =?UTF-8?q?=E5=90=AB=E9=9D=9E=E4=BA=8B=E4=BB=B6=E4=B8=93=E9=A2=98=E7=9A=84?= =?UTF-8?q?=E6=95=B0=E9=87=8Fbug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../pages/Home/components/RoadAndEvents/index.vue | 3 +-- .../pages/Home/components/RoadAndEvents/utils/map.js | 10 ++++++---- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/RoadAndEvents/index.vue b/ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/RoadAndEvents/index.vue index 9ff12937..44487c11 100644 --- a/ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/RoadAndEvents/index.vue +++ b/ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/RoadAndEvents/index.vue @@ -148,7 +148,7 @@ export default { await Promise.allSettled((this.tabContentData || []).map(item => this.handleDeviceImmediate(item, true))) Object.keys(lngLatMap).forEach(key => { addInGraphHandle(lngLatMap[key]); - }) + }); } } }, @@ -227,7 +227,6 @@ export default { const status = item.status; - console.log(item, "item"); if (!status) { this.nowSelected = item.title; this.nowSelectedCompleted = false; } else if (this.nowSelected === item.title && this.nowSelectedCompleted === false) return; diff --git a/ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/RoadAndEvents/utils/map.js b/ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/RoadAndEvents/utils/map.js index 8787de0d..c426b68c 100644 --- a/ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/RoadAndEvents/utils/map.js +++ b/ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/RoadAndEvents/utils/map.js @@ -2,7 +2,7 @@ import { loadAMap } from "@screen/pages/Home/components/AMapContainer/loadAMap.j // import { Message } from "element-ui"; import Vue from "vue"; import { lngLatMap } from "./buttonEvent"; -import { upperFirst } from "lodash"; +import { upperFirst, filter } from "lodash"; /** * @typedef {Object} Point * @property {number} weight - The weight of the item. @@ -27,6 +27,7 @@ const normalBg = require(`@screen/images/mapBg/active.svg`); const faultTitleBg = require(`@screen/images/mapBg/fault_title.svg`); const normalTitleBg = require(`@screen/images/mapBg/active_title.svg`); +const eventRegex = "./事件专题"; /** * 聚合点 */ @@ -483,9 +484,9 @@ export function marksAddInGraph(data) { export function addInGraphHandle(data) { const graphInstance = window.graphInstance; const extData = data[0].extData; - console.log(extData, "extData"); + // console.log(extData, "extData11111"); const { item: eventItem } = data[0].config; - if (eventItem.id.match("./事件专题")) { + if (eventItem.id.match(eventRegex)) { let { stakeMark, lang, direction } = extData; stakeMark = upperFirst(stakeMark); //统一格式 大写K const distance = @@ -515,11 +516,12 @@ export function addInGraphHandle(data) { }); // }, 0); } - console.log(lang, "lang"); + // console.log(lang, "lang"); } } function getDataConf(data, extData) { + data = data.filter((item) => item.config.item.id.match(eventRegex)); let dataConf; const nowBg = getState(data) ? normalBg : faultBg; if (data.length === 1) {