From 4aec0f677c438fc130a8e006934dca632174f153 Mon Sep 17 00:00:00 2001 From: Asoka Date: Fri, 6 Jun 2025 17:14:54 +0800 Subject: [PATCH] =?UTF-8?q?add=20=E5=A4=96=E7=BD=AE=E6=B3=B5=E7=9A=84?= =?UTF-8?q?=E9=A1=B5=E9=9D=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/admin/FeedingConfigApi.ts | 14 + src/api/admin/PumpApi.ts | 63 +++ src/api/admin/data-contracts.ts | 307 +++++++++++ src/views/admin/pump/components/pump-form.vue | 506 ++++++++++++++++++ src/views/admin/pump/index.vue | 302 +++++++++++ .../admin/testequ/components/testequ-form.vue | 210 ++++---- 6 files changed, 1285 insertions(+), 117 deletions(-) create mode 100644 src/api/admin/FeedingConfigApi.ts create mode 100644 src/api/admin/PumpApi.ts create mode 100644 src/views/admin/pump/components/pump-form.vue create mode 100644 src/views/admin/pump/index.vue diff --git a/src/api/admin/FeedingConfigApi.ts b/src/api/admin/FeedingConfigApi.ts new file mode 100644 index 0000000..851f678 --- /dev/null +++ b/src/api/admin/FeedingConfigApi.ts @@ -0,0 +1,14 @@ +import { RequestParams } from './http-client' +import { ContentType, HttpClient } from './http-client' + +export class FeedingConfigApi extends HttpClient { + /** + * 获取泵速策略列表 + */ + getList = (params: RequestParams = {}) => + this.request({ + path: `/api/admin/usp-feeding-config/get-list`, + method: 'GET', + ...params, + }) +} diff --git a/src/api/admin/PumpApi.ts b/src/api/admin/PumpApi.ts new file mode 100644 index 0000000..309402a --- /dev/null +++ b/src/api/admin/PumpApi.ts @@ -0,0 +1,63 @@ +import { PageInputPumpGetPageInput, PumpGetPageOutput, PumpAddInput, PumpUpdateInput } from './data-contracts' +import { RequestParams } from './http-client' +import { ContentType, HttpClient } from './http-client' + +export class PumpApi extends HttpClient { + /** + * 获取分页列表 + */ + getPage = (data: PageInputPumpGetPageInput, params: RequestParams = {}) => + this.request({ + path: `/api/admin/equ-pump/get-page`, + method: 'POST', + body: data, + type: ContentType.Json, + ...params, + }) + + /** + * 获取单条数据 + */ + get = (params: { id: number }, requestParams: RequestParams = {}) => + this.request({ + path: `/api/admin/equ-pump/get`, + method: 'GET', + query: params, + ...requestParams, + }) + + /** + * 新增 + */ + add = (data: PumpAddInput, params: RequestParams = {}) => + this.request({ + path: `/api/admin/equ-pump/add`, + method: 'POST', + body: data, + type: ContentType.Json, + ...params, + }) + + /** + * 更新 + */ + update = (data: PumpUpdateInput, params: RequestParams = {}) => + this.request({ + path: `/api/admin/equ-pump/update`, + method: 'PUT', + body: data, + type: ContentType.Json, + ...params, + }) + + /** + * 软删除 + */ + softDelete = (params: { id: number }, requestParams: RequestParams = {}) => + this.request({ + path: `/api/admin/equ-pump/soft-delete`, + method: 'DELETE', + query: params, + ...requestParams, + }) +} diff --git a/src/api/admin/data-contracts.ts b/src/api/admin/data-contracts.ts index aa21402..f4c18e4 100644 --- a/src/api/admin/data-contracts.ts +++ b/src/api/admin/data-contracts.ts @@ -6988,3 +6988,310 @@ export interface TestequUpdateInput { */ id: number } + +/** 外置泵分页查询输入 */ +export interface PageInputPumpGetPageInput { + dynamicFilter?: DynamicFilterInfo + /** 排序列表 */ + sortList?: SortInput[] | null + /** + * 当前页标 + * @format int32 + */ + currentPage?: number + /** + * 每页大小 + * @format int32 + */ + pageSize?: number + /** 分页请求 */ + filter?: PumpGetPageInput +} + +/** 外置泵分页查询过滤条件 */ +export interface PumpGetPageInput { + /** 关键词 */ + keyWord?: string | null + /** 设备型号 */ + model?: string | null + /** 负责人ID */ + principalId?: number | null + /** 开始日期 */ + stDate?: string | null + /** 结束日期 */ + edDate?: string | null + /** 是否空气泵 */ + isAirPump?: boolean +} + +/** 外置泵分页查询输出 */ +export interface PumpGetPageOutput { + /** + * 编号 + * @format int64 + */ + id?: number + /** 设备编号 */ + deviceNo?: string | null + /** 资产编号 */ + assetNo?: string | null + /** 设备型号 */ + model?: string | null + /** 规格 */ + specification?: string | null + /** + * 泵速(g/min) + * @format double + */ + pumpSpeed?: number + /** + * 负责人ID + * @format int64 + */ + principalId?: number + /** + * 超时(s) + * @format int32 + */ + pumpTimeout?: number + /** 维护标记 */ + maintenanceFlag?: boolean + /** IP地址 */ + ip?: string | null + /** 端口号 */ + port?: string | null + /** + * 泵速系数 + * @format double + */ + speedCoefficient?: number + /** 服务名称 */ + serviceName?: string | null + /** 是否空气泵 */ + isAirPump?: boolean + /** + * 工作速度 + * @format double + */ + workingSpeed?: number + /** + * 工作时间 + * @format int32 + */ + workingTime?: number + /** + * 配置ID + * @format int64 + */ + configId?: number + /** 创建者 */ + createdUserName?: string | null + /** + * 创建时间 + * @format date-time + */ + createdTime?: string | null +} + +/** 外置泵详情输出 */ +export interface PumpGetOutput { + /** 设备编号 */ + deviceNo?: string | null + /** 资产编号 */ + assetNo?: string | null + /** 设备型号 */ + model?: string | null + /** 规格 */ + specification?: string | null + /** + * 泵速(g/min) + * @format double + */ + pumpSpeed?: number + /** + * 负责人ID + * @format int64 + */ + principalId?: number + /** + * 超时(s) + * @format int32 + */ + pumpTimeout?: number + /** 维护标记 */ + maintenanceFlag?: boolean + /** IP地址 */ + ip?: string | null + /** 端口号 */ + port?: string | null + /** + * 泵速系数 + * @format double + */ + speedCoefficient?: number + /** 服务名称 */ + serviceName?: string | null + /** 是否空气泵 */ + isAirPump?: boolean + /** + * 工作速度 + * @format double + */ + workingSpeed?: number + /** + * 工作时间 + * @format int32 + */ + workingTime?: number + /** + * 配置ID + * @format int64 + */ + configId?: number + /** + * 主键Id + * @format int64 + */ + id: number +} + +/** 外置泵新增输入 */ +export interface PumpAddInput { + /** 设备编号 */ + deviceNo?: string | null + /** 资产编号 */ + assetNo?: string | null + /** 设备型号 */ + model?: string | null + /** 规格 */ + specification?: string | null + /** + * 泵速(g/min) + * @format double + */ + pumpSpeed?: number + /** + * 负责人ID + * @format int64 + */ + principalId?: number + /** + * 超时(s) + * @format int32 + */ + pumpTimeout?: number + /** 维护标记 */ + maintenanceFlag?: boolean + /** IP地址 */ + ip?: string | null + /** 端口号 */ + port?: string | null + /** + * 泵速系数 + * @format double + */ + speedCoefficient?: number + /** 服务名称 */ + serviceName?: string | null + /** 是否空气泵 */ + isAirPump?: boolean + /** + * 工作速度 + * @format double + */ + workingSpeed?: number + /** + * 工作时间 + * @format int32 + */ + workingTime?: number + /** + * 配置ID + * @format int64 + */ + configId?: number +} + +/** 外置泵更新输入 */ +export interface PumpUpdateInput { + /** 设备编号 */ + deviceNo?: string | null + /** 资产编号 */ + assetNo?: string | null + /** 设备型号 */ + model?: string | null + /** 规格 */ + specification?: string | null + /** + * 泵速(g/min) + * @format double + */ + pumpSpeed?: number + /** + * 负责人ID + * @format int64 + */ + principalId?: number + /** + * 超时(s) + * @format int32 + */ + pumpTimeout?: number + /** 维护标记 */ + maintenanceFlag?: boolean + /** IP地址 */ + ip?: string | null + /** 端口号 */ + port?: string | null + /** + * 泵速系数 + * @format double + */ + speedCoefficient?: number + /** 服务名称 */ + serviceName?: string | null + /** 是否空气泵 */ + isAirPump?: boolean + /** + * 工作速度 + * @format double + */ + workingSpeed?: number + /** + * 工作时间 + * @format int32 + */ + workingTime?: number + /** + * 配置ID + * @format int64 + */ + configId?: number + /** + * 主键Id + * @format int64 + */ + id: number +} + +/** 泵速策略输出 */ +export interface FeedingConfigGetListOutput { + /** + * 配置ID + * @format int64 + */ + id?: number + /** 配置名称 */ + name?: string | null + /** 配置编码 */ + code?: string | null + /** 配置描述 */ + description?: string | null + /** + * 泵速值 + * @format double + */ + pumpSpeed?: number + /** 启用状态 */ + enabled?: boolean +} diff --git a/src/views/admin/pump/components/pump-form.vue b/src/views/admin/pump/components/pump-form.vue new file mode 100644 index 0000000..cb04460 --- /dev/null +++ b/src/views/admin/pump/components/pump-form.vue @@ -0,0 +1,506 @@ + + + + + diff --git a/src/views/admin/pump/index.vue b/src/views/admin/pump/index.vue new file mode 100644 index 0000000..a73476b --- /dev/null +++ b/src/views/admin/pump/index.vue @@ -0,0 +1,302 @@ + + + + + diff --git a/src/views/admin/testequ/components/testequ-form.vue b/src/views/admin/testequ/components/testequ-form.vue index 143a940..1a7f045 100644 --- a/src/views/admin/testequ/components/testequ-form.vue +++ b/src/views/admin/testequ/components/testequ-form.vue @@ -1,19 +1,24 @@