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

路由变更后建议手动刷新

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