[fix 83085] 消息弹框跳转当前页,带入参数

This commit is contained in:
danshihao
2024-03-26 18:04:05 +08:00
parent 7199a4a9a9
commit f028b5b2b3
5 changed files with 69 additions and 24 deletions
@@ -342,10 +342,23 @@ export default {
return userRoleList.some(tt => adminRoleList.includes(tt))
}
},
watch: {
// 消息当前页跳转,需要带入参数
$route: {
deep: true,
handler (to, from) {
// 如果有消息跳转参数就带入参数查询
if (to.query.standard_number) {
this.$set(this.$refs.searchRef.queryParam, 'standard_number', to.query.standard_number)
this.searchParams = Object.assign({}, this.$refs.searchRef.queryParam)
this.loadData()
}
}
}
},
mounted () {
// 从消息跳转进来带企业编号
const { standard_number } = this.$route.query
this.$set(this.$refs.searchRef.queryParam, 'standard_number', standard_number)
this.$set(this.$refs.searchRef.queryParam, 'standard_number', this.$route.query.standard_number)
this.searchParams = Object.assign({}, this.$refs.searchRef.queryParam)
this.getTableHeader()
this.loadData()