解决偶尔出现的跳转后数据不正确的问题
This commit is contained in:
parent
69176e8fa0
commit
b593befb47
@ -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: {
|
||||||
/** 查询列表 */
|
/** 查询列表 */
|
||||||
|
Loading…
Reference in New Issue
Block a user