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, }) })