Commit ba5761c4 authored by caicaicai's avatar caicaicai

修改

parent 4d95d96f
...@@ -72,7 +72,6 @@ ...@@ -72,7 +72,6 @@
import { Tools, HttpReq, Dates} from '@/assets/js/common.js'; import { Tools, HttpReq, Dates} from '@/assets/js/common.js';
import * as echarts from 'echarts'; import * as echarts from 'echarts';
export default { export default {
data() { data() {
return { return {
...@@ -101,7 +100,11 @@ export default { ...@@ -101,7 +100,11 @@ export default {
wanchengRate:[20,50,60,80], wanchengRate:[20,50,60,80],
}, },
//月生产完成效率 //月生产完成效率
echarts3Data:{}, echarts3Data:{
caiquName:['采区一', '采区二', '采区三', '采区四'],
wanchengNum:[200,250,485,632],
jihuaNum:[300,500,600,700],
},
} }
...@@ -125,6 +128,8 @@ export default { ...@@ -125,6 +128,8 @@ export default {
}) })
//各采区当月完成率 //各采区当月完成率
this.echarts2Fn(); this.echarts2Fn();
//月生产完成效率
this.echarts3Fn();
}) })
...@@ -305,7 +310,80 @@ export default { ...@@ -305,7 +310,80 @@ export default {
//月生产完成效率 //月生产完成效率
echarts3Fn(){ echarts3Fn(){
var myChart = echarts.init(document.getElementById('echarts3View')); var myChart = echarts.init(document.getElementById('echarts3View'));
var option = {
tooltip: {
trigger: 'axis'
},
legend: {
data: ['目标完成', '计划完成'],
textStyle:{
color:'white',
fontSize:15,
}
},
grid: {
left: '3%',
right: '4%',
bottom: '3%',
containLabel: true
},
xAxis: {
type: 'category',
data: this.echarts3Data.caiquName,
axisLabel: {
show: true,
textStyle: {
color: 'white'
}
},
axisLine: {
lineStyle: {
color: 'white',
width: 0
}
}
},
yAxis: {
type: 'value',
name: '完成率(%)',
nameTextStyle: { fontSize: 16 },
axisLabel: {
show: true,
textStyle: {
color: 'white'
}
},
axisLine: {
lineStyle: {
color: 'white',
width: 0
}
}
},
series: [
{
name: '目标完成',
type: 'line',
data: this.echarts3Data.wanchengNum,
itemStyle: {
normal: {
lineStyle: { color: '#FFC200' } //设置线条颜色
}
}
},
{
name: '计划完成',
type: 'line',
data: this.echarts3Data.jihuaNum,
itemStyle: {
normal: {
lineStyle: { color: '#21DDF3' } //设置线条颜色
}
}
}
]
};
option && myChart.setOption(option);
}, },
...@@ -480,6 +558,8 @@ dd>div{ ...@@ -480,6 +558,8 @@ dd>div{
height: 23vh; height: 23vh;
} }
#echarts3View{ #echarts3View{
position: absolute;
left: 0vh;
width: 100%; width: 100%;
height: 23vh; height: 23vh;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment