ViewContentLeft.vue
3.56 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
<!--
* @Description:
* @Author: huyue
* @Date: 2023-02-27 11:29:02
* @LastEditors: huyue
* @LastEditTime: 2023-02-27 14:52:17
-->
<template>
<div class='left'>
<div class='top'>
<view-sub-title title='整体的业务趋势' />
<view-surface
:isMonthDay = 'true'
domId='thirtyChart'
:isEqually='false'
boxHeight='41.5vh'
:showSeletion='true'
:isDatazoom='true'
:dataList='springbudAtionList' />
<!-- <div class='topWrp'>-->
<!-- <view-surface domId='transworkChart' title='1.1转化+业务' :dataList='transworkList' />-->
<!-- <view-surface domId='expandedgoldChart' title='1.2膨胀金业务' :dataList='expandedgoldList' />-->
<!-- <view-surface domId='crowdfundingChart' title='1.3众筹业务' :dataList='crowdfundingList' />-->
<!-- <view-surface domId='noworriesChart' title='2.1车损无忧' :dataList='noworriesList' />-->
<!-- </div>-->
</div>
<div class='bottom' v-if='boxList'>
<view-sub-title title='门店每月各业务展业情况' />
<box-chart :boxList='boxList'></box-chart>
</div>
</div>
</template>
<script type='text/ecmascript-6'>
import datas from '../utils/data'
import Area from '../views/customer/area'
import Store from '../views/customer/store'
import Brand from '../views/customer/brand'
import OverSize from '../views/saas/overview.vue'
import { clientMixin } from '../mixins/index'
import BoxChart from 'plugins/boxChart'
import SelectCpn from 'views/sassPlus/componts/selectCpn'
export default {
name: 'ViewContentLeft',
mixins: [clientMixin],
components: {
BoxChart,
Area,
Store,
Brand,
OverSize,
SelectCpn
},
data() {
return {
defaultHeight: datas.DefaultData.defaultPieHeight,
springbudAtionList: [],
boxList: [],
current: 0,
springbudAtionBackup: '',
monthDayBackUp: ''
}
},
created() {
this.getMerchantMonthlyTrend('transwork', '1')
},
mounted() {
this.$bus.$on('changeSpringbudAtion', data => {
// this.springbudAtionBackup = data.action
this.getMerchantMonthlyTrend(data.action, this.monthDayBackUp)
})
// monthDayEvent
this.$bus.$on('monthDayEvent', data => {
// this.monthDayBackUp = data.queryItem
this.getMerchantMonthlyTrend(this.springbudAtionBackup, data.queryItem)
})
},
methods: {
getMerchantMonthlyTrend(val, monthday ) {
this.springbudAtionBackup = val
this.monthDayBackUp = monthday
this.api.springbudAtion.getAllMerchantMonthlyTrend({
queryItem: val,
queryType: monthday
}).then(res => {
if (res.code == 0) {
this.springbudAtionList = res.data.dataList
}
})
}
}
}
</script>
<style scoped lang='scss'>
.left {
display: flex;
flex-direction: column;
width: 43.89vw;
overflow: hidden;
.top {
height: 50.49vh;
width: 100%;
//background-image: url('../assets/images/bg-1.png');
background-image: url('../assets/images/bg-3.png');
background-repeat: no-repeat;
background-size: 100% 100%;
padding: 0 16px;
box-sizing: border-box;
.topWrp {
display: flex;
justify-content: space-between;
flex-wrap: wrap;
align-content: space-between;
}
}
.bottom {
// height: calc(41% - 16px);
height: 38.05vh;
margin-top: auto;
background-image: url('../assets/images/bg-2.png');
background-repeat: no-repeat;
background-size: 100% 100%;
padding: 0 16px;
box-sizing: border-box;
}
}
</style>