From 40ebca257378d39b2d1c999563e3a229b5789e93 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=A0=82=E7=B3=96?= <2178503051@qq.com> Date: Wed, 3 Jun 2026 16:59:03 +0800 Subject: [PATCH] feat(mes/eqp/check): add inspector summary statistics table MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 新增按实际巡检人维度的巡检汇总统计表格,展示巡检人、巡检次数、通过/不通过数量及通过率 --- klp-ui/src/views/mes/eqp/check/day.vue | 27 ++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) diff --git a/klp-ui/src/views/mes/eqp/check/day.vue b/klp-ui/src/views/mes/eqp/check/day.vue index 511f2b2a..0a56c317 100644 --- a/klp-ui/src/views/mes/eqp/check/day.vue +++ b/klp-ui/src/views/mes/eqp/check/day.vue @@ -37,6 +37,17 @@ + +
按实际巡检人汇总
+ + + + + + + +
+
按负责人汇总
@@ -195,6 +206,22 @@ export default { const end = new Date(this.dateRange[1]); return Math.ceil((end - start) / (1000 * 60 * 60 * 24)) + 1; }, + inspectorSummary() { + const map = {}; + this.records.forEach(r => { + const name = r.inspector || '未指定'; + if (!map[name]) { + map[name] = { inspector: name, total: 0, pass: 0, fail: 0 }; + } + map[name].total++; + if (r.runStatus === 1) map[name].pass++; + else if (r.runStatus === 2) map[name].fail++; + }); + return Object.values(map).map(p => ({ + ...p, + passRate: p.total > 0 ? (p.pass / p.total * 100).toFixed(1) + '%' : '0%', + })); + }, personSummary() { const personMap = {}; this.partList.forEach(p => {