2024-10-29 11:17:04 +08:00
|
|
|
|
import type { ReqPage } from '@/api/interface'
|
|
|
|
|
|
|
|
|
|
|
|
// 检测计划模块
|
|
|
|
|
|
export namespace Plan {
|
|
|
|
|
|
|
2024-11-07 13:22:51 +08:00
|
|
|
|
// 检测计划接口
|
2024-12-11 19:39:09 +08:00
|
|
|
|
export interface ResPlan {
|
|
|
|
|
|
id: string; //检测计划ID
|
2024-10-29 11:17:04 +08:00
|
|
|
|
name: string; //检测计划名称
|
2025-03-11 18:58:26 +08:00
|
|
|
|
pattern?: string; //模式,字典表(数字、模拟、比对)
|
2024-12-11 19:39:09 +08:00
|
|
|
|
fatherPlanId?: string; //父计划ID
|
|
|
|
|
|
dataSourceId: string; //数据源ID
|
|
|
|
|
|
scriptId: string; //检测脚本ID
|
|
|
|
|
|
errorSysId: string;//误差体系ID
|
|
|
|
|
|
timeCheck:number;//守时检测:0否,1。是
|
|
|
|
|
|
testState: number; //检测状态:0:未检、1:检测中、2:检测完成,默认为 0
|
|
|
|
|
|
reportState: number; //报告生成状态:0:未生成、1:部分生成、2:全部生成,默认为 0
|
|
|
|
|
|
result: number;//检测结果:0:不符合、1:符合、2:/,默认为 2
|
|
|
|
|
|
code:number; //自动生成,用于生成数据表后缀
|
|
|
|
|
|
state: number;//;状态:0-删除 1-正常
|
|
|
|
|
|
createBy?:string; //创建用户
|
|
|
|
|
|
createTime?:string; //创建时间
|
|
|
|
|
|
updateBy?:string; //更新用户
|
|
|
|
|
|
updateTime?:string; //更新时间
|
2025-03-24 08:56:08 +08:00
|
|
|
|
|
|
|
|
|
|
associateReport:number;//是否关联报告模板 0否 1是
|
|
|
|
|
|
reportTemplateName:string;
|
2025-05-14 08:58:21 +08:00
|
|
|
|
reportTemplateVersion:string;
|
2025-07-09 20:12:40 +08:00
|
|
|
|
dataRule:string;//数据处理原则
|
|
|
|
|
|
|
2025-07-22 14:56:58 +08:00
|
|
|
|
standardDevIds:string[];
|
2025-07-21 13:47:56 +08:00
|
|
|
|
standardDevMap:Map<string,number>;//标准设备
|
|
|
|
|
|
testItems:string[];//测试项
|
|
|
|
|
|
Check_By?:string;//计划检测人
|
2025-07-09 20:12:40 +08:00
|
|
|
|
progress?: number; // 进度百分比,例如 75
|
|
|
|
|
|
children?: ResPlan[];
|
2025-08-26 11:13:23 +08:00
|
|
|
|
testConfig?: PlanTestConfig;
|
2025-08-29 11:34:55 +08:00
|
|
|
|
importFlag?: number; // 导入标识,0-否,1-是
|
2024-10-29 11:17:04 +08:00
|
|
|
|
}
|
2024-11-07 13:22:51 +08:00
|
|
|
|
|
|
|
|
|
|
// 检测计划 + 分页
|
2024-12-11 19:39:09 +08:00
|
|
|
|
export interface ReqPlanParams extends ReqPage,ResPlan {
|
|
|
|
|
|
|
2024-10-29 11:17:04 +08:00
|
|
|
|
}
|
2024-11-08 13:09:06 +08:00
|
|
|
|
|
2024-12-11 19:39:09 +08:00
|
|
|
|
|
2025-08-26 11:13:23 +08:00
|
|
|
|
|
2024-12-11 19:39:09 +08:00
|
|
|
|
export interface ReqPlan extends ResPlan {
|
2025-09-05 08:57:39 +08:00
|
|
|
|
datasourceIds:string | string[];
|
2025-07-21 13:47:56 +08:00
|
|
|
|
sourceIds: string | null;
|
2024-12-11 19:39:09 +08:00
|
|
|
|
planId:string;
|
|
|
|
|
|
scriptName: string ;
|
|
|
|
|
|
errorSysName: string;
|
|
|
|
|
|
sourceName: string ;
|
2025-07-21 13:47:56 +08:00
|
|
|
|
standardDevNameStr: string;
|
|
|
|
|
|
testItemNameStr:string;
|
2024-12-11 20:24:00 +08:00
|
|
|
|
devIds: string[];
|
2024-11-08 13:09:06 +08:00
|
|
|
|
}
|
2024-12-11 19:39:09 +08:00
|
|
|
|
|
2025-08-26 11:13:23 +08:00
|
|
|
|
export interface PlanTestConfig {
|
|
|
|
|
|
planId: string;
|
|
|
|
|
|
waveRecord: number;
|
|
|
|
|
|
realTime: number;
|
|
|
|
|
|
statistics: number;
|
|
|
|
|
|
flicker: number;
|
|
|
|
|
|
maxTime: number;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2024-11-07 13:22:51 +08:00
|
|
|
|
|
2024-10-29 11:17:04 +08:00
|
|
|
|
}
|