Project.vue
5.43 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
<!--
* @Author: 前端 qianduan01@didihu.com.cn
* @Date: 2022-10-25 10:12:26
* @LastEditors: huyue
* @LastEditTime: 2024-07-12 16:18:10
* @FilePath: \dj-data-view\src\views\saas\project.vue
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
-->
<template>
<div class="project-wrap flex">
<div class="project-item" v-for="(item, index) in projectList" :key="index">
<div class="project-title">{{ item.name }}</div>
<div class="project-subtitle">
<img class="img-icon" src="@/assets/images/left-icon.png" />
<span>{{ item.subName }}</span>
<img class="img-icon" src="@/assets/images/right-icon.png" />
</div>
<div class="project-right">
<div class="project-content-item flex">
<div class="project-content-desc">转化率</div>
<div class="project-content-num">{{ item.rate }}</div>
</div>
<div class="project-content-item flex">
<div class="project-content-desc">客单价</div>
<div class="project-content-num">{{ item.value }}</div>
</div>
<div class="project-content-item flex">
<div class="project-content-desc">GMV</div>
<div class="project-content-num">{{ item.output }}</div>
</div>
<!-- <div class="project-content-item">
<div class="project-content-desc">展业门店数</div>
<div class="project-content-num">{{ item.totalNum }}</div>
</div>
<div class="project-content-item">
<div class="project-content-desc">当年新增</div>
<div class="project-content-num">{{ item.incrNum }}</div>
</div>
<div class="project-content-item">
<div class="project-content-desc">转化率</div>
<div class="project-content-num">{{ toFixRatio(item.conversionrate) }}</div>
</div>
<div class="project-content-item">
<div class="project-content-desc">客单价</div>
<div class="project-content-num">{{ toFixNum(item.atv) }}</div>
</div>
<div class="project-content-item">
<div class="project-content-desc">GMV</div>
<div class="project-content-num">{{ numAddSymbol(item.outputValue) }}</div>
</div> -->
</div>
</div>
</div>
</template>
<script>
export default {
name: 'Project',
data() {
return {
projectList: [
{
name: '数字化轻改',
subName: '1.1新车轻改升级',
rate: '53%',
value: '1,300',
output: '25,509,838'
},
{
name: '数字化轻改',
subName: '1.2次新车增购',
rate: '10%',
value: '2,100',
output: '20,013,764'
},
{
name: '数字化保险',
subName: '2.1新车权益升级',
rate: '50%',
value: '1,650',
output: '1,893,844'
},
{
name: '数字化保险',
subName: '2.2售后续保',
rate: '37%',
value: '2,590',
output: '8,531,460'
},
{
name: '数字化保险',
subName: '2.3新车延保',
rate: '45%',
value: '8,800',
output: '6,127,763'
}
]
}
},
mounted() {
// this.getBusinessType()
},
methods: {
toFixRatio(val) {
if (!val) {
return '0.00%'
}
return (val * 100).toFixed(2) + '%'
},
toFixNum(val) {
return this.numAddSymbol(Math.round(val))
},
getBusinessType() {
this.api.operational.getBusinessType().then(res => {
if (res.code == 0) {
this.projectList = res.data.dataList
}
})
}
}
}
</script>
<style lang="scss" scoped>
.project-wrap {
margin: 0.98vh 0.83vw 0;
height: 11.71vh;
flex-wrap: wrap;
justify-content: space-between;
.project-item {
width: 10vw;
height: 12vh;
background-image: url(../../../assets/images/bg@2x.png);
background-size: 100% 100%;
.project-title {
margin-top: 1.8vh;
font-weight: 600;
font-size: 14px;
background: linear-gradient(to right, #01a4f9, #6df5f9); /* 从左到右渐变 */
-webkit-background-clip: text; /* Safari/Chrome支持该属性 */
color: transparent; /* 将文本颜色设置为透明 */
text-align: center;
}
.project-subtitle {
font-weight: 400;
font-size: 12px;
background: linear-gradient(to right, #01a4f9, #6df5f9); /* 从左到右渐变 */
-webkit-background-clip: text; /* Safari/Chrome支持该属性 */
color: transparent; /* 将文本颜色设置为透明 */
text-align: center;
.img-icon {
width: 0.52vw;
height: 0.19vh;
vertical-align: middle;
}
span {
margin: 0 0.34vw;
}
}
.project-right {
flex: 1;
padding: 0 1.2vw;
.project-content-item {
justify-content: space-between;
// margin-bottom: 0.14vh;
.project-content-desc {
font-size: 12px;
color: #dddddd;
}
.project-content-num {
font-size: 12px;
color: #ffffff;
text-align: right;
}
}
}
}
}
</style>