解决偶尔出现的跳转后数据不正确的问题

This commit is contained in:
zhangjunwen 2024-11-05 17:03:27 +08:00
parent 69176e8fa0
commit b593befb47

View File

@ -337,9 +337,20 @@ export default {
}; };
}, },
created() { created() {
this.queryParams.equipId = this.$route.query.equipId; // this.queryParams.equipId = this.$route.query.equipId;
this.getParamsTree(this.$route.query.equipId); // this.getParamsTree(this.$route.query.equipId);
this.getEquipInfo(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: { methods: {
/** 查询列表 */ /** 查询列表 */