|
|
@@ -1,97 +1,672 @@
|
|
|
<style lang="scss">
|
|
|
- .all_data{
|
|
|
+ .index{
|
|
|
+ .content{
|
|
|
+ background: #151932;
|
|
|
+ color:#fff;
|
|
|
+ padding:0 20px;
|
|
|
+ position: relative;
|
|
|
+ .max,.min{
|
|
|
+ position: absolute;
|
|
|
+ top: 40px;
|
|
|
+ right: 20px;
|
|
|
+ cursor: pointer;
|
|
|
+ z-index: 999;
|
|
|
+ }
|
|
|
+ .min{
|
|
|
+ display: none;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ #fixed{
|
|
|
+ position: fixed;
|
|
|
+ width: 100%;
|
|
|
+ height: 100vh;
|
|
|
+ left: 0;
|
|
|
+ top: 0;
|
|
|
+ z-index: 99999;
|
|
|
+ overflow: auto;
|
|
|
+ .all{
|
|
|
+ top: 80px!important;
|
|
|
+ }
|
|
|
+ .max{
|
|
|
+ display: none;
|
|
|
+ }
|
|
|
+ .min{
|
|
|
+ display: inline-block;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ .title{
|
|
|
+ text-align: center;
|
|
|
+ margin-bottom: 30px;
|
|
|
+ position: relative;
|
|
|
+ span{
|
|
|
+ position: absolute;
|
|
|
+ top: 10px;
|
|
|
+ width: 100%;
|
|
|
+ text-align: center;
|
|
|
+ left: 0;
|
|
|
+ left: 0;
|
|
|
+ right: 0;
|
|
|
+ margin: auto;
|
|
|
+ font-size: 25px;
|
|
|
+ line-height: 70px;
|
|
|
+ font-weight:300;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ .datas{
|
|
|
+ // margin-bottom: 60px;
|
|
|
+ display: flex;
|
|
|
+ &>li{
|
|
|
+ list-style: none;
|
|
|
+ padding-right: 30px;
|
|
|
+ vertical-align: top;
|
|
|
+ .li{
|
|
|
+ background: rgba(39, 51, 76, 0.64);
|
|
|
+ margin-bottom: 30px;
|
|
|
+ padding: 20px;
|
|
|
+ position: relative;
|
|
|
+ &::before{
|
|
|
+ content: url(../images/bk.png);
|
|
|
+ position: absolute;
|
|
|
+ right:0;
|
|
|
+ top:-5px;
|
|
|
+ transform: rotate(90deg);
|
|
|
+ }
|
|
|
+ &::after{
|
|
|
+ content: url(../images/bk.png);
|
|
|
+ position: absolute;
|
|
|
+ right:0;
|
|
|
+ bottom:-5px;
|
|
|
+ transform: rotate(180deg);
|
|
|
+ }
|
|
|
+ .top{
|
|
|
+ position: absolute;
|
|
|
+ left:0;
|
|
|
+ top:0;
|
|
|
+ }
|
|
|
+ .bottom{
|
|
|
+ position: absolute;
|
|
|
+ left:0;
|
|
|
+ bottom:0;
|
|
|
+ transform: rotate(-90deg);
|
|
|
+ }
|
|
|
+ .all{
|
|
|
+ font-size: 48px;
|
|
|
+ color: #fff;
|
|
|
+ position: absolute;
|
|
|
+ left: 0;
|
|
|
+ right: 0;
|
|
|
+ top: 75px;
|
|
|
+ margin: auto;
|
|
|
+ width: 100px;
|
|
|
+ text-align: center;
|
|
|
+ z-index: 999;
|
|
|
+ span{
|
|
|
+ color: #D2D9E3;
|
|
|
+ font-size: 12px;
|
|
|
+ display: block;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ h4{
|
|
|
+ margin-bottom: 20px;
|
|
|
+ color:#fff;
|
|
|
+ }
|
|
|
+ .count{
|
|
|
+ margin-bottom: 50px;
|
|
|
+ margin-top: 27px;
|
|
|
+ span{
|
|
|
+ padding: 0 10px;
|
|
|
+ display: inline-block;
|
|
|
+ width: 160px;
|
|
|
+ height: 28px;
|
|
|
+ font-size: 14px;
|
|
|
+ line-height: 28px;
|
|
|
+ padding-left: 40px;
|
|
|
+ margin-bottom: 20px;
|
|
|
+ margin-right: 60px;
|
|
|
+ }
|
|
|
+ .span1{
|
|
|
+ background: url(../images/hy.png);
|
|
|
+ }
|
|
|
+ .span2{
|
|
|
+ background: url(../images/qy.png);
|
|
|
+ margin-right: 0;
|
|
|
+ }
|
|
|
+ .span3{
|
|
|
+ background: url(../images/fxd.png);
|
|
|
+ }
|
|
|
+ .span4{
|
|
|
+ background: url(../images/gkrw.png);
|
|
|
+ margin-right: 0;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ table{
|
|
|
+ width: 100%;
|
|
|
+ thead td{
|
|
|
+ font-size: 16px;
|
|
|
+ }
|
|
|
+ td{
|
|
|
+ font-size: 14px;
|
|
|
+ padding: 5px;
|
|
|
+ color:#D2D9E3;
|
|
|
+ line-height: 25px;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ .company_top{
|
|
|
li{
|
|
|
- display: inline-block;
|
|
|
- padding: 50px;
|
|
|
- border: 1px solid #d9d9d9;
|
|
|
- list-style: none;
|
|
|
- margin-right: 20px;
|
|
|
+ list-style: none;
|
|
|
+ color: #D2D9E3;
|
|
|
+ line-height: 25px;
|
|
|
+ font-size: 14px;
|
|
|
+ display: flex;
|
|
|
+ vertical-align: middle;
|
|
|
+ span{
|
|
|
+ display: block;
|
|
|
+ // width: 8%;
|
|
|
text-align: center;
|
|
|
- font-size: 14px;
|
|
|
+ min-width: 34px;
|
|
|
+ line-height: 38px;
|
|
|
+ img{
|
|
|
+ position: relative;
|
|
|
+ top:5px;
|
|
|
+ // left:3px;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ .second{
|
|
|
+ width: 58%;
|
|
|
+ padding:0 5px;
|
|
|
+ overflow: hidden;
|
|
|
+ text-overflow: ellipsis;
|
|
|
+ white-space: nowrap;
|
|
|
+ // text-align: left;
|
|
|
+ // padding-left: 10px;
|
|
|
+ }
|
|
|
}
|
|
|
- h4{
|
|
|
- margin: 20px 0;
|
|
|
+ .thead{
|
|
|
+ font-size: 16px;
|
|
|
}
|
|
|
- .table thead th{
|
|
|
- background: #fff;
|
|
|
+ .outer_div{
|
|
|
+ height: 190px;
|
|
|
+ overflow: hidden;
|
|
|
+ .inner_div{
|
|
|
+ position: relative;
|
|
|
+ animation:move 15s infinite linear;
|
|
|
+ }
|
|
|
}
|
|
|
- }
|
|
|
+ @keyframes move {
|
|
|
+ 0%{
|
|
|
+ transform: translateY(0);
|
|
|
+ }
|
|
|
+ 100%{
|
|
|
+ transform: translateY(-228px);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
</style>
|
|
|
<template>
|
|
|
- <section>
|
|
|
- <p>概览</p>
|
|
|
- <div class="content all_data">
|
|
|
- <ul>
|
|
|
- <li>
|
|
|
- <img src="../images/zf.png" width="50" alt=""><br>
|
|
|
- 政府数量 100
|
|
|
- </li>
|
|
|
- <li>
|
|
|
- <img src="../images/fz.png" width="50" alt=""><br>
|
|
|
- 企业数量 100
|
|
|
- </li>
|
|
|
- <li>
|
|
|
- <img src="../images/dp.png" width="50" alt=""><br>
|
|
|
- 风险点 100
|
|
|
- </li>
|
|
|
- </ul>
|
|
|
- <h4>最新告警</h4>
|
|
|
- <el-table
|
|
|
- class="table"
|
|
|
- :data="list"
|
|
|
- v-loading="loading"
|
|
|
- style="width: 100%">
|
|
|
- <el-table-column
|
|
|
- prop="name" width="300"
|
|
|
- label="管辖单位">
|
|
|
- </el-table-column>
|
|
|
- <el-table-column
|
|
|
- prop="area"
|
|
|
- label="企业名称">
|
|
|
- </el-table-column>
|
|
|
- <el-table-column
|
|
|
- prop="parent_name"
|
|
|
- label="风险点">
|
|
|
- </el-table-column>
|
|
|
- <el-table-column
|
|
|
- prop="category"
|
|
|
- label="告警详情">
|
|
|
- </el-table-column>
|
|
|
- <el-table-column
|
|
|
- prop="ctime" width="200"
|
|
|
- label="告警时间">
|
|
|
- </el-table-column>
|
|
|
- </el-table>
|
|
|
- </div>
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
- </section>
|
|
|
+ <section class="index">
|
|
|
+ <div class="content" :id="fullscreen">
|
|
|
+ <img @click="max" class="max" src="../images/max.png" alt="">
|
|
|
+ <img @click="min" class="min" src="../images/min.png" alt="">
|
|
|
+ <h1 class="title">
|
|
|
+ <img height="90px" width="100%" src="../images/bg_1.jpg" alt="">
|
|
|
+ <span>{{info.realname}}可视化系统</span>
|
|
|
+ </h1>
|
|
|
+ <ul class="datas">
|
|
|
+ <li style="width:30%;">
|
|
|
+ <div class="li">
|
|
|
+ <img class="top" src="../images/bk.png" alt="">
|
|
|
+ <h4>安全风险实时统计</h4>
|
|
|
+ <div style="position:relative;">
|
|
|
+ <p class="all">
|
|
|
+ 32 <span>总风险(起)</span>
|
|
|
+ </p>
|
|
|
+ <div id="chart1" style="width: 100%;height:250px;"></div>
|
|
|
+ </div>
|
|
|
+ <div id="chart2" style="width: 100%;height:300px;"></div>
|
|
|
+ <img class="bottom" src="../images/bk.png" alt="">
|
|
|
+ </div>
|
|
|
+ <div class="li">
|
|
|
+ <img class="top" src="../images/bk.png" alt="">
|
|
|
+ <h4>安全隐患实时统计</h4>
|
|
|
+ <div style="position:relative;">
|
|
|
+ <p class="all" style="top:75px;">
|
|
|
+ 24 <span>总隐患数(起)</span>
|
|
|
+ </p>
|
|
|
+ <div id="chart3" style="width: 100%;height:250px;"></div>
|
|
|
+ </div>
|
|
|
+ <img class="bottom" src="../images/bk.png" alt="">
|
|
|
+ </div>
|
|
|
+ </li>
|
|
|
+ <li style="width:45%">
|
|
|
+ <div class="li">
|
|
|
+ <img class="top" src="../images/bk.png" alt="">
|
|
|
+ <h4>实时监测</h4>
|
|
|
+ <p class="count">
|
|
|
+
|
|
|
+ <span class="span1">政府5个</span>
|
|
|
+ <span class="span2">企业5个</span><br>
|
|
|
+ <span class="span3">风险点5个</span>
|
|
|
+ <span class="span4">管控任务5个</span>
|
|
|
+ </p>
|
|
|
+ <h4>行业风险统计</h4>
|
|
|
+ <div id="chart4" style="width: 100%;height:315px;"></div>
|
|
|
+ <br><br>
|
|
|
+ <h4>企业风险统计</h4>
|
|
|
+ <div id="chart5" style="width: 100%;height:315px;"></div>
|
|
|
+ <img class="bottom" src="../images/bk.png" alt="">
|
|
|
+ </div>
|
|
|
+ </li>
|
|
|
+ <li style="width:25%;padding:0;">
|
|
|
+ <div class="li">
|
|
|
+ <img class="top" src="../images/bk.png" alt="">
|
|
|
+ <h4>企业告警TOP5</h4>
|
|
|
+ <ol class="company_top">
|
|
|
+ <li class="thead"><span>序号</span><span class="second">企业名称</span><span>告警次数</span></li>
|
|
|
+ <div class="outer_div">
|
|
|
+ <div class="inner_div">
|
|
|
+ <li>
|
|
|
+ <span><img src="../images/1.png" alt=""></span>
|
|
|
+ <span class="second">巴中达芙妮</span>
|
|
|
+ <span>20</span>
|
|
|
+ </li>
|
|
|
+ <li>
|
|
|
+ <span><img src="../images/2.png" alt=""></span>
|
|
|
+ <span class="second">巴中达芙妮</span>
|
|
|
+ <span>20</span>
|
|
|
+ </li>
|
|
|
+ <li>
|
|
|
+ <span><img src="../images/3.png" alt=""></span>
|
|
|
+ <span class="second">巴中达芙妮</span>
|
|
|
+ <span>20</span>
|
|
|
+ </li>
|
|
|
+ <li>
|
|
|
+ <span>4</span>
|
|
|
+ <span class="second">巴中达芙妮巴中达芙妮巴中达芙妮</span>
|
|
|
+ <span>20</span>
|
|
|
+ </li>
|
|
|
+ <li>
|
|
|
+ <span>5</span>
|
|
|
+ <span class="second">巴中达芙妮</span>
|
|
|
+ <span>20</span>
|
|
|
+ </li>
|
|
|
+ <li>
|
|
|
+ <span>6</span>
|
|
|
+ <span class="second">巴中达芙妮</span>
|
|
|
+ <span>20</span>
|
|
|
+ </li>
|
|
|
+ <li>
|
|
|
+ <span><img src="../images/1.png" alt=""></span>
|
|
|
+ <span class="second">巴中达芙妮</span>
|
|
|
+ <span>20</span>
|
|
|
+ </li>
|
|
|
+ <li>
|
|
|
+ <span><img src="../images/2.png" alt=""></span>
|
|
|
+ <span class="second">巴中达芙妮</span>
|
|
|
+ <span>20</span>
|
|
|
+ </li>
|
|
|
+ <li>
|
|
|
+ <span><img src="../images/3.png" alt=""></span>
|
|
|
+ <span class="second">巴中达芙妮</span>
|
|
|
+ <span>20</span>
|
|
|
+ </li>
|
|
|
+ <li>
|
|
|
+ <span>4</span>
|
|
|
+ <span class="second">巴中达芙妮巴中达芙妮巴中达芙妮</span>
|
|
|
+ <span>20</span>
|
|
|
+ </li>
|
|
|
+ <li>
|
|
|
+ <span>5</span>
|
|
|
+ <span class="second">巴中达芙妮</span>
|
|
|
+ <span>20</span>
|
|
|
+ </li>
|
|
|
+ <li>
|
|
|
+ <span>6</span>
|
|
|
+ <span class="second">巴中达芙妮</span>
|
|
|
+ <span>20</span>
|
|
|
+ </li>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </ol>
|
|
|
+
|
|
|
+ <img class="bottom" src="../images/bk.png" alt="">
|
|
|
+ </div>
|
|
|
+ <div class="li">
|
|
|
+ <img class="top" src="../images/bk.png" alt="">
|
|
|
+ <h4>风险企业TOP5</h4>
|
|
|
+ <div id="chart6" style="width: 100%;height:230px;"></div>
|
|
|
+ <img class="bottom" src="../images/bk.png" alt="">
|
|
|
+ </div>
|
|
|
+ <div class="li">
|
|
|
+ <img class="top" src="../images/bk.png" alt="">
|
|
|
+ <h4>隐患企业TOP5</h4>
|
|
|
+ <div id="chart7" style="width: 100%;height:230px;"></div>
|
|
|
+ <img class="bottom" src="../images/bk.png" alt="">
|
|
|
+ </div>
|
|
|
+ </li>
|
|
|
+ </ul>
|
|
|
+ </div>
|
|
|
+ </section>
|
|
|
</template>
|
|
|
<script>
|
|
|
+import echarts from 'echarts';
|
|
|
export default {
|
|
|
data(){
|
|
|
return{
|
|
|
- form:{name:'',page:1,page_size:20},
|
|
|
- activeName:"1",
|
|
|
- total:1,
|
|
|
- list:[{name:'2333'}],
|
|
|
- loading:false
|
|
|
+ fullscreen:'',
|
|
|
+ info:{}
|
|
|
}
|
|
|
},
|
|
|
methods:{
|
|
|
- getData(){
|
|
|
- var parm=this.form;
|
|
|
- this.loading=true
|
|
|
- // this.$api.getClass(parm).then(res=>{
|
|
|
- // this.list=res.data.data.list
|
|
|
- // this.total=res.data.data.total
|
|
|
- // this.loading=false
|
|
|
- // })
|
|
|
- }
|
|
|
+ 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');
|
|
|
+ var myChart7 = this.$echarts.init(document.getElementById('chart7'),'dark');
|
|
|
+ this.myChart1=myChart1;
|
|
|
+ this.myChart2=myChart2;
|
|
|
+ this.myChart3=myChart3;
|
|
|
+ this.myChart4=myChart4;
|
|
|
+ this.myChart5=myChart5;
|
|
|
+ this.myChart6=myChart6;
|
|
|
+ this.myChart7=myChart7;
|
|
|
+ // 指定图表的配置项和数据
|
|
|
+ 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:['重大风险', '较大风险','一般风险','低风险']
|
|
|
+ },
|
|
|
+ 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:color,
|
|
|
+ tooltip: {formatter: '{b}: {c}'},
|
|
|
+ grid: {
|
|
|
+ left: '1%',
|
|
|
+ right: '1%',
|
|
|
+ bottom: '30px',
|
|
|
+ // top:'50px',
|
|
|
+ containLabel: true
|
|
|
+ },
|
|
|
+ xAxis: {
|
|
|
+ data: ['重大风险', '较大风险','一般风险','低风险'],
|
|
|
+ },
|
|
|
+ yAxis: {
|
|
|
+ axisLine:{
|
|
|
+ show:false
|
|
|
+ },
|
|
|
+ splitLine:{
|
|
|
+ show:true,
|
|
|
+ lineStyle:{
|
|
|
+ type:'solid',
|
|
|
+ color:'#414B66'
|
|
|
+ }
|
|
|
+ },
|
|
|
+ },
|
|
|
+ series: [{
|
|
|
+ type: 'bar',
|
|
|
+ barWidth: 20,
|
|
|
+ data: [
|
|
|
+ {
|
|
|
+ value:20,
|
|
|
+ itemStyle:{
|
|
|
+ color:color[0]
|
|
|
+ }
|
|
|
+ },{
|
|
|
+ value:60,
|
|
|
+ itemStyle:{
|
|
|
+ color:color[1]
|
|
|
+ }
|
|
|
+ },{
|
|
|
+ value:120,
|
|
|
+ itemStyle:{
|
|
|
+ color:color[2]
|
|
|
+ }
|
|
|
+ },{
|
|
|
+ value:204,
|
|
|
+ itemStyle:{
|
|
|
+ color:color[3]
|
|
|
+ }
|
|
|
+ },
|
|
|
+ ],
|
|
|
+ }]
|
|
|
+ };
|
|
|
+ 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: [
|
|
|
+ {value: 3,name:'重大隐患'},
|
|
|
+ {value: 10,name:'一般隐患'},
|
|
|
+ ]
|
|
|
+ }]
|
|
|
+ };
|
|
|
+ var option4 = {
|
|
|
+ backgroundColor:'rgba(0,0,0,0)',
|
|
|
+ title: {
|
|
|
+ text: ''
|
|
|
+ },
|
|
|
+ legend: {
|
|
|
+ y:'bottom',
|
|
|
+ x:'left',
|
|
|
+ itemWidth:8,
|
|
|
+ itemHeight:8,
|
|
|
+ textStyle:{
|
|
|
+ color:'#8C8C8C',
|
|
|
+ },
|
|
|
+ data:['重大风险', '较大风险','一般风险','低风险']
|
|
|
+ },
|
|
|
+ color:color,
|
|
|
+ tooltip: {formatter: '{b}: {c}'},
|
|
|
+ grid: {
|
|
|
+ left: '1%',
|
|
|
+ right: '1%',
|
|
|
+ top: '10px',
|
|
|
+ bottom:'40px',
|
|
|
+ containLabel: true
|
|
|
+ },
|
|
|
+ xAxis: {
|
|
|
+ data: ['危险化学品', '煤矿','非煤矿山','工贸行业']
|
|
|
+ },
|
|
|
+ yAxis: {
|
|
|
+ axisLine:{
|
|
|
+ show:false
|
|
|
+ },
|
|
|
+ splitLine:{
|
|
|
+ show:true,
|
|
|
+ lineStyle:{
|
|
|
+ type:'solid',
|
|
|
+ color:'#414B66'
|
|
|
+ }
|
|
|
+ },
|
|
|
+ },
|
|
|
+ series: [
|
|
|
+ {
|
|
|
+ name: '重大风险',
|
|
|
+ type: 'bar',
|
|
|
+ stack:'风险',
|
|
|
+ barWidth:20,
|
|
|
+ data: [320, 332, 301, 334]
|
|
|
+ },
|
|
|
+ {
|
|
|
+ name: '较大风险',
|
|
|
+ type: 'bar',
|
|
|
+ stack:'风险',
|
|
|
+ data: [310, 32, 31, 334]
|
|
|
+ },
|
|
|
+ {
|
|
|
+ name: '一般风险',
|
|
|
+ type: 'bar',
|
|
|
+ stack:'风险',
|
|
|
+ barWidth:20,
|
|
|
+ data: [390, 320, 31, 140]
|
|
|
+ },
|
|
|
+ {
|
|
|
+ name: '低风险',
|
|
|
+ type: 'bar',
|
|
|
+ stack:'风险',
|
|
|
+ barWidth:20,
|
|
|
+ data: [90, 20, 31, 40]
|
|
|
+ },
|
|
|
+ ]
|
|
|
+ };
|
|
|
+ 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: ['巴中达芙妮', '巴中达芙妮2','巴中达芙妮3','巴中达芙妮4'],
|
|
|
+ },
|
|
|
+ xAxis: {
|
|
|
+ show:false
|
|
|
+ },
|
|
|
+ series: [
|
|
|
+ {
|
|
|
+ name: '风险点',
|
|
|
+ type: 'bar',
|
|
|
+ barWidth:10,
|
|
|
+ data: [320, 332, 301, 334],
|
|
|
+ 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],
|
|
|
+ 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(option4);
|
|
|
+ myChart6.setOption(option6);
|
|
|
+ myChart7.setOption(option6);
|
|
|
+ window.addEventListener("resize", () => {
|
|
|
+ myChart1.resize();
|
|
|
+ myChart2.resize();
|
|
|
+ myChart3.resize();
|
|
|
+ myChart4.resize();
|
|
|
+ myChart5.resize();
|
|
|
+ myChart6.resize();
|
|
|
+ myChart7.resize();
|
|
|
+ })
|
|
|
+ },
|
|
|
+ reload(){
|
|
|
+ this.myChart1.resize();
|
|
|
+ this.myChart2.resize();
|
|
|
+ this.myChart3.resize();
|
|
|
+ this.myChart4.resize();
|
|
|
+ this.myChart5.resize();
|
|
|
+ this.myChart6.resize();
|
|
|
+ this.myChart7.resize();
|
|
|
+ },
|
|
|
+ max(){
|
|
|
+ this.fullscreen='fixed';
|
|
|
+ let _this=this;
|
|
|
+ setTimeout(() => {
|
|
|
+ _this.reload()
|
|
|
+ }, 200)
|
|
|
+ },
|
|
|
+ min(){
|
|
|
+ this.fullscreen='';
|
|
|
+ let _this=this;
|
|
|
+ setTimeout(() => {
|
|
|
+ _this.reload()
|
|
|
+ }, 200)
|
|
|
+ }
|
|
|
+ },
|
|
|
+ mounted(){
|
|
|
+ this.getData()
|
|
|
},
|
|
|
created(){
|
|
|
- // this.getData()
|
|
|
+ this.$api.getInfo().then(res=>{
|
|
|
+ this.info=res.data.data
|
|
|
+ })
|
|
|
}
|
|
|
}
|
|
|
-</script>
|
|
|
+</script>
|