Blame view

src/components/tollman/index.vue 4.35 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
  <template>
    <div class="app-tollmanBox">
      <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="tollmanTotal"></div>
          </div>
          <div class="bottomBox">
            <table class="tollmanTb">
              <tr>
                <td>
                  <div class="onDutyImg eleVerHorCenter-tableCell"></div>
                  <div class="onDutyInfo eleVerHorCenter-tableCell"><span>{{onDutyNum}}</span><div>值班</div> </div> </td>
                <td>
                  <div class="noDutyImg eleVerHorCenter-tableCell"></div>
                  <div class="noDutyInfo eleVerHorCenter-tableCell"><span>{{noDutyNum}}</span><div>未值班</div> </div>
                </td>
              </tr>
            </table>
          </div>
        </div>
      </div>
    </div>
  </template>
  
  <script>
    import common from '../../api/common';
e52cf1d6   liuqimichale   添加丹阳
30
    import { tollmanAddress, tollmanAddressDY } from '../../api/api'
22fb20b3   songchongxian   城市停车运营监控
31
32
33
34
      export default {
        name: "tollman",
        data() {
          return {
74b5bee2   liuqimichale   全局 接口参数
35
            demo:'',//示例 总数
22fb20b3   songchongxian   城市停车运营监控
36
            tollmanTotal:"",//收费员总数html
c9493378   liuqimichale   api 接口封装
37
38
            onDutyNum:'',//值班
            noDutyNum:'',//未值班
22fb20b3   songchongxian   城市停车运营监控
39
40
41
42
43
44
            name: '折线图'
          }
        },
        mounted() {
          //this.createLine();
          //收费员总数
c9493378   liuqimichale   api 接口封装
45
          this.onLoad()
22fb20b3   songchongxian   城市停车运营监控
46
47
48
49
50
        },
        methods: {
          /*
           * 格式化会员总数
           * */
c9493378   liuqimichale   api 接口封装
51
          onLoad() {
e52cf1d6   liuqimichale   添加丹阳
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
            // tollmanAddress({
            //   orgIds: this.GLOBAL.paramsvariables
            // }).then((response)=>{
            //   let  data = response.data.data
            //   this.tollmanTotal = data.allTollCollector
            //   this.tollmanTotal = common.formatNumToStr(this.tollmanTotal);
            //   this.onDutyNum = data.signInTollCollector
            //   this.noDutyNum = data.unSignInTollCollector
            // }).catch((response)=>{
            //   console.log(response);
            // })
  
  
            this.$axios.all(
              [
                tollmanAddress({ orgIds: this.GLOBAL.paramsvariables}),
1bc516df   liuqimichale   地图点击事件
68
                tollmanAddressDY({ orgIds: this.GLOBAL.variables})
e52cf1d6   liuqimichale   添加丹阳
69
70
71
72
73
74
75
              ]
            )
            .then(this.$axios.spread((acctWX, acctDY) => {
              console.log(acctWX)
              console.log(acctDY)
              let WXdata = acctWX.data.data
              let DYdata = acctDY.data.data
a6301da7   liuqimichale   去掉丹阳
76
77
78
79
80
81
82
83
              // this.tollmanTotal = WXdata.allTollCollector+DYdata.allTollCollector
              // this.tollmanTotal = common.formatNumToStr(this.tollmanTotal);
              // this.onDutyNum = WXdata.signInTollCollector+DYdata.signInTollCollector
              // this.noDutyNum = WXdata.unSignInTollCollector+DYdata.unSignInTollCollector
  
  
  
              this.tollmanTotal = WXdata.allTollCollector
c9493378   liuqimichale   api 接口封装
84
              this.tollmanTotal = common.formatNumToStr(this.tollmanTotal);
a6301da7   liuqimichale   去掉丹阳
85
86
              this.onDutyNum = WXdata.signInTollCollector
              this.noDutyNum = WXdata.unSignInTollCollector
e52cf1d6   liuqimichale   添加丹阳
87
88
  
            }))
c9493378   liuqimichale   api 接口封装
89
          }
22fb20b3   songchongxian   城市停车运营监控
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
        },
  
      }
  </script>
  
  <style scoped  lang="scss">
    .app-tollmanBox {
      width: 100%;
      .theme-card{
        height: 100%;
      }
    .tollmanTb{
      margin: 0 auto;
      width: 100%;
      height: 100%;
      position: relative;
    }
    .tollmanTb >tr>td{
      width: 50%;
      vertical-align: middle;
      text-align: center;
    }
    .onDutyImg{
      background: url(../../images/com/onDuty.svg) no-repeat;
      background-size: 100% 100%;
      /*width: 50%;*/
      /*height: 60%;*/
      display: inline-block;
  
      width:45%;
      height:0;
      padding-bottom: 40%;
      margin: auto;
    }
    .onDutyInfo,.noDutyInfo{
      display: inline-block;
    }
    .onDutyInfo >span{
      background-image: -webkit-linear-gradient(bottom, #00CAFE, #2772F4);
      -webkit-background-clip:text;
      -webkit-text-fill-color:transparent;
      font-size: 24px;
    }
    .onDutyInfo >div,.noDutyInfo>div{
      font-size: 12px;text-align: left;
    }
    .noDutyImg{
      background: url(../../images/com/noDuty.svg) no-repeat;
      background-size: 100% 100%;
      /*width: 50%;*/
      /*height: 60%;*/
      display: inline-block;
      /*等比例压缩*/
      width:45%;
      height:0;
      padding-bottom: 40%;
      margin: auto;
    }
    .noDutyInfo>span{
      background-image: -webkit-linear-gradient(bottom, #FFBA00, #FF8100);
      -webkit-background-clip:text;
      -webkit-text-fill-color:transparent;
      font-size: 24px;
    }
    }
  </style>