From da63aa8abe835845cd3b310b0336c1b38ed99bb4 Mon Sep 17 00:00:00 2001 From: guanj Date: Mon, 27 Oct 2025 13:21:31 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E5=9C=B0=E5=9B=BE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/store/index.ts | 15 +- .../SagTraceResult_WX/components/bdMap.vue | 472 ++++++++++++++++++ .../SagTraceResult_WX/components/plan.vue | 25 +- 3 files changed, 493 insertions(+), 19 deletions(-) create mode 100644 src/views/SagTraceResult_WX/components/bdMap.vue diff --git a/src/store/index.ts b/src/store/index.ts index 2ae6f53..b59b81f 100644 --- a/src/store/index.ts +++ b/src/store/index.ts @@ -20,6 +20,7 @@ interface State { eventDuration: number; realData: []; //实时数据 iframeLoad: boolean; + showMap: boolean; } // 初始状态 @@ -37,13 +38,14 @@ const state: State = { eventValue: 0.7, eventDuration: 5, realData: [], //实时数据 - iframeLoad: false, + iframeLoad: false,//无锡接线图是否加载完成 + showMap: true,//无锡地图显示 }; // 定义Mutation类型 enum Mutations { INCREMENT = "INCREMENT", - IFRAMELOAD = "IFRAMELOAD", + SET_STATE= "SET_STATE", SET_TOKEN = "SET_TOKEN", SET_TIME = "SET-TIME", SET_CONFIG = "SET-CONFIG-TIME", @@ -55,8 +57,9 @@ export default createStore({ [Mutations.INCREMENT](state: State) { state.count++; }, - [Mutations.IFRAMELOAD](state: State, data: boolean) { - state.iframeLoad = data; + [Mutations.SET_STATE](state: State, data: any) { + console.log("🚀 ~ data:", data) + state[data.key] = data.value; }, [Mutations.SET_TOKEN](state: State, data: any) { window.sessionStorage.setItem("token", data.token); @@ -103,8 +106,8 @@ export default createStore({ increment({ commit }) { commit(Mutations.INCREMENT); }, - setIframeLoad({ commit }, data: any) { - commit(Mutations.IFRAMELOAD,data); + setStateKey({ commit }, data: any) { + commit(Mutations.SET_STATE,data); }, setTimeType({ commit }, data: any) { commit(Mutations.SET_TIME, data); diff --git a/src/views/SagTraceResult_WX/components/bdMap.vue b/src/views/SagTraceResult_WX/components/bdMap.vue new file mode 100644 index 0000000..7b394f1 --- /dev/null +++ b/src/views/SagTraceResult_WX/components/bdMap.vue @@ -0,0 +1,472 @@ + + + + diff --git a/src/views/SagTraceResult_WX/components/plan.vue b/src/views/SagTraceResult_WX/components/plan.vue index 925485a..68cfe7e 100644 --- a/src/views/SagTraceResult_WX/components/plan.vue +++ b/src/views/SagTraceResult_WX/components/plan.vue @@ -1,14 +1,10 @@