index-legacy.d5b0e51c.js 9.6 KB

12
  1. !function(){function e(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function t(t){for(var n=1;n<arguments.length;n++){var a=null!=arguments[n]?arguments[n]:{};n%2?e(Object(a),!0).forEach((function(e){r(t,e,a[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(a)):e(Object(a)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(a,e))}))}return t}function r(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function n(e,t,r,n,a,s,i){try{var o=e[s](i),c=o.value}catch(l){return void r(l)}o.done?t(c):Promise.resolve(c).then(n,a)}function a(e){return function(){var t=this,r=arguments;return new Promise((function(a,s){var i=e.apply(t,r);function o(e){n(i,a,s,o,c,"next",e)}function c(e){n(i,a,s,o,c,"throw",e)}o(void 0)}))}}var s=document.createElement("style");s.innerHTML='._searchBand_1s5pv_1{display:inline-block;font-size:.37333rem;font-weight:600;color:#333}._searchBand_1s5pv_1 ._bandName_1s5pv_7{display:inline-block;max-width:4.8rem;vertical-align:text-top}._gridContainer_1s5pv_12{margin:0 .34667rem .32rem}._gridContainer_1s5pv_12 ._title_1s5pv_15{font-size:.69333rem;font-weight:700;color:#333}._gridContainer_1s5pv_12 ._title_1s5pv_15 i{font-style:normal;font-size:.32rem;color:#333}._gridContainer_1s5pv_12 ._red_1s5pv_25{color:#f67146}._gridContainer_1s5pv_12 ._name_1s5pv_28{padding-top:.21333rem;font-size:.32rem;color:#777}._gridClass_1s5pv_33 ._img_1s5pv_33{width:1.06667rem;height:1.06667rem;margin-right:.32rem;border-radius:50%;overflow:hidden}._gridClass_1s5pv_33 ._teacherName_1s5pv_40{display:flex;align-items:center}._gridClass_1s5pv_33 ._teacherName_1s5pv_40 ._maxWidth_1s5pv_44{max-width:3.2rem}._gridClass_1s5pv_33 ._teacherName_1s5pv_40 ._name_1s5pv_28{padding-top:0;font-size:.42667rem;font-weight:600;color:#333;line-height:.58667rem}._gridClass_1s5pv_33 ._teacherName_1s5pv_40 .van-tag{margin-left:.16rem}._gridClass_1s5pv_33 ._classCheckbox_1s5pv_57{display:flex;justify-content:flex-end}._gridClass_1s5pv_33 ._orchestraName_1s5pv_61{padding-top:.08rem;font-size:.32rem;color:#777;line-height:.45333rem;max-width:5.33333rem}._gridClass_1s5pv_33 ._title_1s5pv_15{font-size:.64rem}._gridClass_1s5pv_33 ._className_1s5pv_71{padding:.45333rem .4rem 0;font-size:.42667rem;font-weight:500;color:#333;line-height:.58667rem}._gridClass_1s5pv_33 ._className_1s5pv_71 ._line_1s5pv_78{display:inline-block;width:.10667rem;height:.32rem;background:#ff8057;border-radius:.08rem;margin-right:.16rem}._gridClass_1s5pv_33 .van-grid-item:after{content:" ";position:absolute;top:50%;right:0;margin-top:-.26667rem;width:.02667rem;height:.53333rem;background:#eaeaea;border-radius:.02667rem}._gridClass_1s5pv_33 .van-grid-item:last-child:after{display:none}._classCellGroup_1s5pv_100{margin-bottom:.32rem;border-radius:.26667rem;overflow:hidden}\n',document.head.appendChild(s),System.register(["./index-legacy.c1f63540.js","./index-legacy.7e71b67e.js","./icon_teacher-legacy.07765f44.js","./index-legacy.3d6462c3.js","./index-legacy.355799c3.js","./index-legacy.2318e5fa.js","./index-legacy.8a8e9c42.js","./index-legacy.45d07924.js","./index-legacy.47196fed.js","./index-legacy.b98d65d5.js","./index-legacy.cdcc5f23.js","./index-legacy.6aa82d51.js"],(function(e){"use strict";var r,n,s,i,o,c,l,u,d,p,_,f,m,h,v,g,b,y,x,C,w,k,S,N,j;return{setters:[function(e){r=e.d,n=e.r,s=e.Z,i=e.$,o=e.c,c=e.aj,l=e.q,u=e.ak,d=e.B,p=e.P,_=e.al,f=e.m,m=e.g},function(e){h=e.O},function(e){v=e.i},function(e){g=e.L},function(e){b=e.C},function(e){y=e.C},function(e){x=e.C},function(e){C=e.I},function(e){w=e.T},function(e){k=e.C},function(e){S=e.G,N=e.a},function(e){j=e.P}],execute:function(){var O={searchBand:"_searchBand_1s5pv_1",bandName:"_bandName_1s5pv_7",gridContainer:"_gridContainer_1s5pv_12",title:"_title_1s5pv_15",red:"_red_1s5pv_25",name:"_name_1s5pv_28",gridClass:"_gridClass_1s5pv_33",img:"_img_1s5pv_33",teacherName:"_teacherName_1s5pv_40",maxWidth:"_maxWidth_1s5pv_44",classCheckbox:"_classCheckbox_1s5pv_57",orchestraName:"_orchestraName_1s5pv_61",className:"_className_1s5pv_71",line:"_line_1s5pv_78",classCellGroup:"_classCellGroup_1s5pv_100"};e("P",r({name:"practice-class",props:{classType:{type:String,default:""},orchestraId:{type:String,default:""},selectItem:{type:Array,default:function(){return[]}}},emits:["close","confirm"],setup:function(e,r){r.slots,r.attrs;var P=r.emit,I=n({showPopover:!1,orchestraId:e.orchestraId||null,orchestraName:null,orchestraList:[],isClick:!1,list:[],listState:{dataShow:!0,loading:!1,finished:!1},params:{page:1,rows:20},check:e.selectItem||[],checkboxRefs:[]}),R=function(){var e=a(regeneratorRuntime.mark((function e(){var t,r,n,a;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,f.post("/api-school/orchestra/page",{data:{page:1,rows:100,schoolId:m.user.data.school.id,status:"DONE"}});case 3:if(t=e.sent,r=t.data,n=r.rows||[],a=[],n.forEach((function(e){a.push({text:e.name,value:e.id})})),I.orchestraList=[].concat(a),!(a.length>0)){e.next=14;break}return I.orchestraId=a[0].value,I.orchestraName=a[0].text,e.next=14,z();case 14:e.next=18;break;case 16:e.prev=16,e.t0=e.catch(0);case 18:case"end":return e.stop()}}),e,null,[[0,16]])})));return function(){return e.apply(this,arguments)}}(),z=function(){var r=a(regeneratorRuntime.mark((function r(){var n,a,s;return regeneratorRuntime.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:if(r.prev=0,!I.isClick){r.next=3;break}return r.abrupt("return");case 3:return I.isClick=!0,r.next=6,f.post("/api-school/classGroup/page",{data:t(t({},I.params),{},{schoolId:m.user.data.school.id,orchestraId:I.orchestraId,classType:e.classType})});case 6:if(n=r.sent,a=n.data,I.isClick=!1,I.listState.loading=!1,s=a||{},!(I.list.length>0&&1===s.current)){r.next=13;break}return r.abrupt("return");case 13:I.list.concat(s.rows||[]).forEach((function(e){e.preStudentNum>0&&I.list.push(e)})),I.listState.finished=s.current>=s.pages,I.params.page=s.current+1,I.listState.dataShow=I.list.length>0,r.next=25;break;case 20:r.prev=20,r.t0=r.catch(0),I.listState.dataShow=!1,I.listState.finished=!0,I.isClick=!1;case 25:case"end":return r.stop()}}),r,null,[[0,20]])})));return function(){return r.apply(this,arguments)}}();s((function(){return e.classType}),(function(){I.params.page=1,I.list=[],I.listState.dataShow=!0,I.listState.loading=!1,I.listState.finished=!1,z()}));var G=function(){P("confirm",I.check),P("close")};return i(a(regeneratorRuntime.mark((function t(){return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(e.orchestraId){t.next=5;break}return t.next=3,R();case 3:t.next=7;break;case 5:return t.next=7,z();case 7:case"end":return t.stop()}}),t)})))),function(){var t;return o("div",{class:[O.practiceClass,!I.listState.dataShow&&"emptyRootContainer"]},[o(h,{position:"top"},{default:function(){return[o(c,{title:"选择班级",desotry:!1},null),!e.orchestraId&&o("div",{class:"searchGroup-single"},[o("div",{class:["searchItem",I.showPopover&&"searchItem-active"],onClick:function(){return I.showPopover=!0}},[o("span",null,[I.orchestraName])])])]}}),I.listState.dataShow?o(g,{finished:I.listState.finished,style:{marginTop:e.orchestraId?"12px":0},finishedText:" ",class:[O.liveList],onLoad:z,immediateCheck:!1},{default:function(){return[o(b,{class:[O.gridContainer,O.gridClass],modelValue:I.check,"onUpdate:modelValue":function(e){return I.check=e}},(e=t=I.list.map((function(e){return o(y,{class:O.classCellGroup,onClick:function(){var t;e.teacherId&&(t=e.id,I.checkboxRefs[t].toggle())},border:!1},{default:function(){return[o(x,{center:!0,titleStyle:{flex:"0 auto"},valueClass:O.classCheckbox},{icon:function(){return o(C,{src:v,class:O.img},null)},title:function(){return o("div",{class:O.content},[o("div",{class:O.teacherName},[e.teacherName?o("div",{class:[O.name,O.maxWidth,"van-ellipsis"]},[e.teacherName]):o("div",{class:[O.name,"van-ellipsis"],style:{color:"red"}},[l("暂未设置伴学指导")]),o(w,{type:"primary"},{default:function(){return[e.name]}})]),o("div",{class:[O.orchestraName,"van-ellipsis"]},[e.orchestraName])])},value:function(){return o(k,{name:e.id,ref:function(t){return I.checkboxRefs[e.id]=t},disabled:!e.teacherId,onClick:function(e){e.stopPropagation()}},null)}}),o(S,{border:!1,columnNum:3},{default:function(){return[o(N,null,{default:function(){return[o("p",{class:O.title},[e.preStudentNum]),o("p",{class:O.name},[l("学员人数")])]}}),o(N,null,{default:function(){return[o("p",{class:[O.title]},[e.courseScheduleNum-e.completeCourseScheduleNum]),o("p",{class:O.name},[l("剩余课时")])]}}),o(N,null,{default:function(){return[o("p",{class:O.title},[e.courseScheduleNum]),o("p",{class:O.name},[l("总课时")])]}})]}})]}})})),"function"==typeof e||"[object Object]"===Object.prototype.toString.call(e)&&!_(e)?t:{default:function(){return[t]}}))];var e}}):o(u,{btnStatus:!1,tips:"暂无班级"},null),o(h,{position:"bottom"},{default:function(){return[o("div",{class:"btnGroup"},[o(d,{block:!0,round:!0,type:"primary",onClick:G},{default:function(){return[l("确认")]}})])]}}),o(p,{show:I.showPopover,"onUpdate:show":function(e){return I.showPopover=e},position:"bottom",round:!0,class:"popupBottomSearch"},{default:function(){return[o(j,{columns:I.orchestraList,onCancel:function(){return I.showPopover=!1},onConfirm:function(e){I.orchestraId=e.selectedOptions[0].value,I.orchestraName=e.selectedOptions[0].text,I.showPopover=!1,I.params.page=1,I.list=[],I.listState.dataShow=!0,I.listState.loading=!1,I.listState.finished=!1,z()}},null)]}})])}}}))}}}))}();