archivedClazz.vue
1.93 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
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
<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>