From b8962fa60a35ed993003dadbf38976e2f8fba2c2 Mon Sep 17 00:00:00 2001 From: zch Date: Wed, 20 May 2026 16:32:00 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E8=AE=BE=E5=A4=87OEE=E5=88=86=E6=9E=90?= =?UTF-8?q?=E6=94=AF=E6=8C=81=E7=8F=AD=E6=AC=A1=E7=AD=9B=E9=80=89=E5=8F=8A?= =?UTF-8?q?=E6=B3=A8=E5=A1=91=E8=BD=A6=E9=97=B4=E8=AE=A1=E7=AE=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/report/reportAPI.js | 4 +- src/views/report/deviceOeeAnalysis/index.vue | 76 +++++++++++++++----- 2 files changed, 59 insertions(+), 21 deletions(-) diff --git a/src/api/report/reportAPI.js b/src/api/report/reportAPI.js index 2032385..a11cdb1 100644 --- a/src/api/report/reportAPI.js +++ b/src/api/report/reportAPI.js @@ -226,10 +226,10 @@ export function repairHoursStatList(query) { }) } -// 设备 OEE 分析报表 +// 设备 OEE 分析报表 (注塑车间计算版本) export function deviceOeeAnalysisList(query) { return request({ - url: '/report/dmsReport/deviceOeeAnalysis', + url: '/report/injectionOee/deviceOeeAnalysis', method: 'get', params: query }) diff --git a/src/views/report/deviceOeeAnalysis/index.vue b/src/views/report/deviceOeeAnalysis/index.vue index e1d32ef..38cc8a3 100644 --- a/src/views/report/deviceOeeAnalysis/index.vue +++ b/src/views/report/deviceOeeAnalysis/index.vue @@ -1,6 +1,6 @@ @@ -78,7 +104,8 @@ export default { queryParams: { deviceCode: null, beginTime: null, - endTime: null + endTime: null, + shiftType: 'ALL' }, barChart: null } @@ -119,6 +146,7 @@ export default { /** 重置按钮 */ resetQuery() { this.queryParams.deviceCode = null + this.queryParams.shiftType = 'ALL' const today = parseTime(new Date(), '{y}-{m}-{d}') this.daterangeBeginTime = [today, today] this.handleQuery() @@ -126,7 +154,11 @@ export default { /** 初始化柱状图 */ initBarChart() { if (!this.barChart) return - const xData = (this.reportList || []).map(item => item.DEVICE_NAME || item.DEVICE_CODE) + // X轴标签包含设备名与班次 + const xData = (this.reportList || []).map(item => { + const devName = item.DEVICE_NAME || item.DEVICE_CODE + return `${devName}\n(${item.SHIFT_NAME})` + }) const yData = (this.reportList || []).map(item => item.OEE || 0) const option = { tooltip: { @@ -134,13 +166,19 @@ export default { formatter: params => { if (!params || !params.length) return '' const p = params[0] - return `${p.name}
OEE:${this.formatPercent(p.data)}` + const item = this.reportList[p.dataIndex] + if (!item) return `${p.name}
OEE:${this.formatPercent(p.data)}` + return `${item.DEVICE_NAME || item.DEVICE_CODE} (${item.SHIFT_DATE} ${item.SHIFT_NAME})
` + + `OEE:${this.formatPercent(item.OEE)}
` + + `└ 利用率(A):${this.formatPercent(item.AVAILABILITY)}
` + + `└ 性能(P):${this.formatPercent(item.PERFORMANCE)} (诊断值: ${this.formatPercent(item.DIAGNOSTIC_PERFORMANCE)})
` + + `└ 良品率(Q):${this.formatPercent(item.QUALITY)}` } }, grid: { left: '3%', right: '4%', - bottom: '3%', + bottom: '10%', containLabel: true }, xAxis: { @@ -148,7 +186,7 @@ export default { data: xData, axisLabel: { interval: 0, - rotate: 30 + rotate: 20 } }, yAxis: {