diff --git a/src/pages_960/modules/home/index2.vue b/src/pages_960/modules/home/index2.vue
index 676f8d9..47cb815 100644
--- a/src/pages_960/modules/home/index2.vue
+++ b/src/pages_960/modules/home/index2.vue
@@ -55,11 +55,8 @@
包装进度
@@ -120,9 +117,8 @@ export default {
loadList: [], // 当日车间上下料
dataList1: [], // 订单数据-滚动列表1
dataList2: [], // 订单数据-滚动列表2
- myChart1: null,
myChart2: null,
- myChart3: null
+ myChart1: null
}
},
computed: {
@@ -155,22 +151,17 @@ export default {
this.refresh()
},
mounted () {
- // this.myChart1 = this.$echarts.init(this.$refs.echartsRef1)
this.myChart2 = this.$echarts.init(this.$refs.echartsRef2)
- this.myChart3 = this.$echarts.init(this.$refs.echartsRef3)
+ this.myChart1 = this.$echarts.init(this.$refs.echartsRef1)
},
destroyed () {
- if (this.myChart1 !== null) {
- this.myChart1.dispose()
- this.myChart1 = null
- }
if (this.myChart2 !== null) {
this.myChart2.dispose()
this.myChart2 = null
}
- if (this.myChart3 !== null) {
- this.myChart3.dispose()
- this.myChart3 = null
+ if (this.myChart1 !== null) {
+ this.myChart1.dispose()
+ this.myChart1 = null
}
if (this.timer !== null) {
clearInterval(this.timer)
@@ -214,66 +205,9 @@ export default {
this.curList = [...res.todaycpsituation] // 成品包装情况(柱状图)
this.dataList1 = [...res.dddatebase] // 滚动1-订单数据
this.dataList2 = [...res.dddatebase] // 滚动2-(样品)包装发货进度
- // this.setEchart1()
- this.setEchart3()
- console.log(1)
+ this.setEchart1()
this.setEchart2()
- console.log(3)
},
- // setEchart1 () {
- // let data = [
- // {
- // value: this.fhobj.enter_proportion,
- // name: '入库'
- // },
- // {
- // value: this.fhobj.out_proportion,
- // name: '未入库'
- // }
- // ]
- // var option = {
- // legend: {
- // // orient: 'vertical',
- // orient: 'horizontal',
- // top: '4%',
- // // right: 0,
- // textStyle: {
- // color: '#fff',
- // fontWeight: 'bold',
- // fontSize: 12
- // },
- // itemGap: 10.86,
- // itemWidth: 14.16,
- // itemHeight: 7.38,
- // // data: dataName
- // data: ['入库', '未入库']
- // },
- // color: ['#0966E8', '#39E083', '#ffee0e', '#f975aa', '#32c5ff', '#f7b502'],
- // series: [
- // {
- // type: 'pie',
- // radius: ['38%', '70%'],
- // label: {
- // normal: {
- // show: false,
- // // position: 'inner',
- // formatter: '{d}%',
- // textStyle: {
- // color: '#fff',
- // fontWeight: 'bold',
- // fontSize: 12
- // }
- // }
- // },
- // labelLine: {
- // show: true
- // },
- // data: data
- // }
- // ]
- // }
- // this.myChart1.setOption(option, true)
- // },
setEchart2 () {
let barName = []
let barData1 = []
@@ -305,7 +239,7 @@ export default {
itemGap: 10.86,
itemWidth: 14.16,
itemHeight: 7.38,
- data: [{name: '入库', itemStyle: {color: '#67D470'}}, {name: '出库', itemStyle: {color: '#1980EA'}}]
+ data: [{name: '计划重量', itemStyle: {color: '#67D470'}}, {name: '已完成重量', itemStyle: {color: '#1980EA'}}]
},
xAxis: {
type: 'category',
@@ -352,7 +286,7 @@ export default {
},
series: [
{
- name: '入库',
+ name: '计划重量',
type: 'bar',
barWidth: '18',
itemStyle: {
@@ -374,7 +308,7 @@ export default {
data: barData1
},
{
- name: '出库',
+ name: '已完成重量',
type: 'bar',
barWidth: '18',
itemStyle: {
@@ -418,7 +352,7 @@ export default {
this.myChart2.setOption(option, true)
}, 2000)
},
- setEchart3 () {
+ setEchart1 () {
let data = [
{
value: this.bzsituation[0].bz_proportion,
@@ -474,7 +408,7 @@ export default {
}
]
}
- this.myChart3.setOption(option, true)
+ this.myChart1.setOption(option, true)
}
}
}