mirror of
https://github.com/vbenjs/gf-vben-admin.git
synced 2025-02-02 19:08:40 +08:00
增加vxeTable
修改获取菜单接口
This commit is contained in:
parent
db75aa33ef
commit
4641f59a41
@ -68,6 +68,8 @@
|
||||
"vue-json-pretty": "^2.0.6",
|
||||
"vue-router": "^4.0.14",
|
||||
"vue-types": "^4.1.1",
|
||||
"vxe-table": "^4.2.3-beta.0",
|
||||
"xe-utils": "^3.5.4",
|
||||
"xlsx": "^0.18.5"
|
||||
},
|
||||
"devDependencies": {
|
||||
|
5707
pnpm-lock.yaml
generated
5707
pnpm-lock.yaml
generated
File diff suppressed because it is too large
Load Diff
@ -9,10 +9,11 @@ enum Api {
|
||||
Register = '/register',
|
||||
GetPermCode = '/getPermCode',
|
||||
GetUserInfo = '/user/info',
|
||||
GetMenu = '/user/menu',
|
||||
GetPermCodeByUserId = '/getPermCodeByUserId',
|
||||
TestRetry = '/testRetry',
|
||||
}
|
||||
const url=`http://` + window.location.hostname + `:10088`
|
||||
const url = `http://` + window.location.hostname + `:10088`;
|
||||
|
||||
/**
|
||||
* @description: user login api
|
||||
@ -51,6 +52,11 @@ export function getUserInfo() {
|
||||
});
|
||||
}
|
||||
|
||||
export function getUserMenu() {
|
||||
return defHttp.get({
|
||||
url: Api.GetMenu,
|
||||
});
|
||||
}
|
||||
|
||||
export function doLogout() {
|
||||
return defHttp.get({ url: Api.Logout });
|
||||
|
@ -4,6 +4,11 @@ import '/@/design/index.less';
|
||||
import 'virtual:windi-utilities.css';
|
||||
// Register icon sprite
|
||||
import 'virtual:svg-icons-register';
|
||||
|
||||
import 'xe-utils';
|
||||
import VXETable from 'vxe-table';
|
||||
import 'vxe-table/lib/style.css';
|
||||
|
||||
import App from './App.vue';
|
||||
import { createApp } from 'vue';
|
||||
import { initAppConfigStore } from '/@/logics/initAppConfig';
|
||||
@ -46,6 +51,9 @@ async function bootstrap() {
|
||||
// https://next.router.vuejs.org/api/#isready
|
||||
// await router.isReady();
|
||||
|
||||
//use VxeTable
|
||||
app.use(VXETable);
|
||||
|
||||
app.mount('#app');
|
||||
}
|
||||
|
||||
|
@ -22,7 +22,7 @@ import { filter } from '/@/utils/helper/treeHelper';
|
||||
|
||||
import { useMessage } from '/@/hooks/web/useMessage';
|
||||
import { PageEnum } from '/@/enums/pageEnum';
|
||||
import { Curd } from "/@/api/Curd";
|
||||
import { getUserMenu } from '/@/api/sys/user';
|
||||
|
||||
interface PermissionState {
|
||||
// Permission code list
|
||||
@ -174,15 +174,15 @@ export const usePermissionStore = defineStore({
|
||||
// If you are sure that you do not need to do background dynamic permissions, please comment the entire judgment below
|
||||
case PermissionModeEnum.BACK:
|
||||
const { createMessage } = useMessage();
|
||||
createMessage.loading(t('sys.app.menuLoading'),1);
|
||||
createMessage.loading(t('sys.app.menuLoading'), 1);
|
||||
|
||||
// !Simulate to obtain permission codes from the background,
|
||||
// this function may only need to be executed once, and the actual project can be put at the right time by itself
|
||||
let routeList: AppRouteRecordRaw[] = [];
|
||||
try {
|
||||
// this.changePermissionCode();
|
||||
const { router }=await Curd({i:'router',a:'tree'})
|
||||
routeList = router as AppRouteRecordRaw[]
|
||||
const res = await getUserMenu();
|
||||
routeList = res as AppRouteRecordRaw[];
|
||||
} catch (error) {
|
||||
console.error(error);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user