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