archivedClazz.vue 1.93 KB
<template>
  <div>
    <back-box>
      <template slot="title">
        <span>已归档班级</span>
      </template>
    </back-box>
    <div class="page-content" v-loading="loading">
      <el-table :data="tableData" border style="width: 100%">
        <el-table-column
          prop="gradeName"
          label="年级"
          fixed
          align="center"
        ></el-table-column>
        <el-table-column
          prop="className"
          label="班级名称"
          fixed
          align="center"
        ></el-table-column>
        <el-table-column
          prop="studentCount"
          label="学生数量"
          fixed
          align="center"
        ></el-table-column>
        <el-table-column
          prop="modifiedTime"
          label="归档时间"
          fixed
          align="center"
        ></el-table-column>
      </el-table>
    </div>
    <!-- <div class="pagination-box">
      <el-pagination
        small=""
        layout="total,prev, pager, next"
        :hide-on-single-page="true"
        :total="total"
        @current-change="changePage"
        :current-page="page"
        :page-size="size"
      >
      </el-pagination>
    </div> -->
  </div>
</template>

<script>
export default {
  data() {
    return {
      role: "",
      loading: false,
      tableData: [],
      total: 0,
      page: 1,
      size: 20,
    };
  },
  async created() {
    this._QueryData();
  },
  methods: {
    changePage(page) {
      this.page = page;
      this._QueryData(this.query.title);
    },
    async _QueryData() {
      this.loading = true;
      const { data, status, info } = await this.$request.archivingClassList();
      this.loading = false;
      if (status === 0) {
        this.total = data.total;
        this.tableData = (data.list && [...data.list]) || [];
      } else {
        this.$message.error(info);
      }
    },
  },
};
</script>

<style lang="scss" scoped>
.page-content {
  padding: 20px;
}
</style>