From 9ddc0f2555a7b44dad32a041c29de4c8ce0efe5a Mon Sep 17 00:00:00 2001 From: shijing Date: Tue, 26 Dec 2023 16:06:45 +0800 Subject: [PATCH] =?UTF-8?q?=E8=BD=A6=E9=97=B4=E5=90=8D=E7=A7=B0=E6=94=B9?= =?UTF-8?q?=E6=88=90=E9=97=A8=E7=89=8C=E5=90=8D=E7=A7=B0&=E4=B8=8D?= =?UTF-8?q?=E5=90=88=E6=A0=BC=E7=BB=9F=E8=AE=A1=E8=87=AA=E5=8A=A8=E5=88=87?= =?UTF-8?q?=E6=8D=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/bigScreen/index_photon.vue | 65 ++++++++++++++++++++-------- 1 file changed, 47 insertions(+), 18 deletions(-) diff --git a/src/views/bigScreen/index_photon.vue b/src/views/bigScreen/index_photon.vue index c814cbec..ebefa18a 100644 --- a/src/views/bigScreen/index_photon.vue +++ b/src/views/bigScreen/index_photon.vue @@ -135,13 +135,13 @@

390

-
-

预制管

-

390

+
+

光纤预制管

+

390{{ currentObj.生产数 }}

-
-

预制棒

-

390

+
+

光纤预制棒

+

390{{ currentObj.生产数 }}

@@ -242,10 +242,10 @@ export default { updateTime: '2023-08-17 16:00:00', nodesLists: { '单身宿舍.004_primitive3': '办公楼', - '立方体.024_primitive1': '成型10车间', - '立方体.034_primitive1': '配料8车间', - '立方体.026_primitive1': '成型7车间', - '立方体.025_primitive1': '加工6车间', + '立方体.024_primitive1': '光纤预制管生产车间', + '立方体.034_primitive1': '玻璃配合料制备车间', + '立方体.026_primitive1': '光纤预制棒生产车间', + '立方体.025_primitive1': '光学精密加工车间', }, objs: { total: '0', elec: '0' }, currentTime: '', @@ -351,7 +351,6 @@ export default { }else{ that.deptName='10车间' } - that.deptNameChange(that.deptName); }, 5000); @@ -360,6 +359,7 @@ export default { //一天的毫秒数 const ondDayTime = 86400000 let cDate = new Date(); + let week = cDate.getDay();//当前时间的week数 // let time = ' 星期' + '日一二三四五六'.charAt(week);//当前时间周几 let weekFirst = week - 1;//第一天对应的天数 @@ -600,6 +600,7 @@ export default { }); } that.countOkDept7 = countOkDept7; + that.deptData =that.dept7Data; that.countRateDept7 = countRateDept7; that.countOk_dept7 = countOk_dept7; that.getCountDept10(); @@ -612,7 +613,6 @@ export default { query: { start_date: that.start_date, end_date: that.end_date,dept_name: "10车间"}, }; that.$API.bi.dataset.exec.req('lineDay', obj).then((res) => { - console.log('res10',res10); let list = res.data2.ds0; let countOkDept10 = [0,0,0,0,0,0,0],countRateDept10 = [0,0,0,0,0,0,0]; let value0=0,value1=0,value2=0,value3=0,value4=0,value5=0,countOk_dept10=0; @@ -781,8 +781,8 @@ export default { }; that.$API.bi.dataset.exec.req('lineDay', obj).then((res) => { let list = res.data2.ds0; + let deptData = []; if(list.length>0){ - let deptData = []; list.forEach(item => { if(that.deptName == '7车间'){ that.dept7Data[0].value= that.dept7Data[0].value+item.炸纹; @@ -802,10 +802,21 @@ export default { deptData = that.dept10Data; } }); - } + }else{ + if(that.deptName == '7车间'){ + deptData = that.dept7Data; + }else{ + deptData = that.dept10Data; + } + } + console.log(deptData) + that.deptData = deptData; + that.pieoption.series.data = deptData; let pieoption = that.pieoption; - pieoption.series.data = deptData; - pieChart.setOption(pieoption); + let pieDom = document.getElementById('pie'); + let pieChart = echarts.init(pieDom); + pieChart.clear(); + pieChart.setOption(pieoption, true); }); }, //库存情况 @@ -1137,6 +1148,24 @@ export default { this.infoVisibel = true; this.dialogData.deptName = name; } + let obj ={ + query: {start_date:this.start_date,end_date:this.end_date,dept_name: name}, + }; + that.$API.bi.dataset.exec.req('lineDay', obj).then((res1) => { + console.log('生产车间按日统计:',res1); + let list1 = res1.data2.ds0; + if(name=='6车间'){ + that.currentObj = list1[0]; + that.currentObj.rate = list1[0] + }else if(name=='7车间'||name=='10车间'){ + that.currentObj = list1[0]; + }else if(name=='8车间'){ + + } + let seriesData1 = [],xAxisData1=[]; + + debugger; + }); }, initChart() { let that = this; @@ -1534,7 +1563,7 @@ export default { length2: 5 }, labelLayout: function (params) { - var isLeft = params.labelRect.x < myChart.getWidth() / 2 + var isLeft = params.labelRect.x < pieChart.getWidth() / 2 var points = params.labelLinePoints; points[2][0] = isLeft ? params.labelRect.x : params.labelRect.x + params.labelRect.width return { @@ -1543,7 +1572,7 @@ export default { dx: 0 } }, - data:that.dept7Data + data:that.deptData } }; that.pieoption = pieoption;