From 04ff12df2130f043a1549110b7140d2c40213945 Mon Sep 17 00:00:00 2001 From: zch Date: Mon, 3 Mar 2025 21:09:38 +0800 Subject: [PATCH] =?UTF-8?q?refactor(mes):=20=E9=87=8D=E6=9E=84=E7=94=9F?= =?UTF-8?q?=E4=BA=A7=E8=AE=A1=E5=88=92=E7=9B=91=E6=8E=A7=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 修改接口名称和返回类型:queryMoritorPageList -> queryMoritorList,返回类型从 TableDataInfo 改为 List - 新增 PlanMonitorVo 和 ShiftGroupVo 类用于监控数据展示 - 优化前端监控页面,按机台和班次分组展示计划信息 - 重构后端查询逻辑,按时间区间参数查询监控数据 - 更新数据库查询语句,使用 WITH 子句进行预处理 --- src/api/mes/planInfo/index.ts | 4 +- src/api/mes/planInfo/types.ts | 36 +++ src/views/mes/planInfo/monitorPlan.vue | 370 +++++++++++++------------ 3 files changed, 227 insertions(+), 183 deletions(-) diff --git a/src/api/mes/planInfo/index.ts b/src/api/mes/planInfo/index.ts index d93acbf..bc70cac 100644 --- a/src/api/mes/planInfo/index.ts +++ b/src/api/mes/planInfo/index.ts @@ -127,9 +127,9 @@ export const issuePlanInfo = (workshopId: string | number, planId: string | numb * @returns {*} */ -export const queryMoritorPageList = (query?: PlanInfoQuery): AxiosPromise => { +export const queryMoritorList = (query?: PlanInfoQuery): AxiosPromise => { return request({ - url: '/mes/planInfo/queryMoritorPageList', + url: '/mes/planInfo/queryMoritorList', method: 'get', params: query }); diff --git a/src/api/mes/planInfo/types.ts b/src/api/mes/planInfo/types.ts index fb14e68..20ccaf0 100644 --- a/src/api/mes/planInfo/types.ts +++ b/src/api/mes/planInfo/types.ts @@ -537,5 +537,41 @@ export interface PlanInfoQuery extends PageQuery { materialName?: string; } +// 计划监控班次分组视图对象 +export interface ShiftGroupVO { + /** + * 班次ID + */ + shiftId: string | number; + + /** + * 班次名称 + */ + shiftName: string; + + /** + * 该班次下的物料计划列表 + */ + plans: PlanInfoVO[]; +} + +// 生产计划监控视图对象 +export interface PlanMonitorVO { + /** + * 机台ID + */ + machineId: string | number; + + /** + * 机台名称 + */ + machineName: string; + + /** + * 班次分组列表 + */ + shifts: ShiftGroupVO[]; +} + diff --git a/src/views/mes/planInfo/monitorPlan.vue b/src/views/mes/planInfo/monitorPlan.vue index c0e63b3..afeefaa 100644 --- a/src/views/mes/planInfo/monitorPlan.vue +++ b/src/views/mes/planInfo/monitorPlan.vue @@ -6,7 +6,7 @@ - + - + @@ -46,45 +48,57 @@ - - + + - + - +