“wangyihan” 1 年間 前
コミット
3f6d698cdf

+ 2 - 76
src/views/datav/LeftChart1.vue

@@ -90,103 +90,29 @@
 </template>
 
 <script>
-import { count, alarm } from "@/api/system/datav";
+import { alarm } from "@/api/system/datav";
 export default {
   name: "LeftChart1",
   data() {
     return {
       config: {
-        // data: [
-        //   {
-        //     label:222,
-        //     name: '收费系统',
-        //     value: 167
-        //   },
-        //   {
-        //     label:222,
-        //     name: '通信系统',
-        //     value: 67
-        //   },
-        //   {
-        //     label:222,
-        //     name: '监控系统',
-        //     value: 123
-        //   },
-        //   {
-        //     label:222,
-        //     name: '供配系统',
-        //     value: 55
-        //   },
-        //   {
-        //     label:222,
-        //     name: '其他',
-        //     value: 98
-        //   },
-        //   {
-        //     label:222,
-        //     name: '其他',
-        //     value: 98
-        //   },
-        // ],
         colors: ["#00baff", "#3de7c9", "#fff", "#ffc530", "#469f4b"],
         unit: "件",
       },
       number: null,
       data: {},
-      config1: {},
-      currentValue:0,
-      digits: [0, 0, 0],
-      animationInterval: null,
     };
   },
   mounted() {
     this.initData();
-    // this.flipToValue(this.number); // 初始化显示数字
-    // this.startAnimation()
   },
   methods: {
-    async initData() {
-      await count().then((res) => {
-        console.log(res, 999);
-        this.number = res.data;
-      });
+    initData() {
       alarm().then((res) => {
         console.log(res, 444);
         this.data = res.data;
       });
-      this.config1 = {
-        number: [this.number],
-        content: String(this.number),
-        // animationFrame:10
-      };
-      console.log(typeof String(this.number),777);
     },
-    // startAnimation() {
-    //   this.animationInterval = setInterval(() => {
-    //     const increment = this.number > this.currentValue ? 1 : -1;
-    //     this.currentValue += increment;
-    //     console.log(this.currentValue, increment,4545444);
-    //     this.flipToValue(this.currentValue);
-    //     // this.number = this.currentValue
-
-    //     if (this.currentValue === this.number) {
-    //       clearInterval(this.animationInterval);
-    //       setTimeout(() => {
-    //         this.currentValue = 0; // 重置当前值
-    //         this.startAnimation(); // 开始新一轮动画
-    //       }, 5000); // 5秒后重新开始
-    //     }
-    //   }, 50);
-    // },
-    // updateDigit(index, value) {
-    //   this.$set(this.digits, index, value);
-    // },
-    // flipToValue(value) {
-    //   const valueStr = String(value).padStart(3, '0');
-    //   for (let i = 0; i < 3; i++) {
-    //     this.updateDigit(i, Number(valueStr[i]));
-    //   }
-    // },
   },
 };
 </script>

+ 3 - 9
src/views/equBigData/LeftChart2.vue

@@ -31,10 +31,8 @@ export default {
         },
         xAxis: {
           name: "",
-          splitNumber : 10,
-          nameGap :400,
-          // data: this.xlist,
-          data: ['周一', '周二', '周三'],
+          data: this.xlist,
+          // data: ['周一', '周二', '周三'],
           axisLine: {
             style: {
               stroke: "#324686",
@@ -85,12 +83,8 @@ export default {
         },
         series: [
           {
-            // data: this.ylist,
-            data: [12,13,15],
+            data: this.ylist,
             type: "line",
-            smooth: true,
-            // animationCurve : 'easeOutCubic',
-            animationFrame :50,
             lineArea: {
               show: true,
               gradient: ["rgba(55, 162, 218, 0.6)", "rgba(55, 162, 218, 0)"],

+ 14 - 11
src/views/equBigData/index.vue

@@ -220,17 +220,20 @@ export default {
     },
     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,
-        //   };
-        // });
+        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;
       });
     },