1. 跳转时加一个新参数,值最好是随机的(不重复)
const params = {
patInHosId: item.msgExtInfo.patInHosId
}
this.$router.push({ name: '医嘱处理', params, query: { msg: new Date().getTime() } })
this.msgPopperVisible = false
我这里加了一个query。
2. 在当前页面的那个文件监听$route,然后调用自己的方法
watch: {
$route() {
this.patInHosId = this.$route.params.patInHosId
this.queryPatientAndOrder()
},
},