From 03ee669804e90bc5ae0b35f2782c4ced22639935 Mon Sep 17 00:00:00 2001 From: szdot Date: Sun, 22 Jun 2025 00:46:23 +0800 Subject: [PATCH] =?UTF-8?q?=E3=80=90=E7=B1=BB=20=20=E5=9E=8B=E3=80=91?= =?UTF-8?q?=EF=BC=9Atest=20=E3=80=90=E5=8E=9F=20=20=E5=9B=A0=E3=80=91?= =?UTF-8?q?=EF=BC=9A=E6=B5=8B=E8=AF=95=20=E5=9C=B0=E5=9B=BE=E7=BB=84?= =?UTF-8?q?=E4=BB=B6=E5=8A=A0=E8=BD=BD=E4=B9=8B=E5=89=8D=20=E5=85=88?= =?UTF-8?q?=E5=88=A4=E6=96=AD=E6=9C=89=E6=B2=A1=E6=9C=89=E6=8B=BF=E5=88=B0?= =?UTF-8?q?=20=E5=BC=82=E6=AD=A5=E5=8A=A0=E8=BD=BD=E7=9A=84=E5=9C=B0?= =?UTF-8?q?=E5=9B=BE=E6=BA=90=E5=9C=B0=E5=9D=80=20=E6=8B=BF=E5=88=B0?= =?UTF-8?q?=E4=BA=86=20=E5=86=8D=E6=B8=B2=E6=9F=93=E5=9C=B0=E5=9B=BE=20?= =?UTF-8?q?=E3=80=90=E8=BF=87=20=20=E7=A8=8B=E3=80=91=EF=BC=9A=20=E3=80=90?= =?UTF-8?q?=E5=BD=B1=20=20=E5=93=8D=E3=80=91=EF=BC=9A?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit # 类型 包含: # feat:新功能(feature) # fix:修补bug # docs:文档(documentation) # style: 格式(不影响代码运行的变动) # refactor:重构(即不是新增功能,也不是修改bug的代码变动) # test:增加测试 # chore:构建过程或辅助工具的变动 --- src/store/index.js | 9 +++++++++ src/views/layout/components/main/home/index.vue | 15 ++++++--------- 2 files changed, 15 insertions(+), 9 deletions(-) diff --git a/src/store/index.js b/src/store/index.js index ca7077e..7dac9e0 100644 --- a/src/store/index.js +++ b/src/store/index.js @@ -26,6 +26,7 @@ const store = new Vuex.Store({ logList: [], // 操作日志列表 messageList: [], // 管理员公告列表 mapStyleList: [], // 地图样式列表 + mapIsStyleReady: false, // 地图样式是否加载完成 在全局入口判断设置 子页面调用地图组件时直接判断该值 crosFrequency: null, // 对频macadd ADSBList: [] // 存放当前活跃的 ADSB 飞机数据 }, @@ -154,6 +155,13 @@ const store = new Vuex.Store({ setMapStyleList (state, list) { state.mapStyleList = list }, + /** + * @description: 确认地图源地址 加载完成 + * @param {bool} status 是否完成 + */ + setMapIsStyleReady (state, status) { + state.mapIsStyleReady = status + }, /** * @description: 清除过期的 ADSB 数据 */ @@ -1201,6 +1209,7 @@ const store = new Vuex.Store({ } }) commit('setMapStyleList', list) + commit('setMapIsStyleReady', true) } else { commit('setMapStyleList', []) Message.error(res.data.msg || '地图样式获取失败') diff --git a/src/views/layout/components/main/home/index.vue b/src/views/layout/components/main/home/index.vue index 2b7535d..3d9101f 100644 --- a/src/views/layout/components/main/home/index.vue +++ b/src/views/layout/components/main/home/index.vue @@ -1,6 +1,6 @@