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: { /** 查询列表 */