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-11-04 18:43:24 +08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
|
* 电能质量指标字典数据表格分页查询参数
|
|
|
|
|
|
*/
|
|
|
|
|
|
export interface ReqDictPqParams extends ReqPage{
|
|
|
|
|
|
id: string; // 类型id 必填
|
|
|
|
|
|
name?: string; // 名称
|
|
|
|
|
|
phase?: string;//相别
|
|
|
|
|
|
dataType?: string;//数据模型(epd、pqd...)
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
|
* 电能质量指标字典数据新增、修改、根据id查询返回的对象
|
|
|
|
|
|
*/
|
|
|
|
|
|
export interface ResDictPq {
|
|
|
|
|
|
id: string;//指标字典表Id
|
|
|
|
|
|
name: string;//指标名称
|
|
|
|
|
|
phase: string;//相别
|
|
|
|
|
|
dataType: string;//数据模型(epd、pqd...)
|
2024-11-06 08:45:51 +08:00
|
|
|
|
otherName?: string ;//别名(默认与Name相同,主要是为了适配不同数据库里面字段)
|
2024-11-04 18:43:24 +08:00
|
|
|
|
showName?:string | null;//显示名称
|
|
|
|
|
|
sort:number;//排序
|
|
|
|
|
|
type?: string | null;//指标数据类型(整型、浮点型、枚举型这些的)
|
|
|
|
|
|
unit?: string | null;//单位
|
|
|
|
|
|
harmStart?:number | null;//起始次数
|
|
|
|
|
|
harmEnd?:number | null;//结束次数
|
2024-11-05 14:15:56 +08:00
|
|
|
|
classId: string ;//数据表表名
|
2024-11-05 11:23:38 +08:00
|
|
|
|
statMethod?:string;//数据统计类型(最大、最小、平均、CP95)
|
2024-11-04 18:43:24 +08:00
|
|
|
|
systemType?:string | null;//系统类别(区分用能/电能)
|
2024-11-05 11:23:38 +08:00
|
|
|
|
tranFlag?:number ;//数据是否上送(0:不上送 1:上送)
|
2024-11-04 18:43:24 +08:00
|
|
|
|
tranRule?:string | null;//上送规则 变化:“change”周期 :“ period”
|
|
|
|
|
|
eventType?:string | null;//evt的事件类别 "1"、"2";
|
2024-11-05 11:23:38 +08:00
|
|
|
|
storeFlag?:string ;//sts、di的是否存储 1:存储 0:不存 储;
|
2024-11-04 18:43:24 +08:00
|
|
|
|
curSts?:number | null;//sts、do的当前值;
|
2024-11-05 11:23:38 +08:00
|
|
|
|
ctlSts?:number;//do的是否可远程控制 1:是 0:否;
|
2024-11-05 14:15:56 +08:00
|
|
|
|
maxNum?:number ;//设置最大值
|
|
|
|
|
|
minNum?: number;//设置最小值
|
2024-11-04 18:43:24 +08:00
|
|
|
|
setValue?:string | null;//参数为enum可设置的所有值序列
|
2024-11-05 14:15:56 +08:00
|
|
|
|
strlen?:number ;//参数string可设置字符串的长度上 限
|
2024-11-04 18:43:24 +08:00
|
|
|
|
defaultValue?:string | null; //参数缺省值、告警code值
|
2024-11-05 11:23:38 +08:00
|
|
|
|
resourcesId?:string ; //报表数据来源(统计表表名)
|
2024-11-04 18:43:24 +08:00
|
|
|
|
limitName?:string | null; //限值字段名称
|
|
|
|
|
|
limitTable?:string | null;//限值表名
|
2024-11-05 11:23:38 +08:00
|
|
|
|
formula?:string ;//超标判断方式
|
2024-11-04 18:43:24 +08:00
|
|
|
|
primaryFormula?:string | null;//二次值转一次值公式
|
|
|
|
|
|
state:number;//状态:0-删除 1-正常
|
|
|
|
|
|
createBy?:string | null;//创建用户
|
|
|
|
|
|
createTime?:string | null;//创建时间
|
|
|
|
|
|
updateBy?:string | null;//更新用户
|
|
|
|
|
|
updateTime?:string | null;//更新时间
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
|
* 电能质量指标字典数据表格查询分页返回的对象;
|
|
|
|
|
|
*/
|
|
|
|
|
|
export interface ResDictPqPage extends ResPage<ResDictPq> {
|
|
|
|
|
|
|
|
|
|
|
|
}
|
2024-11-11 11:09:20 +08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
|
* 树形字典数据新增、修改、根据id查询返回的对象
|
|
|
|
|
|
*/
|
|
|
|
|
|
export interface ResDictTree {
|
|
|
|
|
|
id: string;//指标字典表Id
|
|
|
|
|
|
pid: string;//
|
|
|
|
|
|
pids: string;//
|
|
|
|
|
|
name:string;//
|
|
|
|
|
|
code:string;//
|
|
|
|
|
|
sort:number;//
|
|
|
|
|
|
remark?:string;//
|
2024-11-11 15:40:49 +08:00
|
|
|
|
state?:number;//'状态(字典 0正常 1停用 2删除)
|
2024-11-11 11:09:20 +08:00
|
|
|
|
createBy?:string | null;//
|
|
|
|
|
|
createTime?:string | null;//
|
|
|
|
|
|
updateBy?:string | null;//
|
|
|
|
|
|
updateTime?:string | null;//
|
|
|
|
|
|
level?:number | null;//
|
|
|
|
|
|
extend?:string | null;//对应type,不同类型可自定义配置
|
|
|
|
|
|
type?:number | null;//用于区分多种类型的字典树 0.台账对象类型 1.自定义报表指标类型
|
|
|
|
|
|
children?: ResDictTree[];
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
2024-10-23 16:08:55 +08:00
|
|
|
|
}
|