From ac630851929d3b6b6d9fc568cd0e06e1f3f18dd3 Mon Sep 17 00:00:00 2001 From: shijing Date: Thu, 30 Jul 2026 14:02:26 +0800 Subject: [PATCH] =?UTF-8?q?fix:=E7=A6=85=E9=81=93474?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/statistics/total_statistics.vue | 19 +++++++++++++++---- 1 file changed, 15 insertions(+), 4 deletions(-) diff --git a/src/views/statistics/total_statistics.vue b/src/views/statistics/total_statistics.vue index 2a88f27a..69af4b66 100644 --- a/src/views/statistics/total_statistics.vue +++ b/src/views/statistics/total_statistics.vue @@ -157,6 +157,12 @@ export default { }, created() {}, methods: { + normalizeBangModel(model) { + if (model === "G05(粗)" || model === "G05(细)") { + return "G05"; + } + return model; + }, getCountOk(type,models) { let that = this; let params = { @@ -177,6 +183,7 @@ export default { } else { b_model = item.型号; } + b_model = that.normalizeBangModel(b_model); let index = models.indexOf(b_model); if(index>-1){ that.tableData11[index].中检合格数 += item.合格数量; @@ -189,6 +196,7 @@ export default { } else { b_model = item1.型号; } + b_model = that.normalizeBangModel(b_model); let index = models.indexOf(b_model); if(index>-1){ that.tableData11[index].检验合格数 += item1.数量; @@ -271,13 +279,15 @@ export default { //按版型(型号)分组 data.forEach((item) => { let index = 0; + let model = ""; if (item.型号.indexOf("+") > -1) { - let model = item.型号.split("+")[0]; - index = models.indexOf(model); - item.型号 = model; + model = item.型号.split("+")[0]; } else { - index = models.indexOf(item.型号); + model = item.型号; } + model = that.normalizeBangModel(model); + item.型号 = model; + index = models.indexOf(model); if (index > -1) { dataArr[index].push(item); } else { @@ -355,6 +365,7 @@ export default { } else { model = item.型号; } + model = that.normalizeBangModel(model); let index = models.indexOf(model); if (index > -1) { that.tableData11[index].检验合格数 += item.数量;