This commit is contained in:
@fawn-nine
2024-08-28 11:55:07 +08:00
parent 396d1e2adf
commit 59de72d0c7
2 changed files with 18 additions and 28 deletions

View File

@@ -397,16 +397,11 @@ export default {
return return
} }
this.$http({ this.$http({
url: this.$http.adornUrl('/common/class/editClass'), url: this.$http.adornUrl('/common/class/updateClassState'),
method: "post", method: "post",
data: this.$http.adornData({ data: this.$http.adornData({
id: this.miniClassForm.id, classId:this.miniClassForm.id,
modelId: this.miniClassForm.modelId, state: '1'
title: this.miniClassForm.title,
icon: this.miniClassForm.icon,
state: '1',
content: this.miniClassForm.content
// createUserid: "10185"
}) })
}) })
.then(({ data }) => { .then(({ data }) => {
@@ -414,23 +409,18 @@ export default {
this.$message.success("操作成功"); this.$message.success("操作成功");
this.handleClose(); this.handleClose();
}else{ }else{
this.$message.error("操作失败"); this.$message.error(data.msg);
} }
}) })
}, },
// 结班 // 结班
jieban(){ jieban(){
this.$http({ this.$http({
url: this.$http.adornUrl('/common/class/editClass'), url: this.$http.adornUrl('/common/class/updateClassState'),
method: "post", method: "post",
data: this.$http.adornData({ data: this.$http.adornData({
id: this.miniClassForm.id, classId:this.miniClassForm.id,
modelId: this.miniClassForm.modelId, state: '2'
title: this.miniClassForm.title,
icon: this.miniClassForm.icon,
state: '2',
content: this.miniClassForm.content
// createUserid: "10185"
}) })
}) })
.then(({ data }) => { .then(({ data }) => {
@@ -438,7 +428,7 @@ export default {
this.$message.success("操作成功"); this.$message.success("操作成功");
this.handleClose(); this.handleClose();
}else{ }else{
this.$message.error("操作失败"); this.$message.error(data.msg);
} }
}) })
}, },

View File

@@ -164,24 +164,24 @@
width="800px" width="800px"
:close="setStudentClose" :close="setStudentClose"
> >
<div> <div>
<el-table :data="studentList"> <el-table :data="studentList">
<el-table-column <el-table-column
property="id" property="student.id"
label="学员id" label="学员id"
width="150" width="150"
></el-table-column> ></el-table-column>
<el-table-column <el-table-column
property="nickname" property="student.nickname"
label="学员名称" label="学员名称"
width="150" width="150"
></el-table-column> ></el-table-column>
<el-table-column <el-table-column
property="vip" property="student.vip"
label="学员身份" label="学员身份"
width="200" width="200"
></el-table-column> ></el-table-column>
<el-table-column property="tel" label="手机号"></el-table-column> <el-table-column property="student.tel" label="手机号"></el-table-column>
<el-table-column property="" label="操作"> <el-table-column property="" label="操作">
<template slot-scope="scope"> <template slot-scope="scope">
<el-button type="warning" @click="outClass(scope.row)" <el-button type="warning" @click="outClass(scope.row)"
@@ -209,8 +209,8 @@ export default {
studentList: [], // 学员列表 studentList: [], // 学员列表
dataForm: { dataForm: {
title: "", title: "",
type: "0", type: "",
state: "0" state: ""
}, },
// courseId: {}, // courseId: {},
course: null, course: null,
@@ -332,7 +332,7 @@ export default {
// 踢出班级 // 踢出班级
async outClass(row) { async outClass(row) {
let that = this; let that = this;
this.$confirm(`确定将学员电话为:${row.tel}踢出班级?`, "提示", { this.$confirm(`确定将学员电话为:${row.student.tel}踢出班级?`, "提示", {
confirmButtonText: "确定", confirmButtonText: "确定",
cancelButtonText: "取消", cancelButtonText: "取消",
type: "warning" type: "warning"
@@ -344,7 +344,7 @@ export default {
method: "post", method: "post",
data: this.$http.adornData({ data: this.$http.adornData({
classId: that.miniClass.id, classId: that.miniClass.id,
userId: row.id userId: row.student.id
}) })
}).then(async ({ data }) => { }).then(async ({ data }) => {
if (data && data.code === 0) { if (data && data.code === 0) {