StationData.vue
1014 Bytes
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
<template>
<div class="station-data">
<el-table
:data="tableData"
:header-cell-style="{ background: '#eeeeee', color: '#333' }"
height="250"
border
style="width: 100%"
fit
>
<el-table-column prop="date" label="日期" width="180"> </el-table-column>
<el-table-column prop="name" label="姓名" width="180"> </el-table-column>
<el-table-column prop="address" label="地址"> </el-table-column>
</el-table>
</div>
</template>
<script>
import { GetStationInfo } from "@/api/main";
export default {
name: "StationData",
data() {
return {
tableData: [],
};
},
methods: {
GetStationInfo() {
GetStationInfo().then((res) => {
console.log("站台", res.data);
if (res.code === "Success") {
this.tableData = res.data;
}
});
},
},
created() {
this.GetStationInfo();
},
};
</script>
<style lang="scss" scoped>
.station-data {
width: 100%;
height: 100%;
}
</style>