|
@@ -65,7 +65,7 @@
|
|
|
</div>
|
|
|
</template>
|
|
|
<script>
|
|
|
-import { getMusicCourseSettingsWithStudents } from '@/api/buildTeam'
|
|
|
+import { getMusicCourseSettingsWithStudents, classGroupUpdate } from '@/api/buildTeam'
|
|
|
import courseItem from "./classroom-setting-item";
|
|
|
export default {
|
|
|
props: ["teacherList", "activeType", "courseTypeList", 'cooperationList', 'musicGroupId', 'detail'],
|
|
@@ -92,6 +92,7 @@ export default {
|
|
|
this.form.classs = classs
|
|
|
},
|
|
|
async mounted() {
|
|
|
+ console.log(this.detail)
|
|
|
try {
|
|
|
await getMusicCourseSettingsWithStudents({
|
|
|
musicGroupId: this.musicGroupId,
|
|
@@ -101,17 +102,19 @@ export default {
|
|
|
},
|
|
|
methods: {
|
|
|
submit() {
|
|
|
- this.$refs.form.validate(valid => {
|
|
|
+ this.$refs.form.validate(async valid => {
|
|
|
if (valid) {
|
|
|
console.log({...this.form})
|
|
|
const list = []
|
|
|
-
|
|
|
for (const key in this.form.classs) {
|
|
|
if (this.form.classs.hasOwnProperty(key)) {
|
|
|
const item = this.form.classs[key];
|
|
|
list.push({
|
|
|
type: key,
|
|
|
+ classGroupId: this.detail?.id,
|
|
|
startDate: item.courseTime,
|
|
|
+ coreTeacher: this.form.coreTeacher,
|
|
|
+ assistant: this.form.assistant,
|
|
|
courseTimeDtoList: item.cycle.map(_ => ({
|
|
|
courseType: key,
|
|
|
dayOfWeek: _.dayOfWeek,
|
|
@@ -121,6 +124,10 @@ export default {
|
|
|
})
|
|
|
}
|
|
|
}
|
|
|
+ try {
|
|
|
+ await classGroupUpdate(list)
|
|
|
+ tthis.$message.success('排课成功')
|
|
|
+ } catch (error) {}
|
|
|
}
|
|
|
})
|
|
|
},
|