feat:整合字典管理

This commit is contained in:
ANHE
2025-03-23 11:00:34 +08:00
parent 3fc4bec81a
commit 7f781112a9
24 changed files with 1077 additions and 17 deletions

View File

@ -232,7 +232,7 @@ declare namespace Api {
/** 字典类型 */
type DictType = Common.CommonRecord<{
/** 字典主键 */
dictId: number;
dictId: CommonType.IdType;
/** 字典名称 */
dictName: string;
/** 字典类型 */
@ -241,12 +241,25 @@ declare namespace Api {
remark: string;
}>;
/** dict type search params */
type DictTypeSearchParams = CommonType.RecordNullable<
Pick<Api.System.DictType, 'dictName' | 'dictType'> & Api.Common.CommonSearchParams
>;
/** dict type operate params */
type DictTypeOperateParams = CommonType.RecordNullable<
Pick<Api.System.DictType, 'dictId' | 'dictName' | 'dictType' | 'remark'>
>;
/** dict type list */
type DictTypeList = Api.Common.PaginatingQueryRecord<DictType>;
/** 字典数据 */
type DictData = Common.CommonRecord<{
/** 样式属性(其他样式扩展) */
cssClass: string;
/** 字典编码 */
dictCode: number;
dictCode: CommonType.IdType;
/** 字典标签 */
dictLabel: string;
/** 字典排序 */
@ -263,6 +276,30 @@ declare namespace Api {
remark: string;
}>;
/** dict data search params */
type DictDataSearchParams = CommonType.RecordNullable<
Pick<Api.System.DictData, 'dictLabel' | 'dictType'> & Api.Common.CommonSearchParams
>;
/** dict data operate params */
type DictDataOperateParams = CommonType.RecordNullable<
Pick<
Api.System.DictData,
| 'dictCode'
| 'dictSort'
| 'dictLabel'
| 'dictValue'
| 'dictType'
| 'cssClass'
| 'listClass'
| 'isDefault'
| 'remark'
>
>;
/** dict data list */
type DictDataList = Api.Common.PaginatingQueryRecord<DictData>;
/** dept */
type Dept = Api.Common.CommonRecord<{
/** 部门id */

View File

@ -39,6 +39,7 @@ declare module 'vue' {
IconIcRoundUpload: typeof import('~icons/ic/round-upload')['default']
IconLocalBanner: typeof import('~icons/local/banner')['default']
IconLocalLogo: typeof import('~icons/local/logo')['default']
'IconMaterialSymbols:syncRounded': typeof import('~icons/material-symbols/sync-rounded')['default']
IconMaterialSymbolsHelpOutline: typeof import('~icons/material-symbols/help-outline')['default']
IconMdiArrowDownThin: typeof import('~icons/mdi/arrow-down-thin')['default']
IconMdiArrowUpThin: typeof import('~icons/mdi/arrow-up-thin')['default']
@ -103,6 +104,7 @@ declare module 'vue' {
NSelect: typeof import('naive-ui')['NSelect']
NSpace: typeof import('naive-ui')['NSpace']
NSpin: typeof import('naive-ui')['NSpin']
NSplit: typeof import('naive-ui')['NSplit']
NStatistic: typeof import('naive-ui')['NStatistic']
NSwitch: typeof import('naive-ui')['NSwitch']
NTab: typeof import('naive-ui')['NTab']

View File

@ -24,6 +24,9 @@ declare module "@elegant-router/types" {
"iframe-page": "/iframe-page/:url";
"login": "/login/:module(pwd-login|code-login|register|reset-pwd|bind-wechat)?";
"system": "/system";
"system_dict": "/system/dict";
"system_dict_data": "/system/dict/data";
"system_dict_type": "/system/dict/type";
"system_menu": "/system/menu";
"system_tenant": "/system/tenant";
"system_user": "/system/user";
@ -90,6 +93,9 @@ declare module "@elegant-router/types" {
| "iframe-page"
| "login"
| "home"
| "system_dict_data"
| "system_dict"
| "system_dict_type"
| "system_menu"
| "system_tenant"
| "system_user"