index-legacy.03a5a10e.js 13 KB

1
  1. !function(){function e(e,t,c,r,n,a,o){try{var s=e[a](o),i=s.value}catch(l){return void c(l)}s.done?t(i):Promise.resolve(i).then(r,n)}function t(t){return function(){var c=this,r=arguments;return new Promise((function(n,a){var o=t.apply(c,r);function s(t){e(o,n,a,s,i,"next",t)}function i(t){e(o,n,a,s,i,"throw",t)}s(void 0)}))}}var c=document.createElement("style");c.innerHTML="._dialogTitle_18ch9_1{padding-left:.66667rem;text-align:left;font-size:.48rem;font-weight:500;color:#333;line-height:.66667rem;padding-bottom:.32rem}._dialogTitle_18ch9_1 i{display:inline-block;width:.10667rem;height:.37333rem;background:#ff8057;border-radius:.05333rem;margin-right:.16rem}._coursePreview_18ch9_18{--van-dialog-message-font-size: .42667rem !important}._orchestraTabs_18ch9_21{font-weight:400;--van-tab-active-text-color: var(--van-primary-color);--van-tab-text-color: #333;--van-tab-font-size: .42667rem}._orchestraTabs_18ch9_21 .van-tabs__wrap{padding-bottom:.08rem}._orchestraTabs_18ch9_21 .van-tab__text--ellipsis{max-width:5.33333rem}._courseTabsContainer_18ch9_33{height:1.33333rem}._courseTabs_18ch9_33 .van-tabs__line{opacity:0}._courseTabs_18ch9_33 .van-tabs__nav{background:#f6f8f9}._courseTabs_18ch9_33 .van-tab__text{font-size:.37333rem;color:#aaa;line-height:.53333rem;background:#eaeaea;border-radius:.10667rem;padding:.08rem .24rem}._courseTabs_18ch9_33 .van-tab--active .van-tab__text{color:#fff;background:#ff8057}._cellGroup_18ch9_54{border-radius:.26667rem;overflow:hidden;margin:.08rem .34667rem .32rem}._cellGroup_18ch9_54 ._cellDatetime_18ch9_59{padding:.32rem .32rem .26667rem}._cellGroup_18ch9_54 ._cellTeacher_18ch9_62{padding:.26667rem .32rem .4rem}._cellGroup_18ch9_54 ._cellTeacher_18ch9_62 .van-button{margin:.10667rem 0}._cellGroup_18ch9_54 ._conflictGrouop_18ch9_68{padding:0 .32rem}._cellGroup_18ch9_54 ._cellDate_18ch9_59{display:flex;align-items:center;font-size:.37333rem;font-weight:500;color:#777;line-height:.53333rem}._cellGroup_18ch9_54 ._cellDate_18ch9_59 ._iconTimer_18ch9_79{font-size:.48rem;margin-right:.16rem}._cellGroup_18ch9_54 ._cellTime_18ch9_83{font-size:.37333rem;font-weight:500;color:#777;line-height:.53333rem}._cellGroup_18ch9_54 ._img_18ch9_89{width:1.12rem;height:1.12rem;overflow:hidden;border-radius:50%;margin-right:.26667rem;flex-shrink:0}._cellGroup_18ch9_54 ._cellTimeRange_18ch9_97{display:flex;align-items:center;padding:.32rem .32rem 0;font-size:.8rem;font-weight:700;color:#333;line-height:.93333rem;font-family:DINA}._cellGroup_18ch9_54 ._cellTimeRange_18ch9_97._conflictType_18ch9_107{color:#f44541}._cellGroup_18ch9_54 ._conflict_18ch9_68{font-size:.32rem;padding:.05333rem .10667rem;border-radius:.08rem;margin-right:.21333rem;margin-bottom:.4rem}._cellGroup_18ch9_54 ._teacherName_18ch9_117{font-size:.42667rem;font-weight:600;color:#333;max-width:3.2rem}._cellGroup_18ch9_54 ._btn_18ch9_123{padding:0 .74667rem;height:.85333rem;line-height:.8rem}\n",document.head.appendChild(c),System.register(["./index-legacy.c1f63540.js","./index-legacy.7e71b67e.js","./icon_teacher-legacy.07765f44.js","./create-legacy.317cf77d.js","./index-legacy.8e95ea07.js","./index-legacy.aa9b4ef8.js","./index-legacy.2318e5fa.js","./index-legacy.8a8e9c42.js","./index-legacy.45d07924.js","./index-legacy.47196fed.js","./use-tab-status-legacy.77a01b2b.js","./index-legacy.49ab1c78.js","./index-legacy.6603017a.js"],(function(e){"use strict";var c,r,n,a,o,s,i,l,u,f,h,d,_,p,m,g,b,T,v,C,y,I,G,x,A,k;return{setters:[function(e){c=e.d,r=e.ah,n=e.ag,a=e.r,o=e.R,s=e.$,i=e.c,l=e.aj,u=e.a5,f=e.ai,h=e.q,d=e.B,_=e.F,p=e.al,m=e.m,g=e.e},function(e){b=e.O},function(e){T=e.i},function(e){v=e.f},function(e){C=e.O},function(e){y=e.T,I=e.a},function(e){G=e.C},function(e){x=e.C},function(e){A=e.I},function(e){k=e.T},function(){},function(){},function(){}],execute:function(){var w={dialogTitle:"_dialogTitle_18ch9_1",coursePreview:"_coursePreview_18ch9_18",orchestraTabs:"_orchestraTabs_18ch9_21",courseTabsContainer:"_courseTabsContainer_18ch9_33",courseTabs:"_courseTabs_18ch9_33",cellGroup:"_cellGroup_18ch9_54",cellDatetime:"_cellDatetime_18ch9_59",cellTeacher:"_cellTeacher_18ch9_62",conflictGrouop:"_conflictGrouop_18ch9_68",cellDate:"_cellDate_18ch9_59",iconTimer:"_iconTimer_18ch9_79",cellTime:"_cellTime_18ch9_83",img:"_img_18ch9_89",cellTimeRange:"_cellTimeRange_18ch9_97",conflictType:"_conflictType_18ch9_107",conflict:"_conflict_18ch9_68",teacherName:"_teacherName_18ch9_117",btn:"_btn_18ch9_123"};function N(e){return"function"==typeof e||"[object Object]"===Object.prototype.toString.call(e)&&!p(e)}e("default",c({name:"course-preview",setup:function(){var e=r(),c=n(),p=a({type:e.query.type,conflictStatus:!1,conflictMessage:"该时间段伴学指导在其他学校有课",tabValue:"",courseValue:"",selectClasses:[],selectCourse:[],choiceCourse:{},isClick:!1,dialogStatus:!1,dialogMessage:""}),E=o(),D=function(){var c=t(regeneratorRuntime.mark((function t(){var c,r,n,a=arguments;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return!(a.length>0&&void 0!==a[0])||a[0],t.prev=1,t.next=4,m.post("/api-school/orchestra/trainingPlanListCache",{requestType:"form",data:{cacheId:e.query.cacheId}});case 4:if(999!==(c=t.sent).code){t.next=9;break}return p.dialogStatus=!0,p.dialogMessage=c.message,t.abrupt("return");case 9:S(c.data),v.planList.orchestra.length>0&&(r=v.selectOrchestraId?{orchestraId:v.selectOrchestraId}:v.planList.orchestra[0],p.tabValue=r.orchestraId,n=v.selectClassGroupId?{classGroupId:v.selectClassGroupId}:v.planList.classes[r.orchestraId]?v.planList.classes[r.orchestraId][0]:{},p.selectClasses=v.planList.classes[r.orchestraId]||[],p.selectCourse=v.planList.course[n.classGroupId],p.courseValue=n.classGroupId,v.selectOrchestraId=null,v.selectClassGroupId=null),t.next=15;break;case 13:t.prev=13,t.t0=t.catch(1);case 15:case"end":return t.stop()}}),t,null,[[1,13]])})));return function(){return c.apply(this,arguments)}}(),S=function(){var e=t(regeneratorRuntime.mark((function e(t){var c,r,n,a;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:for(a in c=[],t.forEach((function(e){-1===c.findIndex((function(t){return t.orchestraId===e.orchestraId}))&&c.push({orchestraId:e.orchestraId,orchestraName:e.orchestraName})})),r={},c.forEach((function(e){t.forEach((function(t){if(e.orchestraId===t.orchestraId){var c=r[e.orchestraId];if(c)-1===c.findIndex((function(e){return e.classGroupId===t.classGroupId}))&&r[e.orchestraId].push({classGroupId:t.classGroupId,className:t.className});else r[e.orchestraId]=[{classGroupId:t.classGroupId,className:t.className}]}}))})),n={},r)(r[a]||[]).forEach((function(e){var c=t.filter((function(t){return t.classGroupId===e.classGroupId}));n[e.classGroupId]=c}));v.planList={orchestra:c,classes:r,course:n};case 7:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),V=function(t){v.selectOrchestraId=p.tabValue||null,v.selectClassGroupId=p.courseValue||null,c.push({path:"/course-adjust",query:{id:t.id,cacheId:e.query.cacheId}})},L=function(){var r=t(regeneratorRuntime.mark((function t(){var r;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,p.isClick=!0,t.next=4,m.post("/api-school/orchestra/trainingPlan/"+e.query.cacheId,{hideLoading:!1});case 4:if(999!==(r=t.sent).code){t.next=9;break}return p.dialogStatus=!0,p.dialogMessage=r.message,t.abrupt("return");case 9:p.isClick=!1,"unbind"===e.query.type?c.replace("/companion-teacher"):g({api:"back",content:{}}),t.next=17;break;case 13:t.prev=13,t.t0=t.catch(0),p.isClick=!1,D(!1);case 17:case"end":return t.stop()}}),t,null,[[0,13]])})));return function(){return r.apply(this,arguments)}}();return s((function(){D()})),function(){var e,t;return i("div",{class:w.coursePreview},[i(b,{position:"top"},{default:function(){return[i(l,{border:!1},null),i(y,{lineWidth:20,lineHeight:4,active:p.tabValue,"onUpdate:active":function(e){return p.tabValue=e},swipeThreshold:3,class:w.orchestraTabs,onChange:function(e){if(console.log(e,"val",p.tabValue),!v.selectClassGroupId){p.selectClasses=v.planList.classes[e]||[];var t=v.planList.classes[e]?v.planList.classes[e][0]:{};p.selectCourse=v.planList.course[t.classGroupId],p.courseValue=t.classGroupId}}},N(e=v.planList.orchestra.map((function(e){return i(I,{title:e.orchestraName,name:e.orchestraId},null)})))?e:{default:function(){return[e]}}),i("div",{class:w.courseTabsContainer},[p.courseValue&&i(y,{swipeThreshold:3,class:w.courseTabs,active:p.courseValue,"onUpdate:active":function(e){return p.courseValue=e},lineHeight:0,shrink:!0,ref:E,onChange:function(e){p.selectCourse=v.planList.course[e]}},N(t=p.selectClasses.map((function(e){return i(I,{title:e.className,name:e.classGroupId},null)})))?t:{default:function(){return[t]}})])]}}),p.selectCourse.map((function(e){return i(G,{inset:!0,class:w.cellGroup},{default:function(){return[i(x,{center:!0,class:w.cellDatetime},{title:function(){return i("div",{class:w.cellDate},[i(u,{name:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACQAAAAkCAYAAADhAJiYAAAAAXNSR0IArs4c6QAAA65JREFUWEfNmE1oXFUUx3/nNTSoENtaUktcKIoLceeiYi1okWrBjSSZNxEK4seyUZQmNGjenUpb2mDFdOkHgouZ17S4EYouqsUPdOXGlVR0Ux2ltjFgIW3yTnnv3kwy8c28N2+wnbsb3j33/uac/zn33Cv02JBueNQ8N4jXfx/Lemeyzgb5h2jxVzGf/lV03Y6AdP/efrZuehZ0GNUngbtbbFxH5EuQM1ya/0xOnl3MC5gLSGf39nNlYBzl9TYQrfasI5xg88KsjGeDZQLpofIuIv0IeGB1R10C+QH4DvgZ0SvJN5XNwIPAY6A7QPrWUF7AkxdluvZ1O2+1BVLjxx45BriFdR7ZcBzt+1DMJ211ombfILL0Ero8AbLJQSwBk2LCE62gWgKpKR8BPWgNVYGToBUxc5fz6iGxNKNbQAJgP4jbT46KqU2lrZMK5DzzjoO5isgLEoRznYCsn6sVfxTVj0Fud9/eSPPUf4CcZs7ZMOlVPG+3TNdivaQOfWv0Efq8syg/YsJnBGJvps89VN5BFJ1zUEt4Eq/dpKkmoCSbLg/8ZAWsioif5Rk1pTdB3rYE0XYxc/V2nnSeCl34LrBl4eG12dcMVPEPoBx3oZoVc+rVrDBppRSgYuw8GRJT+z3TxpTeAxm3JkxIEM6s2DSAkqJ318Bvts7oPOj9eQRcDCgR+i8u++r8vXDvSvFcBaqMDaPRaUvtTUlQPZr1T5MsKuAhazd2EI2OuP1GJKiesQ5zQ41fBcoI19GN92TVmYZdUaC4TrF40RXPmphwbD3QH+5Y+FZM+Hge73TjocTW+N8AO4G6mHB7Ayipqlz700HMiAknbhJQnEAH7F7XtsVdQhIyTeqDfu8gXhETflAI6DYZksnsLFsjk5eB95Pfnjwa1zsLFPh7ED63AtMRCU4lAsszmkWdahEXyvM8FD0lpbnltTO0UhpGxSaS8rRUwi+6BzL+a8C7GfAReNvEVC/lA+omZDP77uDf65Ogg+lQqnhyXqbD2vrvavwWIYtbUTYWEnWesLaao8ZPF7VLwUJp3yVQeto7IFsYibvB/qG8hbEokC01rjCKVCWoPZ/kVCMFCx4dhYGC8hSih21meylHR8HDtQiQ6yLbH65J2Aq0H8WAcrQfCVCBBq1ToI4atATKXntyt7CdANkjqoMWtiFwe/3pjSZ/FaqHrkHrPNUbF8UGVC9dpRtQvfTY0NQurDzHaDQCPNH2OQa+QrzT/8tzTOvT+hY/WHVSc4rOvQGJ+h9D5Yk+CwAAAABJRU5ErkJggg==",class:w.iconTimer},null),f(e.classDate).format("YYYY-MM-DD")])},value:function(){return i("span",{class:w.cellTime},[e.singleCourseTime,h("分钟")])}}),i("div",{class:[w.cellTimeRange,e.conflictType&&e.conflictType.length>0&&w.conflictType]},[f(e.startTime).format("HH:mm"),h("-"),f(e.endTime).format("HH:mm")]),i(x,{center:!0,class:w.cellTeacher,border:!1},{icon:function(){return i(A,{src:e.teacherAvatar||T,class:w.img,fit:"cover"},null)},title:function(){return i("div",{class:w.teacherInfo},[i("p",{class:[w.teacherName,"van-ellipsis"]},[e.teacherName]),i(k,{color:"#FFE3DA",textColor:"#F67146",style:{fontWeight:"500",padding:"2px 6px 1px"}},{default:function(){return[e.className]}})])},value:function(){return i(d,{round:!0,plain:!0,type:"primary",class:w.btn,onClick:function(){return V(e)}},{default:function(){return[h("调整")]}})}}),i(x,{center:!0,border:!1,class:[w.cellTeacher,w.conflictGrouop]},{title:function(){return i(_,null,[e.conflictType&&e.conflictType.includes("STUDENT")&&i(k,{class:w.conflict,color:"#F44541",size:"large",onClick:function(){p.conflictMessage="学员时间冲突",p.conflictStatus=!0,p.choiceCourse=e}},{default:function(){return[h("学员冲突")]}}),e.conflictType&&e.conflictType.includes("DIFF_SCHOOL_TEACHER")&&i(k,{class:w.conflict,color:"#F44541",size:"large",onClick:function(){p.conflictMessage="该时间段伴学指导在其他学校有课",p.conflictStatus=!0,p.choiceCourse=e}},{default:function(){return[h("学校冲突")]}}),e.conflictType&&e.conflictType.includes("SAME_SCHOOL_TEACHER")&&i(k,{class:w.conflict,color:"#ff8057",size:"large",onClick:function(){p.conflictMessage="伴学指导在本学校时间有冲突",p.conflictStatus=!0,p.choiceCourse=e}},{default:function(){return[h("老师冲突")]}}),e.conflictType&&e.conflictType.includes("LEAVE")&&i(k,{class:w.conflict,color:"#F44541",size:"large",onClick:function(){p.conflictMessage="伴学指导请假冲突",p.conflictStatus=!0,p.choiceCourse=e}},{default:function(){return[h("老师请假")]}})])}})]}})})),i(b,{position:"bottom"},{default:function(){return[i("div",{class:"btnGroup"},[i(d,{round:!0,block:!0,type:"primary",onClick:L,disabled:p.isClick},{default:function(){return["change"===p.type||"native"===p.type?"确认调整":"确认排课"]}})])]}}),i(C,{title:"课程冲突",message:p.conflictMessage,show:p.conflictStatus,"onUpdate:show":function(e){return p.conflictStatus=e},messageAlign:"center",confirmButtonText:"去调整",cancelButtonText:"知道了",showCancelButton:!0,onConfirm:function(){p.conflictStatus=!1,V(p.choiceCourse)}},null),i(C,{title:"提示",show:p.dialogStatus,"onUpdate:show":function(e){return p.dialogStatus=e},message:p.dialogMessage,confirmButtonText:"确定",onConfirm:function(){c.back()}},null)])}}}))}}}))}();