From 618546a9ecebee1cbdf058362d63ea60a9cc6b9f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=A4=9C=E7=AC=99=E6=AD=8C?= <2277317060@qq.com> Date: Mon, 21 Nov 2022 17:01:22 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E5=8F=91=E6=B3=A1=E7=BA=BF?= =?UTF-8?q?=E7=94=9F=E4=BA=A7=E7=BB=9F=E8=AE=A1=E6=95=B0=E6=8D=AE=E8=A1=A8?= =?UTF-8?q?=E6=A0=BC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../main/resources/templates/scada/NorthFoamerMesPlan.html | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ruoyi-admin/src/main/resources/templates/scada/NorthFoamerMesPlan.html b/ruoyi-admin/src/main/resources/templates/scada/NorthFoamerMesPlan.html index e4c4384..0c8e3da 100644 --- a/ruoyi-admin/src/main/resources/templates/scada/NorthFoamerMesPlan.html +++ b/ruoyi-admin/src/main/resources/templates/scada/NorthFoamerMesPlan.html @@ -480,7 +480,7 @@ let plannedProduction = arr.map(e => e.plannedProduction).reduce((a, b) => a + b) || 0 let actualProduction = arr.map(e => e.actualProduction).reduce((a, b) => a + b) || 0 dataA.push([val.split(',')[0], '正常', arr[0].target, plannedProduction, actualProduction, plannedProduction === 0 ? '0%' : ((actualProduction / plannedProduction) * 100).toString().substr(0, 5) + '%', filter(arr, 'recordTime', 8, 'actualProduction') || 0, filter(arr, 'recordTime', 9, 'actualProduction') || 0, filter(arr, 'recordTime', 10, 'actualProduction') || 0, filter(arr, 'recordTime', 11, 'actualProduction') || 0, filter(arr, 'recordTime', 12, 'actualProduction') || 0, filter(arr, 'recordTime', 13, 'actualProduction') || 0, filter(arr, 'recordTime', 14, 'actualProduction') || 0, filter(arr, 'recordTime', 15, 'actualProduction') || 0, filter(arr, 'recordTime', 16, 'actualProduction') || 0, filter(arr, 'recordTime', 17, 'actualProduction') || 0, filter(arr, 'recordTime', 18, 'actualProduction') || 0, filter(arr, 'recordTime', 19, 'actualProduction') || 0]) - }else{ + } else { let arr = data.filter(e => e.orderType === val) let plannedProduction = arr.map(e => e.plannedProduction).reduce((a, b) => a + b) || 0 let actualProduction = arr.map(e => e.actualProduction).reduce((a, b) => a + b) || 0 @@ -494,7 +494,7 @@ planInfo.loadData(dataA, 18, { includeHead: true, }) - planInfo2.loadData(dataB, 18, { + planInfo2.loadData(dataB.length > 2 ? dataB : dataA, 18, { includeHead: true, }) })