statistics.vue
1.61 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
<template>
<div class="system-container">
<div class="page_head_title">
<h2 class="h2">运营统计报表</h2>
<h3 class="h3">通过车辆或设备纬度,统计系统内设备数据,并支持宽表输出</h3>
<el-button class="informationBtn" type="primary" size="mini" @click="informationClick">信息解析</el-button>
</div>
<el-tabs v-model="tabActive">
<el-tab-pane label="车辆纬度" name="car">
<statistics-car></statistics-car>
</el-tab-pane>
<el-tab-pane label="设备纬度" name="device">
<statistics-device></statistics-device>
</el-tab-pane>
</el-tabs>
<informationDialog ref="informationDialog" :uploadHeaders="uploadHeaders" @successData="successData" />
</div>
</template>
<script>
import {} from "services/report";
import StatisticsCar from './statistics_car'
import StatisticsDevice from './statistics_device'
import informationDialog from './informationDialog'
export default {
components: {
StatisticsCar,
StatisticsDevice,
informationDialog
},
data() {
return {
tabActive: "car",
uploadHeaders: {}
};
},
mounted() {
let token = localStorage.getItem("token");
this.uploadHeaders = { Authorization: token };
},
methods: {
informationClick() {
this.$refs.informationDialog.openDialog()
// this.$refs.informationDialog.showResult = true
},
successData(val) {
console.log('val', val);
}
},
};
</script>
<style lang="scss" scoped>
@import "@/styles/common.scss";
.informationBtn {
position: absolute;
right: 24px;
z-index: 2;
}
</style>>