Blame view

src/components/memberNum/index.vue 4.36 KB
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
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
  <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>
    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() {
          //会员总数
          this.memberNumTotal=this.formatNumToStr();
a312b338   liuqimichale   公用url
41
          this.axios.post('urban/intelligence/appuser/queryUserPersonStatistic', {
a945302e   liuqimichale   axios
42
43
44
45
46
47
            sysCode: '1001'
          }).then((response)=>{
            console.log(response)
          }).catch((response)=>{
            console.log(response);
          })
22fb20b3   songchongxian   城市停车运营监控
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
167
168
169
170
171
172
173
174
175
176
        },
        methods: {
          /*
           * 格式化会员总数
           * */
          formatNumToStr:function(){
            return common.formatNumToStr(this.$options.data().demo);
          },
  
        }
      }
  </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>