parent
42e8132812
commit
9baf341013
@ -46,6 +46,12 @@ public class MetaVO implements Serializable {
|
|||||||
@Schema(description = "菜单图标", example = "user")
|
@Schema(description = "菜单图标", example = "user")
|
||||||
private String icon;
|
private String icon;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 排序
|
||||||
|
*/
|
||||||
|
@Schema(description = "排序", example = "1")
|
||||||
|
private Integer order;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 是否隐藏
|
* 是否隐藏
|
||||||
*/
|
*/
|
||||||
|
@ -124,6 +124,7 @@ public class LoginServiceImpl implements LoginService {
|
|||||||
metaVO.setIcon(m.getIcon());
|
metaVO.setIcon(m.getIcon());
|
||||||
metaVO.setIgnoreCache(!m.getIsCache());
|
metaVO.setIgnoreCache(!m.getIsCache());
|
||||||
metaVO.setHideInMenu(m.getIsHidden());
|
metaVO.setHideInMenu(m.getIsHidden());
|
||||||
|
metaVO.setOrder(m.getSort());
|
||||||
tree.putExtra("meta", metaVO);
|
tree.putExtra("meta", metaVO);
|
||||||
});
|
});
|
||||||
return BeanUtil.copyToList(treeList, RouteVO.class);
|
return BeanUtil.copyToList(treeList, RouteVO.class);
|
||||||
|
1
continew-admin-ui/.gitignore
vendored
1
continew-admin-ui/.gitignore
vendored
@ -1,7 +1,6 @@
|
|||||||
.DS_Store
|
.DS_Store
|
||||||
node_modules/
|
node_modules/
|
||||||
dist/
|
dist/
|
||||||
demo/
|
|
||||||
npm-debug.log*
|
npm-debug.log*
|
||||||
yarn-debug.log*
|
yarn-debug.log*
|
||||||
yarn-error.log*
|
yarn-error.log*
|
||||||
|
@ -2,7 +2,7 @@ import { computed } from 'vue';
|
|||||||
import { RouteRecordRaw, RouteRecordNormalized } from 'vue-router';
|
import { RouteRecordRaw, RouteRecordNormalized } from 'vue-router';
|
||||||
import usePermission from '@/hooks/permission';
|
import usePermission from '@/hooks/permission';
|
||||||
import { useAppStore } from '@/store';
|
import { useAppStore } from '@/store';
|
||||||
import appClientMenus from '@/router/app-menus';
|
import staticMenus from '@/router/app-menus';
|
||||||
import { cloneDeep } from 'lodash';
|
import { cloneDeep } from 'lodash';
|
||||||
|
|
||||||
export default function useMenuTree() {
|
export default function useMenuTree() {
|
||||||
@ -10,9 +10,9 @@ export default function useMenuTree() {
|
|||||||
const appStore = useAppStore();
|
const appStore = useAppStore();
|
||||||
const appRoute = computed(() => {
|
const appRoute = computed(() => {
|
||||||
if (appStore.menuFromServer) {
|
if (appStore.menuFromServer) {
|
||||||
return appStore.appAsyncMenus;
|
return [...staticMenus, ...appStore.appAsyncMenus];
|
||||||
}
|
}
|
||||||
return appClientMenus;
|
return staticMenus;
|
||||||
});
|
});
|
||||||
const menuTree = computed(() => {
|
const menuTree = computed(() => {
|
||||||
const copyRouter = cloneDeep(appRoute.value) as RouteRecordNormalized[];
|
const copyRouter = cloneDeep(appRoute.value) as RouteRecordNormalized[];
|
||||||
|
@ -13,6 +13,6 @@
|
|||||||
"globalSettings": false,
|
"globalSettings": false,
|
||||||
"device": "desktop",
|
"device": "desktop",
|
||||||
"tabBar": false,
|
"tabBar": false,
|
||||||
"menuFromServer": false,
|
"menuFromServer": true,
|
||||||
"serverMenu": []
|
"serverMenu": []
|
||||||
}
|
}
|
||||||
|
@ -1,8 +1,8 @@
|
|||||||
import { appRoutes, appExternalRoutes } from '../routes';
|
import { fixedRoutes, demoRoutes } from '../routes';
|
||||||
|
|
||||||
const mixinRoutes = [...appRoutes, ...appExternalRoutes];
|
const mixinRoutes = [...fixedRoutes, ...demoRoutes];
|
||||||
|
|
||||||
const appClientMenus = mixinRoutes.map((el) => {
|
const staticMenus = mixinRoutes.map((el) => {
|
||||||
const { name, path, meta, redirect, children } = el;
|
const { name, path, meta, redirect, children } = el;
|
||||||
return {
|
return {
|
||||||
name,
|
name,
|
||||||
@ -13,4 +13,4 @@ const appClientMenus = mixinRoutes.map((el) => {
|
|||||||
};
|
};
|
||||||
});
|
});
|
||||||
|
|
||||||
export default appClientMenus;
|
export default staticMenus;
|
||||||
|
@ -11,7 +11,7 @@ function setupPageGuard(router: Router) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
export default function createRouteGuard(router: Router) {
|
export default function createRouteGuard(router: Router) {
|
||||||
setupPageGuard(router);
|
|
||||||
setupUserLoginInfoGuard(router);
|
setupUserLoginInfoGuard(router);
|
||||||
setupPermissionGuard(router);
|
setupPermissionGuard(router);
|
||||||
|
setupPageGuard(router);
|
||||||
}
|
}
|
||||||
|
@ -3,7 +3,7 @@ import NProgress from 'nprogress'; // progress bar
|
|||||||
|
|
||||||
import usePermission from '@/hooks/permission';
|
import usePermission from '@/hooks/permission';
|
||||||
import { useLoginStore, useAppStore } from '@/store';
|
import { useLoginStore, useAppStore } from '@/store';
|
||||||
import { appRoutes } from '../routes';
|
import { fixedRoutes, demoRoutes } from '../routes';
|
||||||
import { WHITE_LIST, NOT_FOUND } from '../constants';
|
import { WHITE_LIST, NOT_FOUND } from '../constants';
|
||||||
|
|
||||||
export default function setupPermissionGuard(router: Router) {
|
export default function setupPermissionGuard(router: Router) {
|
||||||
@ -16,7 +16,7 @@ export default function setupPermissionGuard(router: Router) {
|
|||||||
// 针对来自服务端的菜单配置进行处理
|
// 针对来自服务端的菜单配置进行处理
|
||||||
// Handle routing configuration from the server
|
// Handle routing configuration from the server
|
||||||
|
|
||||||
// 根据需要自行完善来源于服务端的菜单配置的permission逻辑
|
// 根据需要自行完善来源于服务端的菜单配置的 permission 逻辑
|
||||||
// Refine the permission logic from the server's menu configuration as needed
|
// Refine the permission logic from the server's menu configuration as needed
|
||||||
if (
|
if (
|
||||||
!appStore.appAsyncMenus.length &&
|
!appStore.appAsyncMenus.length &&
|
||||||
@ -24,7 +24,12 @@ export default function setupPermissionGuard(router: Router) {
|
|||||||
) {
|
) {
|
||||||
await appStore.fetchServerMenuConfig();
|
await appStore.fetchServerMenuConfig();
|
||||||
}
|
}
|
||||||
const serverMenuConfig = [...appStore.appAsyncMenus, ...WHITE_LIST];
|
const serverMenuConfig = [
|
||||||
|
...appStore.appAsyncMenus,
|
||||||
|
...WHITE_LIST,
|
||||||
|
...fixedRoutes,
|
||||||
|
...demoRoutes,
|
||||||
|
];
|
||||||
|
|
||||||
let exist = false;
|
let exist = false;
|
||||||
while (serverMenuConfig.length && !exist) {
|
while (serverMenuConfig.length && !exist) {
|
||||||
@ -45,8 +50,10 @@ export default function setupPermissionGuard(router: Router) {
|
|||||||
if (permissionsAllow) next();
|
if (permissionsAllow) next();
|
||||||
else {
|
else {
|
||||||
const destination =
|
const destination =
|
||||||
Permission.findFirstPermissionRoute(appRoutes, loginStore.roles[0]) ||
|
Permission.findFirstPermissionRoute(
|
||||||
NOT_FOUND;
|
[...fixedRoutes, ...demoRoutes],
|
||||||
|
loginStore.roles[0]
|
||||||
|
) || NOT_FOUND;
|
||||||
next(destination);
|
next(destination);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -2,7 +2,7 @@ import { createRouter, createWebHistory } from 'vue-router';
|
|||||||
import NProgress from 'nprogress'; // progress bar
|
import NProgress from 'nprogress'; // progress bar
|
||||||
import 'nprogress/nprogress.css';
|
import 'nprogress/nprogress.css';
|
||||||
|
|
||||||
import { appRoutes } from './routes';
|
import { appRoutes, fixedRoutes, demoRoutes } from './routes';
|
||||||
import { REDIRECT_MAIN, NOT_FOUND_ROUTE } from './routes/base';
|
import { REDIRECT_MAIN, NOT_FOUND_ROUTE } from './routes/base';
|
||||||
import createRouteGuard from './guard';
|
import createRouteGuard from './guard';
|
||||||
|
|
||||||
@ -24,6 +24,8 @@ const router = createRouter({
|
|||||||
},
|
},
|
||||||
},
|
},
|
||||||
...appRoutes,
|
...appRoutes,
|
||||||
|
...fixedRoutes,
|
||||||
|
...demoRoutes,
|
||||||
REDIRECT_MAIN,
|
REDIRECT_MAIN,
|
||||||
NOT_FOUND_ROUTE,
|
NOT_FOUND_ROUTE,
|
||||||
],
|
],
|
||||||
|
@ -1,10 +0,0 @@
|
|||||||
export default {
|
|
||||||
path: 'https://arco.design/vue/docs/start',
|
|
||||||
name: 'ArcoWebsite',
|
|
||||||
meta: {
|
|
||||||
locale: 'menu.arcoWebsite',
|
|
||||||
icon: 'link',
|
|
||||||
requiresAuth: true,
|
|
||||||
order: 106,
|
|
||||||
},
|
|
||||||
};
|
|
@ -1,10 +0,0 @@
|
|||||||
export default {
|
|
||||||
path: 'https://github.com/Charles7c/continew-admin',
|
|
||||||
name: 'GitHub',
|
|
||||||
meta: {
|
|
||||||
locale: 'menu.github',
|
|
||||||
icon: 'github',
|
|
||||||
requiresAuth: true,
|
|
||||||
order: 107,
|
|
||||||
},
|
|
||||||
};
|
|
@ -1,9 +1,8 @@
|
|||||||
import type { RouteRecordNormalized } from 'vue-router';
|
import type { RouteRecordNormalized } from 'vue-router';
|
||||||
|
|
||||||
const modules = import.meta.glob('./modules/**/*.ts', { eager: true });
|
const appModules = import.meta.glob('./modules/*.ts', { eager: true });
|
||||||
const externalModules = import.meta.glob('./externalModules/*.ts', {
|
const fixedModules = import.meta.glob('./modules/fixed/*.ts', { eager: true });
|
||||||
eager: true,
|
const demoModules = import.meta.glob('./modules/demo/*.ts', { eager: true });
|
||||||
});
|
|
||||||
|
|
||||||
function formatModules(_modules: any, result: RouteRecordNormalized[]) {
|
function formatModules(_modules: any, result: RouteRecordNormalized[]) {
|
||||||
Object.keys(_modules).forEach((key) => {
|
Object.keys(_modules).forEach((key) => {
|
||||||
@ -17,9 +16,12 @@ function formatModules(_modules: any, result: RouteRecordNormalized[]) {
|
|||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
export const appRoutes: RouteRecordNormalized[] = formatModules(modules, []);
|
export const appRoutes: RouteRecordNormalized[] = formatModules(appModules, []);
|
||||||
|
export const fixedRoutes: RouteRecordNormalized[] = formatModules(
|
||||||
export const appExternalRoutes: RouteRecordNormalized[] = formatModules(
|
fixedModules,
|
||||||
externalModules,
|
[]
|
||||||
|
);
|
||||||
|
export const demoRoutes: RouteRecordNormalized[] = formatModules(
|
||||||
|
demoModules,
|
||||||
[]
|
[]
|
||||||
);
|
);
|
||||||
|
@ -3,18 +3,17 @@ import { AppRouteRecordRaw } from '../../types';
|
|||||||
|
|
||||||
const EXCEPTION: AppRouteRecordRaw = {
|
const EXCEPTION: AppRouteRecordRaw = {
|
||||||
path: '/exception',
|
path: '/exception',
|
||||||
name: 'exception',
|
|
||||||
component: DEFAULT_LAYOUT,
|
component: DEFAULT_LAYOUT,
|
||||||
meta: {
|
meta: {
|
||||||
locale: 'menu.exception',
|
locale: 'menu.exception',
|
||||||
requiresAuth: true,
|
requiresAuth: true,
|
||||||
icon: 'exclamation-circle',
|
icon: 'exclamation-circle',
|
||||||
order: 104,
|
order: 904,
|
||||||
},
|
},
|
||||||
children: [
|
children: [
|
||||||
{
|
{
|
||||||
path: '403',
|
|
||||||
name: '403',
|
name: '403',
|
||||||
|
path: '403',
|
||||||
component: () => import('@/views/arco-design/exception/403/index.vue'),
|
component: () => import('@/views/arco-design/exception/403/index.vue'),
|
||||||
meta: {
|
meta: {
|
||||||
locale: 'menu.exception.403',
|
locale: 'menu.exception.403',
|
||||||
@ -23,8 +22,8 @@ const EXCEPTION: AppRouteRecordRaw = {
|
|||||||
},
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
path: '404',
|
|
||||||
name: '404',
|
name: '404',
|
||||||
|
path: '404',
|
||||||
component: () => import('@/views/arco-design/exception/404/index.vue'),
|
component: () => import('@/views/arco-design/exception/404/index.vue'),
|
||||||
meta: {
|
meta: {
|
||||||
locale: 'menu.exception.404',
|
locale: 'menu.exception.404',
|
||||||
@ -33,8 +32,8 @@ const EXCEPTION: AppRouteRecordRaw = {
|
|||||||
},
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
path: '500',
|
|
||||||
name: '500',
|
name: '500',
|
||||||
|
path: '500',
|
||||||
component: () => import('@/views/arco-design/exception/500/index.vue'),
|
component: () => import('@/views/arco-design/exception/500/index.vue'),
|
||||||
meta: {
|
meta: {
|
||||||
locale: 'menu.exception.500',
|
locale: 'menu.exception.500',
|
@ -3,18 +3,17 @@ import { AppRouteRecordRaw } from '../../types';
|
|||||||
|
|
||||||
const FORM: AppRouteRecordRaw = {
|
const FORM: AppRouteRecordRaw = {
|
||||||
path: '/form',
|
path: '/form',
|
||||||
name: 'form',
|
|
||||||
component: DEFAULT_LAYOUT,
|
component: DEFAULT_LAYOUT,
|
||||||
meta: {
|
meta: {
|
||||||
locale: 'menu.form',
|
locale: 'menu.form',
|
||||||
icon: 'bookmark',
|
icon: 'bookmark',
|
||||||
requiresAuth: true,
|
requiresAuth: true,
|
||||||
order: 101,
|
order: 901,
|
||||||
},
|
},
|
||||||
children: [
|
children: [
|
||||||
{
|
{
|
||||||
path: 'step',
|
|
||||||
name: 'Step',
|
name: 'Step',
|
||||||
|
path: 'step',
|
||||||
component: () => import('@/views/arco-design/form/step/index.vue'),
|
component: () => import('@/views/arco-design/form/step/index.vue'),
|
||||||
meta: {
|
meta: {
|
||||||
locale: 'menu.form.step',
|
locale: 'menu.form.step',
|
||||||
@ -23,8 +22,8 @@ const FORM: AppRouteRecordRaw = {
|
|||||||
},
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
path: 'group',
|
|
||||||
name: 'Group',
|
name: 'Group',
|
||||||
|
path: 'group',
|
||||||
component: () => import('@/views/arco-design/form/group/index.vue'),
|
component: () => import('@/views/arco-design/form/group/index.vue'),
|
||||||
meta: {
|
meta: {
|
||||||
locale: 'menu.form.group',
|
locale: 'menu.form.group',
|
@ -3,18 +3,17 @@ import { AppRouteRecordRaw } from '../../types';
|
|||||||
|
|
||||||
const LIST: AppRouteRecordRaw = {
|
const LIST: AppRouteRecordRaw = {
|
||||||
path: '/list',
|
path: '/list',
|
||||||
name: 'list',
|
|
||||||
component: DEFAULT_LAYOUT,
|
component: DEFAULT_LAYOUT,
|
||||||
meta: {
|
meta: {
|
||||||
locale: 'menu.list',
|
locale: 'menu.list',
|
||||||
requiresAuth: true,
|
requiresAuth: true,
|
||||||
icon: 'list',
|
icon: 'list',
|
||||||
order: 100,
|
order: 900,
|
||||||
},
|
},
|
||||||
children: [
|
children: [
|
||||||
{
|
{
|
||||||
path: 'search-table', // The midline path complies with SEO specifications
|
|
||||||
name: 'SearchTable',
|
name: 'SearchTable',
|
||||||
|
path: 'search-table', // The midline path complies with SEO specifications
|
||||||
component: () =>
|
component: () =>
|
||||||
import('@/views/arco-design/list/search-table/index.vue'),
|
import('@/views/arco-design/list/search-table/index.vue'),
|
||||||
meta: {
|
meta: {
|
||||||
@ -24,8 +23,8 @@ const LIST: AppRouteRecordRaw = {
|
|||||||
},
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
path: 'card',
|
|
||||||
name: 'Card',
|
name: 'Card',
|
||||||
|
path: 'card',
|
||||||
component: () => import('@/views/arco-design/list/card/index.vue'),
|
component: () => import('@/views/arco-design/list/card/index.vue'),
|
||||||
meta: {
|
meta: {
|
||||||
locale: 'menu.list.cardList',
|
locale: 'menu.list.cardList',
|
@ -3,18 +3,17 @@ import { AppRouteRecordRaw } from '../../types';
|
|||||||
|
|
||||||
const PROFILE: AppRouteRecordRaw = {
|
const PROFILE: AppRouteRecordRaw = {
|
||||||
path: '/profile',
|
path: '/profile',
|
||||||
name: 'profile',
|
|
||||||
component: DEFAULT_LAYOUT,
|
component: DEFAULT_LAYOUT,
|
||||||
meta: {
|
meta: {
|
||||||
locale: 'menu.profile',
|
locale: 'menu.profile',
|
||||||
requiresAuth: true,
|
requiresAuth: true,
|
||||||
icon: 'file',
|
icon: 'file',
|
||||||
order: 102,
|
order: 902,
|
||||||
},
|
},
|
||||||
children: [
|
children: [
|
||||||
{
|
{
|
||||||
path: 'basic',
|
|
||||||
name: 'Basic',
|
name: 'Basic',
|
||||||
|
path: 'basic',
|
||||||
component: () => import('@/views/arco-design/profile/basic/index.vue'),
|
component: () => import('@/views/arco-design/profile/basic/index.vue'),
|
||||||
meta: {
|
meta: {
|
||||||
locale: 'menu.profile.basic',
|
locale: 'menu.profile.basic',
|
@ -3,18 +3,17 @@ import { AppRouteRecordRaw } from '../../types';
|
|||||||
|
|
||||||
const RESULT: AppRouteRecordRaw = {
|
const RESULT: AppRouteRecordRaw = {
|
||||||
path: '/result',
|
path: '/result',
|
||||||
name: 'result',
|
|
||||||
component: DEFAULT_LAYOUT,
|
component: DEFAULT_LAYOUT,
|
||||||
meta: {
|
meta: {
|
||||||
locale: 'menu.result',
|
locale: 'menu.result',
|
||||||
icon: 'check-circle',
|
icon: 'check-circle',
|
||||||
requiresAuth: true,
|
requiresAuth: true,
|
||||||
order: 103,
|
order: 903,
|
||||||
},
|
},
|
||||||
children: [
|
children: [
|
||||||
{
|
{
|
||||||
path: 'success',
|
|
||||||
name: 'Success',
|
name: 'Success',
|
||||||
|
path: 'success',
|
||||||
component: () => import('@/views/arco-design/result/success/index.vue'),
|
component: () => import('@/views/arco-design/result/success/index.vue'),
|
||||||
meta: {
|
meta: {
|
||||||
locale: 'menu.result.success',
|
locale: 'menu.result.success',
|
||||||
@ -23,8 +22,8 @@ const RESULT: AppRouteRecordRaw = {
|
|||||||
},
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
path: 'error',
|
|
||||||
name: 'Error',
|
name: 'Error',
|
||||||
|
path: 'error',
|
||||||
component: () => import('@/views/arco-design/result/error/index.vue'),
|
component: () => import('@/views/arco-design/result/error/index.vue'),
|
||||||
meta: {
|
meta: {
|
||||||
locale: 'menu.result.error',
|
locale: 'menu.result.error',
|
@ -3,18 +3,17 @@ import { AppRouteRecordRaw } from '../../types';
|
|||||||
|
|
||||||
const VISUALIZATION: AppRouteRecordRaw = {
|
const VISUALIZATION: AppRouteRecordRaw = {
|
||||||
path: '/visualization',
|
path: '/visualization',
|
||||||
name: 'visualization',
|
|
||||||
component: DEFAULT_LAYOUT,
|
component: DEFAULT_LAYOUT,
|
||||||
meta: {
|
meta: {
|
||||||
locale: 'menu.visualization',
|
locale: 'menu.visualization',
|
||||||
requiresAuth: true,
|
requiresAuth: true,
|
||||||
icon: 'bar-chart',
|
icon: 'bar-chart',
|
||||||
order: 105,
|
order: 905,
|
||||||
},
|
},
|
||||||
children: [
|
children: [
|
||||||
{
|
{
|
||||||
path: 'data-analysis',
|
|
||||||
name: 'DataAnalysis',
|
name: 'DataAnalysis',
|
||||||
|
path: 'data-analysis',
|
||||||
component: () =>
|
component: () =>
|
||||||
import('@/views/arco-design/visualization/data-analysis/index.vue'),
|
import('@/views/arco-design/visualization/data-analysis/index.vue'),
|
||||||
meta: {
|
meta: {
|
||||||
@ -24,8 +23,8 @@ const VISUALIZATION: AppRouteRecordRaw = {
|
|||||||
},
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
path: 'multi-dimension-data-analysis',
|
|
||||||
name: 'MultiDimensionDataAnalysis',
|
name: 'MultiDimensionDataAnalysis',
|
||||||
|
path: 'multi-dimension-data-analysis',
|
||||||
component: () =>
|
component: () =>
|
||||||
import(
|
import(
|
||||||
'@/views/arco-design/visualization/multi-dimension-data-analysis/index.vue'
|
'@/views/arco-design/visualization/multi-dimension-data-analysis/index.vue'
|
||||||
@ -37,8 +36,8 @@ const VISUALIZATION: AppRouteRecordRaw = {
|
|||||||
},
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
path: 'monitor',
|
|
||||||
name: 'Monitor',
|
name: 'Monitor',
|
||||||
|
path: 'monitor',
|
||||||
component: () =>
|
component: () =>
|
||||||
import('@/views/arco-design/visualization/monitor/index.vue'),
|
import('@/views/arco-design/visualization/monitor/index.vue'),
|
||||||
meta: {
|
meta: {
|
@ -1,9 +1,9 @@
|
|||||||
import { DEFAULT_LAYOUT } from '../base';
|
import { DEFAULT_LAYOUT } from '../../base';
|
||||||
import { AppRouteRecordRaw } from '../types';
|
import { AppRouteRecordRaw } from '../../types';
|
||||||
|
|
||||||
const DASHBOARD: AppRouteRecordRaw = {
|
const DASHBOARD: AppRouteRecordRaw = {
|
||||||
path: '/dashboard',
|
path: '/dashboard',
|
||||||
name: 'dashboard',
|
name: 'Dashboard',
|
||||||
component: DEFAULT_LAYOUT,
|
component: DEFAULT_LAYOUT,
|
||||||
redirect: '/dashboard/workplace',
|
redirect: '/dashboard/workplace',
|
||||||
meta: {
|
meta: {
|
||||||
@ -15,14 +15,14 @@ const DASHBOARD: AppRouteRecordRaw = {
|
|||||||
},
|
},
|
||||||
children: [
|
children: [
|
||||||
{
|
{
|
||||||
path: 'workplace',
|
|
||||||
name: 'Workplace',
|
name: 'Workplace',
|
||||||
|
path: 'workplace',
|
||||||
component: () => import('@/views/dashboard/workplace/index.vue'),
|
component: () => import('@/views/dashboard/workplace/index.vue'),
|
||||||
meta: {
|
meta: {
|
||||||
locale: 'menu.dashboard.workplace',
|
locale: 'menu.dashboard.workplace',
|
||||||
requiresAuth: true,
|
requiresAuth: true,
|
||||||
roles: ['*'],
|
roles: ['*'],
|
||||||
activeMenu: 'dashboard',
|
activeMenu: 'Dashboard',
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
],
|
],
|
@ -1,9 +1,8 @@
|
|||||||
import { DEFAULT_LAYOUT } from '../base';
|
import { DEFAULT_LAYOUT } from '../../base';
|
||||||
import { AppRouteRecordRaw } from '../types';
|
import { AppRouteRecordRaw } from '../../types';
|
||||||
|
|
||||||
const UserCenter: AppRouteRecordRaw = {
|
const UserCenter: AppRouteRecordRaw = {
|
||||||
path: '/login/user',
|
path: '/login/user',
|
||||||
name: 'user',
|
|
||||||
component: DEFAULT_LAYOUT,
|
component: DEFAULT_LAYOUT,
|
||||||
meta: {
|
meta: {
|
||||||
locale: 'menu.user',
|
locale: 'menu.user',
|
||||||
@ -12,8 +11,8 @@ const UserCenter: AppRouteRecordRaw = {
|
|||||||
},
|
},
|
||||||
children: [
|
children: [
|
||||||
{
|
{
|
||||||
path: 'center',
|
|
||||||
name: 'UserCenter',
|
name: 'UserCenter',
|
||||||
|
path: 'center',
|
||||||
component: () => import('@/views/system/user/center/index.vue'),
|
component: () => import('@/views/system/user/center/index.vue'),
|
||||||
meta: {
|
meta: {
|
||||||
locale: 'menu.user.center',
|
locale: 'menu.user.center',
|
@ -3,7 +3,6 @@ import { AppRouteRecordRaw } from '../types';
|
|||||||
|
|
||||||
const Monitor: AppRouteRecordRaw = {
|
const Monitor: AppRouteRecordRaw = {
|
||||||
path: '/monitor',
|
path: '/monitor',
|
||||||
name: 'monitor',
|
|
||||||
component: DEFAULT_LAYOUT,
|
component: DEFAULT_LAYOUT,
|
||||||
meta: {
|
meta: {
|
||||||
locale: 'menu.monitor',
|
locale: 'menu.monitor',
|
||||||
@ -13,23 +12,21 @@ const Monitor: AppRouteRecordRaw = {
|
|||||||
},
|
},
|
||||||
children: [
|
children: [
|
||||||
{
|
{
|
||||||
path: '/monitor/online',
|
|
||||||
name: 'OnlineUser',
|
name: 'OnlineUser',
|
||||||
|
path: '/monitor/online',
|
||||||
component: () => import('@/views/monitor/online/index.vue'),
|
component: () => import('@/views/monitor/online/index.vue'),
|
||||||
meta: {
|
meta: {
|
||||||
locale: 'menu.online.user.list',
|
locale: 'menu.online.user.list',
|
||||||
requiresAuth: true,
|
requiresAuth: true,
|
||||||
roles: ['*'],
|
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
path: '/monitor/log/login',
|
|
||||||
name: 'LoginLog',
|
name: 'LoginLog',
|
||||||
|
path: '/monitor/log/login',
|
||||||
component: () => import('@/views/monitor/log/login/index.vue'),
|
component: () => import('@/views/monitor/log/login/index.vue'),
|
||||||
meta: {
|
meta: {
|
||||||
locale: 'menu.log.login.list',
|
locale: 'menu.log.login.list',
|
||||||
requiresAuth: true,
|
requiresAuth: true,
|
||||||
roles: ['*'],
|
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -39,17 +36,15 @@ const Monitor: AppRouteRecordRaw = {
|
|||||||
meta: {
|
meta: {
|
||||||
locale: 'menu.log.operation.list',
|
locale: 'menu.log.operation.list',
|
||||||
requiresAuth: true,
|
requiresAuth: true,
|
||||||
roles: ['*'],
|
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
path: '/monitor/log/system',
|
|
||||||
name: 'SystemLog',
|
name: 'SystemLog',
|
||||||
|
path: '/monitor/log/system',
|
||||||
component: () => import('@/views/monitor/log/system/index.vue'),
|
component: () => import('@/views/monitor/log/system/index.vue'),
|
||||||
meta: {
|
meta: {
|
||||||
locale: 'menu.log.system.list',
|
locale: 'menu.log.system.list',
|
||||||
requiresAuth: true,
|
requiresAuth: true,
|
||||||
roles: ['*'],
|
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
|
@ -3,7 +3,6 @@ import { AppRouteRecordRaw } from '../types';
|
|||||||
|
|
||||||
const System: AppRouteRecordRaw = {
|
const System: AppRouteRecordRaw = {
|
||||||
path: '/system',
|
path: '/system',
|
||||||
name: 'system',
|
|
||||||
component: DEFAULT_LAYOUT,
|
component: DEFAULT_LAYOUT,
|
||||||
meta: {
|
meta: {
|
||||||
locale: 'menu.system',
|
locale: 'menu.system',
|
||||||
@ -13,53 +12,48 @@ const System: AppRouteRecordRaw = {
|
|||||||
},
|
},
|
||||||
children: [
|
children: [
|
||||||
{
|
{
|
||||||
path: '/system/user',
|
|
||||||
name: 'User',
|
name: 'User',
|
||||||
|
path: '/system/user',
|
||||||
component: () => import('@/views/system/user/index.vue'),
|
component: () => import('@/views/system/user/index.vue'),
|
||||||
meta: {
|
meta: {
|
||||||
locale: 'menu.system.user.list',
|
locale: 'menu.system.user.list',
|
||||||
requiresAuth: true,
|
requiresAuth: true,
|
||||||
roles: ['*'],
|
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
path: '/system/role',
|
|
||||||
name: 'Role',
|
name: 'Role',
|
||||||
|
path: '/system/role',
|
||||||
component: () => import('@/views/system/role/index.vue'),
|
component: () => import('@/views/system/role/index.vue'),
|
||||||
meta: {
|
meta: {
|
||||||
locale: 'menu.system.role.list',
|
locale: 'menu.system.role.list',
|
||||||
requiresAuth: true,
|
requiresAuth: true,
|
||||||
roles: ['*'],
|
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
path: '/system/menu',
|
|
||||||
name: 'Menu',
|
name: 'Menu',
|
||||||
|
path: '/system/menu',
|
||||||
component: () => import('@/views/system/menu/index.vue'),
|
component: () => import('@/views/system/menu/index.vue'),
|
||||||
meta: {
|
meta: {
|
||||||
locale: 'menu.system.menu.list',
|
locale: 'menu.system.menu.list',
|
||||||
requiresAuth: true,
|
requiresAuth: true,
|
||||||
roles: ['*'],
|
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
path: '/system/dept',
|
|
||||||
name: 'Dept',
|
name: 'Dept',
|
||||||
|
path: '/system/dept',
|
||||||
component: () => import('@/views/system/dept/index.vue'),
|
component: () => import('@/views/system/dept/index.vue'),
|
||||||
meta: {
|
meta: {
|
||||||
locale: 'menu.system.dept.list',
|
locale: 'menu.system.dept.list',
|
||||||
requiresAuth: true,
|
requiresAuth: true,
|
||||||
roles: ['*'],
|
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
path: '/system/announcement',
|
|
||||||
name: 'Announcement',
|
name: 'Announcement',
|
||||||
|
path: '/system/announcement',
|
||||||
component: () => import('@/views/system/announcement/index.vue'),
|
component: () => import('@/views/system/announcement/index.vue'),
|
||||||
meta: {
|
meta: {
|
||||||
locale: 'menu.system.announcement.list',
|
locale: 'menu.system.announcement.list',
|
||||||
requiresAuth: true,
|
requiresAuth: true,
|
||||||
roles: ['*'],
|
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
|
@ -3,7 +3,6 @@ import { AppRouteRecordRaw } from '../types';
|
|||||||
|
|
||||||
const Tool: AppRouteRecordRaw = {
|
const Tool: AppRouteRecordRaw = {
|
||||||
path: '/tool',
|
path: '/tool',
|
||||||
name: 'tool',
|
|
||||||
component: DEFAULT_LAYOUT,
|
component: DEFAULT_LAYOUT,
|
||||||
meta: {
|
meta: {
|
||||||
locale: 'menu.tool',
|
locale: 'menu.tool',
|
||||||
@ -13,13 +12,12 @@ const Tool: AppRouteRecordRaw = {
|
|||||||
},
|
},
|
||||||
children: [
|
children: [
|
||||||
{
|
{
|
||||||
path: '/tool/generator',
|
|
||||||
name: 'Generator',
|
name: 'Generator',
|
||||||
|
path: '/tool/generator',
|
||||||
component: () => import('@/views/tool/generator/index.vue'),
|
component: () => import('@/views/tool/generator/index.vue'),
|
||||||
meta: {
|
meta: {
|
||||||
locale: 'menu.tool.generator.list',
|
locale: 'menu.tool.generator.list',
|
||||||
requiresAuth: true,
|
requiresAuth: true,
|
||||||
roles: ['*'],
|
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
|
@ -49,21 +49,21 @@ const useAppStore = defineStore('app', {
|
|||||||
try {
|
try {
|
||||||
notifyInstance = Notification.info({
|
notifyInstance = Notification.info({
|
||||||
id: 'menuNotice', // Keep the instance id the same
|
id: 'menuNotice', // Keep the instance id the same
|
||||||
content: 'loading',
|
content: '菜单加载中...',
|
||||||
closable: true,
|
closable: true,
|
||||||
});
|
});
|
||||||
const { data } = await listRoute();
|
const { data } = await listRoute();
|
||||||
this.serverMenu = data;
|
this.serverMenu = data;
|
||||||
notifyInstance = Notification.success({
|
notifyInstance = Notification.success({
|
||||||
id: 'menuNotice',
|
id: 'menuNotice',
|
||||||
content: 'success',
|
content: '菜单加载成功',
|
||||||
closable: true,
|
closable: true,
|
||||||
});
|
});
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
||||||
notifyInstance = Notification.error({
|
notifyInstance = Notification.error({
|
||||||
id: 'menuNotice',
|
id: 'menuNotice',
|
||||||
content: 'error',
|
content: '菜单加载失败',
|
||||||
closable: true,
|
closable: true,
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
@ -30,6 +30,7 @@ import io.swagger.v3.oas.annotations.tags.Tag;
|
|||||||
import org.springframework.validation.annotation.Validated;
|
import org.springframework.validation.annotation.Validated;
|
||||||
import org.springframework.web.bind.annotation.*;
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
|
||||||
|
import cn.dev33.satoken.annotation.SaCheckPermission;
|
||||||
import cn.hutool.extra.spring.SpringUtil;
|
import cn.hutool.extra.spring.SpringUtil;
|
||||||
|
|
||||||
import top.charles7c.cnadmin.common.model.query.PageQuery;
|
import top.charles7c.cnadmin.common.model.query.PageQuery;
|
||||||
@ -59,6 +60,7 @@ public class GeneratorController {
|
|||||||
private final GeneratorService generatorService;
|
private final GeneratorService generatorService;
|
||||||
|
|
||||||
@Operation(summary = "分页查询数据表", description = "分页查询数据表")
|
@Operation(summary = "分页查询数据表", description = "分页查询数据表")
|
||||||
|
@SaCheckPermission("tool:generator:list")
|
||||||
@GetMapping("/table")
|
@GetMapping("/table")
|
||||||
public R<PageDataVO<TableVO>> pageTable(TableQuery query, @Validated PageQuery pageQuery) throws SQLException {
|
public R<PageDataVO<TableVO>> pageTable(TableQuery query, @Validated PageQuery pageQuery) throws SQLException {
|
||||||
return R.ok(generatorService.pageTable(query, pageQuery));
|
return R.ok(generatorService.pageTable(query, pageQuery));
|
||||||
@ -69,6 +71,7 @@ public class GeneratorController {
|
|||||||
@Parameter(name = "tableName", description = "表名称", required = true, example = "sys_user",
|
@Parameter(name = "tableName", description = "表名称", required = true, example = "sys_user",
|
||||||
in = ParameterIn.PATH),
|
in = ParameterIn.PATH),
|
||||||
@Parameter(name = "requireSync", description = "是否需要同步", example = "true", in = ParameterIn.QUERY)})
|
@Parameter(name = "requireSync", description = "是否需要同步", example = "true", in = ParameterIn.QUERY)})
|
||||||
|
@SaCheckPermission("tool:generator:list")
|
||||||
@GetMapping("/field/{tableName}")
|
@GetMapping("/field/{tableName}")
|
||||||
public R<List<FieldConfigDO>> listFieldConfig(@PathVariable String tableName,
|
public R<List<FieldConfigDO>> listFieldConfig(@PathVariable String tableName,
|
||||||
@RequestParam(required = false, defaultValue = "false") Boolean requireSync) {
|
@RequestParam(required = false, defaultValue = "false") Boolean requireSync) {
|
||||||
@ -77,6 +80,7 @@ public class GeneratorController {
|
|||||||
|
|
||||||
@Operation(summary = "查询生成配置信息", description = "查询生成配置信息")
|
@Operation(summary = "查询生成配置信息", description = "查询生成配置信息")
|
||||||
@Parameter(name = "tableName", description = "表名称", required = true, example = "sys_user", in = ParameterIn.PATH)
|
@Parameter(name = "tableName", description = "表名称", required = true, example = "sys_user", in = ParameterIn.PATH)
|
||||||
|
@SaCheckPermission("tool:generator:list")
|
||||||
@GetMapping("/config/{tableName}")
|
@GetMapping("/config/{tableName}")
|
||||||
public R<GenConfigDO> getGenConfig(@PathVariable String tableName) throws SQLException {
|
public R<GenConfigDO> getGenConfig(@PathVariable String tableName) throws SQLException {
|
||||||
return R.ok(generatorService.getGenConfig(tableName));
|
return R.ok(generatorService.getGenConfig(tableName));
|
||||||
@ -84,6 +88,7 @@ public class GeneratorController {
|
|||||||
|
|
||||||
@Operation(summary = "保存配置信息", description = "保存配置信息")
|
@Operation(summary = "保存配置信息", description = "保存配置信息")
|
||||||
@Parameter(name = "tableName", description = "表名称", required = true, example = "sys_user", in = ParameterIn.PATH)
|
@Parameter(name = "tableName", description = "表名称", required = true, example = "sys_user", in = ParameterIn.PATH)
|
||||||
|
@SaCheckPermission("tool:generator:list")
|
||||||
@PostMapping("/config/{tableName}")
|
@PostMapping("/config/{tableName}")
|
||||||
public R saveConfig(@Validated @RequestBody GenConfigRequest request, @PathVariable String tableName) {
|
public R saveConfig(@Validated @RequestBody GenConfigRequest request, @PathVariable String tableName) {
|
||||||
generatorService.saveConfig(request, tableName);
|
generatorService.saveConfig(request, tableName);
|
||||||
@ -92,6 +97,7 @@ public class GeneratorController {
|
|||||||
|
|
||||||
@Operation(summary = "生成代码", description = "生成代码")
|
@Operation(summary = "生成代码", description = "生成代码")
|
||||||
@Parameter(name = "tableName", description = "表名称", required = true, example = "sys_user", in = ParameterIn.PATH)
|
@Parameter(name = "tableName", description = "表名称", required = true, example = "sys_user", in = ParameterIn.PATH)
|
||||||
|
@SaCheckPermission("tool:generator:list")
|
||||||
@PostMapping("/{tableName}")
|
@PostMapping("/{tableName}")
|
||||||
public R generate(@PathVariable String tableName) {
|
public R generate(@PathVariable String tableName) {
|
||||||
ValidationUtils.throwIf("prod".equals(SpringUtil.getActiveProfile()), "仅支持在开发环境生成代码");
|
ValidationUtils.throwIf("prod".equals(SpringUtil.getActiveProfile()), "仅支持在开发环境生成代码");
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
-- changeset Charles7c:1
|
-- changeset Charles7c:1
|
||||||
-- 初始化默认菜单
|
-- 初始化默认菜单
|
||||||
INSERT IGNORE INTO `sys_menu` VALUES (1000, '系统管理', 0, 1, 'system', NULL, NULL, 'settings', b'0', b'0', b'0', NULL, 1, 1, 1, NOW(), NULL, NULL);
|
INSERT IGNORE INTO `sys_menu` VALUES (1000, '系统管理', 0, 1, '/system', NULL, NULL, 'settings', b'0', b'0', b'0', NULL, 1, 1, 1, NOW(), NULL, NULL);
|
||||||
INSERT IGNORE INTO `sys_menu` VALUES (1010, '用户管理', 1000, 2, '/system/user', 'User', '/system/user/index', NULL, b'0', b'0', b'0', 'system:user:list', 1, 1, 1, NOW(), NULL, NULL);
|
INSERT IGNORE INTO `sys_menu` VALUES (1010, '用户管理', 1000, 2, '/system/user', 'User', '/system/user/index', NULL, b'0', b'0', b'0', 'system:user:list', 1, 1, 1, NOW(), NULL, NULL);
|
||||||
INSERT IGNORE INTO `sys_menu` VALUES (1011, '用户新增', 1010, 3, NULL, NULL, NULL, NULL, b'0', b'0', b'0', 'system:user:add', 1, 1, 1, NOW(), NULL, NULL);
|
INSERT IGNORE INTO `sys_menu` VALUES (1011, '用户新增', 1010, 3, NULL, NULL, NULL, NULL, b'0', b'0', b'0', 'system:user:add', 1, 1, 1, NOW(), NULL, NULL);
|
||||||
INSERT IGNORE INTO `sys_menu` VALUES (1012, '用户修改', 1010, 3, NULL, NULL, NULL, NULL, b'0', b'0', b'0', 'system:user:update', 2, 1, 1, NOW(), NULL, NULL);
|
INSERT IGNORE INTO `sys_menu` VALUES (1012, '用户修改', 1010, 3, NULL, NULL, NULL, NULL, b'0', b'0', b'0', 'system:user:update', 2, 1, 1, NOW(), NULL, NULL);
|
||||||
@ -10,29 +10,29 @@ INSERT IGNORE INTO `sys_menu` VALUES (1013, '用户删除', 1010, 3, NULL, NULL,
|
|||||||
INSERT IGNORE INTO `sys_menu` VALUES (1014, '用户导出', 1010, 3, NULL, NULL, NULL, NULL, b'0', b'0', b'0', 'system:user:export', 4, 1, 1, NOW(), NULL, NULL);
|
INSERT IGNORE INTO `sys_menu` VALUES (1014, '用户导出', 1010, 3, NULL, NULL, NULL, NULL, b'0', b'0', b'0', 'system:user:export', 4, 1, 1, NOW(), NULL, NULL);
|
||||||
INSERT IGNORE INTO `sys_menu` VALUES (1015, '重置密码', 1010, 3, NULL, NULL, NULL, NULL, b'0', b'0', b'0', 'system:user:password:reset', 5, 1, 1, NOW(), NULL, NULL);
|
INSERT IGNORE INTO `sys_menu` VALUES (1015, '重置密码', 1010, 3, NULL, NULL, NULL, NULL, b'0', b'0', b'0', 'system:user:password:reset', 5, 1, 1, NOW(), NULL, NULL);
|
||||||
INSERT IGNORE INTO `sys_menu` VALUES (1016, '分配角色', 1010, 3, NULL, NULL, NULL, NULL, b'0', b'0', b'0', 'system:user:role:update', 6, 1, 1, NOW(), NULL, NULL);
|
INSERT IGNORE INTO `sys_menu` VALUES (1016, '分配角色', 1010, 3, NULL, NULL, NULL, NULL, b'0', b'0', b'0', 'system:user:role:update', 6, 1, 1, NOW(), NULL, NULL);
|
||||||
INSERT IGNORE INTO `sys_menu` VALUES (1020, '角色管理', 1000, 2, '/system/role', 'Role', 'system/role/index', NULL, b'0', b'0', b'0', 'system:role:list', 2, 1, 1, NOW(), NULL, NULL);
|
INSERT IGNORE INTO `sys_menu` VALUES (1020, '角色管理', 1000, 2, '/system/role', 'Role', '/system/role/index', NULL, b'0', b'0', b'0', 'system:role:list', 2, 1, 1, NOW(), NULL, NULL);
|
||||||
INSERT IGNORE INTO `sys_menu` VALUES (1021, '角色新增', 1020, 3, NULL, NULL, NULL, NULL, b'0', b'0', b'0', 'system:role:add', 1, 1, 1, NOW(), NULL, NULL);
|
INSERT IGNORE INTO `sys_menu` VALUES (1021, '角色新增', 1020, 3, NULL, NULL, NULL, NULL, b'0', b'0', b'0', 'system:role:add', 1, 1, 1, NOW(), NULL, NULL);
|
||||||
INSERT IGNORE INTO `sys_menu` VALUES (1022, '角色修改', 1020, 3, NULL, NULL, NULL, NULL, b'0', b'0', b'0', 'system:role:update', 2, 1, 1, NOW(), NULL, NULL);
|
INSERT IGNORE INTO `sys_menu` VALUES (1022, '角色修改', 1020, 3, NULL, NULL, NULL, NULL, b'0', b'0', b'0', 'system:role:update', 2, 1, 1, NOW(), NULL, NULL);
|
||||||
INSERT IGNORE INTO `sys_menu` VALUES (1023, '角色删除', 1020, 3, NULL, NULL, NULL, NULL, b'0', b'0', b'0', 'system:role:delete', 3, 1, 1, NOW(), NULL, NULL);
|
INSERT IGNORE INTO `sys_menu` VALUES (1023, '角色删除', 1020, 3, NULL, NULL, NULL, NULL, b'0', b'0', b'0', 'system:role:delete', 3, 1, 1, NOW(), NULL, NULL);
|
||||||
INSERT IGNORE INTO `sys_menu` VALUES (1024, '角色导出', 1020, 3, NULL, NULL, NULL, NULL, b'0', b'0', b'0', 'system:role:export', 4, 1, 1, NOW(), NULL, NULL);
|
INSERT IGNORE INTO `sys_menu` VALUES (1024, '角色导出', 1020, 3, NULL, NULL, NULL, NULL, b'0', b'0', b'0', 'system:role:export', 4, 1, 1, NOW(), NULL, NULL);
|
||||||
INSERT IGNORE INTO `sys_menu` VALUES (1030, '菜单管理', 1000, 2, '/system/menu', 'Menu', 'system/menu/index', NULL, b'0', b'0', b'0', 'system:menu:list', 3, 1, 1, NOW(), NULL, NULL);
|
INSERT IGNORE INTO `sys_menu` VALUES (1030, '部门管理', 1000, 2, '/system/dept', 'Dept', '/system/dept/index', NULL, b'0', b'0', b'0', 'system:dept:list', 3, 1, 1, NOW(), NULL, NULL);
|
||||||
INSERT IGNORE INTO `sys_menu` VALUES (1031, '菜单新增', 1030, 3, NULL, NULL, NULL, NULL, b'0', b'0', b'0', 'system:menu:add', 1, 1, 1, NOW(), NULL, NULL);
|
INSERT IGNORE INTO `sys_menu` VALUES (1031, '部门新增', 1030, 3, NULL, NULL, NULL, NULL, b'0', b'0', b'0', 'system:dept:add', 1, 1, 1, NOW(), NULL, NULL);
|
||||||
INSERT IGNORE INTO `sys_menu` VALUES (1032, '菜单修改', 1030, 3, NULL, NULL, NULL, NULL, b'0', b'0', b'0', 'system:menu:update', 2, 1, 1, NOW(), NULL, NULL);
|
INSERT IGNORE INTO `sys_menu` VALUES (1032, '部门修改', 1030, 3, NULL, NULL, NULL, NULL, b'0', b'0', b'0', 'system:dept:update', 2, 1, 1, NOW(), NULL, NULL);
|
||||||
INSERT IGNORE INTO `sys_menu` VALUES (1033, '菜单删除', 1030, 3, NULL, NULL, NULL, NULL, b'0', b'0', b'0', 'system:menu:delete', 3, 1, 1, NOW(), NULL, NULL);
|
INSERT IGNORE INTO `sys_menu` VALUES (1033, '部门删除', 1030, 3, NULL, NULL, NULL, NULL, b'0', b'0', b'0', 'system:dept:delete', 3, 1, 1, NOW(), NULL, NULL);
|
||||||
INSERT IGNORE INTO `sys_menu` VALUES (1034, '菜单导出', 1030, 3, NULL, NULL, NULL, NULL, b'0', b'0', b'0', 'system:menu:export', 4, 1, 1, NOW(), NULL, NULL);
|
INSERT IGNORE INTO `sys_menu` VALUES (1034, '部门导出', 1030, 3, NULL, NULL, NULL, NULL, b'0', b'0', b'0', 'system:dept:export', 4, 1, 1, NOW(), NULL, NULL);
|
||||||
INSERT IGNORE INTO `sys_menu` VALUES (1040, '部门管理', 1000, 2, '/system/dept', 'Dept', 'system/dept/index', NULL, b'0', b'0', b'0', 'system:dept:list', 4, 1, 1, NOW(), NULL, NULL);
|
INSERT IGNORE INTO `sys_menu` VALUES (1900, '菜单管理', 1000, 2, '/system/menu', 'Menu', '/system/menu/index', NULL, b'0', b'0', b'0', 'system:menu:list', 999, 1, 1, NOW(), NULL, NULL);
|
||||||
INSERT IGNORE INTO `sys_menu` VALUES (1041, '部门新增', 1040, 3, NULL, NULL, NULL, NULL, b'0', b'0', b'0', 'system:dept:add', 1, 1, 1, NOW(), NULL, NULL);
|
INSERT IGNORE INTO `sys_menu` VALUES (1901, '菜单新增', 1900, 3, NULL, NULL, NULL, NULL, b'0', b'0', b'0', 'system:menu:add', 1, 1, 1, NOW(), NULL, NULL);
|
||||||
INSERT IGNORE INTO `sys_menu` VALUES (1042, '部门修改', 1040, 3, NULL, NULL, NULL, NULL, b'0', b'0', b'0', 'system:dept:update', 2, 1, 1, NOW(), NULL, NULL);
|
INSERT IGNORE INTO `sys_menu` VALUES (1902, '菜单修改', 1900, 3, NULL, NULL, NULL, NULL, b'0', b'0', b'0', 'system:menu:update', 2, 1, 1, NOW(), NULL, NULL);
|
||||||
INSERT IGNORE INTO `sys_menu` VALUES (1043, '部门删除', 1040, 3, NULL, NULL, NULL, NULL, b'0', b'0', b'0', 'system:dept:delete', 3, 1, 1, NOW(), NULL, NULL);
|
INSERT IGNORE INTO `sys_menu` VALUES (1903, '菜单删除', 1900, 3, NULL, NULL, NULL, NULL, b'0', b'0', b'0', 'system:menu:delete', 3, 1, 1, NOW(), NULL, NULL);
|
||||||
INSERT IGNORE INTO `sys_menu` VALUES (1044, '部门导出', 1040, 3, NULL, NULL, NULL, NULL, b'0', b'0', b'0', 'system:dept:export', 4, 1, 1, NOW(), NULL, NULL);
|
INSERT IGNORE INTO `sys_menu` VALUES (1904, '菜单导出', 1900, 3, NULL, NULL, NULL, NULL, b'0', b'0', b'0', 'system:menu:export', 4, 1, 1, NOW(), NULL, NULL);
|
||||||
INSERT IGNORE INTO `sys_menu` VALUES (2000, '系统监控', 0, 1, 'monitor', NULL, NULL, 'computer', b'0', b'0', b'0', NULL, 2, 1, 1, NOW(), NULL, NULL);
|
INSERT IGNORE INTO `sys_menu` VALUES (9000, '系统监控', 0, 1, '/monitor', NULL, NULL, 'computer', b'0', b'0', b'0', NULL, 899, 1, 1, NOW(), NULL, NULL);
|
||||||
INSERT IGNORE INTO `sys_menu` VALUES (2010, '在线用户', 2000, 2, '/monitor/online', 'OnlineUser', 'monitor/online/index', NULL, b'0', b'0', b'0', 'monitor:online:user:list', 1, 1, 1, NOW(), NULL, NULL);
|
INSERT IGNORE INTO `sys_menu` VALUES (9010, '在线用户', 9000, 2, '/monitor/online', 'OnlineUser', '/monitor/online/index', NULL, b'0', b'0', b'0', 'monitor:online:user:list', 1, 1, 1, NOW(), NULL, NULL);
|
||||||
INSERT IGNORE INTO `sys_menu` VALUES (2011, '强退用户', 2010, 3, NULL, NULL, NULL, NULL, b'0', b'0', b'0', 'monitor:online:user:delete', 1, 1, 1, NOW(), NULL, NULL);
|
INSERT IGNORE INTO `sys_menu` VALUES (9011, '强退用户', 9010, 3, NULL, NULL, NULL, NULL, b'0', b'0', b'0', 'monitor:online:user:delete', 1, 1, 1, NOW(), NULL, NULL);
|
||||||
INSERT IGNORE INTO `sys_menu` VALUES (2030, '登录日志', 2000, 2, '/monitor/log/login', 'LoginLog', 'monitor/log/login/index', NULL, b'0', b'0', b'0', 'monitor:log:login:list', 2, 1, 1, NOW(), NULL, NULL);
|
INSERT IGNORE INTO `sys_menu` VALUES (9030, '登录日志', 9000, 2, '/monitor/log/login', 'LoginLog', '/monitor/log/login/index', NULL, b'0', b'0', b'0', 'monitor:log:login:list', 2, 1, 1, NOW(), NULL, NULL);
|
||||||
INSERT IGNORE INTO `sys_menu` VALUES (2050, '操作日志', 2000, 2, '/monitor/log/operation', 'OperationLog', 'monitor/log/operation/index', NULL, b'0', b'0', b'0', 'monitor:log:operation:list', 3, 1, 1, NOW(), NULL, NULL);
|
INSERT IGNORE INTO `sys_menu` VALUES (9050, '操作日志', 9000, 2, '/monitor/log/operation', 'OperationLog', '/monitor/log/operation/index', NULL, b'0', b'0', b'0', 'monitor:log:operation:list', 3, 1, 1, NOW(), NULL, NULL);
|
||||||
INSERT IGNORE INTO `sys_menu` VALUES (2070, '系统日志', 2000, 2, '/monitor/log/system', 'SystemLog', 'monitor/log/system/index', NULL, b'0', b'0', b'0', 'monitor:log:system:list', 4, 1, 1, NOW(), NULL, NULL);
|
INSERT IGNORE INTO `sys_menu` VALUES (9070, '系统日志', 9000, 2, '/monitor/log/system', 'SystemLog', '/monitor/log/system/index', NULL, b'0', b'0', b'0', 'monitor:log:system:list', 4, 1, 1, NOW(), NULL, NULL);
|
||||||
INSERT IGNORE INTO `sys_menu` VALUES (10000, 'Arco Design Vue', 0, 1, 'https://arco.design/vue/docs/start', NULL, NULL, 'link', b'1', b'0', b'0', NULL, 100, 1, 1, NOW(), NULL, NULL);
|
INSERT IGNORE INTO `sys_menu` VALUES (10000, 'Arco Design Vue', 0, 1, 'https://arco.design/vue/docs/start', NULL, NULL, 'link', b'1', b'0', b'0', NULL, 998, 1, 1, NOW(), NULL, NULL);
|
||||||
INSERT IGNORE INTO `sys_menu` VALUES (10001, 'GitHub', 0, 1, 'https://github.com/Charles7c/continew-admin', NULL, NULL, 'github', b'1', b'0', b'0', NULL, 101, 1, 1, NOW(), NULL, NULL);
|
INSERT IGNORE INTO `sys_menu` VALUES (10001, 'GitHub', 0, 1, 'https://github.com/Charles7c/continew-admin', NULL, NULL, 'github', b'1', b'0', b'0', NULL, 999, 1, 1, NOW(), NULL, NULL);
|
||||||
|
|
||||||
-- 初始化默认部门
|
-- 初始化默认部门
|
||||||
INSERT IGNORE INTO `sys_dept` VALUES (1, 'Xxx科技有限公司', 0, '0', '系统初始部门', 1, 1, 1, 1, NOW(), NULL, NULL);
|
INSERT IGNORE INTO `sys_dept` VALUES (1, 'Xxx科技有限公司', 0, '0', '系统初始部门', 1, 1, 1, 1, NOW(), NULL, NULL);
|
||||||
|
@ -1,2 +1,10 @@
|
|||||||
-- liquibase formatted sql
|
-- liquibase formatted sql
|
||||||
|
|
||||||
|
-- changeset Charles7c:1
|
||||||
|
INSERT IGNORE INTO `sys_menu` VALUES (1040, '公告管理', 1000, 2, '/system/announcement', 'Announcement', 'system/announcement/index', NULL, b'0', b'0', b'0', 'system:announcement:list', 4, 1, 1, NOW(), NULL, NULL);
|
||||||
|
INSERT IGNORE INTO `sys_menu` VALUES (1041, '公告新增', 1040, 3, NULL, NULL, NULL, NULL, b'0', b'0', b'0', 'system:announcement:add', 1, 1, 1, NOW(), NULL, NULL);
|
||||||
|
INSERT IGNORE INTO `sys_menu` VALUES (1042, '公告修改', 1040, 3, NULL, NULL, NULL, NULL, b'0', b'0', b'0', 'system:announcement:update', 2, 1, 1, NOW(), NULL, NULL);
|
||||||
|
INSERT IGNORE INTO `sys_menu` VALUES (1043, '公告删除', 1040, 3, NULL, NULL, NULL, NULL, b'0', b'0', b'0', 'system:announcement:delete', 3, 1, 1, NOW(), NULL, NULL);
|
||||||
|
INSERT IGNORE INTO `sys_menu` VALUES (1044, '公告导出', 1040, 3, NULL, NULL, NULL, NULL, b'0', b'0', b'0', 'system:announcement:export', 4, 1, 1, NOW(), NULL, NULL);
|
||||||
|
INSERT IGNORE INTO `sys_menu` VALUES (2000, '系统工具', 0, 1, '/tool', NULL, NULL, 'tool', b'0', b'0', b'0', NULL, 2, 1, 1, NOW(), NULL, NULL);
|
||||||
|
INSERT IGNORE INTO `sys_menu` VALUES (2010, '代码生成', 2000, 2, '/tool/generator', 'Generator', '/tool/generator/index', NULL, b'0', b'0', b'0', 'tool:generator:list', 1, 1, 1, NOW(), NULL, NULL);
|
Loading…
Reference in New Issue
Block a user