2024-10-31 14:53:29 +08:00
|
|
|
|
import type { ReqPage, ResPage } from '@/api/interface'
|
2024-10-23 16:08:55 +08:00
|
|
|
|
|
|
|
|
|
|
export namespace Dict {
|
2024-10-31 14:53:29 +08:00
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
|
* 一个单表的CRUD需要申明一下几个对象
|
|
|
|
|
|
* 1、表格分页查询对象,字段:查询字段?、页码、每页条数;
|
|
|
|
|
|
* 2、新增、修改、根据id查询返回的对象;
|
|
|
|
|
|
* 3、表格查询分页返回的对象;
|
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
|
* 字典类型表格分页查询参数
|
|
|
|
|
|
*/
|
|
|
|
|
|
export interface ReqDictTypeParams extends ReqPage{
|
|
|
|
|
|
name?: string; // 名称
|
|
|
|
|
|
code?: string; // 编码
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
|
* 字典类型新增、修改、根据id查询返回的对象
|
|
|
|
|
|
*/
|
2024-10-23 16:08:55 +08:00
|
|
|
|
export interface ResDictType {
|
|
|
|
|
|
id: string; // 字典类型表Id
|
|
|
|
|
|
name: string; // 名称
|
|
|
|
|
|
code: string; // 编码
|
|
|
|
|
|
sort: number; // 排序
|
|
|
|
|
|
openLevel: number; // 开启等级:0-不开启;1-开启,默认不开启
|
|
|
|
|
|
openDescribe: number; // 开启描述:0-不开启;1-开启,默认不开启
|
|
|
|
|
|
remark?: string | null; // 描述
|
|
|
|
|
|
state: number; // 状态:0-删除 1-正常
|
|
|
|
|
|
createBy?: string | null; // 创建用户
|
|
|
|
|
|
createTime?: string | null; // 创建时间
|
|
|
|
|
|
updateBy?: string | null; // 更新用户
|
|
|
|
|
|
updateTime?: string | null; // 更新时间
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2024-10-31 14:53:29 +08:00
|
|
|
|
/**
|
|
|
|
|
|
* 字典类型表格查询分页返回的对象;
|
|
|
|
|
|
*/
|
|
|
|
|
|
export interface ResDictTypePage extends ResPage<ResDictType> {
|
|
|
|
|
|
|
2024-10-23 16:08:55 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
2024-10-31 14:53:29 +08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
|
* 字典数据表格分页查询参数
|
|
|
|
|
|
*/
|
|
|
|
|
|
export interface ReqDictDataParams extends ReqPage{
|
|
|
|
|
|
typeId: string; // 类型id 必填
|
|
|
|
|
|
name?: string; // 名称
|
|
|
|
|
|
code?: string; // 编码
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
|
* 字典数据新增、修改、根据id查询返回的对象
|
|
|
|
|
|
*/
|
2024-10-23 16:08:55 +08:00
|
|
|
|
export interface ResDictData {
|
|
|
|
|
|
id: string; // 字典数据表Id
|
|
|
|
|
|
typeId: string; // 字典类型表Id
|
|
|
|
|
|
name: string; // 名称
|
|
|
|
|
|
code: string; // 编码
|
|
|
|
|
|
sort: number; // 排序
|
|
|
|
|
|
level?: number | null; // 事件等级:0-普通;1-中等;2-严重 (默认为0)
|
|
|
|
|
|
algoDescribe?: number | null; // 与高级算法内部Id描述对应
|
|
|
|
|
|
value?: string | null; // 字典针对电压等级
|
2024-11-01 13:30:09 +08:00
|
|
|
|
dictValue?:string|null;
|
2024-10-23 16:08:55 +08:00
|
|
|
|
state: number; // 状态:0-删除 1-正常
|
|
|
|
|
|
createBy?: string | null; // 创建用户
|
|
|
|
|
|
createTime?: string | null; // 创建时间
|
|
|
|
|
|
updateBy?: string | null; // 更新用户
|
|
|
|
|
|
updateTime?: string | null; // 更新时间
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2024-10-31 14:53:29 +08:00
|
|
|
|
/**
|
|
|
|
|
|
* 字典数据表格查询分页返回的对象;
|
|
|
|
|
|
*/
|
|
|
|
|
|
export interface ResDictDataPage extends ResPage<ResDictData> {
|
2024-10-23 16:08:55 +08:00
|
|
|
|
|
|
|
|
|
|
}
|
2024-10-31 14:53:29 +08:00
|
|
|
|
|
2024-10-23 16:08:55 +08:00
|
|
|
|
}
|