From d53aa154bfd774f06877c3b6215c9edc3c401c88 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=BA=9E=E4=B8=9C=E6=97=AD?= <850374051@qq.com> Date: Tue, 5 Aug 2025 08:36:01 +0800 Subject: [PATCH] =?UTF-8?q?task=2045202=20=E5=A4=A7=E5=B1=8F=E8=B0=83?= =?UTF-8?q?=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/property/main-gis/index.js | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/src/views/property/main-gis/index.js b/src/views/property/main-gis/index.js index 1c4b731..fdc8216 100644 --- a/src/views/property/main-gis/index.js +++ b/src/views/property/main-gis/index.js @@ -230,6 +230,22 @@ export default { computed: { ...mapGetters(['year', 'deptId']) }, + watch: { + 'queryParams.deptId': { + handler: function () { + this.commitDept(this.queryParams.deptId); + }, + immediate: true, // 立即执行 + + }, + deptLength: { + handler: function () { + //console.log(this.deptLength); + this.commitDeptLength(this.deptLength); + }, + immediate: true, // 立即执行 + } + }, created () { // 获取geoserver的地址 this.getGeoServerUrl(); @@ -278,6 +294,15 @@ export default { }) }, methods: { + commitDept (deptId) { + this.$store.commit('SET_DEPTID', deptId); + }, + commitDeptLength (length) { + this.$store.commit('SET_DEPTIDLENGTH', length); + }, + commitYear (year) { + this.$store.commit('SET_YEAR', year); + }, openImage (url) { console.log(url) this.dialogImageUrl = url;