1 |
- !function(){var e=document.createElement("style");e.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(e),System.register(["./index-legacy.eb062188.js","./index-legacy.ad813f4d.js","./icon_teacher-legacy.07765f44.js","./create-legacy.9418bfea.js","./index-legacy.e0860c0a.js","./index-legacy.ac7c51db.js","./index-legacy.148f784c.js","./index-legacy.918b8c74.js","./index-legacy.fecc738b.js","./index-legacy.11f1ea5f.js","./use-tab-status-legacy.91417466.js","./index-legacy.fab451f1.js","./index-legacy.10d8486a.js"],(function(e){"use strict";var c,a,t,s,l,o,r,i,n,u,h,d,_,f,m,p,g,T,b,C,y,v,I,G,A,x;return{setters:[function(e){c=e.d,a=e.ah,t=e.ag,s=e.r,l=e.R,o=e.$,r=e.c,i=e.aj,n=e.a5,u=e.ai,h=e.q,d=e.B,_=e.F,f=e.al,m=e.m,p=e.e},function(e){g=e.O},function(e){T=e.i},function(e){b=e.f},function(e){C=e.O},function(e){y=e.T,v=e.a},function(e){I=e.C},function(e){G=e.C},function(e){A=e.I},function(e){x=e.T},function(){},function(){},function(){}],execute:function(){var k={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)&&!f(e)}e("default",c({name:"course-preview",setup(){const e=a(),c=t(),f=s({type:e.query.type,conflictStatus:!1,conflictMessage:"该时间段伴学老师在其他学校有课",tabValue:"",courseValue:"",selectClasses:[],selectCourse:[],choiceCourse:{},isClick:!1,dialogStatus:!1,dialogMessage:""}),w=l(),E=async(c=!0)=>{try{const c=await m.post("/api-school/orchestra/trainingPlanListCache",{requestType:"form",data:{cacheId:e.query.cacheId}});if(999===c.code)return f.dialogStatus=!0,void(f.dialogMessage=c.message);if(D(c.data),b.planList.orchestra.length>0){const e=b.selectOrchestraId?{orchestraId:b.selectOrchestraId}:b.planList.orchestra[0];f.tabValue=e.orchestraId;const c=b.selectClassGroupId?{classGroupId:b.selectClassGroupId}:b.planList.classes[e.orchestraId]?b.planList.classes[e.orchestraId][0]:{};f.selectClasses=b.planList.classes[e.orchestraId]||[],f.selectCourse=b.planList.course[c.classGroupId],f.courseValue=c.classGroupId,b.selectOrchestraId=null,b.selectClassGroupId=null}}catch{}},D=async e=>{const c=[];e.forEach((e=>{-1===c.findIndex((c=>c.orchestraId===e.orchestraId))&&c.push({orchestraId:e.orchestraId,orchestraName:e.orchestraName})}));const a={};c.forEach((c=>{e.forEach((e=>{if(c.orchestraId===e.orchestraId){const t=a[c.orchestraId];if(t){-1===t.findIndex((c=>c.classGroupId===e.classGroupId))&&a[c.orchestraId].push({classGroupId:e.classGroupId,className:e.className})}else a[c.orchestraId]=[{classGroupId:e.classGroupId,className:e.className}]}}))}));const t={};for(const s in a){(a[s]||[]).forEach((c=>{const a=e.filter((e=>e.classGroupId===c.classGroupId));t[c.classGroupId]=a}))}b.planList={orchestra:c,classes:a,course:t}},S=a=>{b.selectOrchestraId=f.tabValue||null,b.selectClassGroupId=f.courseValue||null,c.push({path:"/course-adjust",query:{id:a.id,cacheId:e.query.cacheId}})},V=async()=>{try{f.isClick=!0;const a=await m.post("/api-school/orchestra/trainingPlan/"+e.query.cacheId,{hideLoading:!1});if(999===a.code)return f.dialogStatus=!0,void(f.dialogMessage=a.message);f.isClick=!1,"unbind"===e.query.type?c.replace("/companion-teacher"):p({api:"back",content:{}})}catch{f.isClick=!1,E(!1)}};return o((()=>{E()})),()=>{let e,a;return r("div",{class:k.coursePreview},[r(g,{position:"top"},{default:()=>[r(i,{border:!1},null),r(y,{lineWidth:20,lineHeight:4,active:f.tabValue,"onUpdate:active":e=>f.tabValue=e,swipeThreshold:3,class:k.orchestraTabs,onChange:e=>{if(console.log(e,"val",f.tabValue),!b.selectClassGroupId){f.selectClasses=b.planList.classes[e]||[];const c=b.planList.classes[e]?b.planList.classes[e][0]:{};f.selectCourse=b.planList.course[c.classGroupId],f.courseValue=c.classGroupId}}},N(e=b.planList.orchestra.map((e=>r(v,{title:e.orchestraName,name:e.orchestraId},null))))?e:{default:()=>[e]}),r("div",{class:k.courseTabsContainer},[f.courseValue&&r(y,{swipeThreshold:3,class:k.courseTabs,active:f.courseValue,"onUpdate:active":e=>f.courseValue=e,lineHeight:0,shrink:!0,ref:w,onChange:e=>{f.selectCourse=b.planList.course[e]}},N(a=f.selectClasses.map((e=>r(v,{title:e.className,name:e.classGroupId},null))))?a:{default:()=>[a]})])]}),f.selectCourse.map((e=>r(I,{inset:!0,class:k.cellGroup},{default:()=>[r(G,{center:!0,class:k.cellDatetime},{title:()=>r("div",{class:k.cellDate},[r(n,{name:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACQAAAAk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yVQeto7IFsYibvB/qG8hbEokC01rjCKVCWoPZ/kVCMFCx4dhYGC8hSih21meylHR8HDtQiQ6yLbH65J2Aq0H8WAcrQfCVCBBq1ToI4atATKXntyt7CdANkjqoMWtiFwe/3pjSZ/FaqHrkHrPNUbF8UGVC9dpRtQvfTY0NQurDzHaDQCPNH2OQa+QrzT/8tzTOvT+hY/WHVSc4rOvQGJ+h9D5Yk+CwAAAABJRU5ErkJggg==",class:k.iconTimer},null),u(e.classDate).format("YYYY-MM-DD")]),value:()=>r("span",{class:k.cellTime},[e.singleCourseTime,h("分钟")])}),r("div",{class:[k.cellTimeRange,e.conflictType&&e.conflictType.length>0&&k.conflictType]},[u(e.startTime).format("HH:mm"),h("-"),u(e.endTime).format("HH:mm")]),r(G,{center:!0,class:k.cellTeacher,border:!1},{icon:()=>r(A,{src:e.teacherAvatar||T,class:k.img,fit:"cover"},null),title:()=>r("div",{class:k.teacherInfo},[r("p",{class:[k.teacherName,"van-ellipsis"]},[e.teacherName]),r(x,{color:"#FFE3DA",textColor:"#F67146",style:{fontWeight:"500",padding:"2px 6px 1px"}},{default:()=>[e.className]})]),value:()=>r(d,{round:!0,plain:!0,type:"primary",class:k.btn,onClick:()=>S(e)},{default:()=>[h("调整")]})}),r(G,{center:!0,border:!1,class:[k.cellTeacher,k.conflictGrouop]},{title:()=>r(_,null,[e.conflictType&&e.conflictType.includes("STUDENT")&&r(x,{class:k.conflict,color:"#F44541",size:"large",onClick:()=>{f.conflictMessage="学员时间冲突",f.conflictStatus=!0,f.choiceCourse=e}},{default:()=>[h("学员冲突")]}),e.conflictType&&e.conflictType.includes("DIFF_SCHOOL_TEACHER")&&r(x,{class:k.conflict,color:"#F44541",size:"large",onClick:()=>{f.conflictMessage="该时间段伴学老师在其他学校有课",f.conflictStatus=!0,f.choiceCourse=e}},{default:()=>[h("学校冲突")]}),e.conflictType&&e.conflictType.includes("SAME_SCHOOL_TEACHER")&&r(x,{class:k.conflict,color:"#ff8057",size:"large",onClick:()=>{f.conflictMessage="伴学老师在本学校时间有冲突",f.conflictStatus=!0,f.choiceCourse=e}},{default:()=>[h("老师冲突")]}),e.conflictType&&e.conflictType.includes("LEAVE")&&r(x,{class:k.conflict,color:"#F44541",size:"large",onClick:()=>{f.conflictMessage="伴学老师请假冲突",f.conflictStatus=!0,f.choiceCourse=e}},{default:()=>[h("老师请假")]})])})]}))),r(g,{position:"bottom"},{default:()=>[r("div",{class:"btnGroup"},[r(d,{round:!0,block:!0,type:"primary",onClick:V,disabled:f.isClick},{default:()=>["change"===f.type||"native"===f.type?"确认调整":"确认排课"]})])]}),r(C,{title:"课程冲突",message:f.conflictMessage,show:f.conflictStatus,"onUpdate:show":e=>f.conflictStatus=e,messageAlign:"center",confirmButtonText:"去调整",cancelButtonText:"知道了",showCancelButton:!0,onConfirm:()=>{f.conflictStatus=!1,S(f.choiceCourse)}},null),r(C,{title:"提示",show:f.dialogStatus,"onUpdate:show":e=>f.dialogStatus=e,message:f.dialogMessage,confirmButtonText:"确定",onConfirm:()=>{c.back()}},null)])}}}))}}}))}();
|