|
@ -84,6 +84,7 @@ import { handleTree } from '@/utils/tree' |
|
|
import * as MenuApi from '@/api/system/menu' |
|
|
import * as MenuApi from '@/api/system/menu' |
|
|
import MenuForm from './MenuForm.vue' |
|
|
import MenuForm from './MenuForm.vue' |
|
|
import { CACHE_KEY, useCache } from '@/hooks/web/useCache' |
|
|
import { CACHE_KEY, useCache } from '@/hooks/web/useCache' |
|
|
|
|
|
import { getInfo } from '@/api/login' |
|
|
|
|
|
|
|
|
defineOptions({ name: 'SystemMenu' }) |
|
|
defineOptions({ name: 'SystemMenu' }) |
|
|
|
|
|
|
|
@ -107,6 +108,9 @@ const getList = async () => { |
|
|
try { |
|
|
try { |
|
|
const data = await MenuApi.getMenuList(queryParams) |
|
|
const data = await MenuApi.getMenuList(queryParams) |
|
|
list.value = handleTree(data) |
|
|
list.value = handleTree(data) |
|
|
|
|
|
let userInfo = await getInfo() |
|
|
|
|
|
wsCache.set(CACHE_KEY.USER, userInfo) |
|
|
|
|
|
wsCache.set(CACHE_KEY.ROLE_ROUTERS, userInfo.menus) |
|
|
} finally { |
|
|
} finally { |
|
|
loading.value = false |
|
|
loading.value = false |
|
|
} |
|
|
} |
|
|