Blame view

src/components/memberNum/index.vue 4.88 KB
22fb20b3   songchongxian   城市停车运营监控
1
2
3
  <template>
    <div class="app-memberNumBox">
      <div class="theme-card">
41f3747f   liuqimichale   金额 分处理成元
4
        <div class="title"><span>用户数</span></div>
22fb20b3   songchongxian   城市停车运营监控
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
        <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
    import common from '../../api/common';
c9493378   liuqimichale   api 接口封装
27
    import { memberAddress } from '../../api/api'
22fb20b3   songchongxian   城市停车运营监控
28
29
30
31
      export default {
        name: "memberNum",
        data() {
          return {
74b5bee2   liuqimichale   全局 接口参数
32
            demo:'',//示例 总数
22fb20b3   songchongxian   城市停车运营监控
33
            memberNumTotal:"",//会员总数html
c9493378   liuqimichale   api 接口封装
34
35
            activeUserNum:'',//日活跃
            newUerNum:'',//新增用户
22fb20b3   songchongxian   城市停车运营监控
36
37
38
39
40
            name: '会员数'
          }
        },
        mounted() {
          //会员总数
c9493378   liuqimichale   api 接口封装
41
         this.onLoad()
22fb20b3   songchongxian   城市停车运营监控
42
43
        },
        methods: {
a1bafdec   liuqimichale   vuex
44
45
          ...mapActions([
            'transferParkingTotal'
c9493378   liuqimichale   api 接口封装
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
          ]),
          onLoad() {
            memberAddress().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
              this.$store.dispatch('transferParkingTotal', data.registerNum)
              //this.$store.dispatch('transferParkingTotal',10000);
              //this.transferParkingTotal( data.registerNum);
              console.log(this.$store.state.ParkingTotal)
            }).catch((response)=>{
              console.log(response);
            })
          }
22fb20b3   songchongxian   城市停车运营监控
62
63
          /*
           * 格式化会员总数
34a2efc7   liuqimichale   收费员统计
64
65
66
67
          //  * */
          // formatNumToStr:function(){
          //   return common.formatNumToStr(this.$options.data().demo);
          // },
22fb20b3   songchongxian   城市停车运营监控
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
186
187
188
  
        }
      }
  </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>