This commit is contained in:
Teo
2025-09-09 09:40:08 +08:00
parent 910b24019e
commit 4cd7efcfe4
34 changed files with 1898 additions and 71 deletions

View File

@ -45,7 +45,9 @@ export const usePermissionStore = defineStore('permission', () => {
sidebarRouters.value = routes;
};
const generateRoutes = async (): Promise<RouteRecordRaw[]> => {
const res = await getRouters(useUserStoreHook().selectedProject?.id || '0');
const id = useUserStoreHook().selectedProject ? useUserStoreHook().selectedProject.id : '0';
console.log('🚀 ~ generateRoutes ~ useUserStoreHook().selectedProject?.id:', id);
const res = await getRouters(id);
const { data } = res;
const sdata = JSON.parse(JSON.stringify(data));
const rdata = JSON.parse(JSON.stringify(data));