refactor(miniClass): 调整学员列表表格列并优化数据获取

- 将学员ID列宽从150调整为100,移除学员身份列
- 将“学员名称”列改为“学员姓名”并更新对应字段为student.name
- 新增邮箱列显示student.email字段
- 修改学员数据获取方式,使用getStudents接口替代getCLassInfo
- 注释掉分页组件及相关变量,为后续功能做准备
This commit is contained in:
2026-02-09 10:25:45 +08:00
parent 2a457fc076
commit 8bcdb0c00c

View File

@@ -183,19 +183,15 @@
<el-table-column
property="student.id"
label="学员id"
width="150"
width="100"
></el-table-column>
<el-table-column
property="student.nickname"
label="学员名"
property="student.name"
label="学员名"
width="150"
></el-table-column>
<el-table-column
property="student.vip"
label="学员身份"
width="200"
></el-table-column>
<el-table-column property="student.tel" label="手机号"></el-table-column>
<el-table-column property="student.email" label="邮箱"></el-table-column>
<el-table-column property="" label="操作">
<template slot-scope="scope">
<el-button size="mini" type="warning" @click="outClass(scope.row)"
@@ -204,6 +200,16 @@
</template>
</el-table-column>
</el-table>
<!-- <el-pagination
@size-change="sizeChangeHandle"
@current-change="currentChangeHandle"
:current-page="pageIndexStudent"
:page-sizes="[10, 20, 50, 100]"
:page-size="pageSizeStudent"
:total="totalStudent"
layout="total, sizes, prev, pager, next, jumper"
>
</el-pagination> -->
</div>
<span slot="footer" class="dialog-footer">
<el-button @click="setStudentClose"> </el-button>
@@ -275,6 +281,10 @@ export default {
pageSize: 10,
totalPage: 0,
total: 0,
// pageIndexStudent: 1,
// pageSizeStudent: 10,
// totalStudentPage: 0,
// totalStudent: 0,
dataListLoading: false,
miniClassVisible: false
};
@@ -346,15 +356,36 @@ export default {
});
})
},
// 获取学员列表数据
async getStudents(data) {
return new Promise(async(resolve, reject) => {
await this.$http({
url: this.$http.adornUrl("/common/class/getClassUserList"),
method: "post",
data: this.$http.adornData(data)
})
.then(data => {
resolve(data);
})
.catch(e => {
reject(e)
});
})
},
// 管理学员
async setStudent(data) {
this.miniClass = data;
var _classId = data.id;
this.addForm = {};
var jieguo = await this.getCLassInfo(_classId)
// var jieguo = await this.getCLassInfo(_classId)
var students = await this.getStudents({
classId: _classId,
// page: this.pageIndexStudent,
// limit: this.pageSizeStudent,
})
// console.log('jieguo',jieguo.data.code)
if(jieguo.data.code == 0){
this.studentList = jieguo.data.result.students;
if(students.data.code == 0){
this.studentList = students.data.result.students;
this.setStudentVisible = true;
}else{
this.$message.error("获取学员列表失败");