yuantianjiao 6 jaren geleden
bovenliggende
commit
2e997f2706
1 gewijzigde bestanden met toevoegingen van 11 en 6 verwijderingen
  1. 11
    6
      VUECODE/smart-operate-manage/src/components/chart/chart3.vue

+ 11
- 6
VUECODE/smart-operate-manage/src/components/chart/chart3.vue Bestand weergeven

40
   created () {
40
   created () {
41
     this.GetHardData().then(() => {
41
     this.GetHardData().then(() => {
42
       console.log(this.hardData)
42
       console.log(this.hardData)
43
-      this.arr[0].num = this.hardData.count + '次'
44
-      // this.arr[0].text = this.hardData.message
43
+      this.hardData.forEach(item => {
44
+        if (item.message === '小区开门次数') {
45
+          this.arr[0].num = item.count + '次'
46
+        } else if (item.message === '单元门开门次数') {
47
+          this.arr[1].num = item.count + '次'
48
+        }
49
+      });
45
       this.arr = JSON.parse(JSON.stringify(this.arr))
50
       this.arr = JSON.parse(JSON.stringify(this.arr))
46
     })
51
     })
47
   },
52
   },
59
   .title {
64
   .title {
60
     text-align: center;
65
     text-align: center;
61
     padding: 3% 0 30px 0;
66
     padding: 3% 0 30px 0;
62
-    color: #A4B6C5;
67
+    color: #a4b6c5;
63
   }
68
   }
64
   .table {
69
   .table {
65
     display: flex;
70
     display: flex;
66
     flex-flow: row wrap;
71
     flex-flow: row wrap;
67
-    border: 1px solid #A4B6C5;
72
+    border: 1px solid #a4b6c5;
68
     width: 302px;
73
     width: 302px;
69
     margin: 0 auto;
74
     margin: 0 auto;
70
     > div {
75
     > div {
71
       width: 100px;
76
       width: 100px;
72
       height: 100px;
77
       height: 100px;
73
-      border: 1px solid #A4B6C5;
78
+      border: 1px solid #a4b6c5;
74
       display: flex;
79
       display: flex;
75
       flex-flow: column nowrap;
80
       flex-flow: column nowrap;
76
       justify-content: center;
81
       justify-content: center;
79
         cursor: pointer;
84
         cursor: pointer;
80
       }
85
       }
81
       div {
86
       div {
82
-        color: #A4B6C5;
87
+        color: #a4b6c5;
83
         margin: 5px;
88
         margin: 5px;
84
         font-size: 13px;
89
         font-size: 13px;
85
       }
90
       }