|
@@ -249,11 +249,23 @@ export default {
|
|
|
},
|
|
|
getList() {},
|
|
|
gotoNext() {
|
|
|
- console.log(this.waitStudentList.length,'this.waitStudentList')
|
|
|
+
|
|
|
if(this.waitStudentList.length>0){
|
|
|
this.$message.error(`当前有${this.waitStudentList.length}名学员未加入班级`)
|
|
|
return
|
|
|
}
|
|
|
+
|
|
|
+ // 判断是否每个班都至少有一名学员
|
|
|
+ let flag = false
|
|
|
+ this.form.classList.forEach(item=>{
|
|
|
+ if( item.studentList.length <= 0){
|
|
|
+ flag = true
|
|
|
+ }
|
|
|
+ })
|
|
|
+ if(flag){
|
|
|
+ this.$message.error(`请保证每个班级都至少有1名学员`)
|
|
|
+ return
|
|
|
+ }
|
|
|
this.$refs.form.validate((flag) => {
|
|
|
if(flag){
|
|
|
this.$refs.tranPlanCourse.openDialog();
|