|
@@ -183,9 +183,10 @@ export default {
|
|
|
},
|
|
|
isOutRange(selected) {
|
|
|
let res = true;
|
|
|
- if (selected.length > this.selectInfo.personReq) this.$message.error('超出班级规定人数');
|
|
|
- else if (selected.length < this.selectInfo.personReq) this.$message.error('人数不足');
|
|
|
- else if (selected.length == this.selectInfo.personReq) res = false;
|
|
|
+ if (selected.length <= 0) this.$message.warning('请选择学生');
|
|
|
+ else if (_.inRange(selected.length, 1, this.selectInfo.personReq * 1)) this.$message.error('选择人数不足');
|
|
|
+ else if (selected.length > this.selectInfo.personReq * 1) this.$message('超出班级规定人数');
|
|
|
+ else res = false;
|
|
|
return res;
|
|
|
},
|
|
|
},
|