Ver código fonte

代码暂存

“wangyihan” 2 anos atrás
pai
commit
b695690e19

+ 4 - 4
src/views/datav/LeftChart11.vue

@@ -134,7 +134,7 @@ export default {
           let hideName = "";
           let hideTel = "";
           if (item.name.length >= 2) {
-            hideName = item.name[0] + "*" + item.name.substring(2);
+            hideName = item.name[0] + " " + "*" + item.name.substring(2);
           }
           if (item.telno && item.telno.length === 11) {
             hideTel = this.hideMiddleDigits(item.telno);
@@ -145,9 +145,9 @@ export default {
             telno: hideTel,
           };
         });
-        console.log(this.config.data,'445566');
+        console.log(this.config.data, "445566");
 
-        console.log('我先执行');
+        console.log("我先执行");
 
         this.config = {
           ...this.config,
@@ -218,7 +218,7 @@ export default {
 </script>
 
 <style lang="scss" scoped>
-::v-deep .dv-scroll-board .rows{
+::v-deep .dv-scroll-board .rows {
   // overflow: visible !important;
 }
 ::v-deep .dv-scroll-board .rows .row-item {

+ 3 - 0
src/views/datav/index.vue

@@ -347,6 +347,9 @@ export default {
 </script>
 
 <style lang="scss" scoped>
+::v-deep .amap-maps{
+  border:1px solid #6586ec !important;
+}
 #data-view {
   color: #fff;
   width: 100%;

+ 23 - 14
src/views/equBigData/LeftChart1.vue

@@ -23,17 +23,25 @@ export default {
             data: [],
             radius: ["50%", "75%"],
             axisTick: {},
+            percentToFixed: 2,
             insideLabel: {
               show: false,
               formatter: "{value}%",
             },
-            outsideLabel:{
-              show:true,
-              formatter:"{name}  {percent}%",
-              style:{
-                fontSize:18,
-              }
-            }
+            outsideLabel: {
+              show: true,
+              // formatter:"{name}  {percent}%",
+              formatter: (params) => {
+                console.log(params, "我是");
+                // this.datalist.forEach((item) => {
+                return params.name + "  " 
+                 + Number(params.percent).toFixed(2) + "%";
+                // });
+              },
+              style: {
+                fontSize: 18,
+              },
+            },
           },
         ],
       },
@@ -44,13 +52,14 @@ export default {
   },
   methods: {
     getData() {
-      console.log(this.datalist,'我是ist');
-      this.option.series[0].data=this.datalist.map(item=>{
-        return{
-          name:item.deviceStr,
-          value:item.count
-        }
-      })
+      console.log(this.datalist, "我是ist");
+      this.option.series[0].data = this.datalist.map((item) => {
+        return {
+          name: item.deviceStr,
+          value: item.count,
+        };
+      });
+      // console.log(this.datalist, "this.datalist.this.datalist.");
       // addDevice().then(res=>{
       //   let xlist=res.data.map(item=>item.month)
       //   let ylist=res.data.map(item=>item.count)

+ 7 - 1
src/views/equBigData/LeftChart2.vue

@@ -32,6 +32,7 @@ export default {
         xAxis: {
           name: "",
           data: this.xlist,
+          boundaryGap: false,
           // data: ['周一', '周二', '周三'],
           axisLine: {
             style: {
@@ -48,11 +49,12 @@ export default {
           },
           axisTick:{
             show: false,
-          }
+          },
         },
         yAxis: {
           name: "",
           data: "value",
+          min:0,
           splitLine: {
             // show:false,
             style: {
@@ -85,6 +87,10 @@ export default {
           {
             data: this.ylist,
             type: "line",
+            label:{
+              show:true,
+            },
+            // animationCurve:'easeOutCubic',
             lineArea: {
               show: true,
               gradient: ["rgba(55, 162, 218, 0.6)", "rgba(55, 162, 218, 0)"],

+ 3 - 0
src/views/equBigData/MiddleChart.vue

@@ -69,6 +69,9 @@ export default {
             data: this.ylist,
             type: "bar",
             barWidth: 15,
+            label:{
+              show:true,
+            }
           },
         ],
       },

+ 2 - 34
src/views/equBigData/equ.vue

@@ -147,46 +147,14 @@ export default {
             ...this.activeconfig,
             number: [res.data.deviceOnline],
           };
-          this.switper();
+          // this.switper();
         } else {
           this.pageflag = false;
           this.$Message.warning(res.msg);
         }
-
-        this.switper();
+        // this.switper();
       });
     },
-    // getData() {
-    //   this.pageflag = true;
-    //   currentGET("big2").then((res) => {
-    //     if (!this.timer) {
-    //       console.log("设备总览", res);
-    //     }
-    //     if (res.success) {
-    //       this.userOverview = res.data;
-    //       this.equconfig = {
-    //         ...this.equconfig,
-    //         number: [res.data.onlineNum],
-    //       };
-    //       this.config = {
-    //         ...this.config,
-    //         number: [res.data.totalNum],
-    //       };
-    //       this.userconfig = {
-    //         ...this.userconfig,
-    //         number: [res.data.offlineNum],
-    //       };
-    //       this.activeconfig = {
-    //         ...this.activeconfig,
-    //         number: [res.data.alarmNum],
-    //       };
-    //       this.switper();
-    //     } else {
-    //       this.pageflag = false;
-    //       this.$Message.warning(res.msg);
-    //     }
-    //   });
-    // },
     //轮询
     switper() {
       if (this.timer) {

+ 21 - 21
src/views/equBigData/index.vue

@@ -27,7 +27,7 @@
         </div>
       </div>
       <div class="content">
-        <equ-map v-loading="mapLoading" @callback="initMap" />
+        <equ-map style="border: 1px solid #6586ec;" v-loading="mapLoading" @callback="initMap" />
         <div class="left-under">
           <dv-border-box-13>
             <Border-Item title="报警列表">
@@ -152,7 +152,7 @@ export default {
     this.userAgeAll();
     this.userTotal();
     // this.getUserData();
-    this.getAlarmStatusList();
+    // this.getAlarmStatusList();
     this.getEquData();
     this.getAddUser();
     this.getDeviceType();
@@ -246,25 +246,25 @@ export default {
         this.userAgeFlag = true;
       });
     },
-    getAlarmStatusList() {
-      alarmStatusList().then((res) => {
-        this.alarmList = res.data.map((item) => {
-          let hideName = "";
-          if (item.name?.length >= 2) {
-            hideName = item.name[0] + "*" + item.name.substring(2);
-            return {
-              ...item,
-              name: hideName,
-            };
-          } else {
-            return {
-              ...item,
-            };
-          }
-        });
-        this.alarmListFlag = true;
-      });
-    },
+    // getAlarmStatusList() {
+    //   alarmStatusList().then((res) => {
+    //     this.alarmList = res.data.map((item) => {
+    //       let hideName = "";
+    //       if (item.name?.length >= 2) {
+    //         hideName = item.name[0] + "*" + item.name.substring(2);
+    //         return {
+    //           ...item,
+    //           name: hideName,
+    //         };
+    //       } else {
+    //         return {
+    //           ...item,
+    //         };
+    //       }
+    //     });
+    //     this.alarmListFlag = true;
+    //   });
+    // },
     initMap(AMap) {
       this.AMap = AMap;
       this.map = new AMap.Map("map", {

+ 15 - 1
src/views/equBigData/left-bottom.vue

@@ -91,7 +91,20 @@ export default {
     getAlarmStatusList() {
       alarmStatusList().then((res) => {
         this.countUserNumData = res.data;
-        this.list = res.data;
+        this.list = res.data.map((item) => {
+          let hideName = "";
+          if (item.name?.length >= 2) {
+            hideName = item.name[0] + " "+"*" + item.name.substring(2);
+            return {
+              ...item,
+              name: hideName,
+            };
+          } else {
+            return {
+              ...item,
+            };
+          }
+        });
         let timer = setTimeout(() => {
           clearTimeout(timer);
           this.defaultOption.step =
@@ -222,6 +235,7 @@ export default {
     }
       .box-right {
         color: #1fcb21;
+        margin-right: 6%;
       }
 
     }

+ 15 - 40
src/views/equBigData/left-top.vue

@@ -55,7 +55,7 @@ export default {
       pageflag: true,
       timer: null,
       config: {
-        number: [100],
+        number: [0],
         content: "{nt}",
         style: {
           ...style,
@@ -109,11 +109,12 @@ export default {
   methods: {
     clearData() {
       if (this.timer) {
+        // this.onlineconfig = {
+        //   ...this.onlineconfig,
+        //   number: [0],
+        // };
         clearInterval(this.timer);
         this.timer = null;
-        this.onlineconfig = {
-          number: [0],
-        };
       }
     },
     deviceView() {
@@ -136,55 +137,29 @@ export default {
             ...this.laramnumconfig,
             number: [res.data.alarmCount],
           };
-          this.switper();
+          // this.switper();
         } else {
           this.pageflag = false;
           this.$Message.warning(res.msg);
         }
 
-        this.switper();
+        // this.switper();
       });
     },
-    // getData() {
-    //   this.pageflag = true;
-    //   currentGET("big2").then((res) => {
-    //     if (!this.timer) {
-    //       console.log("设备总览", res);
-    //     }
-    //     if (res.success) {
-    //       this.userOverview = res.data;
-    //       this.onlineconfig = {
-    //         ...this.onlineconfig,
-    //         number: [res.data.onlineNum],
-    //       };
-    //       this.config = {
-    //         ...this.config,
-    //         number: [res.data.totalNum],
-    //       };
-    //       this.offlineconfig = {
-    //         ...this.offlineconfig,
-    //         number: [res.data.offlineNum],
-    //       };
-    //       this.laramnumconfig = {
-    //         ...this.laramnumconfig,
-    //         number: [res.data.alarmNum],
-    //       };
-    //       this.switper();
-    //     } else {
-    //       this.pageflag = false;
-    //       this.$Message.warning(res.msg);
-    //     }
-    //   });
-    // },
     //轮询
     switper() {
       if (this.timer) {
         console.log(this.timer, "1212");
-        return;
+        // return;
+      }else{
+        console.log('我在else', this.onlineconfig.number);
+        // this.onlineconfig = {
+        //   ...this.onlineconfig,
+        //   number: [0],
+        // };
       }
       let looper = (a) => {
-        console.log(a, "aa");
-        this.deviceView();
+        // this.deviceView();
       };
       this.timer = setInterval(
         looper,