22fb20b3
songchongxian
城市停车运营监控
|
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
|
<template>
<div class="app-memberNumBox">
<div class="theme-card">
<div class="title"><span>会员数</span></div>
<div class="content">
<div class="topBox eleVerHorCenter-flex">
<span class="eleText">总计</span>
<div class="eleMarginLeft" v-html="memberNumTotal"></div>
</div>
<div class="bottomBox">
<table class="memberNumTb">
<tr>
<td> <div class="activeUserBox"> <span class="activeUserNum">{{activeUserNum}}</span><div class="activeUserText">日活跃</div> </div> </td>
<td><div class="memberRadarBox"><div class="memberRadar eleRotation"></div></div> </td>
<td> <div class="newUerBox"> <span class="newUerNum">{{newUerNum}}</span><div class="newUerNumText">新增用户</div></div> </td>
</tr>
</table>
</div>
</div>
</div>
</div>
</template>
<script>
|
a1bafdec
liuqimichale
vuex
|
25
|
import { mapActions } from 'vuex'
|
22fb20b3
songchongxian
城市停车运营监控
|
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
|
import common from '../../api/common';
import echarts from 'echarts'
export default {
name: "memberNum",
data() {
return {
demo:'219743',//示例 总数
memberNumTotal:"",//会员总数html
activeUserNum:23454,//日活跃
newUerNum:521,//新增用户
name: '会员数'
}
},
mounted() {
//会员总数
|
90185cec
liuqimichale
会员数统计
|
41
42
43
44
45
46
|
this.axios.post('urban/intelligence/appuser/queryUserPersonStatistic').then((response)=>{
let data = response.data.data
this.registerNum = data.registerNum
this.memberNumTotal = common.formatNumToStr(this.registerNum);
this.activeUserNum = data.todayActiveNum
this.newUerNum = data.todayRegisterNum
|
a1bafdec
liuqimichale
vuex
|
47
48
49
50
|
this.$store.dispatch('transferParkingTotal', data.registerNum)
//this.$store.dispatch('transferParkingTotal',10000);
//this.transferParkingTotal( data.registerNum);
console.log(this.$store.state.ParkingTotal)
|
a945302e
liuqimichale
axios
|
51
52
53
|
}).catch((response)=>{
console.log(response);
})
|
22fb20b3
songchongxian
城市停车运营监控
|
54
55
|
},
methods: {
|
a1bafdec
liuqimichale
vuex
|
56
57
58
|
...mapActions([
'transferParkingTotal'
])
|
22fb20b3
songchongxian
城市停车运营监控
|
59
60
|
/*
* 格式化会员总数
|
34a2efc7
liuqimichale
收费员统计
|
61
62
63
64
|
// * */
// formatNumToStr:function(){
// return common.formatNumToStr(this.$options.data().demo);
// },
|
22fb20b3
songchongxian
城市停车运营监控
|
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
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
|
}
}
</script>
<style scoped lang="scss">
.app-memberNumBox {
width: 100%;
.theme-card{
height: 100%;
}
.topBox,.bottomBox{
border:0px solid red;
}
.memberNumTb{
margin: 0 auto;
width: 100%;
height: 100%;
}
.memberNumTb >tr{
width: 100%;height: 100%;
}
.memberNumTb >tr>td{
height: 100%;width:33.333%;
}
/*.memberNumTb >tr>td:first-child{*/
/*width:25%;*/
/*}*/
/*.memberNumTb >tr>td:last-child{*/
/*width:25%;*/
/*}*/
.memberNumTb >tr>td:nth-child(2){
vertical-align: middle;
text-align: center;
position:relative;
}
.memberNumTb >tr>td:first-child{
vertical-align: middle;
text-align: right;
padding-right: 5px;
}
.memberNumTb >tr>td:last-child{
vertical-align: middle;
text-align: left;
padding-left:5px;
}
.memberRadar{
background: url(../../images/com/memberRadar.png) no-repeat;
background-size: 100% 100%;
width:90%;
height:0;
padding-bottom: 90%;
margin: auto;
background-position: center center;
background-repeat: no-repeat;
background-size: cover;
-webkit-background-size: cover;
-moz-background-size: cover;
}
.memberRadarBox:before{
content: " ";
display: block;
height: 30px;
width: 30px;
background: url(../../images/com/memberactiveUser.svg) no-repeat;
background-size: 100%;
position: absolute;
left: 0px;
top: 15px;
z-index: 8;
}
.memberRadarBox:after{
content: " ";
display: block;
height: 30px;
width: 30px;
background: url(../../images/com/membernewUer.svg) no-repeat;
background-size: 100%;
position: absolute;
right: 0px;
bottom: 15px;
z-index: 8;
}
.activeUserNum{
background-image: -webkit-linear-gradient(bottom, #67F967, #05C405);
-webkit-background-clip:text;
-webkit-text-fill-color:transparent;
font-size: 24px;
}
.newUerNum{
background-image: -webkit-linear-gradient(bottom, #FFBA00, #FF8100);
-webkit-background-clip:text;
-webkit-text-fill-color:transparent;
font-size: 24px;
}
.activeUserText,.newUerNumText{
font-size: 12px;
}
.activeUserText:after{
content: " ";
display: inline-block;
height: 12px;
width: 13px;
background: url(../../images/com/activeUser.png) no-repeat;
background-size: 100%;
margin-left:5px;
}
.newUerNumText:before{
content: " ";
display: inline-block;
height: 12px;
width: 13px;
background: url(../../images/com/newUser.png) no-repeat;
background-size: 100%;
margin-right:5px;
}
}
</style>
|