ViewSurface.vue
1.2 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
<!--
* @Author: 前端 qianduan01@didihu.com.cn
* @Date: 2022-10-25 10:12:26
* @LastEditors: huyue
* @LastEditTime: 2024-01-26 20:57:07
* @FilePath: \dj-data-view\src\components\ViewSurface.vue
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
-->
<template>
<div class="surface">
<LineBar ref="lineBarCharts" domId="surfaceChart" boxHeight="22.78vh" :dataList="dataList"></LineBar>
</div>
</template>
<script type="text/ecmascript-6">
import LineBar from './LineBar.vue'
export default {
name: 'ViewSurface',
components: {
LineBar
},
data() {
return {
dataList: []
}
},
mounted() {
this.getEnterpriseOverviewTrend()
},
methods: {
getEnterpriseOverviewTrend() {
this.api.operational.getEnterpriseOverviewTrend().then(res => {
if (res.code == 0) {
// this.dataList = res.data.dataList
this.$refs.lineBarCharts.drawLine(res.data.dataList)
}
})
}
}
}
</script>
<style scoped lang="scss">
.surface {
height: 23.06vh;
margin-bottom: 0.98vh;
}
</style>