From b593befb475eb0d14b80bcb27583144bed42348c Mon Sep 17 00:00:00 2001 From: zhangjunwen Date: Tue, 5 Nov 2024 17:03:27 +0800 Subject: [PATCH] =?UTF-8?q?=E8=A7=A3=E5=86=B3=E5=81=B6=E5=B0=94=E5=87=BA?= =?UTF-8?q?=E7=8E=B0=E7=9A=84=E8=B7=B3=E8=BD=AC=E5=90=8E=E6=95=B0=E6=8D=AE?= =?UTF-8?q?=E4=B8=8D=E6=AD=A3=E7=A1=AE=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../system/data/monitordatadashboard/index.vue | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/imt-ui/src/views/system/data/monitordatadashboard/index.vue b/imt-ui/src/views/system/data/monitordatadashboard/index.vue index 2363e09..a2809ed 100644 --- a/imt-ui/src/views/system/data/monitordatadashboard/index.vue +++ b/imt-ui/src/views/system/data/monitordatadashboard/index.vue @@ -337,9 +337,20 @@ export default { }; }, created() { - this.queryParams.equipId = this.$route.query.equipId; - this.getParamsTree(this.$route.query.equipId); - this.getEquipInfo(this.$route.query.equipId); + // this.queryParams.equipId = this.$route.query.equipId; + // this.getParamsTree(this.$route.query.equipId); + // this.getEquipInfo(this.$route.query.equipId); + }, + watch: { + "$route.query.equipId": { + handler(newId) { + console.log("跳转equipId:", newId); + this.queryParams.equipId = newId; + this.getParamsTree(newId); + this.getEquipInfo(newId); + }, + immediate: true, // 立即执行一次 + }, }, methods: { /** 查询列表 */