wangtao 2 gadi atpakaļ
vecāks
revīzija
1573e82dc6

+ 1 - 1
package.json

@@ -40,7 +40,7 @@
         "axios": "0.21.0",
         "clipboard": "2.0.6",
         "core-js": "3.8.1",
-        "echarts": "4.9.0",
+        "echarts": "^4.9.0",
         "element-ui": "2.15.5",
         "error-stack-parser": "^2.1.4",
         "file-saver": "2.0.4",

+ 2 - 2
src/views/business/ba/airConditioner/index.vue

@@ -93,7 +93,7 @@
       </el-table-column>
       <el-table-column label="送风湿度" align="center" prop="sh"  show-overflow-tooltip >
         <template slot-scope="scope">
-          <span v-if="scope.row.st">{{scope.row.st}}RH</span>
+          <span v-if="scope.row.st">{{scope.row.sh}}RH</span>
         </template>
       </el-table-column>
       <el-table-column label="回风温度" align="center" prop="rt"  show-overflow-tooltip >
@@ -144,7 +144,7 @@
           <span :class="scope.row.mode == 0 ? 'color3' : 'color4'">{{scope.row.mode == 0 ? "夏季" : scope.row.mode == 1 ? "冬季" : ""}}</span>
         </template>
       </el-table-column>
-     
+
     </el-table>
     <pagination
       v-show="total>0"

+ 7 - 3
src/views/business/fireInternet/deviceMonitoring/SSMonitoring/index.vue

@@ -35,11 +35,11 @@
                     <div>
                       <span>处置率</span>
                       <div>
-                        <p v-loading="loading1">{{index1Data.checkRadio ? Number((index1Data.checkRadio)*100).toFixed(2) : '0'}}%</p>
+                        <p>{{index1Data.checkRadio ? Number((index1Data.checkRadio)*100).toFixed(2) : '0'}}%</p>
                       </div>
                     </div>
                 </div>
-                <div class="contain2">
+                <div class="contain2" v-if="bt">
                   <div class="wrap">
                     <index1 :resData="index1Data.checkRadio"
                       :dataMap="index1Data.checkRadio"
@@ -57,7 +57,7 @@
           <el-col :span="12">
             <div class="card_right">
               <el-card class="box-card card2"  v-loading="loading2">
-                <div class="contain">
+                <div class="contain" v-if="zxt">
                   <index2
                   :resData="index2Data"
                   style="width:100%;height:40vh;" alt="折线图" />
@@ -234,6 +234,8 @@ export default {
   },
   data() {
     return {
+      bt:false,
+      zxt:false,
       img:require('@/assets/images/3.png'),
       title:"烟感离线处理情况",
       index1Data:{},//饼图
@@ -289,6 +291,7 @@ export default {
         /* 饼图 */
         getTbDeviceStatusCollect(this.queryParams).then(response =>{
           this.index1Data = response.data
+          this.bt = true
           this.loading1 = false
         })
         this.queryParams.status = 0
@@ -310,6 +313,7 @@ export default {
             checkCount[0].name = "处理次数"
             this.index2Data.push(total[0],checkCount[0],lineData)
             this.index2Data.push({name:"烟感离线处理情况跟踪",color:"#FF9721"})
+            this.zxt = true
             this.loading2 = false
           }
         })

+ 7 - 9
src/views/business/fireInternet/deviceMonitoring/fireMonitoring/index.vue

@@ -35,11 +35,11 @@
                     <div>
                       <span>处置率</span>
                       <div>
-                        <p v-loading="loading1">{{index1Data.checkRadio ? Number((index1Data.checkRadio)*100).toFixed(2) : '0'}}%</p>
+                        <p>{{index1Data.checkRadio ? Number((index1Data.checkRadio)*100).toFixed(2) : '0'}}%</p>
                       </div>
                     </div>
                 </div>
-                <div class="contain2">
+                <div class="contain2" v-if="bt">
                   <div class="wrap">
                     <index1 :resData="index1Data.checkRadio"
                       :dataMap="index1Data.checkRadio"
@@ -56,7 +56,7 @@
           </el-col>
           <el-col :span="12">
             <div class="card_right" v-loading="loading2">
-              <el-card class="box-card card2">
+              <el-card class="box-card card2" v-if="zxt">
                 <div class="contain">
                   <index2
                   :resData="index2Data"
@@ -84,12 +84,6 @@
                     />
                   </el-select>
                 </el-form-item>
-                <!-- <el-form-item label="处理状态:" >
-                  <el-select v-model="queryParams.checkStatus" style="width: 160px" placeholder="请选择处理状态" clearable size="small">
-                    <el-option label="未处理" :value="0"/>
-                    <el-option label="已处理" :value="1"/>
-                  </el-select>
-                </el-form-item> -->
                 <el-form-item label="时间:" label-width="50px">
                   <el-date-picker style="vertical-align: middle;width:340px"
                     v-model="dateRange"
@@ -234,6 +228,8 @@ export default {
   },
   data() {
     return {
+      bt:false,
+      zxt:false,
       img:require('@/assets/images/1.gif'),
       title:"火灾监控离线处理情况",
       index1Data:{},//饼图
@@ -289,6 +285,7 @@ export default {
         getTbDeviceStatusCollect(this.queryParams).then(response =>{
           this.index1Data = response.data
           this.loading1 = false
+          this.bt = true
         })
         /* 折线图 */
         getTbDeviceStatusCollectIcoDetail(this.queryParams2).then(response =>{
@@ -308,6 +305,7 @@ export default {
             checkCount[0].name = "处理次数"
             this.index2Data.push(total[0],checkCount[0],lineData)
             this.index2Data.push({name:"火灾监控离线处理情况跟踪",color:"#FF2416"})
+            this.zxt = true
             this.loading2 = false
           }
         })

+ 12 - 8
src/views/business/fireInternet/deviceMonitoring/waterMonitoring/device/index.vue

@@ -33,7 +33,7 @@
                       </div>
                     </div>
                 </div>
-                <div class="contain2">
+                <div class="contain2" v-if="contain2">
                   <div class="wrap">
                     <index3 :resData="index1Data" style="width:100%" alt="饼图" />
                     <p>设备工况</p>
@@ -46,7 +46,7 @@
           <el-col :span="12">
             <div class="card_right">
               <el-card class="box-card card2"  v-loading="loading2">
-                <div class="contain">
+                <div class="contain" v-if="contain2">
                   <index4
                   :resData="index2Data"
                   style="width:100%;height:40vh;" alt="折线图" />
@@ -136,6 +136,7 @@ export default {
   },
   data() {
     return {
+      contain2:false,
       img:require('@/assets/images/2.png'),
       title:"水系统设备工况",
       index1Data:{
@@ -221,19 +222,22 @@ export default {
         tbInfoList(this.queryParams2).then(response =>{//pointCode=201 信息  pointCode=202 电量
           let data = response.data.records
           let arr = [[],[],[]]
+          let array = {}
           for(let i = 0; i<data.length;i++){
             if(data[i].pointCode == "201"){
-              this.index1Data.dianliang = data[i].pointData
+              array.dianliang = data[i].pointData
               arr[0][i] = []
               arr[0][i].push(data[i].createTime,13)
             }
             if(data[i].pointCode == "202"){
               arr[1][(i-1)/2] = []
-              this.index1Data.xinhao = data[i].pointData
-              this.index1Data.createTime = data[i].createTime
+              array.xinhao = data[i].pointData
+              array.createTime = data[i].createTime
               arr[1][(i-1)/2].push(data[i].createTime,20)
             }
           }
+          this.index1Data = array
+          this.contain2 = true
           this.index2Data = arr
           this.index2Data[2] = {name:"水系统设备工况情况跟踪",color:"#00FFFF"}
           this.loading1 = false
@@ -350,7 +354,7 @@ export default {
           }
         }
         .contain{
-          margin-top:0vh;
+          margin-top:3vh;
           width:58%;
           display: inline-block;
           vertical-align: top;
@@ -378,14 +382,14 @@ export default {
           }
         }
         .contain2{
-          margin-top:-2.5rem;
+          margin-top:-4rem;
           vertical-align: top;
           width:42%;
           display: inline-block;
           p{
             text-align: center;
             font-size: 1.4rem;
-            margin:-2vh 0 0 0%;
+            margin:-5vh 0 0 0%;
           }
         }
       }

+ 6 - 8
src/views/business/fireInternet/deviceMonitoring/waterMonitoring/offLine/index.vue

@@ -41,7 +41,7 @@
                 </div>
                 <div class="contain2">
                   <div class="wrap">
-                    <index1 :resData="index1Data.checkRadio"
+                    <index1 :resData="index1Data.checkRadio" v-if="bt"
                       :dataMap="index1Data.checkRadio"
                       color="#80FFA5"
                       :size="21"
@@ -57,7 +57,7 @@
           <el-col :span="12">
             <div class="card_right">
               <el-card class="box-card card2"  v-loading="loading3">
-                <div class="contain">
+                <div class="contain" v-if="zxt">
                   <index2
                   :resData="index2Data"
                   style="width:100%;height:40vh;" alt="折线图" />
@@ -84,12 +84,6 @@
                     />
                   </el-select>
                 </el-form-item>
-                <!-- <el-form-item label="处理状态:">
-                  <el-select v-model="queryParams.checkStatus" style="width: 160px" placeholder="请选择处理状态" clearable size="small">
-                    <el-option label="未处理" :value="0"/>
-                    <el-option label="已处理" :value="1"/>
-                  </el-select>
-                </el-form-item> -->
                 <el-form-item label="时间:" label-width="50px">
                   <el-date-picker style="vertical-align: middle;width:340px"
                     v-model="dateRange"
@@ -235,6 +229,8 @@ export default {
   },
   data() {
     return {
+      bt:false,
+      zxt:false,
       img:require('@/assets/images/2.png'),
       title:"水系统控离线处理情况",
       index1Data:{},//饼图
@@ -292,6 +288,7 @@ export default {
         /* 饼图 */
         getTbDeviceStatusCollect(this.queryParams).then(response =>{
           this.index1Data = response.data
+          this.bt = true
           this.loading1 = false
         })
         /* 折线图 */
@@ -312,6 +309,7 @@ export default {
             checkCount[0].name = "处理次数"
             this.index2Data.push(total[0],checkCount[0],lineData)
             this.index2Data.push({name:"水系统离线处理情况跟踪",color:"#00FFFF"})
+            this.zxt = true
             this.loading2 = false
           }
         })

+ 7 - 3
src/views/business/fireInternet/fireAlarm/fireMonitoring/index.vue

@@ -32,7 +32,7 @@
                   <div>
                     <span>处置率</span>
                     <div>
-                      <p v-loading="loading1">
+                      <p>
                         {{
                           index1Data.checkRadio
                             ? Number(index1Data.checkRadio * 100).toFixed(2)
@@ -42,7 +42,7 @@
                     </div>
                   </div>
                 </div>
-                <div class="contain2">
+                <div class="contain2" v-if="bt">
                   <div class="wrap">
                     <index1
                       :resData="index1Data.checkRadio"
@@ -64,7 +64,7 @@
         <el-col :span="12">
           <div class="card_right">
             <el-card class="box-card card2" v-loading="loading2">
-              <div class="contain">
+              <div class="contain" v-if="zxt">
                 <index2
                   :resData="index2Data"
                   style="width: 100%; height: 40vh"
@@ -313,6 +313,8 @@ export default {
   },
   data() {
     return {
+      bt:false,
+      zxt:false,
       img: require("@/assets/images/1.gif"),
       title: "火警监控告警处理情况",
       index1Data: {}, //饼图
@@ -371,6 +373,7 @@ export default {
       /* 饼图 */
       collectTbAlarm(this.queryParams).then((response) => {
         this.index1Data = response.data;
+        this.bt = true
         this.loading1 = false;
       });
       /* 折线图 */
@@ -396,6 +399,7 @@ export default {
             name: "火警监控告警处理情况跟踪",
             color: "#FF2416",
           });
+          this.zxt = true
           this.loading2 = false;
         }
       });

+ 145 - 9
src/views/business/fireInternet/fireAlarm/waterAlarm/index.vue

@@ -35,11 +35,11 @@
                     <div>
                       <span>处置率</span>
                       <div>
-                        <p v-loading="loading1">{{index1Data.checkRadio ? Number((index1Data.checkRadio)*100).toFixed(2) : '0'}}%</p>
+                        <p>{{index1Data.checkRadio ? Number((index1Data.checkRadio)*100).toFixed(2) : '0'}}%</p>
                       </div>
                     </div>
                 </div>
-                <div class="contain2">
+                <div class="contain2" v-if="bt">
                   <div class="wrap">
                     <index1 :resData="index1Data.checkRadio"
                       :dataMap="index1Data.checkRadio"
@@ -57,7 +57,7 @@
           <el-col :span="12">
             <div class="card_right">
               <el-card class="box-card card2"  v-loading="loading2">
-                <div class="contain">
+                <div class="contain" v-if="zxt">
                   <index2
                   :resData="index2Data"
                   style="width:100%;height:40vh;" alt="折线图" />
@@ -84,12 +84,6 @@
                     />
                   </el-select>
                 </el-form-item>
-                <!-- <el-form-item label="处理状态:" >
-                  <el-select v-model="queryParams.status" style="width: 160px" placeholder="请选择处理状态" clearable size="small">
-                    <el-option label="未处理" :value="0"/>
-                    <el-option label="已处理" :value="1"/>
-                  </el-select>
-                </el-form-item> -->
                 <el-form-item label="时间:" label-width="50px">
                   <el-date-picker style="vertical-align: middle;width:340px"
                     v-model="dateRange"
@@ -234,6 +228,8 @@ export default {
   },
   data() {
     return {
+      bt:false,
+      zxt:false,
       img:require('@/assets/images/2.png'),
       title:"水系统监控告警处理情况",
       index1Data:{},//饼图
@@ -290,6 +286,7 @@ export default {
         /* 饼图 */
         collectTbAlarm(this.queryParams).then(response =>{
           this.index1Data = response.data
+          this.bt = true
           this.loading1 = false
         })
         /* 折线图 */
@@ -310,6 +307,7 @@ export default {
             checkCount[0].name = "处理次数"
             this.index2Data.push(total[0],checkCount[0],lineData)
             this.index2Data.push({name:"水系统监控告警处理情况跟踪",color:"#00FFFF"})
+            this.zxt = true
             this.loading2 = false
           }
         })
@@ -403,4 +401,142 @@ export default {
   }
 }
 </script>
+<style  lang="scss">
+::-webkit-scrollbar-track {
+  background: #fff;
+  border-radius: 0;
+}
+
+::-webkit-scrollbar {
+  -webkit-appearance: none;
+  width: 4px;
+  height: 4px;
+}
+
+::-webkit-scrollbar-thumb {
+  cursor: pointer;
+  border-radius: 5px;
+  background: rgba(0, 0, 0, 0.25);
+  transition: color 0.2s ease;
+}
+.text {
+  font-size: 14px;
+}
+.item {
+  margin-bottom: 18px;
+}
+.clearfix:before,
+.clearfix:after {
+  display: table;
+  content: "";
+}
+.clearfix:after {
+  clear: both;
+}
+.box-card {
+  margin-top: 20px;
+}
+#main {
+  margin-top: -20px;
+  .box-card {
+    .h2 {
+      text-align: center;
+      margin: 0 auto;
+      display: block;
+      font-size: 1.2em;
+      background-image: -webkit-linear-gradient(bottom, #00adce, #000);
+      -webkit-background-clip: text;
+      -webkit-text-fill-color: transparent;
+    }
+  }
+  .card_left {
+    .card1 {
+      height: 43vh;
+      .title {
+        width: 100%;
+        display: block;
+        text-align: left !important;
+        .imgTitle {
+          width: 5%;
+          display: inline-block;
+          vertical-align: middle;
+        }
+        p {
+          display: inline-block;
+          vertical-align: middle;
+          margin-left: 2%;
+          font-size: 1.4vw;
+        }
+      }
+      .contain {
+        margin-top: 0vh;
+        width: 58%;
+        display: inline-block;
+        vertical-align: top;
+        div {
+          height: 7vh;
+          span {
+            font-size: 1vw;
+            vertical-align: middle;
+            width: 4vw;
+            text-align: left;
+            display: inline-block;
+          }
+          div {
+            width: 212px;
+            height: 6vh;
+            vertical-align: middle;
+            background: url("../../../../../assets/images/operation_item.png")
+              no-repeat right center;
+            display: inline-block;
+            p {
+              font-size: 1.4vw;
+              vertical-align: top;
+              margin: 1vh 0 0 3vh;
+            }
+          }
+        }
+      }
+      .contain2 {
+        margin-top: -2.5rem;
+        vertical-align: top;
+        width: 42%;
+        display: inline-block;
+        p {
+          text-align: center;
+          font-size: 1.4rem;
+          margin: -2vh 0 0 0%;
+        }
+      }
+    }
+  }
+  .card_right {
+    .card2 {
+      height: 43vh;
+    }
+  }
+  .card_bottom {
+    padding-top: 10px;
+    margin-bottom: -10px;
+  }
+}
+
+::v-deep {
+  .el-table__body-wrapper::-webkit-scrollbar {
+    /*width: 0;宽度为0隐藏*/
+    width: 4px;
+  }
+  .el-table__body-wrapper::-webkit-scrollbar-thumb {
+    border-radius: 6px;
+    height: 50px;
+    background: rgba(40, 190, 252, 0.6); //滚动条颜色
+  }
+  .el-table__body-wrapper::-webkit-scrollbar-track {
+    box-shadow: inset 0 0 5px rgba(0, 0, 0, 0.2);
+    border-radius: 6px;
+    background: #eee; //滚动条背景色
+  }
+}
+</style>
+
 

+ 7 - 9
src/views/business/fireInternet/hiddenDanger/index.vue

@@ -35,11 +35,11 @@
                       <div>
                         <span>处置率</span>
                         <div>
-                          <p v-loading="loading1">{{index1Data.checkRadio ? Number((index1Data.checkRadio)*100).toFixed(2) : '0'}}%</p>
+                          <p>{{index1Data.checkRadio ? Number((index1Data.checkRadio)*100).toFixed(2) : '0'}}%</p>
                         </div>
                       </div>
                   </div>
-                  <div class="contain2">
+                  <div class="contain2" v-if="bt">
                     <div class="wrap">
                       <index1 :resData="index1Data.checkRadio"
                         :dataMap="index1Data.checkRadio"
@@ -56,7 +56,7 @@
           </el-col>
           <el-col :span="12" v-loading="loading2">
             <div class="card_right">
-              <el-card class="box-card card2">
+              <el-card class="box-card card2" v-if="zxt">
                 <div class="contain">
                   <index2
                   :resData="index2Data"
@@ -84,12 +84,6 @@
                     />
                   </el-select>
                 </el-form-item>
-                <!-- <el-form-item label="处理状态:">
-                  <el-select v-model="queryParams.status" style="width: 160px" placeholder="请选择处理状态" clearable size="small">
-                    <el-option label="未处理" :value="0"/>
-                    <el-option label="已处理" :value="1"/>
-                  </el-select>
-                </el-form-item> -->
                 <el-form-item label="时间:" label-width="50px">
                   <el-date-picker style="vertical-align: middle;width:340px"
                     v-model="dateRange"
@@ -234,6 +228,8 @@ export default {
   },
   data() {
     return {
+      bt:false,
+      zxt:false,
       img:require('@/assets/images/3.png'),
       title:"隐患处理情况",
       index1Data:{},//饼图
@@ -289,6 +285,7 @@ export default {
         /* 饼图 */
         collectTbAlarm(this.queryParams).then(response =>{
           this.index1Data = response.data
+          this.bt = true
           this.loading1 = false
         })
         /* 折线图 */
@@ -309,6 +306,7 @@ export default {
             checkCount[0].name = "处理次数"
             this.index2Data.push(total[0],checkCount[0],lineData)
             this.index2Data.push({name:"隐患总揽",color:"#FF9721"})
+            this.zxt = true
             this.loading2 = false
           }
         })

+ 27 - 15
src/views/components/fireInternetInfo/index1.vue

@@ -32,11 +32,21 @@ export default {
   methods: {
 
     getData() {
+      console.log(this.dataMap)
+      let data = [
+        {
+          name:"已处置",
+          value:this.dataMap.toFixed(2)
+        },
+        {
+          name:"未处置",
+          value:(1-this.dataMap).toFixed(2)
+        }
+      ]
       echarts.init(this.$refs.echartD).setOption({
         color: [
-          '#FF0087',
           this.color,
-
+          '#FF0087',
         ],
         title: {
           text: (this.dataMap * 100).toFixed(2) + '%',
@@ -49,30 +59,32 @@ export default {
             fontFamily: '"DS", "DS-B", "DS-BB", "DS-BS"',
           },
         },
+        tooltip: {
+          trigger: "item",
+          formatter: function(params) {
+            return (
+              params.name +
+              ":" +
+              params.value +
+              "<br>占比:" +
+              (params.value * 100).toFixed(2) +
+              "%"
+            );
+          }
+        },
         series: [
           {
             name: '',
             type: 'pie',
             radius: ['40%', '60%'],
-            avoidLabelOverlap: false,
-            label: {
-              show: false,
-              position: 'center'
-            },
             emphasis: {
               label: {
                 show: true,
-                fontSize: '40',
+                fontSize: '20',
                 fontWeight: 'bold'
               }
             },
-            labelLine: {
-              show: false
-            },
-            data: [
-             {value:(100 - this.dataMap * 100)},
-             {value:this.dataMap * 100},
-            ]
+            data: data
           }
         ]
       });

+ 65 - 68
src/views/components/fireInternetInfo/index3.vue

@@ -1,17 +1,12 @@
 <template>
   <el-row>
-    <div id="index1" ref="echartD" style="width:100%;height:300px;" v-loading="loading"></div>
+    <div id="index1" ref="echartD" style="width:100%;height:300px;" ></div>
   </el-row>
 </template>
 <script>
 import * as echarts from "echarts";
 export default {
   props: ["resData"],
-  data() {
-    return {
-      loading:true
-    };
-  },
   watch: {
     resData() {
       this.getData();
@@ -22,69 +17,71 @@ export default {
   },
   methods: {
     getData() {
-      setTimeout(() =>{
-        let data = this.resData
-        echarts.init(this.$refs.echartD).setOption({
-          series: [
-            // 进度条
-            {
-              name: "仪表盘",
-              type: "gauge",
-              radius: "55%", // 半径
-              startAngle: 270, //开始角度 左侧角度
-              endAngle: -89.999, //结束角度 右侧
-              splitNumber: 30,
-              axisLine: {
-                lineStyle: {
-                  color: [
-                    [0, "#80FFA5"],
-                    [1, "#FF5801"],
-                  ],
-                  width: 10,
-                },
-              },
-              axisLabel: {
-                show: false,
-              },
-              axisTick: {
-                show: false,
-              },
-              splitLine: {
-                show: false,
-              },
-              itemStyle: {
-                show: false,
-              },
-              detail: {
-                formatter:  () => {
-                  return `电量:${data.dianliang}%\n信号:${data.xinhao}`;
-                },
-                offsetCenter: [0, "0%"],
-                textStyle: {
-                  fontSize: 16,
-                  fontWeight: "700",
-                  height:20,
-                  color:"#80FFA5",
-                  fontFamily: '"DS", "DS-B", "DS-BB", "DS-BS"',
-                },
-              },
-              title: {
-                offsetCenter: [0, "10%"],
-              },
-              pointer: {
-                show: false,
-              },
-              data: [
-                  (`电量:${data.dianliang}%\n信号:${data.xinhao}`),
-              ],
+      let xinhao = this.resData.xinhao
+      let data = [
+        {
+          name:"现存电量",
+          value:this.resData.dianliang
+        },{
+          name:"消耗电量",
+          value:100 - this.resData.dianliang
+        }
+      ]
+      let chartDom = document.getElementById("index1");
+      let myChart = echarts.init(chartDom);
+      let option = {
+        color: [
+          '#80FFA5',
+          '#FF0087',
+        ],
+        title: {
+          text: `电量:${data[0].value}`,
+          textStyle: {
+            color: '#80FFA5',
+            fontSize: 20
+          },
+          subtext: `信号:${xinhao}`,
+          subtextStyle: {
+            color: '#80FFA5',
+            fontSize: 16
+          },
+          itemGap: 10, // 主副标题距离
+          left: 'center',
+          top: '42%'
+        },
+        tooltip: {
+          trigger: "item",
+          formatter: function(params) {
+            return (
+              params.name +
+              ":" +
+              params.value +
+              "<br>占比:" +
+              (params.value / 100 * 100).toFixed(2) +
+              "%"
+            );
+          }
+        },
+        series: [
+          {
+            emphasis: {
+              label: {
+                show: true,
+                fontSize: '20',
+                fontWeight: 'bold'
+              }
             },
-          ],
-        })
-        window.addEventListener("resize", function() {
-          myChart.resize();
-        });
-        this.loading = false
-      },3000)
+            radius: ["45%", "60%"],
+            type: "pie", // 设置图表类型为饼图
+            data: data
+          }
+        ],
+
+      };
+      option && myChart.setOption(option);
+      window.addEventListener("resize", function() {
+        myChart.resize();
+      });
     },
 
   }

+ 0 - 3
src/views/components/index/index1.vue

@@ -31,9 +31,6 @@ export default {
         total += val.value;
       });
       let option = {
-        legend: {
-            data:[]
-        },
         title: [
           {
             text: "{name|" + total + "}\n{val|设备总数}",

+ 2 - 0
src/views/components/index/index3.vue

@@ -17,9 +17,11 @@ export default {
   },
   methods: {
     getData() {
+      console.log(1111)
       let chartDom = document.getElementById("index3");
       let myChart = echarts.init(chartDom);
       let data = this.resData;
+      console.log(data)
       let seriesData = [];
       let lineData = [];
       let date = new Date();

+ 1 - 1
src/views/login.vue

@@ -318,6 +318,6 @@ body,
     margin: 0px;
     padding: 0px;
     background-color: transparent !important;
-    
+
 }
 </style>

+ 1 - 1
vue.config.js

@@ -125,4 +125,4 @@ module.exports = {
                 }
             )
     }
-}
+}