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 2b07486..f444a4d 100644 --- a/ruoyi-admin/src/main/resources/static/js/board/finalAssemblyProductionData.js +++ b/ruoyi-admin/src/main/resources/static/js/board/finalAssemblyProductionData.js @@ -12,19 +12,19 @@ $(() => { $.post(url + "/selectProductInByTeam/0", {}, data => { data = JSON.parse(data) if (isFirst) { - target.top = data.map(val => val.val) - target.bottom = data.val - request() - isFirst = false + // target.top = data.map(val => val.val) + // target.bottom = data.val + // request() + // isFirst = false } }) // LOSS(分类) - $.post(url + "/selectProductInByTeam/0", {}, data => { + $.post(url + "/selectLossInfo", {}, data => { data = JSON.parse(data) - LOSS() + LOSS(data.find(val => val.name == '1').qty) verticalBarChart({ - xName: [">10分钟", "3-10分钟", "0-3分钟"], - yData: [254, 3254, 1654], + xName: ["0-3分钟", "3-10分钟", ">10分钟"], + yData: [data.find(val => val.name == '2').qty, data.find(val => val.name == '3').qty, data.find(val => val.name == '4').qty], }, document.getElementById("LOSSClassify")); }) // 产量 @@ -103,7 +103,7 @@ const LOSS = (val1=0,val2=24) => { ${val1} ${val2} ` - $('body').append(html) + $('#LOSS').html(html) } const moduleTitle = () => { const html = ` diff --git a/ruoyi-admin/src/main/resources/static/js/echartsCommon.js b/ruoyi-admin/src/main/resources/static/js/echartsCommon.js index 6b5b196..c5912c4 100644 --- a/ruoyi-admin/src/main/resources/static/js/echartsCommon.js +++ b/ruoyi-admin/src/main/resources/static/js/echartsCommon.js @@ -1010,7 +1010,7 @@ const verticalBarChart = function (data, id) { let charts = echarts.init(id); if (!data) { data = { - xName: [">10分钟", "3-10分钟", "0-3分钟"], + xName: ["0-3分钟", "3-10分钟", ">10分钟"], yData: [254, 3254, 1654], } } @@ -1021,7 +1021,7 @@ const verticalBarChart = function (data, id) { } }, grid: { - top: "5%", + top: "10%", left: "1%", right: "1%", bottom: "1%", @@ -1071,7 +1071,8 @@ const verticalBarChart = function (data, id) { textStyle: { fontSize: 0.8 * vw, color: '#fff' - } + }, + formatter:`{c}次` }, itemStyle: { normal: { diff --git a/ruoyi-admin/src/main/resources/templates/broad/finalAssemblyProductionData.html b/ruoyi-admin/src/main/resources/templates/broad/finalAssemblyProductionData.html index 0d111c0..f140917 100644 --- a/ruoyi-admin/src/main/resources/templates/broad/finalAssemblyProductionData.html +++ b/ruoyi-admin/src/main/resources/templates/broad/finalAssemblyProductionData.html @@ -40,6 +40,7 @@
+
@@ -51,6 +52,7 @@ + diff --git a/ruoyi-admin/src/main/resources/templates/broad/fp.html b/ruoyi-admin/src/main/resources/templates/broad/fp.html index 5d0d93b..66942f1 100644 --- a/ruoyi-admin/src/main/resources/templates/broad/fp.html +++ b/ruoyi-admin/src/main/resources/templates/broad/fp.html @@ -490,7 +490,10 @@ }) // 获取班次 autoUpdate('/broad/fp/selectTeamGroups', INTERVAL, data => { - classes = data + console.log(data) + console.log(classes) + classes = data[`班组`] + console.log(classes) }) // 生产统计数据 autoUpdate('/broad/fp/selectStationHourInfo', INTERVAL, data => {