From f42b22dc0a34035493a0b4fdef5c49ae191de1e4 Mon Sep 17 00:00:00 2001 From: "Asoka.Wang" Date: Tue, 17 Jun 2025 10:13:46 +0800 Subject: [PATCH] =?UTF-8?q?feat=EF=BC=9A=E5=8F=8D=E5=BA=94=E5=99=A8?= =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E7=9B=B8=E5=85=B3=E6=8A=A5=E8=AD=A6=E8=AE=BE?= =?UTF-8?q?=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/admin/{reactor.ts => ReactorApi.ts} | 0 src/api/admin/ReactorEPSettingApi.ts | 27 ++++ src/api/types/ReactorType.ts | 2 + src/api/types/reactorEPSetting.ts | 38 ++++++ .../reactor/components/alarm-setting-form.vue | 125 ++++++++++++++++++ .../admin/reactor/components/reactor-form.vue | 9 +- src/views/admin/reactor/index.vue | 13 +- .../uspsreactor/components/reactor-form.vue | 4 +- src/views/admin/uspsreactor/index.vue | 4 +- 9 files changed, 213 insertions(+), 9 deletions(-) rename src/api/admin/{reactor.ts => ReactorApi.ts} (100%) create mode 100644 src/api/admin/ReactorEPSettingApi.ts create mode 100644 src/api/types/reactorEPSetting.ts create mode 100644 src/views/admin/reactor/components/alarm-setting-form.vue diff --git a/src/api/admin/reactor.ts b/src/api/admin/ReactorApi.ts similarity index 100% rename from src/api/admin/reactor.ts rename to src/api/admin/ReactorApi.ts diff --git a/src/api/admin/ReactorEPSettingApi.ts b/src/api/admin/ReactorEPSettingApi.ts new file mode 100644 index 0000000..27dfcbf --- /dev/null +++ b/src/api/admin/ReactorEPSettingApi.ts @@ -0,0 +1,27 @@ +import { RequestParams } from './http-client' +import { ContentType, HttpClient } from './http-client' + +export class ReactorEPSettingApi extends HttpClient { + /** + * 批量更新 + */ + batchUpdate = (data: any[], params: RequestParams = {}) => + this.request({ + path: `/api/admin/ep-setting-equ-reactor/batch-update`, + method: 'POST', + body: data, + type: ContentType.Json, + ...params, + }) + + /** + * 根据反应器ID获取报警设置列表 + */ + getListByEquReactor = (params: { equReactorId: number }, requestParams: RequestParams = {}) => + this.request({ + path: `/api/admin/ep-setting-equ-reactor/get-list-by-equ-reactor`, + method: 'GET', + query: params, + ...requestParams, + }) +} diff --git a/src/api/types/ReactorType.ts b/src/api/types/ReactorType.ts index a0de90c..0d43842 100644 --- a/src/api/types/ReactorType.ts +++ b/src/api/types/ReactorType.ts @@ -75,6 +75,8 @@ export interface ReactorDto { createdTime?: string | null /** 修改时间 */ modifiedTime?: string | null + /** 压力单位 */ + pressureUnit?: string | null } /** 反应器添加和更新输入接口 */ diff --git a/src/api/types/reactorEPSetting.ts b/src/api/types/reactorEPSetting.ts new file mode 100644 index 0000000..58d8f3d --- /dev/null +++ b/src/api/types/reactorEPSetting.ts @@ -0,0 +1,38 @@ +// 反应器报警设置类型定义 +export interface ReactorEPSetting { + /** 主键ID */ + id: number + /** 设备反应器ID */ + equReactorId: number + /** EP定义ID */ + epDefId: number + /** EP定义 */ + epDefName: string + /** EP定义别名 */ + epDefAlias: string + /** 告警下限 */ + warningLowerLimit: number + /** 告警下限缓冲 */ + warningLowerBuffer: number + /** 告警上限 */ + warningUpperLimit: number + /** 告警上限缓冲 */ + warningUpperBuffer: number + /** 动作下限 */ + actionLowerLimit: number + /** 动作上限 */ + actionUpperLimit: number + /** 动作时间缓冲 */ + actionTimeBuffer: number + /** 预警时间缓冲 */ + warningTimeBuffer: number + /** 是否启用 */ + isEnable: boolean + /** 状态 */ + status: boolean + + /** 计量单位 */ + unit: string + /** OPC名称 */ + needConfig: boolean +} diff --git a/src/views/admin/reactor/components/alarm-setting-form.vue b/src/views/admin/reactor/components/alarm-setting-form.vue new file mode 100644 index 0000000..00ce193 --- /dev/null +++ b/src/views/admin/reactor/components/alarm-setting-form.vue @@ -0,0 +1,125 @@ + + + + + \ 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 ffa8d97..2853c6c 100644 --- a/src/views/admin/reactor/components/reactor-form.vue +++ b/src/views/admin/reactor/components/reactor-form.vue @@ -355,7 +355,7 @@ import { ref, reactive, onMounted, watch, getCurrentInstance } from 'vue' import { ElMessage } from 'element-plus' import type { FormInstance, FormRules } from 'element-plus' -import { ReactorApi } from '/@/api/admin/reactor' +import { ReactorApi } from '../../../../api/admin/ReactorApi' import { RoomApi } from '/@/api/admin/Room' import { UserApi } from '/@/api/admin/User' import { DictApi } from '/@/api/admin/Dict' @@ -369,9 +369,9 @@ import { MaintenanceFlagEnum, ReactorAddInputAndUpdateInput, PumpConfig, - defaultPumpConfig + defaultPumpConfig, + ReactorTypeEnumItem } from '/@/api/types/ReactorType' -import type { ReactorTypeEnumItem } from '/@/api/types/ReactorType' import { toOptionsByValue } from '/@/utils/enum' import { EnumPressureUnit } from '/@/api/admin/enum-contracts' import eventBus from '/@/utils/mitt' @@ -743,6 +743,9 @@ const submitForm = async () => { state.sureLoading = false // 结束加载 } } + else { + ElMessage.warning('存在未填写的必填项') + } }) } diff --git a/src/views/admin/reactor/index.vue b/src/views/admin/reactor/index.vue index d61cb56..0dc4b01 100644 --- a/src/views/admin/reactor/index.vue +++ b/src/views/admin/reactor/index.vue @@ -56,10 +56,11 @@ - + @@ -73,13 +74,14 @@ +