|
@@ -671,7 +671,10 @@ export default {
|
|
clearCom() {
|
|
clearCom() {
|
|
// this.deleteList = [];
|
|
// this.deleteList = [];
|
|
this.$set(this, "deleteList", []);
|
|
this.$set(this, "deleteList", []);
|
|
- this.$refs.maskStudentList.clearSelection();
|
|
|
|
|
|
+ if (this.$refs.maskStudentList) {
|
|
|
|
+ this.$refs.maskStudentList.clearSelection();
|
|
|
|
+ }
|
|
|
|
+
|
|
// this.$refs.addCompound.isLook = false;
|
|
// this.$refs.addCompound.isLook = false;
|
|
},
|
|
},
|
|
getTemplateRow(index, row) {
|
|
getTemplateRow(index, row) {
|
|
@@ -682,8 +685,9 @@ export default {
|
|
this.$message.error("请选择一名学生");
|
|
this.$message.error("请选择一名学生");
|
|
return;
|
|
return;
|
|
}
|
|
}
|
|
- console.log(this.deleteList);
|
|
|
|
|
|
+ let str = ''
|
|
let arr = this.deleteList.map((stu) => {
|
|
let arr = this.deleteList.map((stu) => {
|
|
|
|
+ str += stu.userName+','
|
|
return {
|
|
return {
|
|
vipGroupId: this.id,
|
|
vipGroupId: this.id,
|
|
studentId: stu.id,
|
|
studentId: stu.id,
|
|
@@ -691,6 +695,7 @@ export default {
|
|
onlineClassesUnitPrice: stu.onlineClassesUnitPrice,
|
|
onlineClassesUnitPrice: stu.onlineClassesUnitPrice,
|
|
};
|
|
};
|
|
});
|
|
});
|
|
|
|
+ str=str.slice(0,str.length-1)
|
|
// return;
|
|
// return;
|
|
// let offlineClassesUnitPrice, onlineClassesUnitPrice;
|
|
// let offlineClassesUnitPrice, onlineClassesUnitPrice;
|
|
// this.maskStudentList.forEach((stu) => {
|
|
// this.maskStudentList.forEach((stu) => {
|
|
@@ -711,13 +716,24 @@ export default {
|
|
// offlineClassesUnitPrice,
|
|
// offlineClassesUnitPrice,
|
|
// },
|
|
// },
|
|
// ]
|
|
// ]
|
|
- addVipGroupStudents(arr).then((res) => {
|
|
|
|
- if (res.code == 200) {
|
|
|
|
- this.$message.success("添加成功");
|
|
|
|
- this.getStudents();
|
|
|
|
- this.clearCom();
|
|
|
|
- }
|
|
|
|
- });
|
|
|
|
|
|
+
|
|
|
|
+ this.$confirm(`是否将${str}加入课程组?`, "提示", {
|
|
|
|
+ confirmButtonText: "确定",
|
|
|
|
+ cancelButtonText: "取消",
|
|
|
|
+ type: "warning",
|
|
|
|
+ })
|
|
|
|
+ .then(async (res) => {
|
|
|
|
+ addVipGroupStudents(arr).then((res) => {
|
|
|
|
+ if (res.code == 200) {
|
|
|
|
+ this.$message.success("添加成功");
|
|
|
|
+ this.getStudents();
|
|
|
|
+ this.clearCom();
|
|
|
|
+ }
|
|
|
|
+ });
|
|
|
|
+ })
|
|
|
|
+ .catch((e) => {
|
|
|
|
+ console.log(e);
|
|
|
|
+ });
|
|
},
|
|
},
|
|
stopCourse(scope) {
|
|
stopCourse(scope) {
|
|
this.$confirm("是否休学?", "提示", {
|
|
this.$confirm("是否休学?", "提示", {
|