提交 86a9129c 编写于 作者: Mr.奇淼('s avatar Mr.奇淼(

路由变更后建议手动刷新

上级 3f0f3f57
......@@ -67,7 +67,6 @@ import {
createAuthority
} from '@/api/authority'
import { getBaseMenuTree, addMenuAuthority, getMenuAuthority } from '@/api/menu'
import { mapActions } from 'vuex'
export default {
name: 'Authority',
data() {
......@@ -92,8 +91,6 @@ export default {
}
},
methods: {
...mapActions('router', ['SetAsyncRouter']),
// 条数
handleSizeChange(val) {
this.pageSize = val
......@@ -113,11 +110,13 @@ export default {
})
.then(async () => {
const res = await deleteAuthority({ authorityId: row.authorityId })
this.$message({
type: 'success',
message: '删除成功!'
})
this.getAuthList()
if (res.success) {
this.$message({
type: 'success',
message: '删除成功!'
})
this.getAuthList()
}
})
.catch(() => {
this.$message({
......@@ -189,7 +188,6 @@ export default {
type: 'success',
message: '添加成功!'
})
this.SetAsyncRouter()
}
this.closeDialog()
}
......
......@@ -80,7 +80,6 @@
<script>
import { getMenuList, addBaseMenu, deleteBaseMenu } from '@/api/menu'
import { mapActions } from 'vuex'
export default {
name: 'Menus',
data() {
......@@ -104,7 +103,6 @@ export default {
}
},
methods: {
...mapActions('router',['SetAsyncRouter']),
handleSizeChange(val) {
this.pageSize = val
this.getMenuList()
......@@ -121,12 +119,13 @@ export default {
})
.then(async () => {
const res = await deleteBaseMenu({ ID })
this.$message({
type: 'success',
message: '删除成功!'
})
this.getMenuList()
this.SetAsyncRouter()
if (res.success) {
this.$message({
type: 'success',
message: '删除成功!'
})
this.getMenuList()
}
})
.catch(() => {
this.$message({
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册