From b0a439b7c9a7a38458110d2538efe7b2323236ec Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=A4=9C=E7=AC=99=E6=AD=8C?= <2277317060@qq.com> Date: Sat, 23 Jul 2022 12:27:50 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E7=95=8C=E9=9D=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../resources/static/js/board/finalAssemblyProductionData.js | 4 ++-- ruoyi-admin/src/main/resources/templates/broad/fp.html | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/ruoyi-admin/src/main/resources/static/js/board/finalAssemblyProductionData.js b/ruoyi-admin/src/main/resources/static/js/board/finalAssemblyProductionData.js index 786a474..ada37e5 100644 --- a/ruoyi-admin/src/main/resources/static/js/board/finalAssemblyProductionData.js +++ b/ruoyi-admin/src/main/resources/static/js/board/finalAssemblyProductionData.js @@ -69,7 +69,7 @@ $(() => { } // 达成率 if (targetTop.progress != 0) { - targetTop.rate = ((targetTop.reality / targetTop.progress).toFixed(4) * 100 + '').substring(0, 5) + targetTop.rate = ((targetTop.reality / targetTop.progress)).toFixed(4) * 100 } else { targetTop.rate = 0 } @@ -103,7 +103,7 @@ $(() => { targetBottom.targetArr = arr xName = ['0:00', '1:00', '2:00', '3:00', '4:00', '5:00', '6:00', '7:00', '8:00', '9:00', '10:00', '11:00', '12:00', '13:00', '14:00', '15:00', '16:00', '17:00', '18:00', '19:00', '20:00', '21:00', '22:00', '23:00'] } - targetBottom.reality = (data.map(val => val.rate).reduce((val1, val2) => val1 + val2, 0) / data.map(val => val.rate).length).toFixed(4) + targetBottom.reality = ((data.map(val => val.rate).reduce((val1, val2) => val1 + val2, 0) / data.map(val => val.rate).length)).toFixed(4) targetBottom.total = data.map(val => val.qty).reduce((val1, val2) => val1 + val2, 0) barChartAndLineChartFour({ xName: xName, diff --git a/ruoyi-admin/src/main/resources/templates/broad/fp.html b/ruoyi-admin/src/main/resources/templates/broad/fp.html index 7676c48..e122345 100644 --- a/ruoyi-admin/src/main/resources/templates/broad/fp.html +++ b/ruoyi-admin/src/main/resources/templates/broad/fp.html @@ -505,10 +505,10 @@ times++ } getTable(classes,dataOne) - total(((data.filter(val => val.status === '生产中').length / 28).toFixed(4) * 100 + '').substring(0, 5) + '%', + total(((data.filter(val => val.status === '生产中').length / 28)).toFixed(4) * 100 + '%', eval(data.map(val => val.plan_number).join('+')), eval(data.map(val => val.qty).join('+')), - ((eval(data.map(val => val.qty).join('+')) / eval(data.map(val => val.plan_number).join('+'))).toFixed(4) * 100 + '').substring(0, 5) + '%', + ((eval(data.map(val => val.qty).join('+')) / eval(data.map(val => val.plan_number).join('+')))).toFixed(4) * 100+ '%', eval(data.map(val => val.h1).join('+')), eval(data.map(val => val.h2).join('+')), eval(data.map(val => val.h3).join('+')),