From 8d95ef8628828199d33c2469696031c099b54a21 Mon Sep 17 00:00:00 2001 From: "Asoka.Wang" Date: Mon, 16 Jun 2025 11:42:26 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E5=8F=8D=E5=BA=94=E5=99=A8=E9=85=8D?= =?UTF-8?q?=E7=BD=AE=E7=BC=96=E8=BE=91=E9=A1=B5=E9=9D=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/admin/enum-contracts.ts | 5 + src/api/types/ReactorType.ts | 99 ++- .../admin/reactor/components/reactor-form.vue | 792 +++++++++++++----- src/views/admin/reactor/index.vue | 8 +- 4 files changed, 684 insertions(+), 220 deletions(-) diff --git a/src/api/admin/enum-contracts.ts b/src/api/admin/enum-contracts.ts index b22e88d..00ace15 100644 --- a/src/api/admin/enum-contracts.ts +++ b/src/api/admin/enum-contracts.ts @@ -126,3 +126,8 @@ export const AppType = { MVC: { name: 'MVC', value: 2, desc: '' }, } +export const EnumPressureUnit = { + Mpa: { name: 'mbar', value: 'mbar', desc: 'mbar' }, + Psi: { name: 'psi', value: 'psi', desc: 'psi' }, + Kpa: { name: 'kPa', value: 'kPa', desc: 'kPa' }, +} diff --git a/src/api/types/ReactorType.ts b/src/api/types/ReactorType.ts index 99c5cd8..2b71745 100644 --- a/src/api/types/ReactorType.ts +++ b/src/api/types/ReactorType.ts @@ -95,6 +95,74 @@ export interface ReactorDto { modifiedTime?: string | null } +/** 反应器添加和更新输入接口 */ +export interface ReactorAddInputAndUpdateInput { + /** 设备编号 */ + deviceNo?: string | null + /** 资产编号 */ + assetNo?: string | null + /** 产品ID */ + productID?: string | null + /** 型号 */ + model?: string | null + /** 规格 */ + specification?: string | null + /** 容量(g) */ + capacity?: number + /** 房间ID */ + roomID?: number + /** 负责人ID */ + principalId?: number + /** 设备状态 */ + deviceStatus?: DeviceStatusEnum + /** 维护标志 */ + maintenanceFlag?: MaintenanceFlagEnum + /** 维护时间 */ + maintenanceTime?: string | null + /** 压力单位 */ + pressureUnit?: string | null + /** 反应器地秤ID */ + equScaleId?: number + /** 补料秤ID */ + feedingScaleId?: number + /** 继电器ID */ + relayID?: number + /** 报警器ID */ + equAlarmId?: number + /** 警告下限 */ + warningLowerLimit?: number + /** 警告上限 */ + warningUpperLimit?: number + /** 错误码 */ + errorCode?: string | null + /** 是否外置泵 */ + isExternalPump?: boolean + /** OPC IP */ + opcip?: string | null + /** OPC 端口 */ + opcPort?: string | null + /** 排序 */ + sort?: number + /** 主键Id */ + id?: number + /** 泵1配置 */ + pump1: PumpConfig + /** 泵2配置 */ + pump2: PumpConfig + /** 泵3配置 */ + pump3: PumpConfig + /** 泵4配置 */ + pump4: PumpConfig + /** 泵5配置 */ + pump5: PumpConfig + /** 泵6配置 */ + pump6: PumpConfig + /** 泵7配置 */ + pump7: PumpConfig + /** 泵8配置 */ + pump8: PumpConfig +} + // 反应器类型枚举项 export interface ReactorTypeEnumItem { /** 枚举值 */ @@ -105,10 +173,39 @@ export interface ReactorTypeEnumItem { label: string } +/** 泵配置接口 */ +export interface PumpConfig { + /** 速度 */ + speed?: number + /** 超时时间 */ + timeout: number + /** 异常信息 */ + exception: string + /** 错误码 */ + errorCode: string + /** 是否喂料 */ + isFeeding: boolean + /** 速度偏移 */ + speedOffset: number + /** 配置ID */ + configId?: number +} + +/** 默认泵配置 */ +export const defaultPumpConfig: PumpConfig = { + speed: undefined, + timeout: 0, + exception: '', + errorCode: '', + isFeeding: true, + speedOffset: 0, + configId: undefined +} + // API 类型定义 export type ReactorPageInput = ServiceRequestPage; export type ReactorPageResponse = ServiceResponse>; export type ReactorOutput = ServiceResponse; export type ReactorAddInput = ReactorDto; export type ReactorUpdateInput = ReactorDto; -export type ReactorTypeEnumListOutput = ServiceResponse; +export type ReactorTypeEnumListOutput = ServiceResponse; \ No newline at end of file diff --git a/src/views/admin/reactor/components/reactor-form.vue b/src/views/admin/reactor/components/reactor-form.vue index 24528a1..ffa8d97 100644 --- a/src/views/admin/reactor/components/reactor-form.vue +++ b/src/views/admin/reactor/components/reactor-form.vue @@ -1,20 +1,7 @@ -