Files
pqs-9100_client/frontend/src/api/check/interface/index.ts
caozehui 30c1f90513 微调
2024-12-24 11:29:31 +08:00

106 lines
2.4 KiB
TypeScript
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

export namespace CheckData {
export interface DataCheck {
testScriptName: string,
errorSysName: string,
dataRule: string,
deviceName: string,
monitorIdx: string,
}
/**
* 用于定义 查看(设备)通道检测结果 类型
*/
export interface CheckResult {
chnNum: string,
standardValue: number,
L1: number,
L1_errValue: number,
L2: number,
L2_errValue: number,
L3: number,
L3_errValue: number,
maxErrVaule: number,
result: string,
}
/**
* 用于定义 具体通道的原始数据类型
*/
export interface RawDataItem {
updateTime: string,
L1: number,
L2: number,
L3: number
}
export interface Device {
deviceId: string; //装置序号Id
deviceName: string; //设备名称
chnNum: number; //设备通道数
}
// 用来描述检测脚本类型
export interface ScriptItem {
id: string,
code: string,
scriptItemName: string,
//children?: ScriptItem[]
}
// 用来描述 通道检测结果
export enum ChnCheckResultEnum {
UNKNOWN = -1,
FAIL = 0,
SUCCESS = 1,
}
//用来描述 某个脚本测试项对所有通道的检测结果
export interface ScriptChnItem {
scriptId: string
scriptItemName?: string //可以不要该属性,有点多余
// 设备
devices: Array<{
deviceId: string,
deviceName: string,
chnResult: ChnCheckResultEnum[] //通道检测结果
}>
}
/**
* 用于描述 (设备)通道检测结果展示的按钮类型
*/
export interface ButtonResult {
resultType: 'info' | 'success' | 'danger',
resultValue: '-' | '√' | '×'
}
/**
* 用于描述 脚本检测结果展示的按钮类型
*/
export interface ScriptChnViewItem {
scriptId: string,
scriptItemName?: string //脚本项名称,可以不要该属性,有点多余
// 设备
devices: Array<{
deviceId: string,
deviceName: string,
chnResult: ButtonResult[],
}>
}
/**
* 定义检测日志类型
*/
export interface LogItem {
type: 'info' | 'error'
log: string
}
}