|
@@ -16,10 +16,7 @@
|
|
|
is-link
|
|
|
@click="show.fenbu = true"
|
|
|
></van-cell> -->
|
|
|
- <van-cell
|
|
|
- title="课程类型"
|
|
|
- :value="activeCourse.name"
|
|
|
- ></van-cell>
|
|
|
+ <van-cell title="课程类型" :value="activeCourse.name"></van-cell>
|
|
|
<!-- <van-cell
|
|
|
title="课程形式"
|
|
|
:value="activeCourse.name"
|
|
@@ -81,12 +78,12 @@
|
|
|
></van-cell>
|
|
|
</van-cell-group>
|
|
|
|
|
|
- <van-cell-group style="margin: 12px 16px;">
|
|
|
+ <van-cell-group style="margin: 12px 16px">
|
|
|
<van-cell v-for="(item, index) in scheduleList" :key="index">
|
|
|
<template #title>
|
|
|
<div class="course-item">
|
|
|
<span>{{ item.type }}</span>
|
|
|
- <span style="margin: 0 16px;">{{ item.weekStr }}</span>
|
|
|
+ <span style="margin: 0 16px">{{ item.weekStr }}</span>
|
|
|
<span>{{ item.startTime }} ~ {{ item.endTime }}</span>
|
|
|
<van-icon
|
|
|
class="clear-icon"
|
|
@@ -99,7 +96,7 @@
|
|
|
</van-cell>
|
|
|
<van-cell>
|
|
|
<template #title>
|
|
|
- <div class="course-item" style="justify-content: center;">
|
|
|
+ <div class="course-item" style="justify-content: center">
|
|
|
<van-button size="small" icon="plus" @click="show.course = true"
|
|
|
>添加课时安排</van-button
|
|
|
>
|
|
@@ -207,7 +204,7 @@ import {
|
|
|
import dayjs from "dayjs";
|
|
|
export default {
|
|
|
name: "classSchedule",
|
|
|
- components: { CourseModal, AddressList, MHeader},
|
|
|
+ components: { CourseModal, AddressList, MHeader },
|
|
|
data() {
|
|
|
return {
|
|
|
activityId: this.$route.query.activityId,
|
|
@@ -241,7 +238,7 @@ export default {
|
|
|
timeTable: [], // 生成的课表
|
|
|
allBranch: [], // 分部
|
|
|
educationalList: [], //乐团主管
|
|
|
- educationalLoading: false
|
|
|
+ educationalLoading: false,
|
|
|
};
|
|
|
},
|
|
|
computed: {
|
|
@@ -253,6 +250,10 @@ export default {
|
|
|
async mounted() {
|
|
|
this.students = this.$store.state.activeStudents;
|
|
|
this.activeCourse = this.$store.state.activeCourse;
|
|
|
+ if (this.activeCourse.name == "乐理课") {
|
|
|
+ this.activeCourse.subjectId = null;
|
|
|
+ this.activeCourse.subjectName = "乐理课";
|
|
|
+ }
|
|
|
// await this.$store.dispatch("setAllBranch");
|
|
|
// this.allBranch = this.$store.state.allBranch;
|
|
|
// if (this.allBranch.length) {
|
|
@@ -299,27 +300,26 @@ export default {
|
|
|
this.scheduleList.splice(index, 1);
|
|
|
},
|
|
|
|
|
|
- async onShowEducational(){ // 显示乐团主管
|
|
|
- this.show.fenbu = true
|
|
|
- if (this.educationalList.length) return
|
|
|
- this.educationalLoading = true
|
|
|
+ async onShowEducational() {
|
|
|
+ // 显示乐团主管
|
|
|
+ this.show.fenbu = true;
|
|
|
+ if (this.educationalList.length) return;
|
|
|
+ this.educationalLoading = true;
|
|
|
try {
|
|
|
- const {data} = await findEducationUsers()
|
|
|
+ const { data } = await findEducationUsers();
|
|
|
// console.log(data)
|
|
|
if (data.code == 200 && data.data && data.data.EDUCATION) {
|
|
|
const EDUCATION = data.data.EDUCATION || [];
|
|
|
- this.educationalList = EDUCATION;
|
|
|
+ this.educationalList = EDUCATION;
|
|
|
} else {
|
|
|
- this.$toast("暂无乐团主管");
|
|
|
+ this.$toast("暂无乐团主管");
|
|
|
}
|
|
|
- } catch (error) {
|
|
|
-
|
|
|
- }
|
|
|
- this.educationalLoading = false
|
|
|
+ } catch (error) {}
|
|
|
+ this.educationalLoading = false;
|
|
|
},
|
|
|
|
|
|
- onSetEducational(val){
|
|
|
- this.educational = val
|
|
|
+ onSetEducational(val) {
|
|
|
+ this.educational = val;
|
|
|
this.show.fenbu = false;
|
|
|
},
|
|
|
|
|
@@ -467,19 +467,15 @@ export default {
|
|
|
// 排课
|
|
|
this.onShowCourseList(false);
|
|
|
if (!this.timeTable.length) return;
|
|
|
- const online = parseInt(this.frequency.online || 0)
|
|
|
- const offline = parseInt(this.frequency.offline || 0)
|
|
|
- const total = online + offline
|
|
|
- let subjectId = this.activeCourse.subjectId;
|
|
|
- if (this.activeCourse.name == "乐理课") {
|
|
|
- subjectId = null;
|
|
|
- }
|
|
|
+ const online = parseInt(this.frequency.online || 0);
|
|
|
+ const offline = parseInt(this.frequency.offline || 0);
|
|
|
+ const total = online + offline;
|
|
|
let params = {
|
|
|
courseSchedules: this.timeTable,
|
|
|
vipGroupApplyBaseInfo: {
|
|
|
vipGroupCategoryId: this.activityId,
|
|
|
- subjectId: subjectId,
|
|
|
- subjectIdList: subjectId,
|
|
|
+ subjectId: this.activeCourse.subjectId,
|
|
|
+ subjectIdList: this.activeCourse.subjectId,
|
|
|
singleClassMinutes: this.activeCourse.courseTime,
|
|
|
totalClassTime: total,
|
|
|
allCourseNum: total,
|
|
@@ -487,7 +483,7 @@ export default {
|
|
|
coursesStart: dayjs(this.formData.time).format("YYYY-MM-DD"),
|
|
|
organId: this.formData.fenbu.id,
|
|
|
studentIdList: this.students.map((n) => n.userId).join(","),
|
|
|
- studentId:this.students.map((n) => n.userId).join(","),
|
|
|
+ studentId: this.students.map((n) => n.userId).join(","),
|
|
|
onlineClassesNum: online,
|
|
|
offlineClassesNum: offline,
|
|
|
userId: this.teacher.id,
|
|
@@ -499,8 +495,8 @@ export default {
|
|
|
}
|
|
|
// console.log(params)
|
|
|
if (this.activityId == 0) {
|
|
|
- params.practiceGroupApplyBaseInfoDto = params.vipGroupApplyBaseInfo
|
|
|
- delete params.vipGroupApplyBaseInfo
|
|
|
+ params.practiceGroupApplyBaseInfoDto = params.vipGroupApplyBaseInfo;
|
|
|
+ delete params.vipGroupApplyBaseInfo;
|
|
|
let res = await createPracticeGroup(params);
|
|
|
if (res.code == 200) {
|
|
|
this.$toast("排课成功");
|
|
@@ -522,7 +518,7 @@ export default {
|
|
|
};
|
|
|
</script>
|
|
|
<style>
|
|
|
-body{
|
|
|
+body {
|
|
|
background: #f3f4f8;
|
|
|
}
|
|
|
</style>
|