This commit is contained in:
2023-03-07 09:06:36 +08:00
parent 7ffa0fcdea
commit 567c7b76ce
4 changed files with 936 additions and 33 deletions

View File

@@ -1,6 +1,6 @@
<template>
<section>
<t-header index='2'></t-header>
<t-header index='1'></t-header>
<section>
<div class="con1">
<div class="c-title c-left">
@@ -21,7 +21,7 @@
<div class="c-title c-right" style="marginLeft: 1.5rem;">
<span>今日成品量</span>
<div class="num">
<div class="bg" v-for="item in showNum2" :key="item" :class="{dot: item === '.'}">{{item}}</div>
<div class="bg" v-for="item in showNum3" :key="item" :class="{dot: item === '.'}">{{item}}</div>
</div>
<span></span>
</div>
@@ -30,8 +30,8 @@
<div class="con2">
<div class="title">原料计划完成情况</div>
<div class="desc">
<div>计划生产<span>12</span></div>
<div>已生产<span>2</span></div>
<div>计划生产<span>{{planqty}}</span></div>
<div>已生产<span>{{realqty}}</span></div>
</div>
<div class="item_content_0">
<div id="echart_d01" style="width: 100%; height: 100%"></div>
@@ -94,7 +94,9 @@ export default {
materData: [],
deviceData: [],
resData: {},
taskData: []
taskData: [],
realqty: '',
planqty: ''
}
},
computed: {
@@ -132,18 +134,24 @@ export default {
let res = await productionStatistics()
this.resData = res
this.taskData = [...res.productionTask]
this.realqty = res.materialTask[0].real_qty
this.planqty = res.materialTask[0].plan_qty
this.showNum1 = (res.finishedTask[0].real_qty + '').split('')
this.showNum2 = (res.finishedTask[1].real_qty + '').split('')
this.showNum3 = (res.finishedTask[2].real_qty + '').split('')
this.setEchart01()
this.setEchart05()
},
setEchart01 () {
// let data = [100, 30, 80, 50]
let data = []
data.push(this.resData.materialTask[0].realqty)
data.push(this.resData.materialTask[0].planqty)
data.push(this.resData.materialTask[0].real_qty)
data.push(this.resData.materialTask[0].plan_qty)
var option = {
legend: {
orient: 'vertical',
right: 0,
right: 'right',
top: '8%',
data: ['未完成重量', '已经完成重量', '重量3', '重量4'],
textStyle: {
color: '#ffffff',
@@ -176,10 +184,10 @@ export default {
var data05d0 = []
var data05d1 = []
var data05d2 = []
this.resData.finishedTask.map(el => {
this.resData.planRes.map(el => {
data05d0.push(el.workorder_procedure)
data05d1.push(el.planqty)
data05d2.push(el.realqty)
data05d1.push(el.plan_qty)
data05d2.push(el.real_qty)
})
let option = {
grid: {
@@ -665,8 +673,9 @@ export default {
position absolute
top .3rem
left .25rem
height 375px
height 360px
width 95%
margin-bottom .1rem
.con4
float left
margin-left .49rem