fanghuisheng vor 3 Jahren
Ursprung
Commit
0c61d90812

BIN
202206161147.zip → 202206171843.zip


BIN
202206211440.zip


+ 2 - 1
public/static/config.js

@@ -12,10 +12,11 @@ if (window.location.host.indexOf("localhost") != -1 || window.location.host.inde
 
     PLATFROM_CONFIG.hrefUrl = 'https://pcdev.ewoogi.com/adminfiv/#/login'//后台管理系统访问路径
 } else {
+    
     PLATFROM_CONFIG.baseUrl = "https://wx.ewoogi.com/api/" //线上
     PLATFROM_CONFIG.fileUrl = "https://wx.ewoogi.com/file/" //xlsx文件访问路径
-
     PLATFROM_CONFIG.hrefUrl = 'https://wx.ewoogi.com/manage/#/'//后台管理系统访问路径
+
 }
 
 

+ 25 - 14
src/views/home/components/triangleChart.vue

@@ -3,23 +3,18 @@
 </template>
 <script>
 import * as echarts from "echarts";
+import api from "@/api/home/home.js";
 
 export default {
-  props: ["frtAnalogData"],
+  // props: ["frtAnalogData"],
   data() {
-    return {};
+    return {
+      frtAnalogData: [],
+    };
   },
 
   mounted() {
-    this.$nextTick(() => {
-      // console.log(1111111111);
-      // console.log(this.frtAnalogData);
-      // console.log(1111111111);
-      this.initChart();
-      // console.log("this.arr");
-      // console.log(this.arr);
-      // console.log("this.arr");
-    });
+    this.rtAnalogData_api();
   },
 
   beforeUnmount() {
@@ -27,15 +22,31 @@ export default {
   },
 
   methods: {
+    //重载运行echarts锥形图
+    rtAnalogData_api() {
+      api.rtAnalogData_api().then((requset) => {
+        this.frtAnalogData = requset.data;
+        this.initChart();
+      });
+    },
     //次数分布折线图
     initChart() {
       var chart = echarts.init(this.$refs.triangleChart);
       var option;
 
       var arr = [
-        { name: "重载运行", reaVal: (this.frtAnalogData.heavyLoad*100).toFixed(2)+'%' },
-        { name: "轻载运行", reaVal: (this.frtAnalogData.easyLoad*100).toFixed(2)+'%' },
-        { name: "正常运行", reaVal: (this.frtAnalogData.norMalLoad*100).toFixed(2)+'%' },
+        {
+          name: "重载运行",
+          reaVal: (this.frtAnalogData.heavyLoad * 100).toFixed(2) + "%",
+        },
+        {
+          name: "轻载运行",
+          reaVal: (this.frtAnalogData.easyLoad * 100).toFixed(2) + "%",
+        },
+        {
+          name: "正常运行",
+          reaVal: (this.frtAnalogData.norMalLoad * 100).toFixed(2) + "%",
+        },
       ];
 
       arr.sort((a, b) => a.reaVal - b.reaVal);

+ 21 - 25
src/views/home/index.vue

@@ -49,16 +49,14 @@
           </div>
           <pie-chart
             :fdeviceTypeCount="deviceTypeCount"
-            v-if="this.deviceTypeCount"
+            v-if="deviceTypeCount"
           ></pie-chart>
           <div class="panel-footer"></div>
         </div>
         <div class="panel line1 operStatus">
           <h2>负载率</h2>
-          <triangle-chart
-            :frtAnalogData="rtAnalogData"
-            v-if="this.rtAnalogData.heavyLoad"
-          ></triangle-chart>
+          <!-- :frtAnalogData="rtAnalogData" v-if="rtAnalogData" -->
+          <triangle-chart></triangle-chart>
           <div class="panel-footer"></div>
         </div>
       </div>
@@ -100,7 +98,7 @@
           </div>
           <line-chart
             :ftrendIcoCount="trendIcoCount"
-            v-if="this.trendIcoCount[0]"
+            v-if="trendIcoCount[0]"
           ></line-chart>
           <div class="panel-footer"></div>
         </div>
@@ -207,13 +205,11 @@ export default {
     this.siteCount_api();
     this.deviceTypeCount_api();
     this.trendIcoCount_api();
-    this.rtAnalogData_api();
+    // this.rtAnalogData_api();
     this.siteList_api();
     this.htAnalogData_api();
     // this.eptrendIco_api();
     this.eptrendIcoMonth_api();
-
-    
   },
   methods: {
     // searchSite(){
@@ -276,12 +272,12 @@ export default {
           this.trendIcoCount = requset.data;
         });
     },
-    //重载运行echarts锥形图
-    rtAnalogData_api() {
-      api.rtAnalogData_api().then((requset) => {
-        this.rtAnalogData = requset.data;
-      });
-    },
+    // //重载运行echarts锥形图
+    // rtAnalogData_api() {
+    //   api.rtAnalogData_api().then((requset) => {
+    //     this.rtAnalogData = requset.data;
+    //   });
+    // },
     //地图撒点
     siteList_api(query = {}) {
       api.siteList_api(query).then((requset) => {
@@ -329,6 +325,10 @@ export default {
         // features: [] //清空背景道路等
       });
 
+      // <div class="infoLine">
+      //   <span>监控类型:</span>
+      //   <p>{deviceType}</p >
+      // </div>
       var con = `<div class="siteModelBox" >
                   <h2>
                     {siteName}
@@ -341,23 +341,19 @@ export default {
                     </div>
                     <div class="infoLine">
                       <span>设备总数:</span>
-                      <p>{deviceCount}</p >
+                      <p>{deviceCount}</p>
                     </div>
                     <div class="infoLine">
                       <span>告警数:</span>
                       <p>{alarmPowerCount}</p >
                     </div>
-                    <div class="infoLine">
-                      <span>监控类型:</span>
-                      <p>{deviceType}</p >
-                    </div>
                     <div class="infoLine">
                       <span>电话:</span>
-                      <p>{phone}</p >
+                      <p>{phone}</p>
                     </div>
                     <div class="infoLine">
                       <span>地址:</span>
-                      <p>{siteAddress}</p >
+                      <p>{siteAddress}</p>
                     </div>
                   </div>
                   </div>
@@ -500,7 +496,7 @@ export default {
       //加载行政区划插件
       if (!this.district) {
         //实例化DistrictSearch
-        var that=this
+        var that = this;
         AMap.plugin("AMap.DistrictSearch", function () {
           that.district = new AMap.DistrictSearch({
             subdistrict: 0, //获取边界不需要返回下级行政区
@@ -518,8 +514,8 @@ export default {
                 //生成行政区划polygon
                 var polygon = new AMap.Polygon({
                   strokeWeight: 1,
-                  path: bounds[i],  
-                  fillOpacity:.2,
+                  path: bounds[i],
+                  fillOpacity: 0.2,
                   fillColor: "pink",
                   strokeColor: "pink",
                 });

+ 2 - 2
src/views/site/components/Overview/modalBox.vue

@@ -27,10 +27,10 @@
         <span>投运时间:</span>
         <p>{{ createTime }}</p>
       </div>
-      <div class="infoLine">
+      <!-- <div class="infoLine">
         <span>监控类型:</span>
         <p>{{ deviceType }}</p>
-      </div>
+      </div> -->
       <div class="infoLine">
         <span>联系人:</span>
         <p>{{ userName }}</p>

+ 1 - 1
src/views/site_ehcarts/Device_StateCurve.vue

@@ -156,7 +156,7 @@ export default {
           },
           formatter: function (params) {
             // console.log(params);
-            var res = params[0].data[0];
+            var res = ``;
             for (let i in params) {
               res += `
               <div style="display:flex">

+ 1 - 1
src/views/site_ehcarts/Device_distion.vue

@@ -134,7 +134,7 @@ export default {
           },
           formatter: function (params) {
             // console.log(params);
-            var res = params[0].data[0];
+            var res = ``;
             for (let i in params) {
               res += `
               <div style="display:flex">

+ 1 - 3
src/views/site_ehcarts/Device_second.vue

@@ -236,7 +236,6 @@ export default {
         });
       }
 
-      
       console.log(JSON.stringify(this.series_all));
 
       option = {
@@ -255,8 +254,7 @@ export default {
           },
           formatter: function (params) {
             // console.log(params);
-            var res = params[0].axisValueLabel;
-
+            var res = ``;
             for (let i in params) {
               res += `
               <div style="display:flex">

+ 2 - 2
src/views/site_ehcarts/Event_alarm.vue

@@ -149,7 +149,7 @@ export default {
           trigger: "axis",
           formatter: function (params) {
             // console.log(params);
-            var res = params[0].axisValueLabel;
+            var res = ``;
             for (let i in params) {
               res += `
               <div style="display:flex">
@@ -190,7 +190,7 @@ export default {
         ],
       };
 
-      chart.setOption(option,true);
+      chart.setOption(option, true);
       window.addEventListener("resize", () => {
         chart.resize();
       });