ViewSolar.vue
1.67 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
<!--
* @Description: 1.0 太阳膜内容页面
* @Author: huyue
* @Date: 2023-07-04 13:56:33
* @LastEditors: huyue
* @LastEditTime: 2023-07-19 14:47:48
-->
<template>
<div class="view-content">
<ViewDate :defaultYear="defaultYear" :dataList="yearList" :businessTime="businessTime"></ViewDate>
<div class="content">
<ContentLeft></ContentLeft>
<ContentRight></ContentRight>
</div>
</div>
</template>
<script>
import ContentLeft from '../../solar/ContentLeft'
import ContentRight from '../../solar/ContentRight.vue'
export default {
name: 'ViewSolar',
components: {
ContentLeft,
ContentRight
},
props: {
},
computed: {
},
data() {
return {
businessTime: '',
yearList: [{
label: '全部',
value: ''
}],
defaultYear: ''
}
},
created() {
this.$bus.$on('businessstarttime', data => {
this.businessTime = data
})
this.getYears()
},
methods: {
async getYears() {
const _data = await this.api.solar.getYears({})
const _yearList = _data.data.dataList[0].year.reverse()
_yearList.forEach(item => {
this.yearList.push({
label: item,
value: item + ''
})
})
this.defaultYear = this.yearList[0].value
}
}
}
</script>
<style scoped lang='scss'>
.view-content {
width: 100%;
height: 100%;
box-sizing: border-box;
position: relative;
padding: 1.78vh 24px;
gap: 0 16px;
}
.content {
display: flex;
justify-content: space-between;
// padding: 1.78vh 0 0;
margin-top: 1.78vh;
> div {
// height: 100%;
}
}
</style>