From 356567153fcd9a4b9a8b3a86f97d6227ccc50843 Mon Sep 17 00:00:00 2001 From: xy <271556543@qq.com> Date: Tue, 22 Aug 2023 09:46:58 +0800 Subject: [PATCH] 2023-8-22 --- src/permission.js | 2 +- src/views/component/map.vue | 8 ++++---- src/views/component/table.vue | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/permission.js b/src/permission.js index c5e41fa..1f9e369 100644 --- a/src/permission.js +++ b/src/permission.js @@ -8,7 +8,7 @@ import getPageTitle from '@/utils/get-page-title' NProgress.configure({ showSpinner: false }) // NProgress Configuration -const whiteList = ['/login'] // no redirect whitelist +const whiteList = ['/login','/assets/map'] // no redirect whitelist router.beforeEach(async(to, from, next) => { // start progress bar diff --git a/src/views/component/map.vue b/src/views/component/map.vue index 8953850..7786cb1 100644 --- a/src/views/component/map.vue +++ b/src/views/component/map.vue @@ -282,7 +282,7 @@ export default { this.addCluster(); }, - init() { + init(adcode = ["320200"]) { let winHeight = document .querySelector(".app-main") ?.getBoundingClientRect()?.height; @@ -294,7 +294,6 @@ export default { zoom: this.zoom, }); // 行政区域加载 - let adcode = ["320200"]; this.areaBG(adcode); this.infoWindow = new AMap.InfoWindow({ isCustom: true, @@ -564,11 +563,12 @@ export default { this.getFormDetail(); }, async mounted() { - this.init(); + let areaId = Number(this.$route.query.area) || '' + areaId ? (this.init(this.wxAreas[areaId - 1]),this.select.filter[0].value = areaId) : this.init(); await this.getList(); this.setMapMarker(); - }, + } }; diff --git a/src/views/component/table.vue b/src/views/component/table.vue index d49ce88..32011cc 100644 --- a/src/views/component/table.vue +++ b/src/views/component/table.vue @@ -4,7 +4,7 @@