OperationalRight.vue
2.97 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
<!--
* @Description: 运营数据右侧
* @Author: huyue
* @Date: 2022-06-23 10:52:23
* @LastEditors: huyue
* @LastEditTime: 2024-09-09 10:10:47
-->
<template>
<div class="right">
<div class="top">
<box-title title="营销增值服务业务" :textAlign="'center'"></box-title>
<Business></Business>
<Project></Project>
</div>
<div class="bottom">
<box-title title="私域用户池总览" :textAlign="'center'"></box-title>
<div class="bottom-content">
<UserTab></UserTab>
<view-chart></view-chart>
<view-line-group>
<div slot="1"><Analyse :height="defaultHeight"></Analyse></div>
<div slot="2"><Brand :height="defaultHeight" :brandList="brandList"></Brand></div>
<div slot="3"><Area :height="defaultHeight" :areaList="areaList"></Area></div>
</view-line-group>
</div>
</div>
</div>
</template>
<script type="text/ecmascript-6">
const queryItem = ['Importantvalue', 'Importantdevelopments', 'Importantrecall', 'Importantretention', 'Generalvalue', 'Generaldevelopments', 'Generalrecall', 'Generalretention']
import datas from '../../utils/data'
import Business from './components/Business.vue'
import Project from './components/Project.vue'
import Analyse from './components/Analyse.vue'
import Area from './components/AreaSaas.vue'
import Brand from './components/BrandSaas.vue'
import UserTab from './components/UserTab.vue'
import ViewChart from './components/ViewChart.vue'
import ViewLineGroup from './components/ViewLineGroup.vue'
export default {
name: 'OperationalRight',
components: {
Business,
Project,
Analyse,
Brand,
Area,
UserTab,
ViewChart,
ViewLineGroup
},
data() {
return {
defaultHeight: datas.DefaultData.defaultLineHeight,
brandList: [],
areaList: []
}
},
mounted() {
this.getValueDistribution(7)
this.$bus.$on('drawChart', data => {
this.getValueDistribution(data)
})
},
methods: {
getValueDistribution(itemKey) {
const params = {
req: {
queryItem: queryItem[7 - itemKey]
}
}
this.api.operational.getValueDistribution(params).then(res => {
if (res.code == 0) {
this.areaList = res.data.dataList[0].rankDistributions
this.brandList = res.data.dataList[1].rankDistributions
}
})
}
}
}
</script>
<style scoped lang="scss">
.right {
width: 53.89vw;
display: flex;
flex-direction: column;
.top {
height: 338px;
box-sizing: border-box;
background: url(../../assets/images/operation/bg-2.png) no-repeat;
background-size: 100% 100%;
}
.bottom {
height: 544px;
margin-top: 20px;
box-sizing: border-box;
background: url(../../assets/images/operation/bg-4.png) no-repeat;
background-size: 100% 100%;
&-content {
padding: 0 0.83vw;
}
}
}
</style>