初步修改前端
This commit is contained in:
@@ -99,10 +99,10 @@ CREATE TABLE `tb_sys_permission` (
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci;
|
||||
|
||||
INSERT INTO `tb_sys_permission` (id,permission_id, name, code, description) VALUES
|
||||
('1','perm_user_manage', '用户管理', 'user:manage', '用户管理权限'),
|
||||
('2','perm_role_manage', '角色管理', 'role:manage', '角色管理权限'),
|
||||
('3','perm_dept_manage', '部门管理', 'dept:manage', '部门管理权限'),
|
||||
('4','perm_permission_manage', '权限管理', 'permission:manage', '权限管理权限');
|
||||
('1','perm_system_dept_manage', '系统部门查看', 'system:dept:manage', '系统部门查看权限'),
|
||||
('2','perm_system_menu_manage', '系统菜单查看', 'system:menu:manage', '系统菜单查看权限'),
|
||||
('3','perm_system_permission_manage', '系统权限查看', 'system:permission:manage', '系统权限查看权限'),
|
||||
('4','perm_system_role_manage', '系统角色查看', 'system:role:manage', '系统角色查看权限');
|
||||
|
||||
-- 角色-权限关联
|
||||
DROP TABLE IF EXISTS `tb_sys_role_permission`;
|
||||
@@ -121,15 +121,10 @@ CREATE TABLE `tb_sys_role_permission` (
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci;
|
||||
|
||||
INSERT INTO `tb_sys_role_permission` (id, role_id, permission_id) VALUES
|
||||
('1', 'admin', 'perm_user_manage'),
|
||||
('2', 'admin', 'perm_role_manage'),
|
||||
('3', 'admin', 'perm_dept_manage'),
|
||||
('4', 'admin', 'perm_permission_manage'),
|
||||
('5', 'admin', 'perm_dashboard'),
|
||||
('6', 'admin', 'perm_user_manage'),
|
||||
('7', 'admin', 'perm_role_manage'),
|
||||
('8', 'admin', 'perm_dept_manage'),
|
||||
('9', 'admin', 'perm_permission_manage');
|
||||
('1', 'admin', 'perm_system_dept_manage'),
|
||||
('2', 'admin', 'perm_system_menu_manage'),
|
||||
('3', 'admin', 'perm_system_permission_manage'),
|
||||
('4', 'admin', 'perm_system_role_manage');
|
||||
|
||||
-- 菜单表
|
||||
DROP TABLE IF EXISTS `tb_sys_menu`;
|
||||
@@ -155,17 +150,11 @@ CREATE TABLE `tb_sys_menu` (
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci;
|
||||
|
||||
-- Insert default menus
|
||||
INSERT INTO `tb_sys_menu` (id,menu_id, name, parent_id, url, icon, order_num, type) VALUES
|
||||
('1','menu_dashboard', '仪表盘', NULL, '/dashboard', 'dashboard', 1, 1),
|
||||
('2','menu_user_mgmt', '用户管理', NULL, '/user-management', 'user', 2, 1),
|
||||
('3','menu_role_mgmt', '角色管理', NULL, '/role-management', 'team', 3, 1),
|
||||
('4','menu_dept_mgmt', '部门管理', NULL, '/dept-management', 'apartment', 4, 1),
|
||||
('5','menu_permission_mgmt', '权限管理', NULL, '/permission-management', 'safety-certificate', 5, 1),
|
||||
('6','menu_dashboard', '仪表盘', NULL, '/dashboard', 'dashboard', 6, 1),
|
||||
('7','menu_user_mgmt', '用户管理', NULL, '/user-management', 'user', 7, 1),
|
||||
('8','menu_role_mgmt', '角色管理', NULL, '/role-management', 'team', 8, 1),
|
||||
('9','menu_dept_mgmt', '部门管理', NULL, '/dept-management', 'apartment', 9, 1),
|
||||
('10','menu_permission_mgmt', '权限管理', NULL, '/permission-management', 'safety-certificate', 10, 1);
|
||||
INSERT INTO `tb_sys_menu` (id,menu_id, name, parent_id, url, component, icon, order_num, type) VALUES
|
||||
('1','menu_system_dept', '部门管理', NULL, '/manage/system/dept', 'manage/system/DeptManageView', 'el-icon-office-building', 1, 1),
|
||||
('2','menu_system_menu', '菜单管理', NULL, '/manage/system/menu', 'manage/system/MenuManageView', 'el-icon-menu', 2, 1),
|
||||
('3','menu_system_permission', '权限管理', NULL, '/manage/system/permission', 'manage/system/PermissionManageView', 'el-icon-key', 3, 1),
|
||||
('4','menu_system_role', '角色管理', NULL, '/manage/system/role', 'manage/system/RoleManageView', 'el-icon-user', 4, 1);
|
||||
|
||||
DROP TABLE IF EXISTS `tb_sys_menu_permission`;
|
||||
CREATE TABLE `tb_sys_menu_permission` (
|
||||
@@ -181,10 +170,9 @@ CREATE TABLE `tb_sys_menu_permission` (
|
||||
PRIMARY KEY (`id`),
|
||||
UNIQUE KEY `uk_menu_permission` (`menu_id`, `permission_id`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci;
|
||||
-- Insert default role-menu associations for admin role
|
||||
-- Insert menu-permission associations
|
||||
INSERT INTO `tb_sys_menu_permission` (id, permission_id, menu_id) VALUES
|
||||
('1', 'perm_dashboard', 'menu_dashboard'),
|
||||
('2', 'perm_user_manage', 'menu_user_mgmt'),
|
||||
('3', 'perm_role_manage', 'menu_role_mgmt'),
|
||||
('4', 'perm_dept_manage', 'menu_dept_mgmt'),
|
||||
('5', 'perm_permission_manage', 'menu_permission_mgmt');
|
||||
('1', 'perm_system_dept_manage', 'menu_system_dept'),
|
||||
('2', 'perm_system_menu_manage', 'menu_system_menu'),
|
||||
('3', 'perm_system_permission_manage', 'menu_system_permission'),
|
||||
('4', 'perm_system_role_manage', 'menu_system_role');
|
||||
@@ -9,6 +9,7 @@
|
||||
<result column="name" property="name" jdbcType="VARCHAR"/>
|
||||
<result column="parent_id" property="parentID" jdbcType="VARCHAR"/>
|
||||
<result column="url" property="url" jdbcType="VARCHAR"/>
|
||||
<result column="component" property="component" jdbcType="VARCHAR"/>
|
||||
<result column="icon" property="icon" jdbcType="VARCHAR"/>
|
||||
<result column="order_num" property="orderNum" jdbcType="INTEGER"/>
|
||||
<result column="type" property="type" jdbcType="INTEGER"/>
|
||||
@@ -22,7 +23,7 @@
|
||||
|
||||
<!-- 基础字段 -->
|
||||
<sql id="Base_Column_List">
|
||||
m.id, m.menu_id, m.name, m.parent_id, m.url, m.icon, m.order_num, m.type,
|
||||
m.id, m.menu_id, m.name, m.parent_id, m.url, m.component, m.icon, m.order_num, m.type,
|
||||
m.creator, m.updater, m.create_time, m.update_time, m.delete_time, m.deleted
|
||||
</sql>
|
||||
|
||||
@@ -125,6 +126,7 @@
|
||||
<if test="name != null">name,</if>
|
||||
<if test="type != null">type,</if>
|
||||
<if test="url != null">url,</if>
|
||||
<if test="component != null">component,</if>
|
||||
<if test="icon != null">icon,</if>
|
||||
<if test="creator != null">creator,</if>
|
||||
<if test="createTime != null">create_time,</if>
|
||||
@@ -137,6 +139,7 @@
|
||||
<if test="name != null">#{name},</if>
|
||||
<if test="type != null">#{type},</if>
|
||||
<if test="url != null">#{url},</if>
|
||||
<if test="component != null">#{component},</if>
|
||||
<if test="icon != null">#{icon},</if>
|
||||
<if test="creator != null">#{creator},</if>
|
||||
<if test="createTime != null">#{createTime},</if>
|
||||
@@ -153,6 +156,7 @@
|
||||
<if test="name != null">name = #{name},</if>
|
||||
<if test="type != null">type = #{type},</if>
|
||||
<if test="url != null">url = #{url},</if>
|
||||
<if test="component != null">component = #{component},</if>
|
||||
<if test="icon != null">icon = #{icon},</if>
|
||||
<if test="updater != null">updater = #{updater},</if>
|
||||
update_time = NOW()
|
||||
|
||||
@@ -1,8 +1,5 @@
|
||||
<template>
|
||||
<div>
|
||||
<nav>
|
||||
<router-link to="/about">About</router-link>
|
||||
</nav>
|
||||
<router-view />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@@ -11,7 +11,7 @@ const routes: Array<RouteRecordRaw> = [
|
||||
{
|
||||
path: "/login",
|
||||
name: "Login",
|
||||
component: () => import("@/views/Login.vue"),
|
||||
component: () => import("@/views/login/Login.vue"),
|
||||
meta: {
|
||||
title: "登录",
|
||||
requiresAuth: false,
|
||||
@@ -20,7 +20,7 @@ const routes: Array<RouteRecordRaw> = [
|
||||
{
|
||||
path: "/register",
|
||||
name: "Register",
|
||||
component: () => import("@/views/Register.vue"),
|
||||
component: () => import("@/views/login/Register.vue"),
|
||||
meta: {
|
||||
title: "注册",
|
||||
requiresAuth: false,
|
||||
@@ -29,7 +29,7 @@ const routes: Array<RouteRecordRaw> = [
|
||||
{
|
||||
path: "/forgot-password",
|
||||
name: "ForgotPassword",
|
||||
component: () => import("@/views/ForgotPassword.vue"),
|
||||
component: () => import("@/views/login/ForgotPassword.vue"),
|
||||
meta: {
|
||||
title: "忘记密码",
|
||||
requiresAuth: false,
|
||||
@@ -85,16 +85,6 @@ const routes: Array<RouteRecordRaw> = [
|
||||
requiresAuth: false,
|
||||
},
|
||||
},
|
||||
// 旧的about路由,保持兼容
|
||||
{
|
||||
path: "/about",
|
||||
name: "About",
|
||||
component: () => import("@/views/AboutView.vue"),
|
||||
meta: {
|
||||
title: "关于",
|
||||
requiresAuth: false,
|
||||
},
|
||||
},
|
||||
// 捕获所有未匹配的路由
|
||||
{
|
||||
path: "/:pathMatch(.*)*",
|
||||
|
||||
@@ -1,5 +0,0 @@
|
||||
<template>
|
||||
<div class="about">
|
||||
<h1>This is an about page</h1>
|
||||
</div>
|
||||
</template>
|
||||
0
schoolNewsWeb/src/views/Home.vue
Normal file
0
schoolNewsWeb/src/views/Home.vue
Normal file
@@ -37,7 +37,7 @@
|
||||
/>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item prop="captcha" v-if="showCaptcha">
|
||||
<!-- <el-form-item prop="captcha" v-if="showCaptcha">
|
||||
<div class="captcha-input">
|
||||
<el-input
|
||||
v-model="loginForm.captcha"
|
||||
@@ -50,7 +50,7 @@
|
||||
<div class="captcha-loading" v-else>加载中...</div>
|
||||
</div>
|
||||
</div>
|
||||
</el-form-item>
|
||||
</el-form-item> -->
|
||||
|
||||
<el-form-item>
|
||||
<div class="login-options">
|
||||
105
schoolNewsWeb/src/views/manage/system/index.ts
Normal file
105
schoolNewsWeb/src/views/manage/system/index.ts
Normal file
@@ -0,0 +1,105 @@
|
||||
/**
|
||||
* @description 系统管理模块统一导出入口
|
||||
* @author yslg
|
||||
* @since 2025-10-07
|
||||
*/
|
||||
|
||||
// 部门管理
|
||||
export { default as DeptManageView } from './DeptManageView.vue';
|
||||
|
||||
// 菜单管理
|
||||
export { default as MenuManageView } from './MenuManageView.vue';
|
||||
|
||||
// 权限管理
|
||||
export { default as PermissionManageView } from './PermissionManageView.vue';
|
||||
|
||||
// 角色管理
|
||||
export { default as RoleManageView } from './RoleManageView.vue';
|
||||
|
||||
// 系统管理模块类型定义
|
||||
export interface SystemManageModule {
|
||||
/** 部门管理组件 */
|
||||
DeptManageView: any;
|
||||
/** 菜单管理组件 */
|
||||
MenuManageView: any;
|
||||
/** 权限管理组件 */
|
||||
PermissionManageView: any;
|
||||
/** 角色管理组件 */
|
||||
RoleManageView: any;
|
||||
}
|
||||
|
||||
// 系统管理路由配置
|
||||
export const systemManageRoutes = [
|
||||
{
|
||||
path: '/manage/system/dept',
|
||||
name: 'DeptManage',
|
||||
component: () => import('./DeptManageView.vue'),
|
||||
meta: {
|
||||
title: '部门管理',
|
||||
requiresAuth: true,
|
||||
permissions: ['system:dept:manage']
|
||||
}
|
||||
},
|
||||
{
|
||||
path: '/manage/system/menu',
|
||||
name: 'MenuManage',
|
||||
component: () => import('./MenuManageView.vue'),
|
||||
meta: {
|
||||
title: '菜单管理',
|
||||
requiresAuth: true,
|
||||
permissions: ['system:menu:manage']
|
||||
}
|
||||
},
|
||||
{
|
||||
path: '/manage/system/permission',
|
||||
name: 'PermissionManage',
|
||||
component: () => import('./PermissionManageView.vue'),
|
||||
meta: {
|
||||
title: '权限管理',
|
||||
requiresAuth: true,
|
||||
permissions: ['system:permission:manage']
|
||||
}
|
||||
},
|
||||
{
|
||||
path: '/manage/system/role',
|
||||
name: 'RoleManage',
|
||||
component: () => import('./RoleManageView.vue'),
|
||||
meta: {
|
||||
title: '角色管理',
|
||||
requiresAuth: true,
|
||||
permissions: ['system:role:manage']
|
||||
}
|
||||
}
|
||||
];
|
||||
|
||||
// 系统管理菜单配置
|
||||
export const systemManageMenus = [
|
||||
{
|
||||
id: 'system-dept',
|
||||
title: '部门管理',
|
||||
icon: 'el-icon-office-building',
|
||||
path: '/manage/system/dept',
|
||||
permissions: ['system:dept:manage']
|
||||
},
|
||||
{
|
||||
id: 'system-menu',
|
||||
title: '菜单管理',
|
||||
icon: 'el-icon-menu',
|
||||
path: '/manage/system/menu',
|
||||
permissions: ['system:menu:manage']
|
||||
},
|
||||
{
|
||||
id: 'system-permission',
|
||||
title: '权限管理',
|
||||
icon: 'el-icon-key',
|
||||
path: '/manage/system/permission',
|
||||
permissions: ['system:permission:manage']
|
||||
},
|
||||
{
|
||||
id: 'system-role',
|
||||
title: '角色管理',
|
||||
icon: 'el-icon-user',
|
||||
path: '/manage/system/role',
|
||||
permissions: ['system:role:manage']
|
||||
}
|
||||
];
|
||||
Reference in New Issue
Block a user