business.vue
1.93 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
<!--
* @Author: 前端 qianduan01@didihu.com.cn
* @Date: 2022-10-25 10:12:26
* @LastEditors: huyue
* @LastEditTime: 2023-02-28 14:53:09
* @FilePath: \dj-data-view\src\views\saas\business.vue
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
-->
<template>
<div class="business-wrap flex">
<div class="business-data">
<business-view :businessNum="businessNum"></business-view>
</div>
<div class="business-category">
<Category :categoryData="categoryData"></Category>
</div>
</div>
</template>
<script>
import businessView from './businessView'
import Category from './category.vue'
export default {
components: {
businessView,
Category
},
name: 'Business',
data() {
return {
businessNum: {},
categoryData: []
}
},
mounted() {
this.getSaasValueaddedTransformationOverview()
},
methods: {
toFixNum(val) {
return (val * 100).toFixed(2) + '%'
},
getSaasValueaddedTransformationOverview() {
this.api.sass.getSaasValueaddedTransformationOverview().then(res => {
if (res.code == 0) {
this.businessNum = res.data.dataList[0]
this.categoryData = [
{
name: '精品类',
value: this.businessNum.equity
},
{
name: '权益类',
value: this.businessNum.membrane
},
{
name: '续保类',
value: this.businessNum.electronics
}
]
}
})
}
}
}
</script>
<style lang="scss" scoped>
.business-wrap {
height: 13.9vh;
margin-bottom: 0.98vh;
margin-top: 0.98vh;
.business-data {
margin-right: 4px;
// margin-top: 0.98vh;
width: 36.11vw;
height: 100%;
}
.business-category {
width: 13.06vw;
height: 100%;
}
}
</style>