|
@@ -49,7 +49,13 @@
|
|
|
</el-table-column>
|
|
|
<el-table-column align="center"
|
|
|
prop="studentNum"
|
|
|
- label="班级人数"></el-table-column>
|
|
|
+ label="班级人数">
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <div>
|
|
|
+ {{scope.row.studentNum+'/'+scope.row.expectStudentNum}}
|
|
|
+ </div>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
<el-table-column align="center"
|
|
|
prop="studentId"
|
|
|
label="主教老师名称">
|
|
@@ -77,7 +83,7 @@
|
|
|
<div>
|
|
|
<el-button type="text"
|
|
|
v-permission="'classGroup/classGroupUpdate'"
|
|
|
- @click="classAdjustment(scope.row)">班级调整</el-button>
|
|
|
+ @click="classAdjustment(scope.row)">老师调整</el-button>
|
|
|
<el-popover placement="top"
|
|
|
width="160"
|
|
|
:ref="scope.$index"
|
|
@@ -96,7 +102,7 @@
|
|
|
slot="reference">删除班级</el-button>
|
|
|
</el-popover>
|
|
|
<!-- v-if="scope.row.type
|
|
|
- !='HIGHT'
|
|
|
+ !='HIGH'
|
|
|
&&scope.row.type
|
|
|
!='HIGH_ONLINE'
|
|
|
" -->
|
|
@@ -349,7 +355,7 @@
|
|
|
</div>
|
|
|
</el-dialog>
|
|
|
<!-- 老师以及课程设置 -->
|
|
|
- <el-dialog title="班级设置"
|
|
|
+ <el-dialog title="老师调整"
|
|
|
width="700px"
|
|
|
:visible.sync="infoVisible"
|
|
|
:modal-append-to-body="false">
|
|
@@ -369,15 +375,15 @@
|
|
|
:value="item.id"></el-option>
|
|
|
</el-select>
|
|
|
</el-form-item>-->
|
|
|
- <el-form-item label="调整方式"
|
|
|
+ <!-- <el-form-item label="调整方式"
|
|
|
v-if="!isNewClass"
|
|
|
- prop="isAdd">
|
|
|
- <el-radio v-model.trim="teacherForm.isAdd"
|
|
|
+ prop="isAdd"> -->
|
|
|
+ <!-- <el-radio v-model.trim="teacherForm.isAdd"
|
|
|
label="new">班级加课</el-radio>
|
|
|
<el-radio v-model.trim="teacherForm.isAdd"
|
|
|
- label="renew">重新排课</el-radio>
|
|
|
- <el-radio v-model.trim="teacherForm.isAdd"
|
|
|
- label="onlyUpdateTeacher">修改老师</el-radio>
|
|
|
+ label="renew">重新排课</el-radio> -->
|
|
|
+ <!-- <el-radio v-model.trim="teacherForm.isAdd"
|
|
|
+ label="onlyUpdateTeacher">修改老师</el-radio> -->
|
|
|
</el-form-item>
|
|
|
<br />
|
|
|
<el-form-item label="主教老师"
|
|
@@ -619,7 +625,7 @@ import axios from "axios";
|
|
|
import { getToken } from "@/utils/auth";
|
|
|
import pagination from "@/components/Pagination/index";
|
|
|
import load from "@/utils/loading";
|
|
|
-import { getTeacher, getEmployeeOrgan, getMusicGroupClass, createClass, findSound, getMusicGroupStuNoClassType, classGroupUpdate, removeSingleClass, workOut } from "@/api/buildTeam";
|
|
|
+import { getTeacher, getEmployeeOrgan, getMusicGroupClass, createClass, findSound, getMusicGroupStuNoClassType, classGroupUpdate, removeSingleClass, workOut, superFindClassGroups } from "@/api/buildTeam";
|
|
|
import {
|
|
|
getClassAllStudent,
|
|
|
removeStudents,
|
|
@@ -632,10 +638,6 @@ import {
|
|
|
export default {
|
|
|
components: { pagination },
|
|
|
props: {
|
|
|
- teamid: {
|
|
|
- type: String,
|
|
|
- required: true
|
|
|
- },
|
|
|
isSetSalary: {
|
|
|
type: Boolean,
|
|
|
required: true
|
|
@@ -688,7 +690,7 @@ export default {
|
|
|
activeChioseSound: null, // 默认选择的声部
|
|
|
infoVisible: false, // 班级调整弹窗
|
|
|
teacherForm: {
|
|
|
- isAdd: null,
|
|
|
+ isAdd: 'onlyUpdateTeacher',
|
|
|
coreTeacher: "",
|
|
|
assistant: [],
|
|
|
courseType: "",
|
|
@@ -735,7 +737,8 @@ export default {
|
|
|
}, // 排课信息
|
|
|
chioseTab: [], // 记录选中的项
|
|
|
|
|
|
- classCardList: [] // 课表的集合
|
|
|
+ classCardList: [], // 课表的集合
|
|
|
+ teamid: null
|
|
|
};
|
|
|
},
|
|
|
//生命周期 - 创建完成(可以访问当前this实例)
|
|
@@ -772,14 +775,13 @@ export default {
|
|
|
},
|
|
|
methods: {
|
|
|
init () {
|
|
|
- this.isInit = true;
|
|
|
+
|
|
|
this.getList();
|
|
|
},
|
|
|
getList () {
|
|
|
- //
|
|
|
- getMusicGroupClass({ groupType: 'MUSIC', musicGroupId: this.teamid, type: this.searchForm.classType }).then(res => {
|
|
|
+ this.teamid = this.$route.query.id;
|
|
|
+ getMusicGroupClass({ groupType: 'MUSIC', musicGroupId: this.teamid, type: this.searchForm.classType, page: this.rules.page }).then(res => {
|
|
|
if (res.code == 200) {
|
|
|
- this.isInit = false;
|
|
|
this.tableList = res.data.rows;
|
|
|
this.rules.total = res.data.total
|
|
|
}
|
|
@@ -817,7 +819,13 @@ export default {
|
|
|
obj.name = this.newClassForm.className;
|
|
|
obj.type = this.newClassForm.type;
|
|
|
obj.groupType = 'MUSIC'
|
|
|
- obj.subjectIdList = this.newClassForm.subjectIdList.length > 0 ? this.newClassForm.subjectIdList.join(',') : null
|
|
|
+ let subjectIdList;
|
|
|
+ if (this.newClassForm.type == 'HIGH_ONLINE') {
|
|
|
+ subjectIdList = this.newClassForm.subjectIdList
|
|
|
+ } else {
|
|
|
+ subjectIdList = this.newClassForm.subjectIdList.length > 0 ? this.newClassForm.subjectIdList.join(',') : null
|
|
|
+ }
|
|
|
+ obj.subjectIdList = subjectIdList
|
|
|
obj.expectStudentNum = this.newClassForm.expectStudentNum;
|
|
|
obj.teacherMapperList = [];
|
|
|
obj.teacherMapperList.push({ userId: this.newClassForm.bishop, teacherRole: 'BISHOP' })
|
|
@@ -863,18 +871,36 @@ export default {
|
|
|
this.$message.error("至少添加一名学员");
|
|
|
return;
|
|
|
}
|
|
|
- addStudents({
|
|
|
- classGroupId: this.activeClass,
|
|
|
- userIdsStr: arr.join(",")
|
|
|
- }).then(res => {
|
|
|
- if (res.code == 200) {
|
|
|
- this.studentVisible = false;
|
|
|
- this.$message.success("添加成功");
|
|
|
- this.getList();
|
|
|
- }
|
|
|
- });
|
|
|
+ if (this.activeType == 'HIGH_ONLINE') {
|
|
|
+ superFindClassGroups({ classGroupId: this.activeClass }).then(res => {
|
|
|
+ if (res.code == 200) {
|
|
|
+ let maxNum = res.data.rows[0].expectStudentNum;
|
|
|
+ if (arr.length + this.activeListStudent.length > maxNum) {
|
|
|
+ this.$message.error('超过预计招生人数');
|
|
|
+ return;
|
|
|
+
|
|
|
+ } else {
|
|
|
+ addStudents({
|
|
|
+ classGroupId: this.activeClass,
|
|
|
+ userIdsStr: arr.join(",")
|
|
|
+ }).then(res => {
|
|
|
+ if (res.code == 200) {
|
|
|
+ this.studentVisible = false;
|
|
|
+ this.$message.success("添加成功");
|
|
|
+ this.getList();
|
|
|
+ }
|
|
|
+ });
|
|
|
+ }
|
|
|
+ }
|
|
|
+ })
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+ // 在此处做拦截
|
|
|
+
|
|
|
},
|
|
|
temporaryRemoveStudent (item) {
|
|
|
+ console.log(item);
|
|
|
// 列表中删除
|
|
|
for (let i in this.activeListStudent) {
|
|
|
if (this.activeListStudent[i].userId == item.userId) {
|
|
@@ -940,16 +966,6 @@ export default {
|
|
|
},
|
|
|
// 根据声部id 获取学生
|
|
|
searchStudent (val) {
|
|
|
- // 搜索学生
|
|
|
- // 根据声部id 乐团id搜索学生
|
|
|
- // teamSoundStudent({
|
|
|
- // musicGroupId: this.teamid,
|
|
|
- // actualSubjectId: this.activeChioseSound
|
|
|
- // }).then(res => {
|
|
|
- // if (res.code == 200) {
|
|
|
- // this.studentList = res.data;
|
|
|
- // }
|
|
|
- // });
|
|
|
this.getNoClassStudent(this.newClassForm.type, val)
|
|
|
},
|
|
|
createMusiceClass () {
|
|
@@ -968,6 +984,14 @@ export default {
|
|
|
obj.groupType = 'MUSIC'
|
|
|
obj.userIds = userIds;
|
|
|
obj.teacherMapperList = [];
|
|
|
+ obj.expectStudentNum = this.newClassForm.expectStudentNum;
|
|
|
+ let subjectIdList;
|
|
|
+ if (this.newClassForm.type == 'HIGH_ONLINE') {
|
|
|
+ subjectIdList = this.newClassForm.subjectIdList
|
|
|
+ } else {
|
|
|
+ subjectIdList = this.newClassForm.subjectIdList.length > 0 ? this.newClassForm.subjectIdList.join(',') : null
|
|
|
+ }
|
|
|
+ obj.subjectIdList = subjectIdList;
|
|
|
obj.teacherMapperList.push({ userId: this.newClassForm.bishop, teacherRole: 'BISHOP' })
|
|
|
for (let i in this.newClassForm.teaching) {
|
|
|
obj.teacherMapperList.push({ userId: this.newClassForm.teaching[i], teacherRole: 'TEACHING' })
|
|
@@ -1088,6 +1112,8 @@ export default {
|
|
|
}
|
|
|
},
|
|
|
SelectionStudent (val) {
|
|
|
+ // console.log(val);
|
|
|
+ // this.activeListStudent = val;
|
|
|
this.chioseStudent = val;
|
|
|
},
|
|
|
addWeek () {
|
|
@@ -1358,7 +1384,10 @@ export default {
|
|
|
}
|
|
|
}).catch(res => {
|
|
|
// this.tableList = [];
|
|
|
+ console.log('排课来了')
|
|
|
this.classCardList = [];
|
|
|
+ this.resetTime();
|
|
|
+
|
|
|
|
|
|
})
|
|
|
},
|
|
@@ -1388,6 +1417,17 @@ export default {
|
|
|
}
|
|
|
|
|
|
},
|
|
|
+ resetTime () {
|
|
|
+ this.arrangeForm.courseTime = null;
|
|
|
+ this.weekList = [
|
|
|
+ {
|
|
|
+ week: "",
|
|
|
+ startTime: "",
|
|
|
+ endTime: "",
|
|
|
+ id: new Date().getTime()
|
|
|
+ }
|
|
|
+ ]
|
|
|
+ }
|
|
|
},
|
|
|
filters: {
|
|
|
getBishopName (val) {
|
|
@@ -1411,7 +1451,8 @@ export default {
|
|
|
}
|
|
|
}
|
|
|
return num;
|
|
|
- }
|
|
|
+ },
|
|
|
+
|
|
|
|
|
|
},
|
|
|
watch: {
|
|
@@ -1447,6 +1488,27 @@ export default {
|
|
|
}
|
|
|
this.$refs['teacherForm'].resetFields()
|
|
|
}
|
|
|
+ },
|
|
|
+ arrangeVisible (val) {
|
|
|
+ if (!val) {
|
|
|
+ this.arrangeForm = {
|
|
|
+ courseNum: null,
|
|
|
+ classNum: null,
|
|
|
+ courseType: null,
|
|
|
+ courseTime: null,
|
|
|
+ teachMode: null,
|
|
|
+ checked: false,
|
|
|
+ }
|
|
|
+ this.$refs['arrangeForm'].resetFields()
|
|
|
+ this.weekList = [
|
|
|
+ {
|
|
|
+ week: "",
|
|
|
+ startTime: "",
|
|
|
+ endTime: "",
|
|
|
+ id: new Date().getTime()
|
|
|
+ }
|
|
|
+ ]
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
}
|