StationData.vue 1014 Bytes
<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>