|  | @@ -102,9 +102,9 @@
 | 
	
		
			
				|  |  |            <courseItem
 | 
	
		
			
				|  |  |              :surplustime="surplustime[key]"
 | 
	
		
			
				|  |  |              @setUserTime="setUserTime"
 | 
	
		
			
				|  |  | -             :teacherList="teacherList"
 | 
	
		
			
				|  |  | -             :activeType="activeType"
 | 
	
		
			
				|  |  | -              :cooperationList="cooperationList"
 | 
	
		
			
				|  |  | +            :teacherList="teacherList"
 | 
	
		
			
				|  |  | +            :activeType="activeType"
 | 
	
		
			
				|  |  | +            :cooperationList="cooperationList"
 | 
	
		
			
				|  |  |              :type="key"
 | 
	
		
			
				|  |  |              :form="item"
 | 
	
		
			
				|  |  |              :prices="prices"
 | 
	
	
		
			
				|  | @@ -156,10 +156,10 @@ import {
 | 
	
		
			
				|  |  |  import courseItem from "./classroom-setting-item";
 | 
	
		
			
				|  |  |  import { classTimeList } from "@/utils/searchArray";
 | 
	
		
			
				|  |  |  import MusicStore from "@/views/resetTeaming/store";
 | 
	
		
			
				|  |  | -import { sysConfigList } from '@/api/generalSettings'
 | 
	
		
			
				|  |  | +import { sysConfigList } from "@/api/generalSettings";
 | 
	
		
			
				|  |  |  import { queryByOrganIdAndCourseType } from "@/views/resetTeaming/api";
 | 
	
		
			
				|  |  |  import { isEmpty } from "lodash";
 | 
	
		
			
				|  |  | -import classromePreview from './classroom-preview'
 | 
	
		
			
				|  |  | +import classromePreview from "./classroom-preview";
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |  const classTimeListByType = {};
 | 
	
		
			
				|  |  |  for (const item of classTimeList) {
 | 
	
	
		
			
				|  | @@ -205,7 +205,7 @@ export default {
 | 
	
		
			
				|  |  |    ],
 | 
	
		
			
				|  |  |    components: {
 | 
	
		
			
				|  |  |      courseItem,
 | 
	
		
			
				|  |  | -    'classrome-preview': classromePreview
 | 
	
		
			
				|  |  | +    "classrome-preview": classromePreview,
 | 
	
		
			
				|  |  |    },
 | 
	
		
			
				|  |  |    data() {
 | 
	
		
			
				|  |  |      return {
 | 
	
	
		
			
				|  | @@ -269,15 +269,15 @@ export default {
 | 
	
		
			
				|  |  |      } catch (error) {}
 | 
	
		
			
				|  |  |      this.setCourseTypeListByName();
 | 
	
		
			
				|  |  |      this.formatClasss();
 | 
	
		
			
				|  |  | -    this.FetchHoliday()
 | 
	
		
			
				|  |  | +    this.FetchHoliday();
 | 
	
		
			
				|  |  |    },
 | 
	
		
			
				|  |  |    methods: {
 | 
	
		
			
				|  |  |      async FetchHoliday() {
 | 
	
		
			
				|  |  |        try {
 | 
	
		
			
				|  |  |          const res = await sysConfigList({
 | 
	
		
			
				|  |  | -          group: 'holiday'
 | 
	
		
			
				|  |  | -        })
 | 
	
		
			
				|  |  | -        this.holidays = JSON.parse(res.data[0].paranValue)
 | 
	
		
			
				|  |  | +          group: "holiday",
 | 
	
		
			
				|  |  | +        });
 | 
	
		
			
				|  |  | +        this.holidays = JSON.parse(res.data[0].paranValue);
 | 
	
		
			
				|  |  |        } catch (error) {}
 | 
	
		
			
				|  |  |      },
 | 
	
		
			
				|  |  |      setCourseTypeListByName() {
 | 
	
	
		
			
				|  | @@ -288,9 +288,9 @@ export default {
 | 
	
		
			
				|  |  |        this.courseTypeListByName = courseTypeListByName;
 | 
	
		
			
				|  |  |      },
 | 
	
		
			
				|  |  |      async formatClasss() {
 | 
	
		
			
				|  |  | +      let coreid = "";
 | 
	
		
			
				|  |  | +      const assistant = [];
 | 
	
		
			
				|  |  |        if (this.detail) {
 | 
	
		
			
				|  |  | -        let coreid = "";
 | 
	
		
			
				|  |  | -        const assistant = [];
 | 
	
		
			
				|  |  |          const { classGroupTeacherMapperList } = this.detail;
 | 
	
		
			
				|  |  |          for (const item of classGroupTeacherMapperList || []) {
 | 
	
		
			
				|  |  |            if (item.teacherRole === "BISHOP") {
 | 
	
	
		
			
				|  | @@ -341,6 +341,8 @@ export default {
 | 
	
		
			
				|  |  |              cycle: [
 | 
	
		
			
				|  |  |                {
 | 
	
		
			
				|  |  |                  time: this.selectPrices ? this.selectPrices[key] : undefined,
 | 
	
		
			
				|  |  | +                coreTeacher: coreid,
 | 
	
		
			
				|  |  | +                assistant: assistant,
 | 
	
		
			
				|  |  |                },
 | 
	
		
			
				|  |  |              ],
 | 
	
		
			
				|  |  |            };
 | 
	
	
		
			
				|  | @@ -363,11 +365,13 @@ export default {
 | 
	
		
			
				|  |  |        for (const key in this.musicCourseSettings) {
 | 
	
		
			
				|  |  |          if (Object.hasOwnProperty.call(this.musicCourseSettings, key)) {
 | 
	
		
			
				|  |  |            const allTime = this.musicCourseSettings[key];
 | 
	
		
			
				|  |  | -          const useTime = this.musicSurplus[key]
 | 
	
		
			
				|  |  | +          const useTime = this.musicSurplus[key];
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |            if (useTime > allTime) {
 | 
	
		
			
				|  |  | -            this.$message.error(this.courseTypeListByName[key] + ' 课程时长不足')
 | 
	
		
			
				|  |  | -            return
 | 
	
		
			
				|  |  | +            this.$message.error(
 | 
	
		
			
				|  |  | +              this.courseTypeListByName[key] + " 课程时长不足"
 | 
	
		
			
				|  |  | +            );
 | 
	
		
			
				|  |  | +            return;
 | 
	
		
			
				|  |  |            }
 | 
	
		
			
				|  |  |          }
 | 
	
		
			
				|  |  |        }
 | 
	
	
		
			
				|  | @@ -395,19 +399,19 @@ export default {
 | 
	
		
			
				|  |  |                  students: this.studentSubmitedData?.seleched,
 | 
	
		
			
				|  |  |                  courseTimes: item.cycle.length,
 | 
	
		
			
				|  |  |                  courseTimeDtoList: item.cycle.map((_) => ({
 | 
	
		
			
				|  |  | -                  classGroupTeacherMapperList:this.formatTeacher(_),
 | 
	
		
			
				|  |  | +                  classGroupTeacherMapperList: this.formatTeacher(_),
 | 
	
		
			
				|  |  |                    courseType: key,
 | 
	
		
			
				|  |  |                    dayOfWeek: _.dayOfWeek,
 | 
	
		
			
				|  |  |                    endClassTime: _.endClassTime,
 | 
	
		
			
				|  |  |                    startClassTime: _.startClassTime,
 | 
	
		
			
				|  |  | -                  startDate:_.startDate,
 | 
	
		
			
				|  |  | -                  endDate:_.endDate,
 | 
	
		
			
				|  |  | +                  startDate: _.startDate,
 | 
	
		
			
				|  |  | +                  endDate: _.endDate,
 | 
	
		
			
				|  |  |                    holiday: _.holiday,
 | 
	
		
			
				|  |  | -                  expectCourseNum:_.expectCourseNum
 | 
	
		
			
				|  |  | +                  expectCourseNum: _.expectCourseNum,
 | 
	
		
			
				|  |  |                  })),
 | 
	
		
			
				|  |  | -              }
 | 
	
		
			
				|  |  | -              if (type && typeof type === 'string') {
 | 
	
		
			
				|  |  | -                data[type] = true
 | 
	
		
			
				|  |  | +              };
 | 
	
		
			
				|  |  | +              if (type && typeof type === "string") {
 | 
	
		
			
				|  |  | +                data[type] = true;
 | 
	
		
			
				|  |  |                }
 | 
	
		
			
				|  |  |                list.push(data);
 | 
	
		
			
				|  |  |              }
 | 
	
	
		
			
				|  | @@ -415,11 +419,15 @@ export default {
 | 
	
		
			
				|  |  |            try {
 | 
	
		
			
				|  |  |              if (this.detail) {
 | 
	
		
			
				|  |  |                let result = await classGroupUpdate(list);
 | 
	
		
			
				|  |  | -              this.previewVisible = false
 | 
	
		
			
				|  |  | +              this.previewVisible = false;
 | 
	
		
			
				|  |  |                if (result.code == 207) {
 | 
	
		
			
				|  |  | -                await this.$confirm((result.msg || `当前课程课酬预计为0,是否继续`), "提示", {
 | 
	
		
			
				|  |  | -                  type: "warning",
 | 
	
		
			
				|  |  | -                })
 | 
	
		
			
				|  |  | +                await this.$confirm(
 | 
	
		
			
				|  |  | +                  result.msg || `当前课程课酬预计为0,是否继续`,
 | 
	
		
			
				|  |  | +                  "提示",
 | 
	
		
			
				|  |  | +                  {
 | 
	
		
			
				|  |  | +                    type: "warning",
 | 
	
		
			
				|  |  | +                  }
 | 
	
		
			
				|  |  | +                );
 | 
	
		
			
				|  |  |                  // obj.allowZeroSalary = true;
 | 
	
		
			
				|  |  |                  list.forEach((item) => {
 | 
	
		
			
				|  |  |                    item.allowZeroSalary = true;
 | 
	
	
		
			
				|  | @@ -430,8 +438,8 @@ export default {
 | 
	
		
			
				|  |  |                  return;
 | 
	
		
			
				|  |  |                }
 | 
	
		
			
				|  |  |                if (result.code == 206) {
 | 
	
		
			
				|  |  | -                this.previewVisible = true
 | 
	
		
			
				|  |  | -                this.previewList = result.data
 | 
	
		
			
				|  |  | +                this.previewVisible = true;
 | 
	
		
			
				|  |  | +                this.previewList = result.data;
 | 
	
		
			
				|  |  |                  return;
 | 
	
		
			
				|  |  |                }
 | 
	
		
			
				|  |  |                this.$message.success("排课修改成功");
 | 
	
	
		
			
				|  | @@ -478,36 +486,33 @@ export default {
 | 
	
		
			
				|  |  |        this.collapses = val;
 | 
	
		
			
				|  |  |      },
 | 
	
		
			
				|  |  |      changecoreTeacher(val) {},
 | 
	
		
			
				|  |  | -    updateMusicSurplus() {
 | 
	
		
			
				|  |  | -
 | 
	
		
			
				|  |  | -    },
 | 
	
		
			
				|  |  | +    updateMusicSurplus() {},
 | 
	
		
			
				|  |  |      setUserTime(time, type) {
 | 
	
		
			
				|  |  |        // console.log(time, type)
 | 
	
		
			
				|  |  | -      this.$set(this.musicSurplus, type, (time || 0))
 | 
	
		
			
				|  |  | +      this.$set(this.musicSurplus, type, time || 0);
 | 
	
		
			
				|  |  |        // console.log(this.musicSurplus)
 | 
	
		
			
				|  |  | -       this.$forceUpdate()
 | 
	
		
			
				|  |  | +      this.$forceUpdate();
 | 
	
		
			
				|  |  |        // this.$nextTick(res=>{
 | 
	
		
			
				|  |  |        //   this.musicSurplus[type] = time;
 | 
	
		
			
				|  |  |        //       console.log(this.musicSurplus[type])
 | 
	
		
			
				|  |  |        // })
 | 
	
		
			
				|  |  | -
 | 
	
		
			
				|  |  |      },
 | 
	
		
			
				|  |  | -    formatTeacher(row){
 | 
	
		
			
				|  |  | -      console.log(row)
 | 
	
		
			
				|  |  | -    let arr = []
 | 
	
		
			
				|  |  | -      if(row.coreTeacher){
 | 
	
		
			
				|  |  | -           let obj ={}
 | 
	
		
			
				|  |  | -        obj.teacherRole = 'BISHOP'
 | 
	
		
			
				|  |  | -        obj.userId = row.coreTeacher
 | 
	
		
			
				|  |  | -        arr.push(obj)
 | 
	
		
			
				|  |  | +    formatTeacher(row) {
 | 
	
		
			
				|  |  | +      console.log(row);
 | 
	
		
			
				|  |  | +      let arr = [];
 | 
	
		
			
				|  |  | +      if (row.coreTeacher) {
 | 
	
		
			
				|  |  | +        let obj = {};
 | 
	
		
			
				|  |  | +        obj.teacherRole = "BISHOP";
 | 
	
		
			
				|  |  | +        obj.userId = row.coreTeacher;
 | 
	
		
			
				|  |  | +        arr.push(obj);
 | 
	
		
			
				|  |  |        }
 | 
	
		
			
				|  |  | -      if(row.assistant?.length>0){
 | 
	
		
			
				|  |  | -        row.assistant.forEach(ass=>{
 | 
	
		
			
				|  |  | -          arr.push({teacherRole:'TEACHING',userId:ass})
 | 
	
		
			
				|  |  | -        })
 | 
	
		
			
				|  |  | +      if (row.assistant?.length > 0) {
 | 
	
		
			
				|  |  | +        row.assistant.forEach((ass) => {
 | 
	
		
			
				|  |  | +          arr.push({ teacherRole: "TEACHING", userId: ass });
 | 
	
		
			
				|  |  | +        });
 | 
	
		
			
				|  |  |        }
 | 
	
		
			
				|  |  | -      return arr
 | 
	
		
			
				|  |  | -    }
 | 
	
		
			
				|  |  | +      return arr;
 | 
	
		
			
				|  |  | +    },
 | 
	
		
			
				|  |  |    },
 | 
	
		
			
				|  |  |    // watch:{
 | 
	
		
			
				|  |  |    //   musicSurplus(){
 |