leftcard.vue
4.63 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
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
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
<template>
<div class="leftcard">
<div class="card">
<div class="cardhead">区县接入</div>
<div class="cardcontent">
<ul class="cardcontent-left d-center">
<div class="rjjrlList">
<p v-for="(item, index) in qxjrlList" class="d-center qxjr" :key="index">
{{ item }}
</p>
</div>
<li>总量</li>
</ul>
<div class="cardcontent-right d-center">
<p>
<span>失败</span>
<span class="bad">{{ qxerrer }}</span>
</p>
<p>
<span>成功率</span>
<span class="cg">99%</span>
</p>
</div>
</div>
</div>
<div class="card mt-15">
<div class="cardhead">省厅汇交</div>
<div class="cardcontent">
<ul class="cardcontent-left d-center">
<div class="rjjrlList">
<p v-for="(item, index) in stjrlList" class="d-center sthj" :key="index">
{{ item }}
</p>
</div>
<li>总量</li>
</ul>
<div class="cardcontent-right d-center">
<p>
<span>失败</span>
<span class="bad">{{ sterrer }}</span>
</p>
<p>
<span>成功率</span>
<span class="cg">99%</span>
</p>
</div>
</div>
</div>
<div class="card1 mt-15">
<div class="cardhead">各区县数据上报统计</div>
<columnar />
</div>
</div>
</template>
<script>
import columnar from "@/components/Echart/Columnar";
import work from "@/api/work";
export default {
data () {
return {
// 日均接入量
qxerrer: 0,
qxsuccess: 0,
sterrer: 0,
stsuccess: 0,
qxjrl: 50300,
stjrl: 50300,
};
},
mounted () {
this.getsthjqxjrtotal();
},
components: { columnar },
computed: {
qxjrlList: function () {
return this.qxjrl.toString().split("");
},
stjrlList: function () {
return this.stjrl.toString().split("");
},
sbqkgsList: function () {
const numbers = this.sbqkgs.toString().split("").reverse();
const segs = [];
while (numbers.length) segs.push(numbers.splice(0, 3).join(""));
return segs.join(",").split("").reverse().join("");
},
},
methods: {
getsthjqxjrtotal () {
return new Promise(async (resolve) => {
try {
let p = {
DJLX: "A21",
QLLX: "A8",
XZQDM: "A20",
};
let res = await work.getsthjqxjrtotal(p);
} catch (error) {
this.$refs.msg.messageShow();
}
});
},
},
};
</script>
<style lang="scss" scoped>
.leftcard {
width: 32%;
height: calc(100% -94px);
display: flex;
flex-direction: column;
.card {
background: url("~@/image/homeLeftBg.png") no-repeat;
background-size: 100% 100%;
position: relative;
padding: 8px 0;
height: 170px;
}
.card1 {
background: url("~@/image/qxsj.png") no-repeat;
background-size: 100% 100%;
position: relative;
padding: 10px 0;
box-sizing: border-box;
flex: 1;
height: 100%;
}
.cardhead {
color: #02d9fd;
line-height: 24px;
letter-spacing: 2px;
position: absolute;
font-size: 20px;
left: 0;
right: 0;
margin: auto;
text-align: center;
top: 8px;
font-weight: 700;
}
.rjjrlList {
display: flex;
margin-top: 15px;
.qxjr {
background: url("~@/image/jrl3.png");
}
.sthj {
background: url("~@/image/jh.png");
}
p {
margin: 0 3px 10px 3px;
font-weight: 700;
width: 24px;
height: 36px;
font-size: 30px;
font-size: 32px;
}
}
.cardcontent {
width: 100%;
height: 100%;
display: flex;
padding: 35px 20px 20px 20px;
box-sizing: border-box;
color: #e3f1ff;
.cardcontent-left {
width: 60%;
flex-direction: column;
position: relative;
}
.cardcontent-left::before {
position: absolute;
right: 0;
top: 20px;
content: "";
width: 1px;
height: 90px;
background: linear-gradient(180deg,
#091b4c 0%,
#47b5e0 56%,
#091b4c 100%);
}
.cardcontent-right {
flex: 1;
width: 100%;
flex-direction: column;
font-size: 16px;
.bad {
color: #c97168;
}
.cg {
color: #5fba7d;
}
p {
margin-bottom: 8px;
span:nth-child(1) {
margin-right: 15px;
}
span:nth-child(2) {
font-size: 20px;
font-weight: 900;
}
}
}
}
}
</style>