Commit 11ce260f authored by miaojiale's avatar miaojiale

1.解决路由重定向报错

2.返回按钮去除地址栏传参
parent 7aaeae87
...@@ -290,5 +290,8 @@ export function resetRouter() { ...@@ -290,5 +290,8 @@ export function resetRouter() {
routes: constantRoutes, routes: constantRoutes,
}).matcher }).matcher
} }
const originalPush = VueRouter.prototype.push
VueRouter.prototype.push = function push(location) {
return originalPush.call(this, location).catch((err) => err)
}
export default router export default router
...@@ -25,9 +25,7 @@ ...@@ -25,9 +25,7 @@
<div v-if="isDetail"> <div v-if="isDetail">
<div> <div>
<el-button icon="el-icon-back" @click="isDetail = false" <el-button icon="el-icon-back" @click="backInfoce">返 回</el-button>
>返 回</el-button
>
</div> </div>
<ConfigForms <ConfigForms
form-type="1" form-type="1"
...@@ -250,6 +248,10 @@ export default { ...@@ -250,6 +248,10 @@ export default {
} }
}, },
methods: { methods: {
backInfoce() {
this.$router.push({ query: {} })
this.isDetail = false
},
handleView(row) { handleView(row) {
this.handleAdd(row, null, true, false) this.handleAdd(row, null, true, false)
}, },
...@@ -336,7 +338,7 @@ export default { ...@@ -336,7 +338,7 @@ export default {
this.$store.commit("table/setRefreshFlag", 0) this.$store.commit("table/setRefreshFlag", 0)
this.isDetail = false this.isDetail = false
this.$nextTick(() => { this.$nextTick(() => {
this.handleAdd({ this.handleView({
patientId: this.patientId, patientId: this.patientId,
name: "", name: "",
}) })
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment