|
@@ -109,7 +109,7 @@
|
|
<div>{{ scope.row.totalClassTimes }}</div>
|
|
<div>{{ scope.row.totalClassTimes }}</div>
|
|
</template>
|
|
</template>
|
|
</el-table-column>
|
|
</el-table-column>
|
|
- <el-table-column align="center" width="220px" label="操作">
|
|
|
|
|
|
+ <el-table-column align="center" width="240px" label="操作">
|
|
<template slot-scope="scope">
|
|
<template slot-scope="scope">
|
|
<div>
|
|
<div>
|
|
<!-- v-if="scope.row.type !='MIX'" -->
|
|
<!-- v-if="scope.row.type !='MIX'" -->
|
|
@@ -122,13 +122,20 @@
|
|
>
|
|
>
|
|
<el-button
|
|
<el-button
|
|
type="text"
|
|
type="text"
|
|
|
|
+ @click="resetTeacher(scope.row)"
|
|
|
|
+ v-permission="'classGroup/classGroupUpdate'"
|
|
|
|
+ v-if="scope.row.type != 'MUSIC_NETWORK'"
|
|
|
|
+ >老师调整</el-button
|
|
|
|
+ >
|
|
|
|
+ <el-button
|
|
|
|
+ type="text"
|
|
v-if="
|
|
v-if="
|
|
permission('classGroup/classGroupUpdate') ||
|
|
permission('classGroup/classGroupUpdate') ||
|
|
permission('classGroup/revisionClassGroup') ||
|
|
permission('classGroup/revisionClassGroup') ||
|
|
permission('classGroup/revisionAddClassGroup')
|
|
permission('classGroup/revisionAddClassGroup')
|
|
"
|
|
"
|
|
@click="classAdjustment(scope.row)"
|
|
@click="classAdjustment(scope.row)"
|
|
- >班级调整</el-button
|
|
|
|
|
|
+ >排课</el-button
|
|
>
|
|
>
|
|
<!--<el-button type="text"
|
|
<!--<el-button type="text"
|
|
@click="recourse(scope.row)">重新排课</el-button>-->
|
|
@click="recourse(scope.row)">重新排课</el-button>-->
|
|
@@ -162,7 +169,7 @@
|
|
scope.row.totalClassTimes == '0'
|
|
scope.row.totalClassTimes == '0'
|
|
"
|
|
"
|
|
slot="reference"
|
|
slot="reference"
|
|
- >删除班级</el-button
|
|
|
|
|
|
+ >删除</el-button
|
|
>
|
|
>
|
|
</el-popover>
|
|
</el-popover>
|
|
</div>
|
|
</div>
|
|
@@ -194,9 +201,26 @@
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
+ <el-dialog
|
|
|
|
+ title="老师调整"
|
|
|
|
+ width="750px"
|
|
|
|
+ :visible.sync="teacherVisible"
|
|
|
|
+ destroy-on-close
|
|
|
|
+ >
|
|
|
|
+ <changeTeacher
|
|
|
|
+ v-if="teacherVisible && teacherDetail"
|
|
|
|
+ :classGroupId="activeClass"
|
|
|
|
+ :activeType="activeType"
|
|
|
|
+ :teacherList="teacherList"
|
|
|
|
+ :cooperationList="cooperationList"
|
|
|
|
+ :detail="teacherDetail"
|
|
|
|
+ @submited="teacherSubmited"
|
|
|
|
+ @close="teacherVisible = false"
|
|
|
|
+ />
|
|
|
|
+ </el-dialog>
|
|
<!-- 学员选择 -->
|
|
<!-- 学员选择 -->
|
|
<el-dialog
|
|
<el-dialog
|
|
- title="学员选择"
|
|
|
|
|
|
+ :title="isOnlyChangeUser ? '学员调整' : '新建班级'"
|
|
width="750px"
|
|
width="750px"
|
|
:visible.sync="studentVisible"
|
|
:visible.sync="studentVisible"
|
|
destroy-on-close
|
|
destroy-on-close
|
|
@@ -206,6 +230,8 @@
|
|
:studentList="studentList"
|
|
:studentList="studentList"
|
|
:soundList="activeSoundList"
|
|
:soundList="activeSoundList"
|
|
:classGroupId="activeClass"
|
|
:classGroupId="activeClass"
|
|
|
|
+ :teacherList="teacherList"
|
|
|
|
+ :cooperationList="cooperationList"
|
|
:isOnlyChangeUser="isOnlyChangeUser"
|
|
:isOnlyChangeUser="isOnlyChangeUser"
|
|
:activeType="activeType"
|
|
:activeType="activeType"
|
|
@changeActiveChioseSound="changeActiveChioseSound"
|
|
@changeActiveChioseSound="changeActiveChioseSound"
|
|
@@ -558,11 +584,26 @@ import axios from "axios";
|
|
import { classTimeList, musicClassTypeList } from "@/utils/searchArray";
|
|
import { classTimeList, musicClassTypeList } from "@/utils/searchArray";
|
|
import viewStudentList from "./modals/view-student-list";
|
|
import viewStudentList from "./modals/view-student-list";
|
|
import selectStudent from "./modals/select-student";
|
|
import selectStudent from "./modals/select-student";
|
|
|
|
+import changeTeacher from "./modals/change-teacher";
|
|
import classroomSetting from "./modals/classroom-setting";
|
|
import classroomSetting from "./modals/classroom-setting";
|
|
import studentResetView from "./modals/student-reset-view";
|
|
import studentResetView from "./modals/student-reset-view";
|
|
import qs from "qs";
|
|
import qs from "qs";
|
|
import { permission } from "@/utils/directivePage";
|
|
import { permission } from "@/utils/directivePage";
|
|
import { getCourseType } from "@/utils/utils";
|
|
import { getCourseType } from "@/utils/utils";
|
|
|
|
+
|
|
|
|
+const formatClassGroupTeacherMapperList = (core, ass) => {
|
|
|
|
+ const list = [];
|
|
|
|
+ if (core) {
|
|
|
|
+ list.push({ userId: core, teacherRole: "BISHOP" });
|
|
|
|
+ }
|
|
|
|
+ if (ass) {
|
|
|
|
+ for (const item of ass) {
|
|
|
|
+ list.push({ userId: item, teacherRole: "TEACHING" });
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ return list;
|
|
|
|
+};
|
|
|
|
+
|
|
export default {
|
|
export default {
|
|
props: ["musicGroupInfo"],
|
|
props: ["musicGroupInfo"],
|
|
name: "tresetClass",
|
|
name: "tresetClass",
|
|
@@ -571,9 +612,11 @@ export default {
|
|
selectStudent,
|
|
selectStudent,
|
|
classroomSetting,
|
|
classroomSetting,
|
|
studentResetView,
|
|
studentResetView,
|
|
|
|
+ changeTeacher,
|
|
},
|
|
},
|
|
data() {
|
|
data() {
|
|
return {
|
|
return {
|
|
|
|
+ teacherVisible: false,
|
|
musicGroupInfos: this.musicGroupInfo,
|
|
musicGroupInfos: this.musicGroupInfo,
|
|
classType: 0,
|
|
classType: 0,
|
|
pickerOptions: {
|
|
pickerOptions: {
|
|
@@ -679,6 +722,7 @@ export default {
|
|
courseTime: "",
|
|
courseTime: "",
|
|
courseNum: "",
|
|
courseNum: "",
|
|
},
|
|
},
|
|
|
|
+ teacherDetail: null,
|
|
organId: "",
|
|
organId: "",
|
|
newClassVisible: false,
|
|
newClassVisible: false,
|
|
newClassForm: {
|
|
newClassForm: {
|
|
@@ -767,10 +811,59 @@ export default {
|
|
});
|
|
});
|
|
// 根据分部id和缴费类型获取 可选课程类型
|
|
// 根据分部id和缴费类型获取 可选课程类型
|
|
},
|
|
},
|
|
|
|
+ resetTeacher(row) {
|
|
|
|
+ this.teacherVisible = true
|
|
|
|
+ this.teacherDetail = row
|
|
|
|
+ },
|
|
|
|
+ teacherSubmited(data) {
|
|
|
|
+ const obj = this.getSubmitData(data, {classGroupId: this.teacherDetail?.id, courseAddType: 'onlyUpdateTeacher'})
|
|
|
|
+ classGroupUpdate(obj).then((res) => {
|
|
|
|
+ if (res.code == 200) {
|
|
|
|
+ this.$message.success("修改成功");
|
|
|
|
+ this.teacherVisible = false;
|
|
|
|
+ this.getList();
|
|
|
|
+ }
|
|
|
|
+ });
|
|
|
|
+ },
|
|
|
|
+ getSubmitData(data, more = {}) {
|
|
|
|
+ return [{
|
|
|
|
+ type: this.activeType,
|
|
|
|
+ classGroupName: data?.name,
|
|
|
|
+ musicGroupId: this.teamid,
|
|
|
|
+ classGroupTeacherMapperList: formatClassGroupTeacherMapperList(
|
|
|
|
+ data.coreTeacher,
|
|
|
|
+ data.assistant
|
|
|
|
+ ),
|
|
|
|
+ students: data?.seleched,
|
|
|
|
+ ...more
|
|
|
|
+ }]
|
|
|
|
+ },
|
|
|
|
+ async submitClass(data) {
|
|
|
|
+ const list = this.getSubmitData(data, {onlyCreateClassGroup: true});
|
|
|
|
+ try {
|
|
|
|
+ if (this.classType == 1) {
|
|
|
|
+ // 0新建班级 2 3 4新增班级修改
|
|
|
|
+ await revisionClassGroup(list);
|
|
|
|
+ this.$message.success("提交成功");
|
|
|
|
+ } else if (
|
|
|
|
+ this.classType == 2 ||
|
|
|
|
+ this.classType == 3 ||
|
|
|
|
+ this.classType == 4
|
|
|
|
+ ) {
|
|
|
|
+ await revisionAddClassGroup(list);
|
|
|
|
+ this.$message.success("提交成功");
|
|
|
|
+ }
|
|
|
|
+ this.studentVisible = false
|
|
|
|
+ this.getList()
|
|
|
|
+ } catch (error) {
|
|
|
|
+ console.log(error);
|
|
|
|
+ }
|
|
|
|
+ },
|
|
studentSubmited(data) {
|
|
studentSubmited(data) {
|
|
if (!this.isOnlyChangeUser) {
|
|
if (!this.isOnlyChangeUser) {
|
|
- this.studentSubmitedData = data;
|
|
|
|
- this.infoVisible = true;
|
|
|
|
|
|
+ this.submitClass(data)
|
|
|
|
+ // this.studentSubmitedData = data;
|
|
|
|
+ // this.infoVisible = true;
|
|
} else {
|
|
} else {
|
|
this.getList();
|
|
this.getList();
|
|
}
|
|
}
|