From f5473d479c4809650f39821dbad912e70a5aaf75 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=A4=9C=E7=AC=99=E6=AD=8C?= <2277317060@qq.com> Date: Tue, 26 Jul 2022 09:50:56 +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 --- .../static/css/board/beforeLibrary.css | 7 +++-- .../static/js/board/beforeLibrary.js | 27 ++++++++++++++----- .../js/board/finalAssemblyProductionData.js | 9 ++++++- 3 files changed, 32 insertions(+), 11 deletions(-) diff --git a/ruoyi-admin/src/main/resources/static/css/board/beforeLibrary.css b/ruoyi-admin/src/main/resources/static/css/board/beforeLibrary.css index c9c7c76..b18cd91 100644 --- a/ruoyi-admin/src/main/resources/static/css/board/beforeLibrary.css +++ b/ruoyi-admin/src/main/resources/static/css/board/beforeLibrary.css @@ -61,8 +61,8 @@ body { .distributionOfBadTypesInProductionLineByDay{ position: absolute; width: 30%; - height: 35%; - top: 60%; + height: 30%; + top: 65%; left: 66.6%; } @@ -90,7 +90,6 @@ body { background-color: #2C95FD; color:#C2D8FF; } -.orderQuantityFulfillmentRateOfTheDay .autoscroll-table .autoscroll-table_thead tr .autoscroll-table_tbody:nth-child(n+1){ +.orderQuantityFulfillmentRateOfTheDay .autoscroll-table .autoscroll-table_tbody tr td:nth-child(n+1){ text-align: left; - } \ No newline at end of file diff --git a/ruoyi-admin/src/main/resources/static/js/board/beforeLibrary.js b/ruoyi-admin/src/main/resources/static/js/board/beforeLibrary.js index 407d76c..e583712 100644 --- a/ruoyi-admin/src/main/resources/static/js/board/beforeLibrary.js +++ b/ruoyi-admin/src/main/resources/static/js/board/beforeLibrary.js @@ -6,7 +6,7 @@ $(() => { const INTERVAL = 30000 // 订单详情 - const orderDetailsTable = new AutoScrollTable(document.getElementById("orderQuantityFulfillmentRateOfTheDay"), ["编号", "型号", "计划数量", "完成数量", "差异值"], {width: ['10%', null, null, null, '9%']}) + const orderDetailsTable = new AutoScrollTable(document.getElementById("orderQuantityFulfillmentRateOfTheDay"), ["编号", "型号", "计划数量", "完成数量", "差异值"], {width: ['13%', '40%', null, null, '9%']}) // 成品质量详情 const PropertyInsuranceOneDayOrderInfoTable = new AutoScrollTable(document.getElementById("PropertyInsuranceOneDayOrderInfo"), ["检测项", "质量缺陷", "数量",'占比'], {width: ['30%', null, null, null]}) @@ -35,7 +35,15 @@ $(() => { arr[8] = Math.ceil(targetTop.tips / 22) arr[0] = arr[0] - (arr.reduce((val1, val2) => val1 + val2, 0) - targetTop.tips) targetTop.targetArr = arr - targetTop.progress = arr.slice(0, data.length).reduce((val1, val2) => val1 + val2, 0) + let num = 0 + arr.forEach((val,index) => { + console.log(data[index]) + if(data[index].qty){ + num += arr[index] + } + }) + targetTop.progress = num + // targetTop.progress = arr.slice(0, data.length).reduce((val1, val2) => val1 + val2, 0) for (let i = 0; i < 12; i++) { xName.push(`${(oneTime + i) % 24}:30`) } @@ -48,6 +56,14 @@ $(() => { arr[13] = Math.ceil(targetTop.tips / 46) arr[0] = arr[0] - (arr.reduce((val1, val2) => val1 + val2, 0) - targetTop.tips) targetTop.targetArr = arr + // let num = 0 + // arr.forEach((val,index) => { + // console.log(data[index]) + // if(data[index].qty){ + // num += arr[index] + // } + // }) + // targetTop.progress = num targetTop.progress = arr.slice(0, data.length).reduce((val1, val2) => val1 + val2, 0) 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'] } @@ -110,18 +126,17 @@ $(() => { //成品质量详情轮询 autoUpdate(url + "/selectQualityInfo ", INTERVAL, data => { PropertyInsuranceOneDayOrderInfoTable.loadData(data.map(value => [value.item, value.type, value.qty, `${value.rate}%`]), Object.keys(["检测项", "质量缺陷", "数量",'占比'])) - }) - //产线不良类型分布 + 质量统计轮询 - autoUpdate(url + "/selectQualityItem ", INTERVAL, data => { pieChart(data.map(val => { return { - name: val.name, + name: val.type, value: val.qty } }), document.getElementById("distributionOfBadTypesInProductionLineByDay")); }) + + //产线不良类型分布 + 质量统计轮询 autoUpdate("/broad/mtk/selectQAZD", INTERVAL, data => { percentageRingDiagramTwo([ { 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 57dcbbb..e8731c3 100644 --- a/ruoyi-admin/src/main/resources/static/js/board/finalAssemblyProductionData.js +++ b/ruoyi-admin/src/main/resources/static/js/board/finalAssemblyProductionData.js @@ -65,7 +65,14 @@ $(() => { arr[8] = Math.ceil(targetTop.tips / 22) arr[0] = arr[0] - (arr.reduce((val1, val2) => val1 + val2, 0) - targetTop.tips) targetTop.targetArr = arr - targetTop.progress = arr.slice(0, data.length).reduce((val1, val2) => val1 + val2, 0) + // targetTop.progress = arr.slice(0, data.length).reduce((val1, val2) => val1 + val2, 0) + let num = 0 + arr.forEach((val,index) => { + if(data[index].qty){ + num += arr[index] + } + }) + targetTop.progress = num for (let i = 0; i < 12; i++) { xName.push(`${(oneTime + i) % 24}:30`) }