overview.vue
7.86 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
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
<template>
<div class="overview flex">
<div class="store mgr4">
<div class="headline flex-around">
<div :style="{ width: item.width ? item.width : 'auto' }" v-for="(item, index) in titleList" :key="index">{{ item.text }}</div>
</div>
<div class="content">
<div :class="['content-item', 'flex-around', info.pd ? info.pd : '']" v-for="(info, index) in infoList" :key="index">
<div class="content-title">{{ info.title }}</div>
<template v-for="(data, ids) in info.dataList">
<div v-if="ids != 2" :class="['content-number', 'num-' + ids]" :key="ids">
{{ index == 0 ? numAddSymbol(data(smartClueData)) : index == 1 ? numAddSymbol(data(merchantData)) : numAddSymbol(data(smartData)) }}
</div>
<div v-else :class="['content-number', 'num-' + ids]" :key="ids">
{{ index == 0 ? toFixNum(data(smartClueData)) : index == 1 ? toFixNum(data(merchantData)) : toFixNum(data(smartData)) }}
</div>
</template>
</div>
</div>
</div>
<div class="clew mgr4">
<div class="headline text-center">产生线索/核销数</div>
<div class="clew-content">
<div :class="['clew-content-item', 'bg-' + clewInx]" v-for="(clew, clewInx) in clewList" :key="clewInx">
<template v-for="(clewData, clewIds) in clew">
<div class="clew-line-text flex-between" :key="clewIds">
<div>{{ clewData.title }}</div>
<div class="clew-num">
{{ clewInx == 0 ? numAddSymbol(clewData.value(smartClueData)) : clewInx == 1 ? numAddSymbol(clewData.value(merchantData)) : numAddSymbol(clewData.value(smartData)) }}
</div>
</div>
</template>
</div>
</div>
</div>
<!-- <div class="estimate">
<div class="headline text-center">预估价值/挽回损失</div>
<div class="estimate-content">
<div :class="['estimate-content-item', 'bgEstimate-' + estimateInx]" v-for="(estimate, estimateInx) in estimateList" :key="estimateInx">
<template v-for="(estimateData, estimateIds) in estimate">
<div :class="['estimate-line-text', estimateInx == 2 ? 'flex-column retrieve' : 'text-center']" :key="estimateIds">
<div v-if="estimateInx == 2">挽回损失</div>
<div class="estimate-num">
{{ estimateInx == 0 ? numAddSymbol(estimateData(smartClueData)) : estimateInx == 1 ? numAddSymbol(estimateData(merchantData)) : numAddSymbol(estimateData(smartData)) }}
</div>
</div>
</template>
</div>
</div>
</div> -->
</div>
</template>
<script>
import datas from '../../utils/data'
export default {
name: 'oversize',
data() {
return {
merchantData: '', //门店会员的权益
smartData: '', // 智慧车管线索订阅
smartClueData: '', //智慧门店线索订阅
titleList: [
{ text: '订阅门店', width: '2.78vw' },
{ text: '线索订阅门店数(累计)', width: '3.82vw' },
{ text: '活跃使用门店', width: '4.95vw' },
{ text: '留存率', width: '4.29vw' }
],
infoList: [
{
title: '智慧门店线索订阅',
pd: 'pd26',
width: '2.78vw',
dataList: [obj => obj.totalnum, obj => obj.activenum, obj => obj.retention]
},
{
title: '门店会员的权益',
width: '2.78vw',
dataList: [obj => obj.totalnum, obj => obj.activenum, obj => obj.retention]
},
{
title: '智慧车管线索订阅',
width: '2.78vw',
dataList: [obj => obj.totalnum, obj => obj.activenum, obj => obj.retention]
}
],
clewList: [
[
{ title: '到店线索', value: obj => obj.arrival },
{ title: '送修线索', value: obj => obj.repair },
{ title: '续保线索', value: obj => obj.insurance }
],
[
// { title: '自店权益', value: obj => obj.ownshopequity },
{ title: '数字权益', value: obj => obj.digitalequity }
],
[
{ title: '高危点', value: obj => obj.highcriticalpoint },
{ title: '高危报警', value: obj => obj.highriskalarm }
]
],
estimateList: [[obj => obj.totalnum, obj => obj.increnum, obj => obj.activenum], [obj => obj.totalnum], [obj => obj.totalnum]]
}
},
created() {
this.getMerchantData()
this.getSmartData()
this.getSmartClueData()
},
methods: {
toFixNum(val) {
return (val * 100).toFixed(1) + '%'
},
getMerchantData() {
this.api.sass.getMerchantData().then(res => {
if (res.code == 0) {
this.merchantData = res.data.dataList[0]
}
})
},
getSmartData() {
this.api.sass.getSmartData().then(res => {
if (res.code == 0) {
this.smartData = res.data.dataList[0]
}
})
},
getSmartClueData() {
this.api.sass.getSmartClueData().then(res => {
if (res.code == 0) {
this.smartClueData = res.data.dataList[0]
}
})
}
}
}
</script>
<style lang="scss" scoped>
.overview {
margin: 10px 0 16px 0;
.store {
width: 30.28vw;
height: 30.73vh;
}
.clew {
width: 11.11vw;
height: 30.73vh;
}
.estimate {
width: 7.64vw;
height: 30.73vh;
}
.headline {
height: 6.1vh;
background: rgba(22, 28, 95, 0.6);
font-weight: 600;
font-size: 10px;
color: #e8e8e8;
text-align: center;
}
.content {
width: 100%;
&-item {
padding: 1.59vh 0;
height: 6.83vh;
background: #0b0e31;
margin-bottom: 0.49vh;
justify-content: space-around;
box-sizing: border-box;
}
&-title {
width: 2.78vw;
font-weight: 400;
font-size: 10px;
color: #fff;
text-align: center;
// white-space: pre-wrap;
}
&-number {
font-weight: 700;
font-size: 12px;
color: #ffffff;
text-align: center;
}
.num-0 {
width: 3.82vw;
}
.num-1 {
width: 4.95vw;
}
.num-2 {
width: 4.29vw;
}
.pd26 {
height: 9.999vh;
padding: 3.17vh 0;
}
}
.mgr4 {
margin-right: 0.28vw;
}
.clew-content {
width: 100%;
&-item {
margin-bottom: 0.49vh;
background: #091b39;
.clew-line-text {
padding: 0.85vh 0.56vw 0.73vh 0.56vw;
font-weight: 400;
font-size: 10px;
color: #fff;
border-bottom: 1px solid #0e2949;
box-sizing: border-box;
height: 3.333vh;
.clew-num {
font-weight: 700;
font-size: 12px;
color: #ffffff;
}
&:last-child {
border: none !important;
}
}
}
.bg-1 {
background: #061e19;
.clew-line-text {
border-bottom: 1px solid #0a2d26;
height: 6.83vh;
}
}
.bg-2 {
background: #280935;
.clew-line-text {
border-bottom: 1px solid #390b4b;
height: 3.415vh;
}
}
}
.estimate-content {
width: 100%;
&-item {
margin-bottom: 0.49vh;
background: #0b0e31;
.estimate-line-text {
font-weight: 400;
border-bottom: 1px solid #171f60;
box-sizing: border-box;
height: 3.333vh;
.estimate-num {
font-weight: 700;
font-size: 12px;
color: #ffffff;
}
&:last-child {
border: none !important;
}
}
}
.bgEstimate-1 {
.estimate-line-text {
height: 6.83vh;
border: none;
}
}
.bgEstimate-2 {
.estimate-line-text {
height: 6.83vh;
border: none;
}
}
.retrieve {
font-size: 10px;
color: #ff3540;
.estimate-num {
color: #ff3540 !important;
margin-top: 0.37vh;
}
}
}
}
</style>