123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225 |
- <template>
- <div>
- <div id="analysisChartTopLeft" @click="dialogVisible = true" style="width:6.8rem;height:2.5rem;"></div>
- <el-dialog title="HRSG 1#" :visible.sync="dialogVisible" width="1600px" @open="open" destroy-on-close append-to-body>
- <div id="analysisChartTopLeft2" style="width:20rem;height:6rem;margin:0.5rem auto;"></div>
- </el-dialog>
- </div>
- </template>
- <script>
- import echartMixins from "@/utils/resizeMixins";
- export default {
- data() {
- return {
- chart: null,
- dialogVisible: false
- }
- },
- mixins: [echartMixins],
- mounted() {
- this.init();
- },
- methods: {
- opnenDialg(){
- this.dialogVisible = true
- },
- open(){
- this.$nextTick(() => {
- this.init2()
- })
- },
- init() {
- this.chart = this.echarts.init(document.getElementById("analysisChartTopLeft"), 'dark');
- let option = {
- backgroundColor: 'transparent',
- title: {
- text: 'HRSG 1#',
- textStyle: {
- fontSize: 18
- }
- },
- tooltip: {
- trigger: 'axis'
- },
- legend: {
- data: ['烟尘', 'SO2', 'NOx'],
- padding: [30, 0, 0, 0]
- },
- grid: {
- left: '3%',
- right: '4%',
- bottom: '3%',
- containLabel: true
- },
- toolbox: {
- feature: {
- }
- },
- xAxis: {
- type: 'category',
- boundaryGap: false,
- data: ['Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun'],
- axisLabel: {
- color: '#808080'
- },
- },
- yAxis: {
- type: 'value',
- name: 'Unit:(mg/m3)',
- axisLabel: {
- color: '#808080'
- },
- splitLine: {
- show: true,
- lineStyle:{
- color: 'rgba(255,255,255,.7)'
- }
- }
- },
- series: [
- {
- name: '烟尘',
- type: 'line',
- smooth: true,
- data: [80,90,70,20,10,60,50],
- symbolSize: 10,
- color: '#FF9800',
- lineStyle: {
- width: 3,
- },
- itemStyle: {
- borderWidth: 2,
- borderColor: '#fff',
- }
- },
- {
- name: 'SO2',
- type: 'line',
- smooth: true,
- data: [1400,2200,1300,1800,2500,1100,1300],
- symbolSize: 10,
- color: '#9D00FF',
- lineStyle: {
- width: 3,
- },
- itemStyle: {
- borderWidth: 2,
- borderColor: '#fff',
- }
- },
- {
- name: 'NOx',
- type: 'line',
- smooth: true,
- data: [400,200,300,800,500,100,300],
- symbolSize: 10,
- color: '#00FF0D',
- lineStyle: {
- width: 3,
- },
- itemStyle: {
- borderWidth: 2,
- borderColor: '#fff',
- }
- },
- ]
- };
- this.chart.setOption(option);
- },
- init2() {
- this.chart2 = this.echarts.init(document.getElementById("analysisChartTopLeft2"));
- let option = {
- backgroundColor: 'transparent',
- tooltip: {
- trigger: 'axis'
- },
- legend: {
- data: ['烟尘', 'SO2', 'NOx'],
- padding: [30, 0, 0, 0]
- },
- grid: {
- left: '3%',
- right: '4%',
- bottom: '3%',
- containLabel: true
- },
- toolbox: {
- feature: {
- }
- },
- xAxis: {
- type: 'category',
- boundaryGap: false,
- data: ['Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun'],
- axisLabel: {
- color: '#808080'
- },
- },
- yAxis: {
- type: 'value',
- name: 'Unit:(mg/m3)',
- axisLabel: {
- color: '#808080'
- }
- },
- series: [
- {
- name: '烟尘',
- type: 'line',
- smooth: true,
- data: [80,90,70,20,10,60,50],
- symbolSize: 10,
- color: '#FF9800',
- lineStyle: {
- width: 3,
- },
- itemStyle: {
- borderWidth: 2,
- borderColor: '#fff',
- }
- },
- {
- name: 'SO2',
- type: 'line',
- smooth: true,
- data: [1400,2200,1300,1800,2500,1100,1300],
- symbolSize: 10,
- color: '#9D00FF',
- lineStyle: {
- width: 3,
- },
- itemStyle: {
- borderWidth: 2,
- borderColor: '#fff',
- }
- },
- {
- name: 'NOx',
- type: 'line',
- smooth: true,
- data: [400,200,300,800,500,100,300],
- symbolSize: 10,
- color: '#00FF0D',
- lineStyle: {
- width: 3,
- },
- itemStyle: {
- borderWidth: 2,
- borderColor: '#fff',
- }
- },
- ]
- };
- this.chart2.setOption(option);
- }
- },
- destroyed() {
- window.onresize = null;
- }
- }
- </script>
- <style>
- </style>
|