| | |
| | | } from '@bole-core/components'; |
| | | import type { Ref, ComputedRef } from 'vue'; |
| | | import { myClient } from '@/constants/query'; |
| | | import * as menuServices from '@/services/api/menu'; |
| | | import * as authServices from '@/services/api/auth'; |
| | | |
| | | type UseAccessOptions = { |
| | | operationBtnMap?: Record<string, OperationBtnType>; |
| | |
| | | return useBoleAccess({ |
| | | queryKey: ['baseModuleServices/getCurrentSubModuleList', { moduleId }], |
| | | service: async () => { |
| | | const res = await menuServices.getMenu( |
| | | const res = await authServices.getCurrentLogierMenu( |
| | | { id: moduleId }, |
| | | { |
| | | showLoading: false, |
| | |
| | | // import { RouteConfigs } from "@/layout/types"; |
| | | import { constantRoutes, Route } from '@/router'; |
| | | import { addAsyncRoutes, ascending } from '@/router/utils'; |
| | | import * as menuServices from '@/services/api/menu'; |
| | | import * as authServices from '@/services/api/auth'; |
| | | import { myClient } from '@/constants/query'; |
| | | |
| | | export interface PermissonState { |
| | |
| | | getModuleList() { |
| | | return new Promise<Route[]>(async (resolve, reject) => { |
| | | try { |
| | | const params: API.APIgetMenusParams = { |
| | | userType: AppLocalConfig.userType, |
| | | clientType: AppLocalConfig.clientType, |
| | | }; |
| | | const params: API.APIgetCurrentLogierMenusParams = {}; |
| | | const res = await myClient.fetchQuery({ |
| | | queryKey: ['menuServices/getMenus', params], |
| | | queryKey: ['authServices/getCurrentLogierMenus', params], |
| | | queryFn: () => { |
| | | return menuServices.getMenus(params, { |
| | | return authServices.getCurrentLogierMenus(params, { |
| | | showLoading: false, |
| | | }); |
| | | }, |