...
|
...
|
@@ -12,10 +12,11 @@ function initChart1(canvas, width, height) { |
|
|
var option = {
|
|
|
title: {
|
|
|
text: '开平机01每日开工时间',
|
|
|
left: 'center'
|
|
|
left: 'center',
|
|
|
textStyle: {
|
|
|
fontSize: 13
|
|
|
},
|
|
|
},
|
|
|
|
|
|
|
|
|
toolbox: {
|
|
|
|
|
|
},
|
...
|
...
|
@@ -27,8 +28,6 @@ function initChart1(canvas, width, height) { |
|
|
interval: 1,
|
|
|
},
|
|
|
name: '日期'
|
|
|
|
|
|
|
|
|
},
|
|
|
yAxis: {
|
|
|
type: 'value',
|
...
|
...
|
@@ -84,7 +83,10 @@ function initChart2(canvas, width, height) { |
|
|
var option = {
|
|
|
title: {
|
|
|
text: '开平机02每日开工时间',
|
|
|
left: 'center'
|
|
|
left: 'center',
|
|
|
textStyle: {
|
|
|
fontSize: 13
|
|
|
},
|
|
|
},
|
|
|
|
|
|
|
...
|
...
|
@@ -156,7 +158,10 @@ function initChart3(canvas, width, height) { |
|
|
var option = {
|
|
|
title: {
|
|
|
text: '企业开工月累计时间',
|
|
|
left: 'center'
|
|
|
left: 'center',
|
|
|
textStyle: {
|
|
|
fontSize: 13
|
|
|
},
|
|
|
},
|
|
|
|
|
|
|
...
|
...
|
@@ -216,6 +221,7 @@ function initChart3(canvas, width, height) { |
|
|
chart.setOption(option);
|
|
|
return chart;
|
|
|
}
|
|
|
|
|
|
// 半年度开工时间对比
|
|
|
function initChart4(canvas, width, height) {
|
|
|
const chart = echarts.init(canvas, null, {
|
...
|
...
|
@@ -225,23 +231,48 @@ function initChart4(canvas, width, height) { |
|
|
canvas.setChart(chart);
|
|
|
|
|
|
var option = {
|
|
|
title: {
|
|
|
text: '半年度企业电耗对比',
|
|
|
textStyle: {
|
|
|
fontSize: 13
|
|
|
},
|
|
|
left: 'center'
|
|
|
},
|
|
|
|
|
|
xAxis: {
|
|
|
type: 'category',
|
|
|
data: ['Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun']
|
|
|
data: ['2018-11', '2018-12', '2019-01', '2019-02', '2019-03', '2019-04'],
|
|
|
axisLabel: {
|
|
|
interval: 0,
|
|
|
textStyle: {
|
|
|
fontSize: 12
|
|
|
}
|
|
|
},
|
|
|
name: '日期'
|
|
|
},
|
|
|
yAxis: {
|
|
|
type: 'value'
|
|
|
type: 'value',
|
|
|
min: 0,
|
|
|
max: 500,
|
|
|
splitNumber: 5,
|
|
|
name: '小时(h)',
|
|
|
// textStyle: {
|
|
|
// fontSize: 14
|
|
|
// }
|
|
|
},
|
|
|
series: [{
|
|
|
data: [120, 200, 150, 80, 70, 110, 130],
|
|
|
type: 'bar'
|
|
|
data: [120, 200, 150, 80, 70, 110],
|
|
|
type: 'bar',
|
|
|
color: '#3CDACD',
|
|
|
barWidth: '55%',
|
|
|
}]
|
|
|
};
|
|
|
|
|
|
chart.setOption(option);
|
|
|
return chart;
|
|
|
}
|
|
|
// 企业每日电耗
|
|
|
// 企业月开工率
|
|
|
|
|
|
function initChart5(canvas, width, height) {
|
|
|
const chart = echarts.init(canvas, null, {
|
|
|
width: width,
|
...
|
...
|
@@ -252,63 +283,107 @@ function initChart5(canvas, width, height) { |
|
|
var option = {
|
|
|
title: {
|
|
|
text: '企业月开工率',
|
|
|
left: 'center'
|
|
|
subtext: '',
|
|
|
left: 'center',
|
|
|
textStyle: {
|
|
|
fontSize: 13
|
|
|
},
|
|
|
},
|
|
|
|
|
|
|
|
|
textStyle: {
|
|
|
fontSize: 12
|
|
|
},
|
|
|
tooltip: {
|
|
|
trigger: 'axis'
|
|
|
},
|
|
|
|
|
|
toolbox: {
|
|
|
|
|
|
|
|
|
},
|
|
|
xAxis: {
|
|
|
type: 'category',
|
|
|
boundaryGap: false,
|
|
|
data: ['1', '2', '3', '4', '5', '6', '7', '8', '9', '10', '11', '12', '13', '14', '15', '16', '17', '18', '19', '20', '21', '22', '23', '24', '25', '26', '27', '28', '29', '30', '31'],
|
|
|
data: ['1', '2', '3', '4', '5', '6', '7', '8', '9', '10', '11', '12', '13', '14', '15', '16', '17', '18', '19', '20', '21', '22', '23', '24', '25', '26', '27', '28', '29', '30','31'],
|
|
|
axisLabel: {
|
|
|
interval: 1,
|
|
|
},
|
|
|
name: '日期'
|
|
|
|
|
|
|
|
|
name:"日期"
|
|
|
},
|
|
|
yAxis: {
|
|
|
type: 'value',
|
|
|
min:0,
|
|
|
max: 100,
|
|
|
splitNumber: 10,
|
|
|
|
|
|
|
|
|
axisLabel: {
|
|
|
formatter: '{value}'
|
|
|
},
|
|
|
min: 1,
|
|
|
max: 24,
|
|
|
splitNumber: 24,
|
|
|
name: '小时(h)'
|
|
|
|
|
|
name:'百分比'
|
|
|
},
|
|
|
series: [
|
|
|
{
|
|
|
name: '',
|
|
|
type: 'line',
|
|
|
smooth: true,
|
|
|
color: '#6495F8',
|
|
|
data: [11, 11, 15, 13, 12, 13, 10],
|
|
|
markPoint: {
|
|
|
data: [
|
|
|
{ type: 'max', name: '最大值' },
|
|
|
{ type: 'min', name: '最小值' }
|
|
|
]
|
|
|
},
|
|
|
markLine: {
|
|
|
data: [
|
|
|
{ type: 'average', name: '平均值' }
|
|
|
]
|
|
|
series: [{
|
|
|
name: '',
|
|
|
type: 'line',
|
|
|
color: '#FA9C03',
|
|
|
data: [11, 11, 15, 13, 12, 13, 10,23,45,67],
|
|
|
markPoint: {
|
|
|
data: [{
|
|
|
type: 'max',
|
|
|
name: '最大值'
|
|
|
},
|
|
|
// areaStyle: {
|
|
|
// // normal: {
|
|
|
// // color: '#F8E9DD' //改变区域颜色
|
|
|
// // }
|
|
|
// },
|
|
|
{
|
|
|
type: 'min',
|
|
|
name: '最小值'
|
|
|
}
|
|
|
]
|
|
|
},
|
|
|
|
|
|
markLine: {
|
|
|
data: [{
|
|
|
type: 'average',
|
|
|
name: '平均值'
|
|
|
}]
|
|
|
}
|
|
|
},
|
|
|
{
|
|
|
name: '',
|
|
|
type: 'line',
|
|
|
color: '#95D602',
|
|
|
data: [78, 18, 44, 33, 25, 45, 67,89,34,45],
|
|
|
markPoint: {
|
|
|
data: [{
|
|
|
name: '周最低',
|
|
|
value: 10,
|
|
|
xAxis: 1,
|
|
|
yAxis: 10
|
|
|
}]
|
|
|
},
|
|
|
markLine: {
|
|
|
data: [{
|
|
|
type: 'average',
|
|
|
name: '平均值'
|
|
|
},
|
|
|
[{
|
|
|
symbol: 'none',
|
|
|
x: '90%',
|
|
|
yAxis: 'max'
|
|
|
}, {
|
|
|
symbol: 'circle',
|
|
|
label: {
|
|
|
normal: {
|
|
|
position: 'start',
|
|
|
formatter: '最大值'
|
|
|
}
|
|
|
},
|
|
|
type: 'max',
|
|
|
name: '最高点'
|
|
|
}]
|
|
|
]
|
|
|
}
|
|
|
}
|
|
|
]
|
|
|
};
|
|
|
|
|
|
|
|
|
chart.setOption(option);
|
|
|
return chart;
|
|
|
}
|
...
|
...
|
@@ -323,7 +398,10 @@ function initChart6(canvas, width, height) { |
|
|
var option = {
|
|
|
title: {
|
|
|
text: '企业月开工率',
|
|
|
left: 'center'
|
|
|
left: 'center',
|
|
|
textStyle: {
|
|
|
fontSize: 13
|
|
|
},
|
|
|
},
|
|
|
|
|
|
|
...
|
...
|
@@ -392,16 +470,40 @@ function initChart7(canvas, width, height) { |
|
|
canvas.setChart(chart);
|
|
|
|
|
|
var option = {
|
|
|
title: {
|
|
|
text: '半年度企业电耗对比',
|
|
|
textStyle:{
|
|
|
fontSize:13
|
|
|
},
|
|
|
left: 'center'
|
|
|
},
|
|
|
|
|
|
xAxis: {
|
|
|
type: 'category',
|
|
|
data: ['Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun']
|
|
|
data: ['2018-11', '2018-12', '2019-01', '2019-02', '2019-03', '2019-04'],
|
|
|
axisLabel: {
|
|
|
interval: 0,
|
|
|
textStyle: {
|
|
|
fontSize:12
|
|
|
}
|
|
|
},
|
|
|
name: '日期'
|
|
|
},
|
|
|
yAxis: {
|
|
|
type: 'value'
|
|
|
type: 'value',
|
|
|
min:0,
|
|
|
max:500,
|
|
|
splitNumber: 5,
|
|
|
name:'小时(h)',
|
|
|
// textStyle: {
|
|
|
// fontSize: 14
|
|
|
// }
|
|
|
},
|
|
|
series: [{
|
|
|
data: [120, 200, 150, 80, 70, 110, 130],
|
|
|
type: 'bar'
|
|
|
data: [120, 200, 150, 80, 70, 110],
|
|
|
type: 'bar',
|
|
|
color:'#3CDACD',
|
|
|
barWidth: '55%',
|
|
|
}]
|
|
|
};
|
|
|
|
...
|
...
|
@@ -540,6 +642,7 @@ Page({ |
|
|
*/
|
|
|
data: {
|
|
|
statedate:"",
|
|
|
state:1,
|
|
|
ec1: {
|
|
|
|
|
|
onInit: initChart1
|
...
|
...
|
@@ -579,6 +682,12 @@ Page({ |
|
|
})
|
|
|
|
|
|
},
|
|
|
// 顶部tab切换
|
|
|
selectshebei(e){
|
|
|
this.setData({
|
|
|
state:e.currentTarget.dataset.id
|
|
|
})
|
|
|
},
|
|
|
|
|
|
// 选择日期
|
|
|
bindstateDateChange(e) {
|
...
|
...
|
|