菜单管理
This commit is contained in:
24
frontend/src/api/resource/interface/index.ts
Normal file
24
frontend/src/api/resource/interface/index.ts
Normal file
@@ -0,0 +1,24 @@
|
||||
import type { DefineComponent } from "vue";
|
||||
import type { DatetimeFormatProps } from "vue-i18n";
|
||||
|
||||
// 菜单管理模块
|
||||
export namespace Resource {
|
||||
// 菜单列表
|
||||
export interface ResResourceList {
|
||||
id: string;//资源表Id
|
||||
name: string;//名称
|
||||
path:string;//路径
|
||||
sort:number;//排序
|
||||
type:string;//资源类型
|
||||
remark:string;//资源描述
|
||||
route_Name:string;//路由名称
|
||||
create_Time:string;//创建时间
|
||||
update_Time:string;//更新时间
|
||||
children?: ResResourceList[];
|
||||
}
|
||||
|
||||
export interface ResType {
|
||||
userLabel: string;
|
||||
userValue: number;
|
||||
}
|
||||
}
|
||||
249
frontend/src/api/resource/resourceData.ts
Normal file
249
frontend/src/api/resource/resourceData.ts
Normal file
@@ -0,0 +1,249 @@
|
||||
import { HomeFilled, Operation } from "@element-plus/icons-vue"
|
||||
import type { Resource } from "./interface"
|
||||
|
||||
const resourcedata = ref<Resource.ResResourceList[]>([
|
||||
{
|
||||
'id': '1',
|
||||
'name': '检测计划',
|
||||
'path':'/plan/planList/index',
|
||||
'sort':1,
|
||||
'type':'菜单',
|
||||
'remark':'检测计划描述',
|
||||
'route_Name':'route',
|
||||
'create_Time': '2024-10-16 12:13:14',
|
||||
'update_Time':'2024-10-16 12:13:14',
|
||||
},
|
||||
{
|
||||
'id': '2',
|
||||
'name': '台账管理',
|
||||
'path':'/plan/planList/index',
|
||||
'sort':2,
|
||||
'type':'菜单',
|
||||
'remark':'检测计划描述',
|
||||
'route_Name':'route',
|
||||
'create_Time': '2024-10-16 12:13:14',
|
||||
'update_Time':'2024-10-16 12:13:14',
|
||||
children:[{
|
||||
'id': '21',
|
||||
'name': '检测脚本',
|
||||
|
||||
'path':'/plan/planList/index',
|
||||
'sort':21,
|
||||
'type':'菜单',
|
||||
'remark':'检测计划描述',
|
||||
'route_Name':'route',
|
||||
'create_Time': '2024-10-16 12:13:14',
|
||||
'update_Time':'2024-10-16 12:13:14',
|
||||
},
|
||||
{
|
||||
'id': '22',
|
||||
'name': '被检设备',
|
||||
|
||||
'path':'/plan/planList/index',
|
||||
'sort':22,
|
||||
'type':'菜单',
|
||||
'remark':'检测计划描述',
|
||||
'route_Name':'route',
|
||||
'create_Time': '2024-10-16 12:13:14',
|
||||
'update_Time':'2024-10-16 12:13:14',
|
||||
},
|
||||
{
|
||||
'id': '23',
|
||||
'name': '误差体系',
|
||||
|
||||
'path':'/plan/planList/index',
|
||||
'sort':23,
|
||||
'type':'菜单',
|
||||
'remark':'检测计划描述',
|
||||
'route_Name':'route',
|
||||
'create_Time': '2024-10-16 12:13:14',
|
||||
'update_Time':'2024-10-16 12:13:14',
|
||||
},{
|
||||
'id': '24',
|
||||
'name': '检测源',
|
||||
|
||||
'path':'/plan/planList/index',
|
||||
'sort':24,
|
||||
'type':'菜单',
|
||||
'remark':'检测计划描述',
|
||||
'route_Name':'route',
|
||||
'create_Time': '2024-10-16 12:13:14',
|
||||
'update_Time':'2024-10-16 12:13:14',
|
||||
}
|
||||
|
||||
]
|
||||
},
|
||||
{
|
||||
'id': '3',
|
||||
'name': '权限管理',
|
||||
|
||||
'path':'/plan/planList/index',
|
||||
'sort':3,
|
||||
'type':'菜单',
|
||||
'remark':'检测计划描述',
|
||||
'route_Name':'route',
|
||||
'create_Time': '2024-10-16 12:13:14',
|
||||
'update_Time':'2024-10-16 12:13:14',
|
||||
children:[{
|
||||
'id': '31',
|
||||
'name': '用户管理',
|
||||
|
||||
'path':'/plan/planList/index',
|
||||
'sort':31,
|
||||
'type':'菜单',
|
||||
'remark':'检测计划描述',
|
||||
'route_Name':'route',
|
||||
'create_Time': '2024-10-16 12:13:14',
|
||||
'update_Time':'2024-10-16 12:13:14',
|
||||
},
|
||||
{
|
||||
'id': '32',
|
||||
'name': '角色管理',
|
||||
|
||||
'path':'/plan/planList/index',
|
||||
'sort':32,
|
||||
'type':'菜单',
|
||||
'remark':'检测计划描述',
|
||||
'route_Name':'route',
|
||||
'create_Time': '2024-10-16 12:13:14',
|
||||
'update_Time':'2024-10-16 12:13:14',
|
||||
},
|
||||
{
|
||||
'id': '33',
|
||||
'name': '菜单管理',
|
||||
|
||||
'path':'/plan/planList/index',
|
||||
'sort':33,
|
||||
'type':'菜单',
|
||||
'remark':'检测计划描述',
|
||||
'route_Name':'route',
|
||||
'create_Time': '2024-10-16 12:13:14',
|
||||
'update_Time':'2024-10-16 12:13:14',
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
'id': '4',
|
||||
'name': '系统配置',
|
||||
|
||||
'path':'/plan/planList/index',
|
||||
'sort':4,
|
||||
'type':'菜单',
|
||||
'remark':'检测计划描述',
|
||||
'route_Name':'route',
|
||||
'create_Time': '2024-10-16 12:13:14',
|
||||
'update_Time':'2024-10-16 12:13:14',
|
||||
children:[{
|
||||
'id': '41',
|
||||
'name': '通用配置',
|
||||
|
||||
'path':'/plan/planList/index',
|
||||
'sort':41,
|
||||
'type':'菜单',
|
||||
'remark':'检测计划描述',
|
||||
'route_Name':'route',
|
||||
'create_Time': '2024-10-16 12:13:14',
|
||||
'update_Time':'2024-10-16 12:13:14',
|
||||
},
|
||||
{
|
||||
'id': '42',
|
||||
'name': '数据字典',
|
||||
|
||||
'path':'/plan/planList/index',
|
||||
'sort':42,
|
||||
'type':'菜单',
|
||||
'remark':'检测计划描述',
|
||||
'route_Name':'route',
|
||||
'create_Time': '2024-10-16 12:13:14',
|
||||
'update_Time':'2024-10-16 12:13:14',
|
||||
},
|
||||
{
|
||||
'id': '43',
|
||||
'name': '报告模版',
|
||||
|
||||
'path':'/plan/planList/index',
|
||||
'sort':43,
|
||||
'type':'菜单',
|
||||
'remark':'检测计划描述',
|
||||
'route_Name':'route',
|
||||
'create_Time': '2024-10-16 12:13:14',
|
||||
'update_Time':'2024-10-16 12:13:14',
|
||||
},{
|
||||
'id': '44',
|
||||
'name': '版本注册',
|
||||
|
||||
'path':'/plan/planList/index',
|
||||
'sort':44,
|
||||
'type':'菜单',
|
||||
'remark':'检测计划描述',
|
||||
'route_Name':'route',
|
||||
'create_Time': '2024-10-16 12:13:14',
|
||||
'update_Time':'2024-10-16 12:13:14',
|
||||
}
|
||||
|
||||
]
|
||||
},
|
||||
{
|
||||
'id': '5',
|
||||
'name': '日志管理',
|
||||
|
||||
'path':'/plan/planList/index',
|
||||
'sort':5,
|
||||
'type':'菜单',
|
||||
'remark':'检测计划描述',
|
||||
'route_Name':'route',
|
||||
'create_Time': '2024-10-16 12:13:14',
|
||||
'update_Time':'2024-10-16 12:13:14',
|
||||
},
|
||||
{
|
||||
'id': '6',
|
||||
'name': '统计分析',
|
||||
|
||||
'path':'/plan/planList/index',
|
||||
'sort':6,
|
||||
'type':'菜单',
|
||||
'remark':'检测计划描述',
|
||||
'route_Name':'route',
|
||||
'create_Time': '2024-10-16 12:13:14',
|
||||
'update_Time':'2024-10-16 12:13:14',
|
||||
},
|
||||
{
|
||||
'id': '7',
|
||||
'name': '示例',
|
||||
|
||||
'path':'/plan/planList/index',
|
||||
'sort':7,
|
||||
'type':'菜单',
|
||||
'remark':'检测计划描述',
|
||||
'route_Name':'route',
|
||||
'create_Time': '2024-10-16 12:13:14',
|
||||
'update_Time':'2024-10-16 12:13:14',
|
||||
children:[{
|
||||
'id': '71',
|
||||
'name': '普通表格',
|
||||
|
||||
'path':'/plan/planList/index',
|
||||
'sort':71,
|
||||
'type':'菜单',
|
||||
'remark':'检测计划描述',
|
||||
'route_Name':'route',
|
||||
'create_Time': '2024-10-16 12:13:14',
|
||||
'update_Time':'2024-10-16 12:13:14',
|
||||
},
|
||||
{
|
||||
'id': '72',
|
||||
'name': '表格树',
|
||||
|
||||
'path':'/plan/planList/index',
|
||||
'sort':72,
|
||||
'type':'菜单',
|
||||
'remark':'检测计划描述',
|
||||
'route_Name':'route',
|
||||
'create_Time': '2024-10-16 12:13:14',
|
||||
'update_Time':'2024-10-16 12:13:14',
|
||||
}
|
||||
]
|
||||
},
|
||||
])
|
||||
|
||||
export default resourcedata
|
||||
@@ -43,6 +43,28 @@ const dictData: Dict[] = [
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
id: "3",
|
||||
code: 'type',
|
||||
label: '资源类型',
|
||||
children: [
|
||||
{
|
||||
id: "1",
|
||||
label: '菜单',
|
||||
code: 1,
|
||||
},
|
||||
{
|
||||
id: "2",
|
||||
label: '按钮',
|
||||
code: 2,
|
||||
},
|
||||
{
|
||||
id: "3",
|
||||
label: '公共资源',
|
||||
code: 3,
|
||||
},
|
||||
],
|
||||
},
|
||||
]
|
||||
|
||||
export default dictData
|
||||
@@ -65,4 +65,5 @@ export namespace User {
|
||||
name: string;
|
||||
children?: ResDepartment[];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -2,6 +2,7 @@ import { ResPage } from '@/api/interface'
|
||||
import { User } from './interface'
|
||||
import { ADMIN as rePrefix } from '@/api/config/serviceName'
|
||||
import http from '@/api'
|
||||
import type { Resource } from '../resource/interface'
|
||||
|
||||
/**
|
||||
* @name 用户管理模块
|
||||
@@ -56,6 +57,11 @@ export const getUserStatus = () => {
|
||||
return http.get<User.ResStatus[]>(`${rePrefix}/user/status`)
|
||||
}
|
||||
|
||||
// 获取用户状态字典
|
||||
export const getResourceType = () => {
|
||||
return http.get<Resource.ResType[]>(`${rePrefix}/user/status`)
|
||||
}
|
||||
|
||||
// 获取用户性别字典
|
||||
export const getUserGender = () => {
|
||||
return http.get<User.ResGender[]>(`${rePrefix}/user/gender`)
|
||||
|
||||
Reference in New Issue
Block a user