Browse Source

路由变更后建议手动刷新

main
pixelqm 5 years ago
parent
commit
86a9129cfe
  1. 6
      QMPlusVuePage/src/view/superAdmin/authority/authority.vue
  2. 5
      QMPlusVuePage/src/view/superAdmin/menu/menu.vue

6
QMPlusVuePage/src/view/superAdmin/authority/authority.vue

@ -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 {
} }
}, },
methods: { methods: {
...mapActions('router', ['SetAsyncRouter']),
// //
handleSizeChange(val) { handleSizeChange(val) {
this.pageSize = val this.pageSize = val
@ -113,11 +110,13 @@ export default {
}) })
.then(async () => { .then(async () => {
const res = await deleteAuthority({ authorityId: row.authorityId }) const res = await deleteAuthority({ authorityId: row.authorityId })
if (res.success) {
this.$message({ this.$message({
type: 'success', type: 'success',
message: '删除成功!' message: '删除成功!'
}) })
this.getAuthList() this.getAuthList()
}
}) })
.catch(() => { .catch(() => {
this.$message({ this.$message({
@ -189,7 +188,6 @@ export default {
type: 'success', type: 'success',
message: '添加成功!' message: '添加成功!'
}) })
this.SetAsyncRouter()
} }
this.closeDialog() this.closeDialog()
} }

5
QMPlusVuePage/src/view/superAdmin/menu/menu.vue

@ -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 {
} }
}, },
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 {
}) })
.then(async () => { .then(async () => {
const res = await deleteBaseMenu({ ID }) const res = await deleteBaseMenu({ ID })
if (res.success) {
this.$message({ this.$message({
type: 'success', type: 'success',
message: '删除成功!' message: '删除成功!'
}) })
this.getMenuList() this.getMenuList()
this.SetAsyncRouter()
}
}) })
.catch(() => { .catch(() => {
this.$message({ this.$message({

Loading…
Cancel
Save