ViewInterior.vue
1.69 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
<!--
* @Description: 内部数据页面
* @Author: huyue
* @Date: 2023-07-04 13:55:35
* @LastEditors: huyue
* @LastEditTime: 2023-08-22 17:31:50
-->
<template>
<div class="view-content">
<div class="content">
<InternalLeft></InternalLeft>
<InternalRight></InternalRight>
</div>
</div>
</template>
<script>
import InternalLeft from "../../internal/InternalLeft.vue"
import InternalRight from "../../internal/InternalRight.vue"
import {overViewList} from '../../internal/components/constant'
export default {
name: 'ViewInterior',
components: {
InternalLeft,
InternalRight
},
data() {
return {
overViewData: overViewList
}
},
created() {
this.getAllOverview()
},
mounted() { },
methods: {
async getAllOverview() {
const _data = await this.api.internal.getAllOverview()
const _dataList = _data.data.dataList[0]
console.log(_dataList);
this.overViewData.forEach(item => {
item.value = _dataList[item.valueName]
if (item.bottomValue) item.bottomValue = _dataList[item.bottemName]
if (item.bottomType === 'ratio') {
item.ratioLeftValue = _dataList[item.ratioLeftValueName]
item.ratioRightValue = _dataList[item.ratioRightValueName]
}
})
this.$bus.$emit('innerGetAllOverview', this.overViewData)
}
}
}
</script>
<style lang="scss" scoped>
.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;
}
</style>