1 |
- (window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["CourseApply"],{"1e5c":function(t,e,n){"use strict";var r=n("bfa0"),a=n.n(r);a.a},"6e6e":function(t,e,n){"use strict";var r=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"mheader"},[n("header",{staticClass:"m-nav-header",class:[t.isFixed?"fixed":""]},[n("div",{directives:[{name:"show",rawName:"v-show",value:t.isBack,expression:"isBack"}],staticClass:"m-nav-bar__left",on:{click:t.goBack}},[n("van-icon",{staticClass:"arrow-left",attrs:{name:"arrow-left"}})],1),n("div",{staticClass:"m-nav-bar__title"},[t._t("default",[t._v(t._s(t.name?t.name:this.$route.meta.descrition))])],2),n("div",{staticClass:"m-nav-bar__right"},[t._t("right")],2)])])},a=[],s={name:"mheader",props:{name:String,isBack:{type:Boolean,default:!0},isFixed:{type:Boolean,default:!0},backUrl:{type:Object,default:function(){return{callBack:null,path:"",params:{}}}}},methods:{goBack:function(){var t=this.backUrl;"function"==typeof t.callBack?t.callBack():t.path?this.$router.push({path:t.path,query:t.params}):history.go(-1)}}},u=s,i=(n("d133"),n("2877")),o=Object(i["a"])(u,r,a,!1,null,"0e835508",null);e["a"]=o.exports},"9afb":function(t,e,n){"use strict";n.d(e,"F",function(){return i}),n.d(e,"O",function(){return o}),n.d(e,"H",function(){return c}),n.d(e,"V",function(){return d}),n.d(e,"k",function(){return l}),n.d(e,"ab",function(){return m}),n.d(e,"i",function(){return h}),n.d(e,"m",function(){return f}),n.d(e,"P",function(){return g}),n.d(e,"Q",function(){return v}),n.d(e,"R",function(){return b}),n.d(e,"h",function(){return S}),n.d(e,"Y",function(){return T}),n.d(e,"Z",function(){return y}),n.d(e,"N",function(){return C}),n.d(e,"A",function(){return k}),n.d(e,"c",function(){return L}),n.d(e,"q",function(){return w}),n.d(e,"p",function(){return x}),n.d(e,"e",function(){return D}),n.d(e,"g",function(){return N}),n.d(e,"S",function(){return I}),n.d(e,"T",function(){return F}),n.d(e,"I",function(){return j}),n.d(e,"L",function(){return P}),n.d(e,"v",function(){return $}),n.d(e,"X",function(){return M}),n.d(e,"n",function(){return p}),n.d(e,"s",function(){return _}),n.d(e,"y",function(){return G}),n.d(e,"a",function(){return A}),n.d(e,"U",function(){return R}),n.d(e,"l",function(){return q}),n.d(e,"x",function(){return B}),n.d(e,"t",function(){return z}),n.d(e,"b",function(){return O}),n.d(e,"o",function(){return V}),n.d(e,"f",function(){return W}),n.d(e,"W",function(){return H}),n.d(e,"w",function(){return E}),n.d(e,"d",function(){return J}),n.d(e,"J",function(){return U}),n.d(e,"z",function(){return Q}),n.d(e,"bb",function(){return X}),n.d(e,"cb",function(){return Z}),n.d(e,"j",function(){return tt}),n.d(e,"E",function(){return K}),n.d(e,"C",function(){return et}),n.d(e,"B",function(){return nt}),n.d(e,"r",function(){return rt}),n.d(e,"M",function(){return at}),n.d(e,"G",function(){return st}),n.d(e,"D",function(){return it}),n.d(e,"u",function(){return ut}),n.d(e,"K",function(){return Y});var r=n("4328"),a=n.n(r),s=n("981f").default,u="/api-teacher",i=function(t){return s({url:u+"/snaker/task/queryMyCreatedList",method:"get",params:t})},o=function(t){return s({url:u+"/snaker/task/queryWaitList",method:"get",params:t})},c=function(t){return s({url:u+"/snaker/task/queryProcessedList",method:"get",params:t})},l=function(t){return s({url:u+"/subject/findTeacherSubjets",method:"get",params:t})},d=function(t){return s({url:u+"/subject/findSubSubjects",method:"get",params:t})},m=function(t){return s({url:u+"/vipGroupCategory/queryAll",method:"get",params:t})},h=function(t){return s({url:u+"/vipGroupActivity/findByVipGroupCategory",method:"get",params:t})},f=function(t){return s({url:u+"/school/findVipSchoolByTeacher",method:"get",params:t})},p=function(t){return s({url:u+"/school/findVipSchoolByTeacher2",method:"get",params:t})},g=function(t){return s({url:u+"/school/add",method:"post",data:a.a.stringify(t)})},v=function(t){return s({url:u+"/school/del",method:"post",data:a.a.stringify(t)})},b=function(t){return s({url:u+"/school/update",method:"post",data:a.a.stringify(t)})},S=function(t){return s({url:u+"/teacherDefaultVipGroupSalary/findByTeacherAndCategory",method:"get",params:t})},T=function(t){return s({url:u+"/teacherVipGroup/vipGroupApply",method:"post",data:t})},y=function(t){return s({url:u+"/teacherVipGroup/vipGroupApplyForDouble11",method:"post",data:t})},C=function(t){return s({url:u+"/teacherLeaveRecord/queryVipCourseScheduleList",method:"get",params:t})},k=function(t){return s({url:u+"/leaveCategory/queryPage",method:"post",data:t})},L=function(t){return s({url:u+"/teacherLeaveRecord/askForLeave",method:"post",data:a.a.stringify(t)})},w=function(t){return s({url:u+"/teacherCourseSchedule/getCourseSchedulesWithDate",method:"get",params:t})},x=function(t){return s({url:u+"/teacherCourseSchedule/getCourseScheduleDateByMonth",method:"get",params:t})},D=function(t){return s({url:u+"/teacherCourseSchedule/classStartDateAdjust",method:"post",data:a.a.stringify(t)})},N=function(t){return s({url:u+"/teacherCourseSchedule/courseSwap",method:"post",data:a.a.stringify(t)})},I=function(t){return s({url:u+"/teacherCourseSchedule/statisticsInfo",method:"get",params:t})},F=function(t){return s({url:u+"/teacherCourseSchedule/statisticsList",method:"get",params:t})},j=function(t){return s({url:u+"/teacher/queryStudentApply",method:"get",params:t})},P=function(t){return s({url:u+"/teacher/querySubByMusicGroupId",method:"get",params:t})},$=function(t){return s({url:u+"/teacher/getRegisterOrPreList",method:"get",params:t})},M=function(t){return s({url:u+"/studentRegistration/updateSubject",method:"post",data:a.a.stringify(t)})},_=function(){return s({url:"/api-student/studentOrder/getLuckStatis",method:"get"})},G=function(){return s({url:"/api-web/api/practiceSum",method:"get"})},A=function(t){return s({url:"/api-teacher/classGroup/addStudyReport ",method:"post",data:t})},O=function(t){return s({url:"/api-teacher/studyReport/addStudyReport",method:"post",data:t})},R=function(t){return s({url:"/api-teacher/studyReport/info",method:"get",params:t})},B=function(t){return s({url:"/api-teacher/studyReport/getReviewsInfo",method:"get",params:t})},q=function(t){return s({url:"/api-teacher/classGroup/findTeacherClassGroupInfo",method:"get",params:t})},z=function(t){return s({url:"/api-teacher/studyReport/getNeedPost",method:"get",params:t})},V=function(t){return s({url:"/api-teacher/courseReview/getCourseInfoHead",method:"get",params:t})},W=function(t){return s({url:"/api-teacher/courseReview/add",method:"post",data:a.a.stringify(t)})},H=function(t){return s({url:"/api-teacher/courseReview/updateReviewInfo",method:"post",data:a.a.stringify(t)})},E=function(t){return s({url:"/api-teacher/courseReview/getReviewInfo",method:"get",params:t})},J=function(t){return s({url:"/api-teacher/teacherCourseHomeworkReply/checkeIsAssignHomework",method:"get",params:t})},U=function(t){return s({url:"/api-teacher/teacherVipGroup/queryStudentsWithTeacher",method:"get",params:t})},Y=function(t){return s({url:"/api-teacher/teacherVipGroup/queryStudentsWithTeacherByOrganId",method:"get",params:t})},K=function(t){return s({url:"/api-teacher/teacherVipGroup/queryDouble11Students",method:"get",params:t})},Q=function(t){return s({url:"/api-teacher/visit/queryPage",method:"get",params:t})},X=function(t){return s({url:"/api-teacher/visit/add",method:"post",data:a.a.stringify(t)})},Z=function(t){return s({url:"/api-teacher/visit/getInfo",method:"get",params:t})},tt=function(t){return s({url:"/api-teacher/teacher/findEducationUsers",method:"get",params:t})},et=function(t){return s({url:"/api-cms/news/query",method:"get",params:t})},nt=function(t){return s({url:"/api-cms/news/list",method:"get",params:t})},rt=function(t){return s({url:"/api-teacher/classGroup/getCourseStudents",method:"get",params:t})},at=function(t){return s({url:"/api-auth/user/queryUserById/"+t.userId,method:"get"})},st=function(t){return s({url:"/api-teacher/teacherPracticeGroup/queryPracticeGroupSellPrice",method:"get",params:t})},ut=function(t){return s({url:"/api-teacher/teacherPracticeGroup/getPracticeGroupCostCount",method:"get",params:t})},it=function(t){return s({url:u+"/teacherPracticeGroup/practiceGroupApply",method:"post",data:t})}},a9c0:function(t,e,n){"use strict";n.r(e);for(var r=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"courseApply"},[t.statusList.headerStatus?n("m-header"):t._e(),n("van-cell-group",[n("van-field",{attrs:{label:"课程班名称","input-align":"right",size:"large",placeholder:"请输入班级名称"},model:{value:t.form.name,callback:function(e){t.$set(t.form,"name",e)},expression:"form.name"}}),n("van-field",{attrs:{label:"科目名称",readonly:!0,"input-align":"right","is-link":"",size:"large",placeholder:"请选择"},on:{click:function(e){return t.onGetSheetList("subjectList")}},model:{value:t.formName.subjectListName,callback:function(e){t.$set(t.formName,"subjectListName",e)},expression:"formName.subjectListName"}})],1),n("van-cell-group",[n("van-field",{attrs:{label:"每班人数",readonly:!0,"input-align":"right",size:"large","is-link":"",placeholder:"每班预计招收人数"},on:{click:function(e){t.statusList.studentNumStatus=!0}},model:{value:t.form.studentNum,callback:function(e){t.$set(t.form,"studentNum",e)},expression:"form.studentNum"}}),n("van-field",{attrs:{label:"每课时长",readonly:!0,"input-align":"right","is-link":"",size:"large",placeholder:"请输入每课时长"},on:{click:t.onClickSingleClass},model:{value:t.form.singleClassMinutes,callback:function(e){t.$set(t.form,"singleClassMinutes",e)},expression:"form.singleClassMinutes"}})],1),n("van-cell-group",[n("van-field",{attrs:{label:"排课数量","input-align":"right",size:"large",placeholder:"请输入排课数量",type:"digit"},on:{input:t.onCourseChange},model:{value:t.form.courseCount,callback:function(e){t.$set(t.form,"courseCount",e)},expression:"form.courseCount"}}),n("van-field",{attrs:{label:"排课开始时间",readonly:!0,"input-align":"right","is-link":"",size:"large",placeholder:"请选择"},on:{click:function(e){t.dataForm.status=!0}},model:{value:t.formName.courseStart,callback:function(e){t.$set(t.formName,"courseStart",e)},expression:"formName.courseStart"}}),t._l(t.scheduleList,function(e,r){return n("van-cell",{key:r,attrs:{"title-class":"title-time"}},[n("template",{slot:"title"},[n("span",{staticClass:"week"},[t._v(t._s(e.weekStr))]),n("span",{staticClass:"timer"},[t._v(t._s(e.startTime+"-"+e.endTime))])]),n("template",{slot:"default"},[n("van-button",{attrs:{type:"warning",round:"",size:"small",plain:""},on:{click:function(n){return t.onScheduleRemove(e)}}},[t._v("删除")])],1)],2)}),n("div",{staticClass:"add-plan van-cell",on:{click:t.onCourseShedule}},[n("p",[n("van-icon",{attrs:{name:"add-o"}}),t._v("请设置循环周期/每周")],1)]),t.scheduleList.length>0?n("van-field",{attrs:{label:"排课列表",disabled:"","input-align":"right","is-link":"",size:"large"},on:{click:t.onShowTimeTable}}):t._e()],2),n("van-cell-group",[n("van-field",{attrs:{label:"预计消耗课时",disabled:"","input-align":"right",size:"large",placeholder:"预计消耗课时"},model:{value:t.consumePeriodText,callback:function(e){t.consumePeriodText=e},expression:"consumePeriodText"}}),n("van-field",{attrs:{label:"剩余可用课时","input-align":"right",disabled:"",size:"large",placeholder:"剩余可用课时"},model:{value:t.usePeriodText,callback:function(e){t.usePeriodText=e},expression:"usePeriodText"}})],1),n("div",{staticClass:"button-group"},[n("van-button",{attrs:{type:"primary",round:"",size:"large"},on:{click:t.onSubmit}},[t._v("确认")])],1),n("van-action-sheet",{attrs:{round:!1,actions:t.loadData.studentNumList,"cancel-text":"取消"},on:{cancel:function(e){t.statusList.studentNumStatus=!1},select:t.onStudentSelect},model:{value:t.statusList.studentNumStatus,callback:function(e){t.$set(t.statusList,"studentNumStatus",e)},expression:"statusList.studentNumStatus"}}),n("van-popup",{attrs:{position:"bottom"},model:{value:t.statusList.classTimerStatus,callback:function(e){t.$set(t.statusList,"classTimerStatus",e)},expression:"statusList.classTimerStatus"}},[n("van-picker",{attrs:{columns:t.loadData.classTimer,"show-toolbar":""},on:{cancel:function(e){t.statusList.classTimerStatus=!1},confirm:t.onClassTimerSelect}})],1),n("van-popup",{attrs:{position:"bottom"},model:{value:t.sheetForm.sheetStatus,callback:function(e){t.$set(t.sheetForm,"sheetStatus",e)},expression:"sheetForm.sheetStatus"}},[n("van-picker",{attrs:{loading:t.sheetForm.loading,"default-index":t.sheetForm.index,columns:t.sheetForm.columns,"show-toolbar":""},on:{cancel:function(e){t.sheetForm.sheetStatus=!1},confirm:t.onSheetConfirm}})],1),n("van-popup",{attrs:{position:"bottom"},model:{value:t.dataForm.status,callback:function(e){t.$set(t.dataForm,"status",e)},expression:"dataForm.status"}},[n("van-datetime-picker",{attrs:{type:"date","min-date":t.dataForm.minDate,"max-date":t.dataForm.maxDate,formatter:t.formatter},on:{cancel:function(e){t.dataForm.status=!1},confirm:t.onCurrentConfirm},model:{value:t.dataForm.currentDate,callback:function(e){t.$set(t.dataForm,"currentDate",e)},expression:"dataForm.currentDate"}})],1),n("van-popup",{attrs:{position:"bottom"},model:{value:t.courseForm.teachingStatus,callback:function(e){t.$set(t.courseForm,"teachingStatus",e)},expression:"courseForm.teachingStatus"}},[n("van-picker",{attrs:{columns:t.courseForm.columns,"show-toolbar":""},on:{cancel:function(e){t.courseForm.teachingStatus=!1},confirm:t.onTeachinConfirm}})],1),n("van-popup",{attrs:{position:"bottom"},model:{value:t.statusList.classTime,callback:function(e){t.$set(t.statusList,"classTime",e)},expression:"statusList.classTime"}},[n("van-row",[n("van-col",{attrs:{span:"24"}},[t._v("上课时间")])],1),n("div",{staticClass:"tableContainer"},t._l(t.timeTable,function(e,r){return n("van-row",{key:r},[n("van-col",{attrs:{span:"24"}},[t._v("\n "+t._s(e.classDate)+" "+t._s(e.startClassTimeStr)+" "+t._s(t.getWeekStr(new Date(e.classDate).getDay()))+"\n ")])],1)}),1)],1)],1)},a=[],s=n("6e6e"),u=n("ff51"),i=n("9afb"),o=n("b562"),c=[],l=0;l<60;l++){var d=l<10?"0"+l:l;c.push(d+"分")}var m={name:"courseApply",components:{MHeader:s["a"]},data:function(){var t=localStorage.getItem("courseApply");return t=t?JSON.parse(t):null,localStorage.removeItem("courseApply"),{dataForm:{status:!1,minDate:new Date,maxDate:new Date(2025,10,1),currentDate:new Date},statusList:{classTime:!1,headerStatus:!0,studentNumStatus:!1,classTimerStatus:!1,agreeStatus:!1},loadData:{subjectList:[],subjectListSelect:[],classTimer:[{values:[15,30,45,60,75,90,105,120],className:"classTimer"}],studentNumList:[{name:1,subname:"(人)"}]},sheetForm:{currentType:null,sheetStatus:!1,loading:!0,index:0,columns:[]},courseForm:{teachingStatus:!1,columns:[{values:["周一","周二","周三","周四","周五","周六","周日"],className:"week"},{values:[1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23],className:"hours",defaultIndex:7},{values:c,className:"minutes"}]},form:t?t.form:{name:null,subjectIdList:null,studentNum:null,singleClassMinutes:null,courseCount:null,courseStart:null},formName:t?t.formName:{subjectListName:null,subjectListIndex:0,courseStart:null},scheduleList:t?t.scheduleList:[],timeTable:[],onSubmitStatus:!0,consumePeriod:t?t.consumePeriod:0,consumePeriodText:t?t.consumePeriodText:"0分钟",usePeriod:0,usePeriodText:"0分钟"}},mounted:function(){var t=this,e=this.$route.query;e.Authorization&&(localStorage.setItem("Authorization",decodeURI(e.Authorization)),localStorage.setItem("userInfo",decodeURI(e.Authorization))),document.title="课程创建",(Object(u["b"])().android||Object(u["b"])().iPhone)&&(this.statusList.headerStatus=!1),Object(o["o"])().then(function(e){var n=e.data;if(200==n.code){var r=n.data;r&&(t.usePeriod=r.availableMinutes?r.availableMinutes:0,t.usePeriodText=Object(u["c"])(t.usePeriod))}else t.$toast(n.msg)})},methods:{onGetSheetList:function(t){var e=this.sheetForm;e.sheetStatus=!0,e.loading=!0,e.currentType=t,e.index=0;var n=this.loadData[t];n.length>0?(e.columns=n,e.index=this.formName[t+"Index"],e.loading=!1):this.onLoadingData(t)},onLoadingData:function(){var t=this,e=this.sheetForm;"subjectList"==e.currentType&&Object(i["V"])().then(function(n){var r=n.data;if(200==r.code&&r.data.length>0){var a=[];r.data.forEach(function(t){t.value=t.id,t.text=t.name,a.push(t)}),t.loadData.subjectList=a,e.columns=a,e.loading=!1}else t.$toast("暂无科目列表"),e.loading=!1})},onSheetConfirm:function(t,e){var n=this.sheetForm,r=this.form,a=this.formName,s=this.loadData;t&&("subjectList"==n.currentType&&(r.subjectIdList=t.value,a.subjectListName=t.text,a.subjectListIndex=e,s.subjectListSelect=t),n.sheetStatus=!1)},onClickSingleClass:function(){this.statusList.classTimerStatus=!0},onCourseChange:function(){this.calcTimer(),this.scheduleList=[],this.timeTable=[],this.setTimeTable()},onClassTimerSelect:function(t){this.form.singleClassMinutes!=t[0]&&(this.form.singleClassMinutes=t[0],this.statusList.classTimerStatus=!1,this.calcTimer(),this.scheduleList=[],this.timeTable=[])},onStudentSelect:function(t){this.form.studentNum=t.name,this.statusList.studentNumStatus=!1},onCurrentConfirm:function(t){var e=new Date(t),n=e.getMonth()+1>=10?e.getMonth()+1:"0"+(e.getMonth()+1),r=e.getDate()>=10?e.getDate():"0"+e.getDate();this.form.courseStart=e.getFullYear()+"-"+n+"-"+r,this.formName.courseStart=e.getFullYear()+"-"+n+"-"+r+" "+this.getWeekStr(e.getDay()),this.dataForm.status=!1},onCourseShedule:function(){this.form.singleClassMinutes?this.form.courseCount?this.form.courseStart?this.scheduleList.length>=this.form.courseCount?this.$toast("循环周期次数不能大于排课数量"):this.courseForm.teachingStatus=!0:this.$toast("请选择排课开始时间"):this.$toast("请选择排课数"):this.$toast("请选择每课时长")},onScheduleRemove:function(t){var e=this.scheduleList.indexOf(t);-1!==e&&this.scheduleList.splice(e,1)},onTeachinConfirm:function(t){var e=this,n=this.scheduleList,r=(t[1]>=10?t[1]:"0"+t[1])+":"+t[2].split("分")[0],a=this.MinutesTest(t[1],t[2],this.form.singleClassMinutes),s=!0;n.forEach(function(n){var u=e.timeIsrange(r,a,n.startTime),i=e.timeIsrange(r,a,n.endTime);s&&(t[0]==n.weekStr?s=!u&&!i:t[0]!=n.weekStr&&(s=!0))}),s?(n.push({weekStr:t[0],weekIndex:this.getWeek(t[0]),startTime:r,endTime:a,id:Date.now()}),this.courseForm.teachingStatus=!1):this.$toast("该时间段已排课请重选时间")},calcTimer:function(){var t=this.form;if(t.singleClassMinutes&&t.courseCount){var e=t.singleClassMinutes*t.courseCount;this.consumePeriod=e,this.consumePeriodText=Object(u["c"])(e)}},onShowTimeTable:function(){this.statusList.classTime=!0,this.setTimeTable()},setTimeTable:function(){this.timeTable=[];var t=this.form,e=this.scheduleList;if(!(e.length<=0)){var n=this.form.courseCount,r=t.courseStart.replace(/-/gi,"/"),a=new Date(r),s=0;while(n&&n>0){for(var u=0;u<e.length;u++){var i=e[u].weekIndex-a.getDay();s>0&&0==i&&0==u&&(i+=7),i<0&&(i+=7);var o=this.getThinkDate(a,i),c=(new Date).getTime(),l=new Date(o.replace(/-/gi,"/")+" "+e[u].startTime+":00").getTime();if(c<l){var d={classDate:o,startClassTimeStr:e[u].startTime,endClassTimeStr:e[u].endTime};this.timeTable.push(d),n--}if(n<=0)return}1==e.length?a.setDate(a.getDate()+7):e.every(function(t){return t.weekStr===e[0].weekStr})&&s++}}},getThinkDate:function(t,e){var n=t;n.setDate(t.getDate()+e);var r=n.getFullYear(),a=n.getMonth()+1,s="";s=a<10?"0"+a:a+"";var u=n.getDate(),i="";return i=u<10?"0"+u:u+"",r+"-"+s+"-"+i},MinutesTest:function(t,e,n){var r=e.split("分")[0],a=new Date(1900,1,1,t,r);a.setMinutes(a.getMinutes()+parseInt(n));var s=a.getHours(),u=a.getMinutes();return s<10&&(s="0"+s),u<10&&(u="0"+u),s+":"+u},timeIsrange:function(t,e,n){var r=t.split(":");if(2!=r.length)return!1;var a=e.split(":");if(2!=a.length)return!1;var s=n.split(":");if(2!=a.length)return!1;var u=new Date,i=new Date,o=new Date;return u.setHours(r[0]),u.setMinutes(r[1]),i.setHours(a[0]),i.setMinutes(a[1]),o.setHours(s[0]),o.setMinutes(s[1]),o.getTime()-u.getTime()>=0&&o.getTime()-i.getTime()<=0},getWeek:function(t){var e={"周一":1,"周二":2,"周三":3,"周四":4,"周五":5,"周六":6,"周日":0};return e[t]},getWeekStr:function(t){var e={1:"周一",2:"周二",3:"周三",4:"周四",5:"周五",6:"周六",0:"周日"};return e[t]},formatter:function(t,e){return"year"===t?"".concat(e,"年"):"month"===t?"".concat(e,"月"):"day"===t?"".concat(e,"日"):e},onSubmit:function(){var t=this,e=this.form;this.statusList;if(this.setTimeTable(),!e.name)return this.$toast("请输入课程班名称"),!1;if(!e.subjectIdList)return this.$toast("请选择科目"),!1;if(!e.singleClassMinutes)return this.$toast("请选择每课时长"),!1;if(this.scheduleList.length<=0)return this.$toast("课时安排不能为空"),!1;var n=[];if(this.scheduleList.forEach(function(t){n.push({dayOfWeek:0==t.weekIndex?7:t.weekIndex,startClassTime:t.startTime+":00"})}),this.consumePeriod>this.usePeriod)this.$dialog.confirm({message:"余额不足,请充值。",confirmButtonText:"充值"}).then(function(){var n={form:e,scheduleList:t.scheduleList,formName:t.formName,consumePeriod:t.consumePeriod,consumePeriodText:t.consumePeriodText};localStorage.setItem("courseApply",JSON.stringify(n)),t.$router.push("/periodExchange")}).catch(function(){});else{var r={coursesGroup:{name:e.name,subjectId:e.subjectIdList,maxStudentNum:e.studentNum},courseCycleInfo:{courseCreateStartTime:e.courseStart,teachMode:"ONLINE",courseCount:Number(e.courseCount),singleClassMinutes:e.singleClassMinutes,courseTimes:n}};this.onSubmitStatus&&(this.onSubmitStatus=!1,this.$dialog.confirm({title:"确认创建",message:"确认创建课程组?"}).then(function(){t.$toast.loading({duration:0,message:"加载中...",forbidClick:!0,loadingType:"spinner"}),Object(o["c"])(r).then(function(e){var n=e.data;t.$toast.clear(),200==n.code?(t.$toast("创建成功"),setTimeout(function(){t.onSubmitStatus=!0,Object(u["b"])().iPhone?window.webkit.messageHandlers.DAYA.postMessage(JSON.stringify({api:"back"})):Object(u["b"])().android&&DAYA.postMessage(JSON.stringify({api:"back"}))},500)):302==n.code?(t.onSubmitStatus=!0,t.$dialog.alert({title:"课程冲突",message:n.msg,messageAlign:"left"}).then(function(){})):(t.onSubmitStatus=!0,t.$toast(n.msg))})}).catch(function(){t.onSubmitStatus=!0}))}}}},h=m,f=(n("1e5c"),n("2877")),p=Object(f["a"])(h,r,a,!1,null,"ebbf5d86",null);e["default"]=p.exports},bb2c:function(t,e,n){},bfa0:function(t,e,n){},d133:function(t,e,n){"use strict";var r=n("bb2c"),a=n.n(r);a.a}}]);
|