Xxxu
2020-07-07 4f953ffc89fc95f83b152e914c5e65938b440f17
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
<template>
  <div>
    <div class="wifi-info-title">
        <div style="margin-left:30px;padding-top:8px">
            <img src="~@/assets/img/home/wifi_icon.png" style="margin-top:0px" height="13px" width="15px">
            <span style="color:white">公共WIFI信息</span>
        </div>
    </div>
    <div id="wifi-info-body" class="wifi-info-body">
        <el-row style="padding-top:20px;padding-left:10px;height:50%;">
            <el-col class="onlineCount" :span="5">
            </el-col>
            <el-col :span="7">
              <el-row>
                <el-col class="fontLocation" style="margin-top:15px" :span="24">
                  <span style="color:white;font-size:12px">在线</span>
                  <span style="color:white;font-size:20px">{{brightnessNum}}</span>
                  <span style="color:white">台</span>
                </el-col>
              </el-row>
            </el-col>
            <el-col class="totalFlow" :span="5">
              
            </el-col>
            <el-col :span="7">
              <el-row>
                <el-col class="fontLocation" :span="24">
                  <span style="color:white;font-size:20px">{{brightnessNum * 33}}</span>
                </el-col>
              </el-row>
              <el-row>
                <el-col class="fontLocation" :span="24">
                  <span style="color:white;font-size:12px">总流量(Mb)</span>
                </el-col>
              </el-row>
            </el-col>
        </el-row>
        <el-row  style="padding-top:10px;padding-left:10px;height:50%;"> 
            <el-col class="userCount" :span="5">
              
            </el-col>
            <el-col :span="7">
              <el-row>
                <el-col class="fontLocation" :span="24">
                  <span style="color:white;font-size:20px">{{this.$store.state.home.homeStreetlightList.length * 3}}</span>
                </el-col>
              </el-row>
              <el-row>
                <el-col class="fontLocation" :span="24">
                  <span style="color:white;font-size:12px">累计用户(人)</span>
                </el-col>
              </el-row>
            </el-col>
            <el-col class="avgFlow" :span="5">
              
            </el-col>
            <el-col :span="7">
              <el-row>
                <el-col class="fontLocation" :span="24">
                  <span style="color:white;font-size:20px">91</span>
                </el-col>
              </el-row>
              <el-row>
                <el-col class="fontLocation" :span="24">
                  <span style="color:white;font-size:12px">人均流量(Mb)</span>
                </el-col>
              </el-row>
            </el-col>
        </el-row>
    </div>
    <div class="wifi-info-bottom"></div>
  </div>
</template>
 
<script>
export default {
  data () {
    return {
      brightnessNum: 0
    }
  },
  computed: {
    streetlightList () {
      return this.$store.state.home.homeStreetlightList
    }
  },
  watch: {
    streetlightList (curVal, oldVal) {
      this.brightnessNum = 0
      var streetlightList = curVal
      for (var i = 0; i < streetlightList.length; i++) {
        if (streetlightList[i].light !== 0) {
          this.brightnessNum++
        }
      }
    }
  },
  components: {},
  activated () {
    this.init()
  },
 
  methods: {
    init () {
      var h = document.body.clientHeight
      var wifiInfoBodyH = document.getElementById('wifi-info-body')
      var num = (h - 425) / 3
      wifiInfoBodyH.style.height = num + 'px'
    },
    getdomheight (dom) {
      return dom.offsetHeight
    }
  }
}
</script>
<style>
.wifi-info-title {
  height: 30px;
  width: 100%;
  background-image: url(~@/assets/img/content_charts_title.png);
  background-size: 100% 30px;
}
.wifi-info-body {
  height: 110px;
  width: 100%;
  background-image: url(~@/assets/img/content_charts_body.png);
  background-size: 100% 100%;
}
.wifi-info-bottom {
  height: 30px;
  width: 100%;
  background-image: url(~@/assets/img/content_charts_bottom.png);
  background-size: 100% 30px;
}
.onlineCount {
  height: 75%;
  background-image: url(~@/assets/img/home/basePageWifi/device.png);
  background-size: 100% 100%
}
.totalFlow {
  height: 75%;
  background-image: url(~@/assets/img/home/basePageWifi/flow.png);
  background-size: 100% 100%
}
.avgFlow {
  height: 75%;
  background-image: url(~@/assets/img/home/basePageWifi/avgFlow.png);
  background-size: 100% 100%
}
.userCount {
  height: 75%;
  background-image: url(~@/assets/img/home/basePageWifi/user.png);
  background-size: 100% 100%
}
.fontLocation {
  text-align: center;
  padding-left: 5px;
  padding-top: 5px;
}
.small-font {
    font-size:1vw;
  -webkit-transform-origin-x: 0;
  -webkit-transform: scale(0.80);
  color: white;
}
</style>