|
@@ -33,7 +33,7 @@
|
|
|
<span style="color:#5cd9e8">
|
|
|
<icon name="align-left"></icon>
|
|
|
</span>
|
|
|
- <span class="fs-xl text mx-2 mb-1" style="display: none">每日能耗状态</span>
|
|
|
+ <span class="fs-xl text mx-2 mb-1" style="display:block">每日能耗状态</span>
|
|
|
<div id="naturalGasChart" style="width:100%;height:2.5rem;"></div>
|
|
|
</div>
|
|
|
<div class="percent">
|
|
@@ -225,74 +225,109 @@ export default {
|
|
|
mounted() {
|
|
|
this.initChart();
|
|
|
},
|
|
|
- // methods: {
|
|
|
- // initChart() {
|
|
|
- // // 基于准备好的dom,初始化echarts实例
|
|
|
- // this.chart = this.echarts.init(document.getElementById('naturalGasChart'))
|
|
|
- //
|
|
|
- // this.chart.setOption({
|
|
|
- // color: ['#00DDFF', '#37A2FF'],
|
|
|
- // tooltip: {
|
|
|
- // trigger: 'axis',
|
|
|
- // type: 'category',
|
|
|
- // },
|
|
|
- // /* 标识 */
|
|
|
- // legend: {
|
|
|
- // data: ['实际', '计划'],
|
|
|
- // textStyle:{
|
|
|
- // color: '#ffffff'//字体颜色
|
|
|
- // }
|
|
|
- // },
|
|
|
- // /* 周围边距 */
|
|
|
- // grid: {
|
|
|
- // left: '3%',
|
|
|
- // right: '3%',
|
|
|
- // bottom: '1%',
|
|
|
- // top: '13%',
|
|
|
- // containLabel: true
|
|
|
- // },
|
|
|
- // 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'],
|
|
|
- // axisLabel: {//x轴文字的配置
|
|
|
- // show: true,
|
|
|
- // textStyle: {
|
|
|
- // color: '#ffffff',
|
|
|
- // }
|
|
|
- // },
|
|
|
- // }
|
|
|
- // ],
|
|
|
- // yAxis: [
|
|
|
- // {
|
|
|
- // type: 'value',
|
|
|
- // axisLabel: {
|
|
|
- // textStyle: {
|
|
|
- // fontSize: 10,
|
|
|
- // color: '#ffffffff',
|
|
|
- // margin: 15
|
|
|
- // },
|
|
|
- // }
|
|
|
- // }
|
|
|
- // ],
|
|
|
- // series: [
|
|
|
- // {
|
|
|
- // name: this.$t('实际'),
|
|
|
- // type: 'line',
|
|
|
- // symbol: "none",
|
|
|
- // data: [20, 32, 1, 34, 90, 30, 20, 20, 32, 1, 34, 90, 40, 10, 20, 82, 11, 34, 20, 30, 10, 20, 82, 11, 34, 20, 40, 10]
|
|
|
- // },
|
|
|
- // {
|
|
|
- // name: this.$t('计划'),
|
|
|
- // type: 'line',
|
|
|
- // symbol: "none",
|
|
|
- // data: [20, 82, 11, 24, 20, 30, 10, 20, 82, 11, 24, 20, 10, 20, 20, 32, 21, 34, 10, 30, 20, 20, 32, 21, 34, 19, 13, 20]
|
|
|
- // },
|
|
|
- // ]
|
|
|
- // })
|
|
|
- // }
|
|
|
- // }
|
|
|
+ methods: {
|
|
|
+ initChart() {
|
|
|
+ // 基于准备好的dom,初始化echarts实例
|
|
|
+ this.chart = this.echarts.init(document.getElementById('naturalGasChart'))
|
|
|
+
|
|
|
+ this.chart.setOption({
|
|
|
+ xAxis: {
|
|
|
+ type: 'category',
|
|
|
+ data: [
|
|
|
+ '00:00-03:00',
|
|
|
+ '03:00-06:00',
|
|
|
+ '06:00-09:00',
|
|
|
+ '09:00-12:00',
|
|
|
+ '12:00-15:00',
|
|
|
+ '15:00-18:00',
|
|
|
+ '18:00-21:00',
|
|
|
+ '21:00-00:00'
|
|
|
+ ]
|
|
|
+ },
|
|
|
+ yAxis: {
|
|
|
+ type: 'value'
|
|
|
+ },
|
|
|
+ series: [
|
|
|
+ {
|
|
|
+ data: [120, 200, 150, 80, 70, 110, 130],
|
|
|
+ type: 'line',
|
|
|
+ smooth: true,
|
|
|
+ symbol: '',
|
|
|
+ symbolSize: 10,
|
|
|
+ lineStyle: {
|
|
|
+ color: '#5470C6',
|
|
|
+ width: 4,
|
|
|
+ type: 'dashed'
|
|
|
+ },
|
|
|
+ itemStyle: {
|
|
|
+ borderWidth: 3,
|
|
|
+ borderColor: '#EE6666',
|
|
|
+ color: 'yellow'
|
|
|
+ }
|
|
|
+ }
|
|
|
+ ]
|
|
|
+ // color: ['#00DDFF', '#37A2FF'],
|
|
|
+ // tooltip: {
|
|
|
+ // trigger: 'axis',
|
|
|
+ // type: 'category',
|
|
|
+ // },
|
|
|
+ // /* 标识 */
|
|
|
+ // legend: {
|
|
|
+ // data: ['实际', '计划'],
|
|
|
+ // textStyle:{
|
|
|
+ // color: '#ffffff'//字体颜色
|
|
|
+ // }
|
|
|
+ // },
|
|
|
+ // /* 周围边距 */
|
|
|
+ // grid: {
|
|
|
+ // left: '3%',
|
|
|
+ // right: '3%',
|
|
|
+ // bottom: '1%',
|
|
|
+ // top: '13%',
|
|
|
+ // containLabel: true
|
|
|
+ // },
|
|
|
+ // 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'],
|
|
|
+ // axisLabel: {//x轴文字的配置
|
|
|
+ // show: true,
|
|
|
+ // textStyle: {
|
|
|
+ // color: '#ffffff',
|
|
|
+ // }
|
|
|
+ // },
|
|
|
+ // }
|
|
|
+ // ],
|
|
|
+ // yAxis: [
|
|
|
+ // {
|
|
|
+ // type: 'value',
|
|
|
+ // axisLabel: {
|
|
|
+ // textStyle: {
|
|
|
+ // fontSize: 10,
|
|
|
+ // color: '#ffffffff',
|
|
|
+ // margin: 15
|
|
|
+ // },
|
|
|
+ // }
|
|
|
+ // }
|
|
|
+ // ],
|
|
|
+ // series: [
|
|
|
+ // {
|
|
|
+ // name: this.$t('实际'),
|
|
|
+ // type: 'line',
|
|
|
+ // symbol: "none",
|
|
|
+ // data: [20, 32, 1, 34, 90, 30, 20, 20, 32, 1, 34, 90, 40, 10, 20, 82, 11, 34, 20, 30, 10, 20, 82, 11, 34, 20, 40, 10]
|
|
|
+ // },
|
|
|
+ // {
|
|
|
+ // name: this.$t('计划'),
|
|
|
+ // type: 'line',
|
|
|
+ // symbol: "none",
|
|
|
+ // data: [20, 82, 11, 24, 20, 30, 10, 20, 82, 11, 24, 20, 10, 20, 20, 32, 21, 34, 10, 30, 20, 20, 32, 21, 34, 19, 13, 20]
|
|
|
+ // },
|
|
|
+ // ]
|
|
|
+ })
|
|
|
+ }
|
|
|
+ }
|
|
|
};
|
|
|
</script>
|
|
|
|