mirror of
https://gitee.com/hhyykk/ipms-sjy.git
synced 2025-08-23 22:51:54 +08:00
1. 修改 MenuDO 的字段,menuId 改成 id,menuName 改成 name
2. 添加 Menu 的创建、修改、删除接口
This commit is contained in:
30
ruoyi-ui/src/utils/constants.js
Normal file
30
ruoyi-ui/src/utils/constants.js
Normal file
@@ -0,0 +1,30 @@
|
||||
/**
|
||||
* Created by 芋道源码
|
||||
*
|
||||
* 枚举类
|
||||
*/
|
||||
|
||||
/**
|
||||
* 全局通用状态枚举
|
||||
*/
|
||||
export const SysCommonStatusEnum = {
|
||||
ENABLE: 0, // 开启
|
||||
DISABLE: 1 // 禁用
|
||||
}
|
||||
|
||||
/**
|
||||
* 菜单的类型枚举
|
||||
*/
|
||||
export const SysMenuTypeEnum = {
|
||||
DIR : 1, // 目录
|
||||
MENU: 2, // 菜单
|
||||
BUTTON: 3 // 按钮
|
||||
}
|
||||
|
||||
/**
|
||||
* 角色的类型枚举
|
||||
*/
|
||||
export const RoleTypeEnum = {
|
||||
SYSTEM: 1, // 内置角色
|
||||
CUSTOM: 2 // 自定义角色
|
||||
}
|
@@ -6,7 +6,8 @@
|
||||
import store from '@/store'
|
||||
|
||||
export const DICT_TYPE = {
|
||||
SYS_COMMON_STATUS: 'sys_common_status'
|
||||
SYS_COMMON_STATUS: 'sys_common_status',
|
||||
SYS_MENU_TYPE: 'menu_type'
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -28,8 +29,8 @@ export function getDictDataLabel(dictType, value) {
|
||||
// 获取 value 对应的展示名
|
||||
value = value + '' // 强制转换成字符串,因为 DictData 小类数值,是字符串
|
||||
for (const dictData of dictDatas) {
|
||||
if (dictData.dictValue === value) {
|
||||
return dictData.dictLabel
|
||||
if (dictData.value === value) {
|
||||
return dictData.label
|
||||
}
|
||||
}
|
||||
return ''
|
||||
|
Reference in New Issue
Block a user