增加了论文首页(郑瑜甜)

pull/1136/head
15892072232 2025-10-30 09:32:58 +08:00
parent 1d9b584e2f
commit fd4f0ef3ae
4 changed files with 26 additions and 67 deletions

View File

@ -1,44 +0,0 @@
import request from '@/utils/request'
// 查询学生信息列表
export function listInfo(query) {
return request({
url: '/system/info/list',
method: 'get',
params: query
})
}
// 查询学生信息详细
export function getInfo(studentId) {
return request({
url: '/system/info/' + studentId,
method: 'get'
})
}
// 新增学生信息
export function addInfo(data) {
return request({
url: '/system/info',
method: 'post',
data: data
})
}
// 修改学生信息
export function updateInfo(data) {
return request({
url: '/system/info',
method: 'put',
data: data
})
}
// 删除学生信息
export function delInfo(studentId) {
return request({
url: '/system/info/' + studentId,
method: 'delete'
})
}

View File

@ -70,7 +70,7 @@ export const constantRoutes = [
path: 'index',
component: () => import('@/views/dashboard/index'),
name: 'Index',
meta: { title: '论文首页(郑', icon: 'dashboard', affix: true }
meta: { title: '论文首页(郑瑜甜', icon: 'dashboard', affix: true }
}
]
},
@ -92,6 +92,21 @@ export const constantRoutes = [
// 动态路由,基于用户权限动态去加载
export const dynamicRoutes = [
{
path: '/student',
component: Layout,
alwaysShow: true,
permissions: ['student:info:list'],
meta: { title: '学生管理', icon: 'student' },
children: [
{
path: 'info',
component: () => import('@/views/student/info/index'),
name: 'StudentInfo',
meta: { title: '学生信息管理', permissions: ['student:info:list'] }
}
]
},
{
path: '/system/user-auth',
component: Layout,

View File

@ -65,6 +65,11 @@ const permission = {
// 遍历后台传来的路由字符串,转换为组件对象
function filterAsyncRouter(asyncRouterMap, lastRouter = false, type = false) {
return asyncRouterMap.filter(route => {
// 只排除特定的学生信息模块路由,保留我们的学生管理模块
if (route.path === '/student-info') {
return false;
}
if (type && route.children) {
route.children = filterChildren(route.children)
}
@ -81,7 +86,12 @@ function filterAsyncRouter(asyncRouterMap, lastRouter = false, type = false) {
}
}
if (route.children != null && route.children && route.children.length) {
// 递归过滤子路由
route.children = filterAsyncRouter(route.children, route, type)
// 如果子路由都被过滤掉了,这个父路由也应该被过滤
if (route.children.length === 0) {
return false;
}
} else {
delete route['children']
delete route['redirect']

View File

@ -1,22 +0,0 @@
-- 菜单 SQL
insert into sys_menu (menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, perms, icon, create_by, create_time, update_by, update_time, remark)
values('学生信息', '3', '1', 'info', 'system/info/index', 1, 0, 'C', '0', '0', 'system:info:list', '#', 'admin', sysdate(), '', null, '学生信息菜单');
-- 按钮父菜单ID
SELECT @parentId := LAST_INSERT_ID();
-- 按钮 SQL
insert into sys_menu (menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, perms, icon, create_by, create_time, update_by, update_time, remark)
values('学生信息查询', @parentId, '1', '#', '', 1, 0, 'F', '0', '0', 'system:info:query', '#', 'admin', sysdate(), '', null, '');
insert into sys_menu (menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, perms, icon, create_by, create_time, update_by, update_time, remark)
values('学生信息新增', @parentId, '2', '#', '', 1, 0, 'F', '0', '0', 'system:info:add', '#', 'admin', sysdate(), '', null, '');
insert into sys_menu (menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, perms, icon, create_by, create_time, update_by, update_time, remark)
values('学生信息修改', @parentId, '3', '#', '', 1, 0, 'F', '0', '0', 'system:info:edit', '#', 'admin', sysdate(), '', null, '');
insert into sys_menu (menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, perms, icon, create_by, create_time, update_by, update_time, remark)
values('学生信息删除', @parentId, '4', '#', '', 1, 0, 'F', '0', '0', 'system:info:remove', '#', 'admin', sysdate(), '', null, '');
insert into sys_menu (menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, perms, icon, create_by, create_time, update_by, update_time, remark)
values('学生信息导出', @parentId, '5', '#', '', 1, 0, 'F', '0', '0', 'system:info:export', '#', 'admin', sysdate(), '', null, '');