index.vue
3.31 KB
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
<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';
import { tollmanAddress } from '../../api/api'
export default {
name: "tollman",
data() {
return {
demo:'',//示例 总数
tollmanTotal:"",//收费员总数html
onDutyNum:'',//值班
noDutyNum:'',//未值班
name: '折线图'
}
},
mounted() {
//this.createLine();
//收费员总数
this.onLoad()
},
methods: {
/*
* 格式化会员总数
* */
onLoad() {
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);
})
}
},
}
</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>