|
|
@@ -190,7 +190,7 @@
|
|
|
<h4>安全风险实时统计</h4>
|
|
|
<div style="position:relative;">
|
|
|
<p class="all">
|
|
|
- 32 <span>总风险(起)</span>
|
|
|
+ {{count}} <span>总风险(起)</span>
|
|
|
</p>
|
|
|
<div id="chart1" style="width: 100%;height:230px;"></div>
|
|
|
</div>
|
|
|
@@ -201,8 +201,8 @@
|
|
|
<img class="top" src="../images/bk.png" alt="">
|
|
|
<h4>安全隐患实时统计</h4>
|
|
|
<div style="position:relative;">
|
|
|
- <p class="all" style="top:75px;">
|
|
|
- 24 <span>总隐患数(起)</span>
|
|
|
+ <p class="all" style="top:75px;" v-if='data.yh_data'>
|
|
|
+ {{data.yh_data[0].value+data.yh_data[1].value}} <span>总隐患数(起)</span>
|
|
|
</p>
|
|
|
<div id="chart3" style="width: 100%;height:250px;"></div>
|
|
|
</div>
|
|
|
@@ -214,8 +214,8 @@
|
|
|
<img class="top" src="../images/bk.png" alt="">
|
|
|
<h4>系统实时监测</h4>
|
|
|
<p class="count">
|
|
|
- <span class="span3">风险点5个</span>
|
|
|
- <span class="span4">管控任务5个</span>
|
|
|
+ <span class="span3">风险点 {{data.riskpoint_count}} 个</span>
|
|
|
+ <span class="span4">管控任务 {{data.monittask_count}} 个</span>
|
|
|
</p>
|
|
|
<h4>风险点任务</h4>
|
|
|
<div id="chart4" style="width: 100%;height:310px;"></div>
|
|
|
@@ -231,16 +231,9 @@
|
|
|
<h4>最新告警</h4>
|
|
|
<table cellpadding='0' cellspacing='0'>
|
|
|
<!-- <thead><td>序号</td><td>企业名称</td><td>告警次数</td></thead> -->
|
|
|
- <tr><td>加油区</td><td>加油机损坏</td><td>2020-07-08 12:11:20</td></tr>
|
|
|
- <tr><td>加油区</td><td>加油机损坏</td><td>2020-07-08 12:11:20</td></tr>
|
|
|
- <tr><td>加油区</td><td>加油机损坏</td><td>2020-07-08 12:11:20</td></tr>
|
|
|
- <tr><td>加油区</td><td>加油机损坏</td><td>2020-07-08 12:11:20</td></tr>
|
|
|
- <tr><td>加油区</td><td>加油机损坏</td><td>2020-07-08 12:11:20</td></tr>
|
|
|
- <tr><td>加油区</td><td>加油机损坏</td><td>2020-07-08 12:11:20</td></tr>
|
|
|
- <tr><td>加油区</td><td>加油机损坏</td><td>2020-07-08 12:11:20</td></tr>
|
|
|
- <tr><td>加油区</td><td>加油机损坏</td><td>2020-07-08 12:11:20</td></tr>
|
|
|
- <tr><td>加油区</td><td>加油机损坏</td><td>2020-07-08 12:11:20</td></tr>
|
|
|
- <tr><td>加油区</td><td>加油机损坏</td><td>2020-07-08 12:11:20</td></tr>
|
|
|
+ <tr v-for="(item,index) in data.latest_warning" :key='index'>
|
|
|
+ <td>{{item.riskpoint_name}}</td>
|
|
|
+ <td>{{item.monit_name}}</td><td>{{item.ctime}}</td></tr>
|
|
|
</table>
|
|
|
<img class="bottom" src="../images/bk-1.png" alt="">
|
|
|
</div>
|
|
|
@@ -261,273 +254,220 @@ export default {
|
|
|
data(){
|
|
|
return{
|
|
|
fullscreen:'',
|
|
|
- info:{}
|
|
|
+ info:{},
|
|
|
+ count:0,
|
|
|
+ data:{}
|
|
|
}
|
|
|
},
|
|
|
methods:{
|
|
|
- getData(){
|
|
|
- // 基于准备好的dom,初始化echarts实例
|
|
|
- var myChart1 = this.$echarts.init(document.getElementById('chart1'),'dark');
|
|
|
- var myChart2 = this.$echarts.init(document.getElementById('chart2'),'dark');
|
|
|
- var myChart3 = this.$echarts.init(document.getElementById('chart3'),'dark');
|
|
|
- var myChart4 = this.$echarts.init(document.getElementById('chart4'),'dark');
|
|
|
- var myChart5 = this.$echarts.init(document.getElementById('chart5'),'dark');
|
|
|
- var myChart6 = this.$echarts.init(document.getElementById('chart6'),'dark');
|
|
|
- this.myChart1=myChart1;
|
|
|
- this.myChart2=myChart2;
|
|
|
- this.myChart3=myChart3;
|
|
|
- this.myChart4=myChart4;
|
|
|
- this.myChart5=myChart5;
|
|
|
- this.myChart6=myChart6;
|
|
|
- // 指定图表的配置项和数据
|
|
|
- let color=['#dc402c','#ee5930','#fcd865','#3074b5']
|
|
|
- var option1 = {
|
|
|
- backgroundColor:'rgba(0,0,0,0)',
|
|
|
- color:color,
|
|
|
- tooltip: {formatter: '{b}: {c} ({d}%)'},
|
|
|
- legend: {
|
|
|
- y:'bottom',
|
|
|
- itemWidth:8,
|
|
|
- itemHeight:8,
|
|
|
- textStyle:{
|
|
|
- color:'#8C8C8C',
|
|
|
- },
|
|
|
- data:['重大风险', '较大风险','一般风险','低风险']
|
|
|
+ getData(){
|
|
|
+ this.$api.getChartData({type:'qy'}).then(res=>{
|
|
|
+ this.data=res.data.data
|
|
|
+ var data=res.data.data;
|
|
|
+ let count=0;
|
|
|
+ for(let i=0;i<data.risk_data.length;i++){
|
|
|
+ count+=data.risk_data[i].value
|
|
|
+ }
|
|
|
+ this.count=count;
|
|
|
+
|
|
|
+ // 基于准备好的dom,初始化echarts实例
|
|
|
+ var myChart1 = this.$echarts.init(document.getElementById('chart1'),'dark');
|
|
|
+ var myChart2 = this.$echarts.init(document.getElementById('chart2'),'dark');
|
|
|
+ var myChart3 = this.$echarts.init(document.getElementById('chart3'),'dark');
|
|
|
+ var myChart4 = this.$echarts.init(document.getElementById('chart4'),'dark');
|
|
|
+ var myChart5 = this.$echarts.init(document.getElementById('chart5'),'dark');
|
|
|
+ var myChart6 = this.$echarts.init(document.getElementById('chart6'),'dark');
|
|
|
+ this.myChart1=myChart1;
|
|
|
+ this.myChart2=myChart2;
|
|
|
+ this.myChart3=myChart3;
|
|
|
+ this.myChart4=myChart4;
|
|
|
+ this.myChart5=myChart5;
|
|
|
+ this.myChart6=myChart6;
|
|
|
+ // 指定图表的配置项和数据
|
|
|
+ let color=['#dc402c','#ee5930','#fcd865','#3074b5']
|
|
|
+ var option1 = {
|
|
|
+ backgroundColor:'rgba(0,0,0,0)',
|
|
|
+ color:color,
|
|
|
+ tooltip: {formatter: '{b}: {c} ({d}%)'},
|
|
|
+ legend: {
|
|
|
+ y:'bottom',
|
|
|
+ itemWidth:8,
|
|
|
+ itemHeight:8,
|
|
|
+ textStyle:{
|
|
|
+ color:'#8C8C8C',
|
|
|
},
|
|
|
- series: [{
|
|
|
- type: 'pie',
|
|
|
- radius: ['55%', '60%'],
|
|
|
- label: {
|
|
|
- normal: {
|
|
|
- show: false
|
|
|
+ data:['重大风险', '较大风险','一般风险','低风险']
|
|
|
+ },
|
|
|
+ series: [{
|
|
|
+ type: 'pie',
|
|
|
+ radius: ['55%', '60%'],
|
|
|
+ label: {
|
|
|
+ normal: {
|
|
|
+ show: false
|
|
|
+ },
|
|
|
},
|
|
|
- },
|
|
|
- data: [
|
|
|
- {value: 100,name:'重大风险'},
|
|
|
- {value: 200,name:'较大风险'},
|
|
|
- {value: 50,name:'一般风险'},
|
|
|
- {value: 200,name:'低风险'},
|
|
|
- ]
|
|
|
- }]
|
|
|
- };
|
|
|
- var option2 = {
|
|
|
- backgroundColor:'rgba(0,0,0,0)',
|
|
|
- // color:['#3398dc'],
|
|
|
- tooltip: {formatter: '{b}: {c}'},
|
|
|
- grid: {
|
|
|
- left: '1%',
|
|
|
- right: '1%',
|
|
|
- bottom: '20px',
|
|
|
- // top:'50px',
|
|
|
- containLabel: true
|
|
|
- },
|
|
|
- xAxis: {
|
|
|
- data: ['重大风险', '较大风险','一般风险','低风险'],
|
|
|
+ data: data.risk_data
|
|
|
+ }]
|
|
|
+ };
|
|
|
+ var option2 = {
|
|
|
+ backgroundColor:'rgba(0,0,0,0)',
|
|
|
+ color:color,
|
|
|
+ tooltip: {formatter: '{b}: {c}'},
|
|
|
+ grid: {
|
|
|
+ left: '1%',
|
|
|
+ right: '1%',
|
|
|
+ bottom: '30px',
|
|
|
+ // top:'50px',
|
|
|
+ containLabel: true
|
|
|
+ },
|
|
|
+ xAxis: {
|
|
|
+ data: ['重大风险', '较大风险','一般风险','低风险'],
|
|
|
+ },
|
|
|
+ yAxis: {
|
|
|
+ axisLine:{
|
|
|
+ show:false
|
|
|
},
|
|
|
- yAxis: {
|
|
|
- axisLine:{
|
|
|
- show:false
|
|
|
- },
|
|
|
- splitLine:{
|
|
|
- show:true,
|
|
|
- lineStyle:{
|
|
|
- type:'solid',
|
|
|
- color:'#414B66'
|
|
|
- }
|
|
|
- },
|
|
|
- },
|
|
|
- series: [{
|
|
|
+ splitLine:{
|
|
|
+ show:true,
|
|
|
+ lineStyle:{
|
|
|
+ type:'solid',
|
|
|
+ color:'#414B66'
|
|
|
+ }
|
|
|
+ },
|
|
|
+ },
|
|
|
+ series: [{
|
|
|
type: 'bar',
|
|
|
barWidth: 20,
|
|
|
data: [
|
|
|
- {
|
|
|
- value:20,
|
|
|
+ {
|
|
|
+ value:data.risk_data[0].value,
|
|
|
itemStyle:{
|
|
|
- color:color[0]
|
|
|
+ color:color[0]
|
|
|
}
|
|
|
- },{
|
|
|
- value:60,
|
|
|
+ },{
|
|
|
+ value:data.risk_data[1].value,
|
|
|
itemStyle:{
|
|
|
- color:color[1]
|
|
|
+ color:color[1]
|
|
|
}
|
|
|
- },{
|
|
|
- value:120,
|
|
|
+ },{
|
|
|
+ value:data.risk_data[2].value,
|
|
|
itemStyle:{
|
|
|
- color:color[2]
|
|
|
+ color:color[2]
|
|
|
}
|
|
|
- },{
|
|
|
- value:204,
|
|
|
+ },{
|
|
|
+ value:data.risk_data[3].value,
|
|
|
itemStyle:{
|
|
|
- color:color[3]
|
|
|
+ color:color[3]
|
|
|
}
|
|
|
- },
|
|
|
+ },
|
|
|
],
|
|
|
- }]
|
|
|
- };
|
|
|
- var option3 = {
|
|
|
- backgroundColor:'rgba(0,0,0,0)',
|
|
|
- title: {
|
|
|
- text: ''
|
|
|
- },
|
|
|
- color:['#dc402c','#fcd865'],
|
|
|
- tooltip: {formatter: '{b}: {c} ({d}%)'},
|
|
|
- legend: {
|
|
|
+ }]
|
|
|
+ };
|
|
|
+ var option3 = {
|
|
|
+ backgroundColor:'rgba(0,0,0,0)',
|
|
|
+ title: {
|
|
|
+ text: ''
|
|
|
+ },
|
|
|
+ color:['#dc402c','#fcd865'],
|
|
|
+ tooltip: {formatter: '{b}: {c} ({d}%)'},
|
|
|
+ legend: {
|
|
|
y:'bottom',
|
|
|
itemWidth:8,
|
|
|
itemHeight:8,
|
|
|
- data:['重大隐患','一般隐患']
|
|
|
- },
|
|
|
- series: [{
|
|
|
- type: 'pie',
|
|
|
- radius: ['55%', '60%'],
|
|
|
- label: {
|
|
|
- normal: {
|
|
|
- show: false
|
|
|
- },
|
|
|
+ data:['重大隐患','一般隐患']
|
|
|
+ },
|
|
|
+ series: [{
|
|
|
+ type: 'pie',
|
|
|
+ radius: ['55%', '60%'],
|
|
|
+ label: {
|
|
|
+ normal: {
|
|
|
+ show: false
|
|
|
},
|
|
|
- data: [
|
|
|
- {value: 3,name:'重大隐患'},
|
|
|
- {value: 10,name:'一般隐患'},
|
|
|
- ]
|
|
|
- }]
|
|
|
- };
|
|
|
- var option4 = {
|
|
|
- backgroundColor:'rgba(0,0,0,0)',
|
|
|
- // color:['#3398dc'],
|
|
|
- tooltip: {formatter: '{b}: {c}'},
|
|
|
- grid: {
|
|
|
- left: '1%',
|
|
|
- right: '1%',
|
|
|
- bottom: '20px',
|
|
|
- top:'20px',
|
|
|
- containLabel: true
|
|
|
- },
|
|
|
- xAxis: {
|
|
|
- data: ['加油区', '加油区1','加油区2','加油区3','加油区4','加油区5'],
|
|
|
},
|
|
|
- yAxis: {
|
|
|
- axisLine:{
|
|
|
- show:false
|
|
|
- },
|
|
|
- splitLine:{
|
|
|
- show:true,
|
|
|
- lineStyle:{
|
|
|
- type:'solid',
|
|
|
- color:'#414B66'
|
|
|
- }
|
|
|
- },
|
|
|
- },
|
|
|
- series: [{
|
|
|
- type: 'bar',
|
|
|
- barWidth: 20,
|
|
|
- data: [5, 20, 36, 10,70,100],
|
|
|
- itemStyle: {
|
|
|
- color: new echarts.graphic.LinearGradient(
|
|
|
- 0, 0, 0, 1,
|
|
|
- [
|
|
|
- {offset: 0, color: '#7AF7FF'},
|
|
|
- {offset: 1, color: '#3687FF'}
|
|
|
- ]
|
|
|
- )
|
|
|
- },
|
|
|
- }]
|
|
|
- };
|
|
|
- let day=[],data=[];
|
|
|
- for(let i=1;i<25;i++){
|
|
|
- day.push(i)
|
|
|
- data.push(Math.ceil(Math.random()*50+20))
|
|
|
- }
|
|
|
- var option5 = {
|
|
|
- backgroundColor:'rgba(0,0,0,0)',
|
|
|
- // color:['#3398dc'],
|
|
|
- tooltip: {formatter: '{b}: {c}'},
|
|
|
- grid: {
|
|
|
- left: '1%',
|
|
|
- right: '1%',
|
|
|
- bottom: '20px',
|
|
|
- top:'20px',
|
|
|
- containLabel: true
|
|
|
- },
|
|
|
- xAxis: {
|
|
|
- data: day,
|
|
|
+ data:data.yh_data
|
|
|
+ }]
|
|
|
+ };
|
|
|
+ let fxd_name=[]
|
|
|
+ for(let i=0;i<data.riskpoint_count_data.length;i++){
|
|
|
+ fxd_name.push(data.riskpoint_count_data[i].name)
|
|
|
+ }
|
|
|
+ var option4 = {
|
|
|
+ backgroundColor:'rgba(0,0,0,0)',
|
|
|
+ // color:['#3398dc'],
|
|
|
+ tooltip: {formatter: '{b}: {c}'},
|
|
|
+ grid: {
|
|
|
+ left: '1%',
|
|
|
+ right: '1%',
|
|
|
+ bottom: '20px',
|
|
|
+ top:'20px',
|
|
|
+ containLabel: true
|
|
|
},
|
|
|
- yAxis: {
|
|
|
- axisLine:{
|
|
|
- show:false
|
|
|
- },
|
|
|
- splitLine:{
|
|
|
- show:true,
|
|
|
- lineStyle:{
|
|
|
- type:'solid',
|
|
|
- color:'#414B66'
|
|
|
- }
|
|
|
- },
|
|
|
- },
|
|
|
- series: [{
|
|
|
- type: 'line',
|
|
|
- smooth: 0.6,
|
|
|
- data: data,
|
|
|
- areaStyle: {},
|
|
|
- itemStyle: {
|
|
|
- color: new echarts.graphic.LinearGradient(
|
|
|
- 0, 0, 0, 1,
|
|
|
- [
|
|
|
- {offset: 0, color: '#7AF7FF'},
|
|
|
- {offset: 1, color: '#3687FF'}
|
|
|
- ]
|
|
|
- )
|
|
|
- },
|
|
|
- }]
|
|
|
- };
|
|
|
- var option6 = {
|
|
|
- backgroundColor:'rgba(0,0,0,0)',
|
|
|
- color:['#3398dc'],
|
|
|
- tooltip: {formatter: '{b}: {c}'},
|
|
|
- legend: {
|
|
|
- y:'bottom',
|
|
|
- x:'left',
|
|
|
- itemWidth:8,
|
|
|
- itemHeight:8,
|
|
|
- textStyle:{
|
|
|
- color:'#8C8C8C',
|
|
|
- },
|
|
|
- data:['风险点', '管控任务']
|
|
|
+ xAxis: {
|
|
|
+ data: fxd_name,
|
|
|
+ },
|
|
|
+ yAxis: {
|
|
|
+ axisLine:{
|
|
|
+ show:false
|
|
|
},
|
|
|
- grid: {
|
|
|
- left: '1%',
|
|
|
- right: '1%',
|
|
|
- bottom: '10px',
|
|
|
- top:'10px',
|
|
|
- containLabel: true
|
|
|
- },
|
|
|
- yAxis: {
|
|
|
- data: ['加油区1', '加油区2','加油区3','加油区4','加油区5'],
|
|
|
+ splitLine:{
|
|
|
+ show:true,
|
|
|
+ lineStyle:{
|
|
|
+ type:'solid',
|
|
|
+ color:'#414B66'
|
|
|
+ }
|
|
|
},
|
|
|
- xAxis: {
|
|
|
- show:false
|
|
|
- },
|
|
|
- series: [
|
|
|
- {
|
|
|
- name: '风险点',
|
|
|
- type: 'bar',
|
|
|
- barWidth:10,
|
|
|
- data: [320, 332, 301, 334,690],
|
|
|
- itemStyle: {
|
|
|
+ },
|
|
|
+ series: [{
|
|
|
+ type: 'bar',
|
|
|
+ barWidth: 20,
|
|
|
+ data: data.riskpoint_count_data,
|
|
|
+ itemStyle: {
|
|
|
color: new echarts.graphic.LinearGradient(
|
|
|
0, 0, 0, 1,
|
|
|
[
|
|
|
- {offset: 0, color: '#FFEE7F'},
|
|
|
- {offset: 1, color: '#E8B35F'}
|
|
|
+ {offset: 0, color: '#7AF7FF'},
|
|
|
+ {offset: 1, color: '#3687FF'}
|
|
|
]
|
|
|
)
|
|
|
+ },
|
|
|
+ }]
|
|
|
+ };
|
|
|
+ let fxd_date_name=[]
|
|
|
+ for(let i=0;i<data.time_count.length;i++){
|
|
|
+ fxd_date_name.push(data.time_count[i].date)
|
|
|
+ }
|
|
|
+ var option5 = {
|
|
|
+ backgroundColor:'rgba(0,0,0,0)',
|
|
|
+ // color:['#3398dc'],
|
|
|
+ tooltip: {formatter: '{b}: {c}'},
|
|
|
+ grid: {
|
|
|
+ left: '1%',
|
|
|
+ right: '1%',
|
|
|
+ bottom: '20px',
|
|
|
+ top:'20px',
|
|
|
+ containLabel: true
|
|
|
+ },
|
|
|
+ xAxis: {
|
|
|
+ data: fxd_date_name,
|
|
|
},
|
|
|
- },
|
|
|
- {
|
|
|
- name: '管控任务',
|
|
|
- type: 'bar',
|
|
|
- barWidth:10,
|
|
|
- data: [30, 132, 201, 34,270],
|
|
|
- itemStyle: {
|
|
|
+ yAxis: {
|
|
|
+ axisLine:{
|
|
|
+ show:false
|
|
|
+ },
|
|
|
+ splitLine:{
|
|
|
+ show:true,
|
|
|
+ lineStyle:{
|
|
|
+ type:'solid',
|
|
|
+ color:'#414B66'
|
|
|
+ }
|
|
|
+ },
|
|
|
+ },
|
|
|
+ series: [{
|
|
|
+ type: 'line',
|
|
|
+ smooth: 0.6,
|
|
|
+ data: data.time_count,
|
|
|
+ areaStyle: {},
|
|
|
+ itemStyle: {
|
|
|
color: new echarts.graphic.LinearGradient(
|
|
|
0, 0, 0, 1,
|
|
|
[
|
|
|
@@ -535,26 +475,87 @@ export default {
|
|
|
{offset: 1, color: '#3687FF'}
|
|
|
]
|
|
|
)
|
|
|
+ },
|
|
|
+ }]
|
|
|
+ };
|
|
|
+ var option6 = {
|
|
|
+ backgroundColor:'rgba(0,0,0,0)',
|
|
|
+ color:['#3398dc'],
|
|
|
+ tooltip: {formatter: '{b}: {c}'},
|
|
|
+ legend: {
|
|
|
+ y:'bottom',
|
|
|
+ x:'left',
|
|
|
+ itemWidth:8,
|
|
|
+ itemHeight:8,
|
|
|
+ textStyle:{
|
|
|
+ color:'#8C8C8C',
|
|
|
+ },
|
|
|
+ data:['风险点', '管控任务']
|
|
|
+ },
|
|
|
+ grid: {
|
|
|
+ left: '1%',
|
|
|
+ right: '1%',
|
|
|
+ bottom: '10px',
|
|
|
+ top:'10px',
|
|
|
+ containLabel: true
|
|
|
+ },
|
|
|
+ yAxis: {
|
|
|
+ data: ['加油区1', '加油区2','加油区3','加油区4','加油区5'],
|
|
|
},
|
|
|
- },
|
|
|
- ]
|
|
|
- };
|
|
|
- // 使用刚指定的配置项和数据显示图表。
|
|
|
- myChart1.setOption(option1);
|
|
|
- myChart2.setOption(option2);
|
|
|
- myChart3.setOption(option3);
|
|
|
- myChart4.setOption(option4);
|
|
|
- myChart5.setOption(option5);
|
|
|
- myChart6.setOption(option6);
|
|
|
- window.addEventListener("resize", () => {
|
|
|
- myChart1.resize();
|
|
|
- myChart2.resize();
|
|
|
- myChart3.resize();
|
|
|
- myChart4.resize();
|
|
|
- myChart5.resize();
|
|
|
- myChart6.resize();
|
|
|
- })
|
|
|
+ xAxis: {
|
|
|
+ show:false
|
|
|
+ },
|
|
|
+ series: [
|
|
|
+ {
|
|
|
+ name: '风险点',
|
|
|
+ type: 'bar',
|
|
|
+ barWidth:10,
|
|
|
+ data: [320, 332, 301, 334,690],
|
|
|
+ itemStyle: {
|
|
|
+ color: new echarts.graphic.LinearGradient(
|
|
|
+ 0, 0, 0, 1,
|
|
|
+ [
|
|
|
+ {offset: 0, color: '#FFEE7F'},
|
|
|
+ {offset: 1, color: '#E8B35F'}
|
|
|
+ ]
|
|
|
+ )
|
|
|
+ },
|
|
|
+ },
|
|
|
+ {
|
|
|
+ name: '管控任务',
|
|
|
+ type: 'bar',
|
|
|
+ barWidth:10,
|
|
|
+ data: [30, 132, 201, 34,270],
|
|
|
+ itemStyle: {
|
|
|
+ color: new echarts.graphic.LinearGradient(
|
|
|
+ 0, 0, 0, 1,
|
|
|
+ [
|
|
|
+ {offset: 0, color: '#7AF7FF'},
|
|
|
+ {offset: 1, color: '#3687FF'}
|
|
|
+ ]
|
|
|
+ )
|
|
|
+ },
|
|
|
+ },
|
|
|
+ ]
|
|
|
+ };
|
|
|
+ // 使用刚指定的配置项和数据显示图表。
|
|
|
+ myChart1.setOption(option1);
|
|
|
+ myChart2.setOption(option2);
|
|
|
+ myChart3.setOption(option3);
|
|
|
+ myChart4.setOption(option4);
|
|
|
+ myChart5.setOption(option5);
|
|
|
+ myChart6.setOption(option6);
|
|
|
+ window.addEventListener("resize", () => {
|
|
|
+ myChart1.resize();
|
|
|
+ myChart2.resize();
|
|
|
+ myChart3.resize();
|
|
|
+ myChart4.resize();
|
|
|
+ myChart5.resize();
|
|
|
+ myChart6.resize();
|
|
|
+ })
|
|
|
+ })
|
|
|
},
|
|
|
+
|
|
|
reload(){
|
|
|
this.myChart1.resize();
|
|
|
this.myChart2.resize();
|