From a0b50cdc63831901abae69f26140e61e1192d29b Mon Sep 17 00:00:00 2001 From: shijing Date: Fri, 8 May 2026 16:34:37 +0800 Subject: [PATCH] =?UTF-8?q?fix:=E6=B4=81=E5=87=80=E8=BD=A6=E9=97=B4?= =?UTF-8?q?=EF=BC=88=E6=B4=97=EF=BC=89=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/bigScreen/bxerp/jiejingdept.vue | 68 ++++++++++++++--------- 1 file changed, 42 insertions(+), 26 deletions(-) diff --git a/src/views/bigScreen/bxerp/jiejingdept.vue b/src/views/bigScreen/bxerp/jiejingdept.vue index 4e2d227b..e327c47a 100644 --- a/src/views/bigScreen/bxerp/jiejingdept.vue +++ b/src/views/bigScreen/bxerp/jiejingdept.vue @@ -11,7 +11,7 @@
车间各工段生产产品数
- +
@@ -44,25 +44,25 @@
今日工序报工量
-
123
+
245
在产产品数
-
123
+
2
本月完工工单
-
123
+
20
本月计划产量
-
123
+
2465
@@ -407,18 +407,7 @@ export default { headerHeight:40, data:[] }, - config_left1:{ - data:[ - {name:'洗棒',value:0}, - {name:'捆棒',value:0}, - {name:'拉单丝',value:0}, - {name:'排一次棒',value:0}, - {name:'一次复丝',value:0}, - {name:'排二次棒',value:0}, - {name:'二次复丝',value:0}, - ], - showValue: true - } , + chartLeft1Data: { names: ['拉单丝', '一次复丝', '二次复丝'], values: [320, 280, 195] }, config_left2:{ data:[], digitalFlopStyle: { @@ -451,7 +440,8 @@ export default { end_time:'', start_time:'', deptName:"拉丝排板班组", - mgroups:['洗棒','捆棒','拉单丝','排一次棒','一次复丝','排二次棒','二次复丝'], + // mgroups:['洗棒','捆棒','拉单丝','排一次棒','一次复丝','排二次棒','二次复丝'], + mgroups:['拉单丝','一次复丝','二次复丝'], }; }, computed: { @@ -499,6 +489,7 @@ export default { that.mgroupsforEach(); that.getEquipment(); that.getMgroups(); + that.$nextTick(() => { that.renderChartLeft1(); }); //每个人日生产量:个人绩效 // that.getEveryoneCount(); that.materialAll(); @@ -599,9 +590,41 @@ export default { res.forEach((item) => { count += Number(item.count); }) - that.config_left1.data[index].value = count; + if (!that.chartLeft1Data.names[index]) { + that.chartLeft1Data.names[index] = name; + that.chartLeft1Data.values[index] = count; + } else { + that.chartLeft1Data.values[index] = count; + } + // that.renderChartLeft1(); }) }, + renderChartLeft1() { + let that = this; + let myChart = echarts.getInstanceByDom(document.getElementById('chartLeft1')); + if (!myChart) { + myChart = echarts.init(document.getElementById('chartLeft1')); + } + let option = { + backgroundColor: 'transparent', + grid: { left: '2%', right: '15%', top: '8%', bottom: '5%', containLabel: true }, + xAxis: { type: 'value', axisLabel: { color: '#fff', fontSize: 12 }, splitLine: { lineStyle: { color: 'rgba(255,255,255,0.08)' } } }, + yAxis: { type: 'category', data: that.chartLeft1Data.names, axisLabel: { color: '#fff', fontSize: 14 }, axisLine: { show: false }, axisTick: { show: false } }, + series: [{ + type: 'bar', data: that.chartLeft1Data.values, + barWidth: 18, + label: { show: true, position: 'right', color: '#fff', fontSize: 14, fontWeight: 'bold' }, + itemStyle: { + borderRadius: [0, 6, 6, 0], + color: new echarts.graphic.LinearGradient(0, 0, 1, 0, [ + { offset: 0, color: '#0a5a8a' }, + { offset: 1, color: '#00c8ff' }, + ]), + }, + }], + }; + myChart.setOption(option); + }, //车间设备列表 getEquipment() { let that = this; @@ -808,13 +831,6 @@ export default { font-size: 3vh; font-family: "myfont"; } -.leftChartBlock1{ - width: 90%; - height: 43vh; - z-index: 999; - left: 5%; - border-radius: 3vh; -} /* ===== 产品统计面板 ===== */ .mat-panel-wrap { position: relative; }