Browse Source

监听路由写错位置了

wyx
mk 3 months ago
parent
commit
154d23ca56
  1. 12
      src/views/records/checkin/index.vue
  2. 15
      src/views/residence/checkIn/index.vue

12
src/views/records/checkin/index.vue

@ -726,17 +726,7 @@ export default {
deptName(val) { deptName(val) {
this.$refs.tree.filter(val); this.$refs.tree.filter(val);
}, },
$route:{
handler: function (newVal, oldVal) {
console.log(newVal);
if (newVal.query) {
this.queryParams.idCard = newVal.query.idCard;
this.handleQuery()
}
},
immediate: true,
deep: true,
}
}, },
created() { created() {
this.getList(); this.getList();

15
src/views/residence/checkIn/index.vue

@ -423,6 +423,21 @@ export default {
mounted() { mounted() {
// //
}, },
watch: {
//
$route:{
handler: function (newVal, oldVal) {
if (newVal.query) {
this.$nextTick(()=>{
this.checnInForm.idCard = newVal.query.idCard;
this.handleQuery()
})
}
},
immediate: true,
deep: true,
}
}
}; };
</script> </script>

Loading…
Cancel
Save