From a4148ff5b28e2b7778e4f6f6a3a927d1cbdfc3c0 Mon Sep 17 00:00:00 2001 From: "Asoka.Wang" Date: Fri, 20 Jun 2025 15:01:07 +0800 Subject: [PATCH] =?UTF-8?q?add=20=E4=B8=8B=E6=B8=B8=E4=B8=8A=E6=B8=B8?= =?UTF-8?q?=E6=89=B9=E6=AC=A1=E7=AE=A1=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/admin/PreBatchApi.ts | 70 +++++ src/api/admin/UspBatchApi.ts | 70 +++++ src/api/types/preBatchType.ts | 60 ++++ src/api/types/uspBatchType.ts | 64 ++++ .../dspbatch/components/prebatch-form.vue | 200 +++++++++++++ src/views/admin/dspbatch/index.vue | 271 +++++++++++++++++ src/views/admin/template/index.vue | 2 - .../uspbatch/components/uspbatch-form.vue | 200 +++++++++++++ src/views/admin/uspbatch/index.vue | 281 ++++++++++++++++++ 9 files changed, 1216 insertions(+), 2 deletions(-) create mode 100644 src/api/admin/PreBatchApi.ts create mode 100644 src/api/admin/UspBatchApi.ts create mode 100644 src/api/types/preBatchType.ts create mode 100644 src/api/types/uspBatchType.ts create mode 100644 src/views/admin/dspbatch/components/prebatch-form.vue create mode 100644 src/views/admin/dspbatch/index.vue create mode 100644 src/views/admin/uspbatch/components/uspbatch-form.vue create mode 100644 src/views/admin/uspbatch/index.vue diff --git a/src/api/admin/PreBatchApi.ts b/src/api/admin/PreBatchApi.ts new file mode 100644 index 0000000..45fb32b --- /dev/null +++ b/src/api/admin/PreBatchApi.ts @@ -0,0 +1,70 @@ +import { RequestParams } from './http-client' +import { ContentType, HttpClient } from './http-client' +import type { + PreBatchDto, + PreBatchPageInput, + PreBatchPageResponse, + PreBatchOutput, + PreBatchAddInput, + PreBatchUpdateInput +} from '/@/api/types/preBatchType' + +export class PreBatchApi extends HttpClient { + /** + * 获取分页列表 + */ + getPage = (data: PreBatchPageInput, params: RequestParams = {}) => + this.request({ + path: `/api/admin/pre-batch/get-page`, + method: 'POST', + body: data, + type: ContentType.Json, + ...params, + }) + + /** + * 获取单条数据 + */ + get = (params: { id: number }, requestParams: RequestParams = {}) => + this.request({ + path: `/api/admin/pre-batch/get`, + method: 'GET', + query: { id: params.id }, + ...requestParams, + }) + + /** + * 新增 + */ + add = (data: PreBatchAddInput, params: RequestParams = {}) => + this.request({ + path: `/api/admin/pre-batch/add`, + method: 'POST', + body: data, + type: ContentType.Json, + ...params, + }) + + /** + * 更新 + */ + update = (data: PreBatchUpdateInput, params: RequestParams = {}) => + this.request({ + path: `/api/admin/pre-batch/update`, + method: 'PUT', + body: data, + type: ContentType.Json, + ...params, + }) + + /** + * 软删除 + */ + softDelete = (params: { id: number }, requestParams: RequestParams = {}) => + this.request({ + path: `/api/admin/pre-batch/soft-delete`, + method: 'DELETE', + query: params, + ...requestParams, + }) +} \ No newline at end of file diff --git a/src/api/admin/UspBatchApi.ts b/src/api/admin/UspBatchApi.ts new file mode 100644 index 0000000..9485dfb --- /dev/null +++ b/src/api/admin/UspBatchApi.ts @@ -0,0 +1,70 @@ +import { RequestParams } from './http-client' +import { ContentType, HttpClient } from './http-client' +import type { + UspBatchDto, + UspBatchPageInput, + UspBatchPageResponse, + UspBatchOutput, + UspBatchAddInput, + UspBatchUpdateInput +} from '/@/api/types/uspBatchType' + +export class UspBatchApi extends HttpClient { + /** + * 获取分页列表 + */ + getPage = (data: UspBatchPageInput, params: RequestParams = {}) => + this.request({ + path: `/api/admin/pre-batch/get-page`, + method: 'POST', + body: data, + type: ContentType.Json, + ...params, + }) + + /** + * 获取单条数据 + */ + get = (params: { id: number }, requestParams: RequestParams = {}) => + this.request({ + path: `/api/admin/pre-batch/get`, + method: 'GET', + query: { id: params.id }, + ...requestParams, + }) + + /** + * 新增 + */ + add = (data: UspBatchAddInput, params: RequestParams = {}) => + this.request({ + path: `/api/admin/pre-batch/add`, + method: 'POST', + body: data, + type: ContentType.Json, + ...params, + }) + + /** + * 更新 + */ + update = (data: UspBatchUpdateInput, params: RequestParams = {}) => + this.request({ + path: `/api/admin/pre-batch/update`, + method: 'PUT', + body: data, + type: ContentType.Json, + ...params, + }) + + /** + * 软删除 + */ + softDelete = (params: { id: number }, requestParams: RequestParams = {}) => + this.request({ + path: `/api/admin/pre-batch/soft-delete`, + method: 'DELETE', + query: params, + ...requestParams, + }) +} \ No newline at end of file diff --git a/src/api/types/preBatchType.ts b/src/api/types/preBatchType.ts new file mode 100644 index 0000000..5cf52e6 --- /dev/null +++ b/src/api/types/preBatchType.ts @@ -0,0 +1,60 @@ +import { ServiceResponse } from './response' +import { ServiceRequestPage } from './pageInput' +import { PageResponse } from './pageResponse' + +// 过滤条件 +export interface PreBatchFilter { + /** 预批次名称 */ + keyWord?: string | null + /** 项目ID */ + projectId?: number | null + /** 是否下游 */ + isDown?: boolean | null + /** 开始时间 */ + stDate?: string | null + /** 结束时间 */ + edDate?: string | null +} + +/** + * 预批次分页数据接口 + */ +export interface PreBatchPageDto { + /** 主键ID */ + id: number + /** 预批次名称 */ + preBatchName: string + /** 预批次编号 */ + preBatchNo: string + /** 项目ID */ + projectId?: number | null + /** 创建用户真实姓名 */ + createdUserRealName?: string + /** 创建时间 */ + createdTime: string +} + +/** + * 预批次完整数据接口 + */ +export interface PreBatchDto { + /** 主键ID */ + id?: number + /** 预批次名称 */ + preBatchName: string + /** 预批次编号 */ + preBatchNo: string + /** 项目ID */ + projectId?: number | null + /** 是否下游 0否1是 */ + isDown?: boolean | null + /** 滴度 */ + titer?: number | null +} + +export type PreBatchPageInput = ServiceRequestPage +export type PreBatchPageResponse = ServiceResponse> + +export type PreBatchOutput = ServiceResponse +export type PreBatchAddInput = PreBatchDto +export type PreBatchUpdateInput = PreBatchDto \ No newline at end of file diff --git a/src/api/types/uspBatchType.ts b/src/api/types/uspBatchType.ts new file mode 100644 index 0000000..71c324a --- /dev/null +++ b/src/api/types/uspBatchType.ts @@ -0,0 +1,64 @@ +import { ServiceResponse } from './response' +import { ServiceRequestPage } from './pageInput' +import { PageResponse } from './pageResponse' + +// 过滤条件 +export interface UspBatchFilter { + /** 关键字 */ + keyWord?: string | null + /** 项目ID */ + projectId?: number | null + /** 是否下游 */ + isDown?: boolean | null + /** 开始时间 */ + stDate?: string | null + /** 结束时间 */ + edDate?: string | null +} + +/** + * USP批次分页数据接口 + */ +export interface UspBatchPageDto { + /** 主键ID */ + id: number + /** USP批次名称 */ + uspBatchName: string + /** USP批次编号 */ + uspBatchNo: string + /** 项目ID */ + projectId?: number | null + /** 是否下游 */ + isDown?: boolean | null + /** 滴度 */ + titer?: number | null + /** 创建用户真实姓名 */ + createdUserRealName?: string + /** 创建时间 */ + createdTime: string +} + +/** + * USP批次完整数据接口 + */ +export interface UspBatchDto { + /** 主键ID */ + id?: number + /** USP批次名称 */ + uspBatchName: string + /** USP批次编号 */ + uspBatchNo: string + /** 项目ID */ + projectId?: number | null + /** 是否下游 */ + isDown?: boolean | null + /** 滴度 */ + titer?: number | null +} + +export type UspBatchPageInput = ServiceRequestPage +export type UspBatchPageResponse = ServiceResponse> + +export type UspBatchOutput = ServiceResponse +export type UspBatchAddInput = UspBatchDto +export type UspBatchUpdateInput = UspBatchDto \ No newline at end of file diff --git a/src/views/admin/dspbatch/components/prebatch-form.vue b/src/views/admin/dspbatch/components/prebatch-form.vue new file mode 100644 index 0000000..df02749 --- /dev/null +++ b/src/views/admin/dspbatch/components/prebatch-form.vue @@ -0,0 +1,200 @@ + + + + + \ No newline at end of file diff --git a/src/views/admin/dspbatch/index.vue b/src/views/admin/dspbatch/index.vue new file mode 100644 index 0000000..fad6040 --- /dev/null +++ b/src/views/admin/dspbatch/index.vue @@ -0,0 +1,271 @@ + + + + + \ No newline at end of file diff --git a/src/views/admin/template/index.vue b/src/views/admin/template/index.vue index 5c4af85..c98aa0d 100644 --- a/src/views/admin/template/index.vue +++ b/src/views/admin/template/index.vue @@ -288,8 +288,6 @@ const handleReactorSelect = async (data: { reactorId: number | null, remark: str reactorId: data.reactorId }) - console.log('API 调用结果:', res) - if (res.success) { proxy.$modal.msgSuccess('复制成功') Query() diff --git a/src/views/admin/uspbatch/components/uspbatch-form.vue b/src/views/admin/uspbatch/components/uspbatch-form.vue new file mode 100644 index 0000000..c475830 --- /dev/null +++ b/src/views/admin/uspbatch/components/uspbatch-form.vue @@ -0,0 +1,200 @@ + + + + + \ No newline at end of file diff --git a/src/views/admin/uspbatch/index.vue b/src/views/admin/uspbatch/index.vue new file mode 100644 index 0000000..a8aeaa3 --- /dev/null +++ b/src/views/admin/uspbatch/index.vue @@ -0,0 +1,281 @@ + + + + + \ No newline at end of file