diff --git a/frontend/src/api/device/interface/testSource.ts b/frontend/src/api/device/interface/testSource.ts index 3b59f26..066e96f 100644 --- a/frontend/src/api/device/interface/testSource.ts +++ b/frontend/src/api/device/interface/testSource.ts @@ -2,43 +2,44 @@ import type { ReqPage, ResPage } from '@/api/interface' // 检测源模块 export namespace TestSource { - - /** - * 检测脚本表格分页查询参数 - */ - export interface ReqTestSourceParams extends ReqPage{ - id: string; // 装置序号id 必填 - name: string; - pattern: string; - } + /** + * 检测源表格分页查询参数 + */ + export interface ReqTestSourceParams extends ReqPage { + id: string + name: string + pattern: string + } // 检测源接口 export interface ResTestSource { - id: string; //检测源ID - name?: string; //检测源名称(检测源类型 + 设备类型 + 数字自动生成) - pattern: string;//检测源模式(字典表Code字段,数字、模拟、比对) - type: string; //检测源类型(字典表Code字段,标准源、高精度设备) - devType: string;//检测源设备类型(字典表Code字段) - parameter?: string;//源参数(JSON字符串) - state:number;// - createBy?: string; - createTime?: string; - updateBy?: string; - updateTime?: string; + id: string + name?: string + pattern: string + type: string + devType: string + maxVoltage?: number + maxCurrent?: number + parameter?: string + state: number + createBy?: string + createTime?: string + updateBy?: string + updateTime?: string } - - /* 检测脚本查询分页返回的对象; - */ - export interface ResTestSourcePage extends ResPage { - - } - export interface ParameterType{ - id:string; - type:string; - desc:string; - value:string|null; - sort:number; - pId:string; - children?:ParameterType[]; + + /* + * 检测源查询分页返回的对象 + */ + export interface ResTestSourcePage extends ResPage {} + + export interface ParameterType { + id: string + type: string + desc: string + value: string | null + sort: number + pId: string + children?: ParameterType[] } - } \ No newline at end of file +} diff --git a/frontend/src/views/home/components/preTest.vue b/frontend/src/views/home/components/preTest.vue index 8da05be..1ebc6eb 100644 --- a/frontend/src/views/home/components/preTest.vue +++ b/frontend/src/views/home/components/preTest.vue @@ -206,6 +206,20 @@ function handleWarningError(stepRef: any, logRef: any, message: string) { watch(webMsgSend, function (newValue, oldValue) { if (testStatus.value !== 'waiting') { switch (newValue.requestId) { + case 'overloadTest': + if (newValue.code === 1) { + handleFatalError(step1, step1InitLog, '电压过载!') + } + if (newValue.code === 2) { + handleFatalError(step1, step1InitLog, '电流过载!') + } + if (newValue.code === 3) { + handleFatalError(step1, step1InitLog, '电压和电流过载!') + } + if (newValue.code === 4) { + handleFatalError(step1, step1InitLog, '过载检测成功!') + } + break; case 'yjc_ytxjy': switch (newValue.operateCode) { case 'INIT_GATHER': diff --git a/frontend/src/views/machine/testSource/components/testSourcePopup.vue b/frontend/src/views/machine/testSource/components/testSourcePopup.vue index 34ef211..cfea713 100644 --- a/frontend/src/views/machine/testSource/components/testSourcePopup.vue +++ b/frontend/src/views/machine/testSource/components/testSourcePopup.vue @@ -10,7 +10,7 @@ class="form-three" > - + + + + + + + @@ -40,7 +58,7 @@ /> @@ -49,12 +67,12 @@ - \ No newline at end of file +