2026-03-26 20:18:20 +08:00
|
|
|
|
declare namespace Api {
|
|
|
|
|
|
/**
|
|
|
|
|
|
* namespace Dict
|
|
|
|
|
|
*
|
|
|
|
|
|
* backend api module: "dict"
|
|
|
|
|
|
*/
|
|
|
|
|
|
namespace Dict {
|
|
|
|
|
|
type DictStatus = 0 | 1;
|
|
|
|
|
|
|
|
|
|
|
|
interface PageParams {
|
|
|
|
|
|
pageNo: number;
|
|
|
|
|
|
pageSize: number;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
interface PageResult<T = any> {
|
|
|
|
|
|
total: number;
|
|
|
|
|
|
list: T[];
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/** dict type */
|
|
|
|
|
|
interface DictType {
|
|
|
|
|
|
/** dict type id */
|
|
|
|
|
|
id: number;
|
|
|
|
|
|
/** dict name */
|
|
|
|
|
|
name: string;
|
|
|
|
|
|
/** dict type code */
|
|
|
|
|
|
type: string;
|
|
|
|
|
|
/** status: 0 enabled, 1 disabled */
|
|
|
|
|
|
status: DictStatus;
|
|
|
|
|
|
/** remark */
|
|
|
|
|
|
remark?: string | null;
|
|
|
|
|
|
/** create time */
|
|
|
|
|
|
createTime: number;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/** dict type search params */
|
|
|
|
|
|
type DictTypeSearchParams = CommonType.RecordNullable<Pick<DictType, 'name' | 'type' | 'status'>> & PageParams;
|
|
|
|
|
|
|
|
|
|
|
|
/** dict type save params */
|
|
|
|
|
|
type SaveDictTypeParams = Pick<DictType, 'name' | 'type' | 'status'> & {
|
|
|
|
|
|
remark?: string | null;
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
/** dict data */
|
|
|
|
|
|
interface DictData {
|
|
|
|
|
|
/** dict data id */
|
|
|
|
|
|
id: number;
|
|
|
|
|
|
/** dict label */
|
|
|
|
|
|
label: string;
|
|
|
|
|
|
/** dict value */
|
|
|
|
|
|
value: string;
|
|
|
|
|
|
/** dict type code */
|
|
|
|
|
|
dictType: string;
|
|
|
|
|
|
/** display order */
|
|
|
|
|
|
sort: number;
|
|
|
|
|
|
/** status: 0 enabled, 1 disabled */
|
|
|
|
|
|
status: DictStatus;
|
2026-05-21 21:42:23 +08:00
|
|
|
|
/** 颜色(hex,#xxxxxx);nullable,无值时前端按默认渲染 */
|
|
|
|
|
|
colorType?: string | null;
|
2026-03-26 20:18:20 +08:00
|
|
|
|
/** remark */
|
|
|
|
|
|
remark?: string | null;
|
|
|
|
|
|
/** create time */
|
|
|
|
|
|
createTime: number;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2026-04-23 09:05:55 +08:00
|
|
|
|
/** frontend runtime dict item */
|
|
|
|
|
|
interface FrontendDictData {
|
|
|
|
|
|
/** dict label */
|
|
|
|
|
|
label: string;
|
|
|
|
|
|
/** dict value */
|
|
|
|
|
|
value: string;
|
|
|
|
|
|
/** display order */
|
|
|
|
|
|
sort: number;
|
|
|
|
|
|
/** dict type code */
|
|
|
|
|
|
dictType?: string;
|
|
|
|
|
|
/** status: 0 enabled, 1 disabled */
|
|
|
|
|
|
status?: DictStatus;
|
2026-05-21 21:42:23 +08:00
|
|
|
|
/** 颜色(hex,#xxxxxx);nullable,无值时前端按默认渲染 */
|
|
|
|
|
|
colorType?: string | null;
|
|
|
|
|
|
/** 备注,可用于下拉中文释义展示 */
|
|
|
|
|
|
remark?: string | null;
|
2026-04-23 09:05:55 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/** frontend runtime dict cache map */
|
|
|
|
|
|
type FrontendDictCache = Record<string, FrontendDictData[]>;
|
|
|
|
|
|
|
2026-03-26 20:18:20 +08:00
|
|
|
|
/** dict data search params */
|
|
|
|
|
|
type DictDataSearchParams = CommonType.RecordNullable<Pick<DictData, 'label' | 'dictType' | 'status'>> & PageParams;
|
|
|
|
|
|
|
|
|
|
|
|
/** dict data save params */
|
2026-05-22 14:05:25 +08:00
|
|
|
|
type SaveDictDataParams = Pick<DictData, 'label' | 'value' | 'dictType' | 'sort' | 'status'> & {
|
2026-03-26 20:18:20 +08:00
|
|
|
|
remark?: string | null;
|
|
|
|
|
|
};
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|