|
@@ -80,10 +80,10 @@
|
|
|
<div>
|
|
|
<!-- v-if="scope.row.type !='MIX'" -->
|
|
|
<el-button type="text"
|
|
|
- @click="resetClass(scope.row)">修改</el-button>
|
|
|
+ @click="resetClass(scope.row)">学员调整</el-button>
|
|
|
<!-- <el-button type="text"
|
|
|
- @click="classAdjustment(scope.row)">班级调整</el-button>
|
|
|
- <el-button type="text"
|
|
|
+ @click="classAdjustment(scope.row)">班级调整</el-button> -->
|
|
|
+ <!--<el-button type="text"
|
|
|
@click="recourse(scope.row)">重新排课</el-button> -->
|
|
|
<el-popover placement="top"
|
|
|
width="160"
|
|
@@ -107,7 +107,7 @@
|
|
|
</el-table>
|
|
|
<div class="floor">
|
|
|
<div class="add"
|
|
|
- @click="temporary">临时调整</div>
|
|
|
+ @click="temporary">新建临时班</div>
|
|
|
<div class='add'
|
|
|
@click="addNewClass('NORMAL')">新建单技班</div>
|
|
|
<div class='add'
|
|
@@ -117,6 +117,7 @@
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
+ <!-- 学员选择 -->
|
|
|
<el-dialog title="学员选择"
|
|
|
width="700px"
|
|
|
:visible.sync="studentVisible"
|
|
@@ -346,7 +347,7 @@
|
|
|
<el-time-select placeholder=""
|
|
|
v-model="item.startClassTime"
|
|
|
:picker-options="{
|
|
|
- start: '08:30',
|
|
|
+ start: '04:30',
|
|
|
step: '00:05',
|
|
|
end: '23:55'
|
|
|
}">
|
|
@@ -355,7 +356,7 @@
|
|
|
<el-time-select placeholder=""
|
|
|
v-model="item.endClassTime"
|
|
|
:picker-options="{
|
|
|
- start: '08:30',
|
|
|
+ start: '04:30',
|
|
|
step: '00:05',
|
|
|
end: '23:55',
|
|
|
minTime:item.startClassTime
|
|
@@ -454,7 +455,7 @@
|
|
|
</div>
|
|
|
</el-dialog>
|
|
|
<!-- 班级调整 -->
|
|
|
- <el-dialog title="班级调整"
|
|
|
+ <!-- <el-dialog title="班级调整"
|
|
|
width="500px"
|
|
|
:visible.sync="resetClassVisible"
|
|
|
:modal-append-to-body="false">
|
|
@@ -504,13 +505,12 @@
|
|
|
<div slot="footer"
|
|
|
class="dialog-footer">
|
|
|
<el-button @click="resetClassVisible = false">取 消</el-button>
|
|
|
- <!-- 班级学员修改 -->
|
|
|
<el-button type="primary"
|
|
|
@click="">确 定</el-button>
|
|
|
</div>
|
|
|
- </el-dialog>
|
|
|
+ </el-dialog> -->
|
|
|
<!-- 重新排课 -->
|
|
|
- <el-dialog title="重新排课"
|
|
|
+ <!-- <el-dialog title="重新排课"
|
|
|
width="700px"
|
|
|
:visible.sync="resetCourseVisible"
|
|
|
:modal-append-to-body="false">
|
|
@@ -585,11 +585,10 @@
|
|
|
<div slot="footer"
|
|
|
class="dialog-footer">
|
|
|
<el-button @click="resetCourseVisible = false">取 消</el-button>
|
|
|
- <!-- 班级学员修改 -->
|
|
|
<el-button type="primary"
|
|
|
@click="">确 定</el-button>
|
|
|
</div>
|
|
|
- </el-dialog>
|
|
|
+ </el-dialog> -->
|
|
|
</div>
|
|
|
</template>
|
|
|
<script>
|
|
@@ -648,13 +647,6 @@ export default {
|
|
|
}],
|
|
|
teacherList: [], // 存储的老师列表
|
|
|
courseTypeList: [
|
|
|
- { value: 'SINGLE', label: '单技课' },
|
|
|
- { value: 'MIX', label: '合奏课' },
|
|
|
- { value: 'TRAINING_SINGLE', label: '集训单技课' },
|
|
|
- { value: 'TRAINING_MIX', label: '集训合奏课' },
|
|
|
- { value: 'HIGH', label: '基础技能课' },
|
|
|
- { value: 'COMPREHENSIVE', label: '综合课' },
|
|
|
- { value: 'CLASSROOM', label: '课堂课' },
|
|
|
],
|
|
|
weekDateList: [
|
|
|
{ value: '1', label: '星期一' },
|
|
@@ -789,11 +781,61 @@ export default {
|
|
|
this.isSearch = true;
|
|
|
this.className = '';
|
|
|
this.isTemporary = true;
|
|
|
-
|
|
|
+ this.setType('SNAP');
|
|
|
+ this.getNoClassStudent('SNAP')
|
|
|
+ },
|
|
|
+ setType (type) {
|
|
|
+ switch (type) {
|
|
|
+ case 'NORMAL': {
|
|
|
+ this.courseTypeList = [
|
|
|
+ { value: 'SINGLE', label: '单技课' },
|
|
|
+ { value: 'TRAINING_SINGLE', label: '集训单技课' },
|
|
|
+ { value: 'COMPREHENSIVE', label: '综合课' },
|
|
|
+ { value: 'CLASSROOM', label: '课堂课' },
|
|
|
+ ]
|
|
|
+ break;
|
|
|
+ }
|
|
|
+ case 'MIX': {
|
|
|
+ this.courseTypeList = [
|
|
|
+ { value: 'MIX', label: '合奏课' },
|
|
|
+ { value: 'TRAINING_MIX', label: '集训合奏课' },
|
|
|
+ { value: 'COMPREHENSIVE', label: '综合课' },
|
|
|
+ { value: 'CLASSROOM', label: '课堂课' },
|
|
|
+ ]
|
|
|
+ break;
|
|
|
+ }
|
|
|
+ case 'HIGH': {
|
|
|
+ this.courseTypeList = [
|
|
|
+ { value: 'SINGLE', label: '单技课' },
|
|
|
+ { value: 'TRAINING_SINGLE', label: '集训单技课' },
|
|
|
+ { value: 'HIGH', label: '基础技能课' },
|
|
|
+ { value: 'COMPREHENSIVE', label: '综合课' },
|
|
|
+ { value: 'CLASSROOM', label: '课堂课' },
|
|
|
+ ]
|
|
|
+ break;
|
|
|
+ }
|
|
|
+ case 'SNAP': {
|
|
|
+ this.courseTypeList = [
|
|
|
+ { value: 'SINGLE', label: '单技课' },
|
|
|
+ { value: 'MIX', label: '合奏课' },
|
|
|
+ { value: 'TRAINING_SINGLE', label: '集训单技课' },
|
|
|
+ { value: 'TRAINING_MIX', label: '集训合奏课' },
|
|
|
+ { value: 'HIGH', label: '基础技能课' },
|
|
|
+ { value: 'COMPREHENSIVE', label: '综合课' },
|
|
|
+ { value: 'CLASSROOM', label: '课堂课' },
|
|
|
+ ]
|
|
|
+ }
|
|
|
+ }
|
|
|
},
|
|
|
-
|
|
|
// 新增班级
|
|
|
addNewClass (type) {
|
|
|
+ /**
|
|
|
+ * { value: 'NORMAL', label: '单技班' },
|
|
|
+ { value: 'MIX', label: '合奏班' },
|
|
|
+ { value: 'HIGH', label: '基础技能班' },
|
|
|
+ { value: 'SNAP', label: '临时班' },
|
|
|
+ */
|
|
|
+ this.setType(type);
|
|
|
this.activeType = type;
|
|
|
this.activeClass = '';
|
|
|
this.activeListStudent = [];
|
|
@@ -861,7 +903,8 @@ export default {
|
|
|
this.studentVisible = true;
|
|
|
this.activeClass = row.id
|
|
|
this.isSearch = false;
|
|
|
- console.log(row);
|
|
|
+ this.activeType = row.type;
|
|
|
+ // console.log(row);
|
|
|
// 根据单机班id 查询单技班内的所有学生
|
|
|
getClassAllStudent({ classGroupId: row.id }).then(res => {
|
|
|
if (res.code == 200) {
|
|
@@ -876,16 +919,16 @@ export default {
|
|
|
},
|
|
|
// 班级调整
|
|
|
classAdjustment (row) {
|
|
|
- this.resetClassForm.assistant = [];
|
|
|
+ this.teacherForm.assistant = [];
|
|
|
for (let i in row.classGroupTeacherMapperList) {
|
|
|
if (row.classGroupTeacherMapperList[i].teacherRole == 'BISHOP') {
|
|
|
- this.resetClassForm.coreTeacher = row.classGroupTeacherMapperList[i].userId;
|
|
|
+ this.teacherForm.coreTeacher = row.classGroupTeacherMapperList[i].userId;
|
|
|
}
|
|
|
if (row.classGroupTeacherMapperList[i].teacherRole == 'TEACHING') {
|
|
|
- this.resetClassForm.assistant.push(row.classGroupTeacherMapperList[i].userId)
|
|
|
+ this.teacherForm.assistant.push(row.classGroupTeacherMapperList[i].userId)
|
|
|
}
|
|
|
}
|
|
|
- this.resetClassVisible = true;
|
|
|
+ this.infoVisible = true;
|
|
|
},
|
|
|
getNoClassStudent (type) {
|
|
|
// 获取乐团内所有未分班的学生
|
|
@@ -902,19 +945,39 @@ export default {
|
|
|
// }
|
|
|
// })
|
|
|
// }
|
|
|
+ // res.data - activeListStudent
|
|
|
getMusicGroupStuNoClassType({ musicGroupId: this.teamid, type }).then(res => {
|
|
|
if (res.code == 200) {
|
|
|
- this.studentList = res.data
|
|
|
+ // this.studentList = res.data.concat(this.activeListStudent).filter(item=>{
|
|
|
+ // return res.data
|
|
|
+ // });
|
|
|
+ if (this.activeType == 'SNAP') {
|
|
|
+ let idarr1 = [];
|
|
|
+ let idarr2 = [];
|
|
|
+ let arr3 = res.data.concat(this.activeListStudent);
|
|
|
+ for (let i in res.data) {
|
|
|
+ idarr1.push(res.data[i].userId);
|
|
|
+ }
|
|
|
+ for (let j in this.activeListStudent) {
|
|
|
+ idarr2.push(this.activeListStudent[j].userId);
|
|
|
+ }
|
|
|
+ this.studentList = arr3.filter(item => {
|
|
|
+ return idarr1.indexOf(item.userId) === -1 || (idarr2.indexOf(item.userId) === -1)
|
|
|
+ })
|
|
|
+ } else {
|
|
|
+ this.studentList = res.data;
|
|
|
+ }
|
|
|
+
|
|
|
}
|
|
|
})
|
|
|
|
|
|
},
|
|
|
// 删除学生 调整
|
|
|
removeStudent (item) {
|
|
|
- // console.log(item.userId);
|
|
|
// removeStudents({ classGroupId:}).then(res => {
|
|
|
removeStudents({ classGroupId: this.activeClass, userId: item.userId }).then(res => {
|
|
|
if (res.code == 200) {
|
|
|
+ this.$message.success('删除成功');
|
|
|
item.isVisible = false;
|
|
|
// 这里刷新 this.studentList this.activeListStudent
|
|
|
this.getList(this.activeMixClass);
|
|
@@ -923,16 +986,16 @@ export default {
|
|
|
this.activeListStudent = res.data;
|
|
|
}
|
|
|
})
|
|
|
- getNoClassStudentAll({ musicGroupId: this.teamid }).then(res => {
|
|
|
- if (res.code == 200) {
|
|
|
- this.$message.success('删除成功');
|
|
|
- this.studentList = res.data.map(item => {
|
|
|
- item.isVisible = false;
|
|
|
- return item;
|
|
|
- });
|
|
|
-
|
|
|
- }
|
|
|
- })
|
|
|
+ this.getNoClassStudent(this.activeType);
|
|
|
+ // getNoClassStudentAll({ musicGroupId: this.teamid }).then(res => {
|
|
|
+ // if (res.code == 200) {
|
|
|
+ // this.$message.success('删除成功');
|
|
|
+ // this.studentList = res.data.map(item => {
|
|
|
+ // item.isVisible = false;
|
|
|
+ // return item;
|
|
|
+ // });
|
|
|
+ // }
|
|
|
+ // })
|
|
|
}
|
|
|
})
|
|
|
},
|
|
@@ -942,9 +1005,15 @@ export default {
|
|
|
let arr = this.chioseStudent.map(item => {
|
|
|
return item.userId;
|
|
|
});
|
|
|
+ if (arr.length <= 0) {
|
|
|
+ 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()
|
|
|
}
|
|
|
})
|
|
|
},
|