!function(){function e(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,a)}return n}function t(t){for(var a=1;aspan{flex-shrink:0}._subjectContainer_n4tbz_29 ._tagSubject_n4tbz_35{margin-right:.26667rem;margin-top:.05333rem;margin-bottom:.05333rem}\n',document.head.appendChild(i),System.register(["./index-legacy.50ceab3b.js","./index-legacy.5ee1edf1.js","./index-legacy.a9944503.js","./index.module-legacy.dd749bc4.js","./index-legacy.00d82922.js","./icon_teacher-legacy.07765f44.js","./index-legacy.2a9471c6.js","./index-legacy.8271e59c.js","./index-legacy.3652aee1.js","./index-legacy.75e78f7b.js","./index-legacy.16d013c6.js","./index-legacy.aa24f77a.js","./index-legacy.c74636d9.js","./index-legacy.1f2c4a24.js","./index-legacy.2605abd7.js","./index-legacy.40afcdaf.js","./index-legacy.c7f919fb.js","./index-legacy.e997fd26.js","./icon_student-legacy.6118fd72.js","./index-legacy.ea1cf20b.js","./index-legacy.b9c4417f.js","./index-legacy.85ba4dc7.js","./index-legacy.0256f666.js","./index-legacy.bb54fe60.js","./index-legacy.55bd130c.js","./index-legacy.c75fe8a2.js","./use-tab-status-legacy.7b80393c.js","./Checker-legacy.a8f83c3c.js","./index-legacy.8bfb99fc.js","./index-legacy.57a461ad.js","./utils-legacy.0c949fd0.js","./function-call-legacy.ec02c576.js"],(function(e){"use strict";var n,a,i,c,s,o,l,u,d,f,p,h,m,g,b,v,_,y,S,x,k,w,C,T,j,I,L,N,E,z,O,R,D,V,H,U,A,M,P,B,F,G,Y,q,W,K,Z,$,J,Q;return{setters:[function(e){n=e.O},function(e){a=e.d},function(e){i=e.D,c=e.d,s=e.r,o=e.Z,l=e.$,u=e.c,d=e.q,f=e.ai,p=e.P,h=e.aj,m=e.m,g=e.f,b=e.al,v=e.B,_=e.ag,y=e.aU,S=e.ah,x=e.y,k=e.a5,w=e.o,C=e.bd,T=e.bt,j=e.bu},function(e){I=e.s},function(e){L=e.O},function(e){N=e.i},function(e){E=e.S},function(e){z=e.L},function(e){O=e.C},function(e){R=e.C},function(e){D=e.C},function(e){V=e.I},function(e){H=e.T},function(e){U=e.C},function(e){A=e.G,M=e.a},function(e){P=e.s,B=e.P},function(e){F=e.O},function(e){G=e.T,Y=e.a},function(e){q=e.i},function(e){W=e.O},function(e){K=e.O},function(e){Z=e.T},function(e){$=e.F},function(e){J=e.U},function(e){Q=e.D},function(){},function(){},function(){},function(){},function(){},function(){},function(){}],execute:function(){var X=i(P),ee={searchBand:"_searchBand_13btn_1",bandName:"_bandName_13btn_7",gridContainer:"_gridContainer_13btn_12",title:"_title_13btn_15",red:"_red_13btn_25",name:"_name_13btn_28",gridClass:"_gridClass_13btn_33",img:"_img_13btn_33",teacherName:"_teacherName_13btn_40",classCheckbox:"_classCheckbox_13btn_55",orchestraName:"_orchestraName_13btn_59",className:"_className_13btn_69",line:"_line_13btn_76",classCellGroup:"_classCellGroup_13btn_98"};var te=c({name:"practice-class",props:{height:{type:[String,Number],default:"auto"},bottomHeight:{type:[String,Number],default:0},selectItem:{type:Array,default:function(){return[]}}},emits:["close","confirm","update:selectItem"],setup:function(e,n){var a=n.emit,i=s({showPopover:!1,orchestraId:null,orchestraName:null,orchestraList:[],isClick:!1,list:[],listState:{dataShow:!0,loading:!1,finished:!1},params:{type:null,page:1,rows:20},check:[],checkboxRefs:[]}),c=function(){var e=r(regeneratorRuntime.mark((function e(){var t,n,a,r;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,m.post("/api-school/orchestra/page",{data:{page:1,rows:100,schoolId:g.user.data.school.id,status:"DONE"}});case 3:t=e.sent,n=t.data,a=n.rows||[],r=[],a.forEach((function(e){r.push({text:e.name,value:e.id})})),i.orchestraList=[].concat(r),r.length>0&&(i.orchestraId=r[0].value,i.orchestraName=r[0].text),e.next=14;break;case 12:e.prev=12,e.t0=e.catch(0);case 14:case"end":return e.stop()}}),e,null,[[0,12]])})));return function(){return e.apply(this,arguments)}}(),b=function(){var e=r(regeneratorRuntime.mark((function e(){var n,a,r;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(e.prev=0,!i.isClick){e.next=3;break}return e.abrupt("return");case 3:return i.isClick=!0,e.next=6,m.post("/api-school/classGroup/page",{data:t(t({},i.params),{},{schoolId:g.user.data.school.id,orchestraId:i.orchestraId})});case 6:if(n=e.sent,a=n.data,i.isClick=!1,i.listState.loading=!1,r=a||{},!(i.list.length>0&&1===r.current)){e.next=13;break}return e.abrupt("return");case 13:i.list=i.list.concat(r.rows||[]),i.listState.finished=r.current>=r.pages,i.params.page=r.current+1,i.listState.dataShow=i.list.length>0,e.next=24;break;case 19:e.prev=19,e.t0=e.catch(0),i.listState.dataShow=!1,i.listState.finished=!0,i.isClick=!1;case 24:case"end":return e.stop()}}),e,null,[[0,19]])})));return function(){return e.apply(this,arguments)}}(),v=function(e){i.checkboxRefs[e].toggle();var t=[];i.list.forEach((function(e){i.check.includes(e.id)&&t.push({id:e.id,value:e.name,avatar:""})})),a("update:selectItem",t)};o((function(){return e.selectItem}),(function(){_()}),{deep:!0});var _=function(){var t=e.selectItem||[],n=[];t.forEach((function(e){n.push(e.id)})),i.check=n};return l(r(regeneratorRuntime.mark((function e(){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,c();case 2:return e.next=4,b();case 4:_();case 5:case"end":return e.stop()}}),e)})))),function(){var t;return u("div",{class:[ee.practiceClass,!i.listState.dataShow&&"emptyRootContainer"],style:{"min-height":"calc(100vh - ".concat(e.height,"px - ").concat(e.bottomHeight,"px)")}},[i.orchestraList.length>0&&u(E,{position:"top",offsetTop:e.height,style:{width:"100%"}},{default:function(){return[u("div",{class:"searchGroup-single"},[u("div",{class:["searchItem",i.showPopover?"searchItem-active":""]},[u("span",null,[i.orchestraName])])])]}}),i.listState.dataShow?u(z,{finished:i.listState.finished,finishedText:" ",class:[ee.liveList],onLoad:b,immediateCheck:!1},{default:function(){return[u(O,{class:[ee.gridContainer,ee.gridClass],modelValue:i.check,"onUpdate:modelValue":function(e){return i.check=e}},(e=t=i.list.map((function(e){return u(R,{class:ee.classCellGroup,onClick:function(){return v(e.id)},border:!1},{default:function(){return[u(D,{center:!0,titleStyle:{flex:"0 auto"},valueClass:ee.classCheckbox},{icon:function(){return u(V,{src:N,class:ee.img},null)},title:function(){return u("div",{class:ee.content},[u("div",{class:ee.teacherName},[u("span",{class:["van-ellipsis",ee.name]},[e.teacherName]),u(H,{type:"primary"},{default:function(){return[e.name]}})]),u("div",{class:[ee.orchestraName,"van-ellipsis"]},[e.orchestraName])])},value:function(){return u(U,{name:e.id,ref:function(t){return i.checkboxRefs[e.id]=t},onClick:function(t){t.preventDefault(),t.stopPropagation(),v(e.id)}},null)}}),u(A,{border:!1,columnNum:3},{default:function(){return[u(M,null,{default:function(){return[u("p",{class:ee.title},[e.preStudentNum]),u("p",{class:ee.name},[d("学生人数")])]}}),u(M,null,{default:function(){return[u("p",{class:[ee.title]},[e.courseScheduleNum-e.completeCourseScheduleNum]),u("p",{class:ee.name},[d("剩余课时")])]}}),u(M,null,{default:function(){return[u("p",{class:ee.title},[e.courseScheduleNum]),u("p",{class:ee.name},[d("总课时")])]}})]}})]}})})),"function"==typeof e||"[object Object]"===Object.prototype.toString.call(e)&&!h(e)?t:{default:function(){return[t]}}))];var e}}):u(f,{btnStatus:!1,tips:"暂无班级"},null),u(p,{show:i.showPopover,"onUpdate:show":function(e){return i.showPopover=e},position:"bottom",round:!0,class:"popupBottomSearch"},{default:function(){return[u(B,{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,b()}},null)]}})])}}}),ne={cellTeacher:"_cellTeacher_n4tbz_1",img:"_img_n4tbz_1",name:"_name_n4tbz_9",class:"_class_n4tbz_16",checkboxValue:"_checkboxValue_n4tbz_25",subjectContainer:"_subjectContainer_n4tbz_29",tagSubject:"_tagSubject_n4tbz_35"};var ae=c({name:"manage-list",props:{height:{type:[String,Number],default:"auto"},bottomHeight:{type:[String,Number],default:0},removeTeacherId:{type:String,default:""},subjectIdList:{type:Array,default:function(){return[]}},selectItem:{type:Array,default:function(){return[]}}},emits:["close","select","update:selectItem"],setup:function(e,n){n.slots,n.attrs;var a=n.emit,i=s({teacherStatus:!1,isLoad:!1,list:[],listState:{dataShow:!0,loading:!1,finished:!1},params:{keyword:null,subjectIdList:e.subjectIdList,page:1,rows:20},check:e.selectItem||[],checkboxRefs:[]}),c=function(){var e=r(regeneratorRuntime.mark((function e(){var n,a,r;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(e.prev=0,!i.isLoad){e.next=3;break}return e.abrupt("return");case 3:return i.isLoad=!0,e.next=6,m.post("/api-school/schoolStaff/page",{data:t(t({},i.params),{},{schoolId:g.user.data.school.id,status:"ACTIVATION"})});case 6:if(n=e.sent,i.listState.loading=!1,a=n.data||{},!(i.list.length>0&&1===a.current)){e.next=11;break}return e.abrupt("return");case 11:(r=a.rows||[]).forEach((function(e){e.subjectNames=e.subjectName?e.subjectName.split(","):[]})),i.list=i.list.concat(r),i.listState.finished=a.current>=a.pages,i.params.page=a.current+1,i.listState.dataShow=i.list.length>0,i.isLoad=!1,e.next=25;break;case 20:e.prev=20,e.t0=e.catch(0),i.listState.dataShow=!1,i.listState.finished=!0,i.isLoad=!1;case 25:case"end":return e.stop()}}),e,null,[[0,20]])})));return function(){return e.apply(this,arguments)}}(),d=function(e){i.checkboxRefs[e].toggle();var t=[];i.list.forEach((function(e){i.check.includes(e.id)&&t.push({id:e.id,value:e.nickname,avatar:e.avatar})})),a("update:selectItem",t)};o((function(){return e.selectItem}),(function(){p()}),{deep:!0});var p=function(){var t=e.selectItem||[],n=[];t.forEach((function(e){n.push(e.id)})),i.check=n};return l((function(){c(),p()})),function(){var t;return u("div",{class:[!i.listState.dataShow&&"emptyRootContainer"],style:{"min-height":"calc(100vh - ".concat(e.height,"px - ").concat(e.bottomHeight,"px)")}},[u(E,{position:"top",offsetTop:e.height,style:{width:"100%"}},{default:function(){return[u(F,{placeholder:"伴学指导名称/手机号",onSearch:function(e){i.params.keyword=e,i.params.page=1,i.list=[],i.listState.dataShow=!0,i.listState.loading=!1,i.listState.finished=!1,c()}},null)]}}),i.listState.dataShow?u(z,{finished:i.listState.finished,finishedText:" ",onLoad:c,style:{paddingTop:"12px"},immediateCheck:!1},{default:function(){return[u(O,{class:[ne.gridContainer,ne.gridClass],modelValue:i.check,"onUpdate:modelValue":function(e){return i.check=e}},(e=t=i.list.map((function(e){return u(R,{inset:!0,style:{marginBottom:"12px"},onClick:function(){return d(e.id)}},{default:function(){return[u(D,{center:!0,class:ne.cellTeacher,valueClass:ne.checkboxValue},{icon:function(){return u(V,{class:ne.img,src:e.avatar||N,fit:"cover"},null)},title:function(){return u("div",{class:ne.content},[u("p",{class:[ne.name,"van-ellipsis"]},[e.nickname])])},value:function(){return u(U,{name:e.id,ref:function(t){return i.checkboxRefs[e.id]=t},onClick:function(t){t.preventDefault(),t.stopPropagation(),d(e.id)}},null)}})]}})})),"function"==typeof e||"[object Object]"===Object.prototype.toString.call(e)&&!h(e)?t:{default:function(){return[t]}}))];var e}}):u(f,{btnStatus:!1,tips:"暂无伴学指导"},null)])}}}),re={cellTeacher:"_cellTeacher_n4tbz_1",img:"_img_n4tbz_1",name:"_name_n4tbz_9",class:"_class_n4tbz_16",checkboxValue:"_checkboxValue_n4tbz_25",subjectContainer:"_subjectContainer_n4tbz_29",tagSubject:"_tagSubject_n4tbz_35"};function ie(e){return"function"==typeof e||"[object Object]"===Object.prototype.toString.call(e)&&!h(e)}var ce=c({name:"teacher-list",props:{height:{type:[String,Number],default:"auto"},bottomHeight:{type:[String,Number],default:0},selectItem:{type:Array,default:function(){return[]}}},emits:["close","select","update:selectItem"],setup:function(e,n){var a=n.emit,i=s({teacherStatus:!1,isLoad:!1,list:[],listState:{dataShow:!0,loading:!1,finished:!1},params:{keyword:null,page:1,rows:20},check:e.selectItem||[],checkboxRefs:[]}),c=function(){var e=r(regeneratorRuntime.mark((function e(){var n,a,r;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(e.prev=0,!i.isLoad){e.next=3;break}return e.abrupt("return");case 3:return i.isLoad=!0,e.next=6,m.post("/api-school/student/page",{data:t(t({},i.params),{},{schoolId:g.user.data.school.id})});case 6:if(n=e.sent,i.listState.loading=!1,a=n.data||{},!(i.list.length>0&&1===a.current)){e.next=11;break}return e.abrupt("return");case 11:(r=a.rows||[]).forEach((function(e){e.subjectNames=e.subjectNames?e.subjectNames.split(","):[]})),i.list=i.list.concat(r),i.listState.finished=a.current>=a.pages,i.params.page=a.current+1,i.listState.dataShow=i.list.length>0,i.isLoad=!1,e.next=25;break;case 20:e.prev=20,e.t0=e.catch(0),i.listState.dataShow=!1,i.listState.finished=!0,i.isLoad=!1;case 25:case"end":return e.stop()}}),e,null,[[0,20]])})));return function(){return e.apply(this,arguments)}}(),d=function(e){i.checkboxRefs[e].toggle();var t=[];i.list.forEach((function(e){i.check.includes(e.id)&&t.push({id:e.id,value:e.nickname,avatar:e.avatar})})),a("update:selectItem",t)};o((function(){return e.selectItem}),(function(){p()}),{deep:!0});var p=function(){var t=e.selectItem||[],n=[];t.forEach((function(e){n.push(e.id)})),i.check=n};return l((function(){c(),p()})),function(){var t;return u("div",{class:[!i.listState.dataShow&&"emptyRootContainer"],style:{"min-height":"calc(100vh - ".concat(e.height,"px - ").concat(e.bottomHeight,"px)")}},[u(E,{position:"top",offsetTop:e.height,style:{width:"100%"}},{default:function(){return[u(F,{placeholder:"学员名称/手机号",onSearch:function(e){i.params.keyword=e,i.params.page=1,i.list=[],i.listState.dataShow=!0,i.listState.loading=!1,i.listState.finished=!1,c()}},null)]}}),i.listState.dataShow?u(z,{finished:i.listState.finished,finishedText:" ",onLoad:c,style:{paddingTop:"12px"},immediateCheck:!1},{default:function(){return[u(O,{class:[re.gridContainer,re.gridClass],modelValue:i.check,"onUpdate:modelValue":function(e){return i.check=e}},ie(t=i.list.map((function(e){return u(R,{inset:!0,style:{marginBottom:"12px"},onClick:function(){return d(e.id)}},{default:function(){return[u(D,{center:!0,class:re.cellTeacher,valueClass:re.checkboxValue},{icon:function(){return u(V,{class:re.img,src:e.avatar||N,fit:"cover"},null)},title:function(){return u("div",{class:re.content},[u("p",{class:[re.name,"van-ellipsis"]},[e.nickname]),u("p",{class:re.class},[e.subjectNames&&e.subjectNames.map((function(e){return u(H,{type:"primary",class:re.tagSubject,color:"#FFE7DA",textColor:"#F67146"},ie(e)?e:{default:function(){return[e]}})}))])])},value:function(){return u(U,{name:e.id,ref:function(t){return i.checkboxRefs[e.id]=t},onClick:function(t){t.preventDefault(),t.stopPropagation(),d(e.id)}},null)}})]}})})))?t:{default:function(){return[t]}})]}}):u(f,{btnStatus:!1,tips:"暂无学生"},null)])}}}),se={cellTeacher:"_cellTeacher_n4tbz_1",img:"_img_n4tbz_1",name:"_name_n4tbz_9",class:"_class_n4tbz_16",checkboxValue:"_checkboxValue_n4tbz_25",subjectContainer:"_subjectContainer_n4tbz_29",tagSubject:"_tagSubject_n4tbz_35"};function oe(e){return"function"==typeof e||"[object Object]"===Object.prototype.toString.call(e)&&!h(e)}var le=c({name:"teacher-list",props:{height:{type:[String,Number],default:"auto"},bottomHeight:{type:[String,Number],default:0},removeTeacherId:{type:String,default:""},subjectIdList:{type:Array,default:function(){return[]}},selectItem:{type:Array,default:function(){return[]}}},emits:["close","select","update:selectItem"],setup:function(e,n){n.slots,n.attrs;var a=n.emit,i=s({teacherStatus:!1,isLoad:!1,list:[],listState:{dataShow:!0,loading:!1,finished:!1},params:{keyword:null,subjectIdList:e.subjectIdList,page:1,rows:20},check:e.selectItem||[],checkboxRefs:[]}),c=function(){var n=r(regeneratorRuntime.mark((function n(){var a,r,c;return regeneratorRuntime.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:if(n.prev=0,!i.isLoad){n.next=3;break}return n.abrupt("return");case 3:return i.isLoad=!0,n.next=6,m.post("/api-school/teacher/page",{data:t(t({},i.params),{},{schoolId:g.user.data.school.id,removeTeacherId:e.removeTeacherId,delFlag:!1})});case 6:if(a=n.sent,i.listState.loading=!1,r=a.data||{},!(i.list.length>0&&1===r.current)){n.next=11;break}return n.abrupt("return");case 11:(c=r.rows||[]).forEach((function(e){e.subjectNames=e.subjectName?e.subjectName.split(","):[]})),i.list=i.list.concat(c),i.listState.finished=r.current>=r.pages,i.params.page=r.current+1,i.listState.dataShow=i.list.length>0,i.isLoad=!1,n.next=25;break;case 20:n.prev=20,n.t0=n.catch(0),i.listState.dataShow=!1,i.listState.finished=!0,i.isLoad=!1;case 25:case"end":return n.stop()}}),n,null,[[0,20]])})));return function(){return n.apply(this,arguments)}}(),p=function(e){i.checkboxRefs[e].toggle();var t=[];i.list.forEach((function(e){i.check.includes(e.id)&&t.push({id:e.id,value:e.nickname,avatar:e.avatar})})),a("update:selectItem",t)};o((function(){return e.selectItem}),(function(){h()}),{deep:!0});var h=function(){var t=e.selectItem||[],n=[];t.forEach((function(e){n.push(e.id)})),i.check=n};return l((function(){c(),h()})),function(){var t;return u("div",{class:[!i.listState.dataShow&&"emptyRootContainer"],style:{"min-height":"calc(100vh - ".concat(e.height,"px - ").concat(e.bottomHeight,"px)")}},[u(E,{position:"top",offsetTop:e.height,style:{width:"100%"}},{default:function(){return[u(F,{placeholder:"伴学名称/手机号",onSearch:function(e){i.params.keyword=e,i.params.page=1,i.list=[],i.listState.dataShow=!0,i.listState.loading=!1,i.listState.finished=!1,c()}},null)]}}),i.listState.dataShow?u(z,{finished:i.listState.finished,finishedText:" ",style:{paddingTop:"12px"},onLoad:c,immediateCheck:!1},{default:function(){return[u(O,{class:[se.gridContainer,se.gridClass],modelValue:i.check,"onUpdate:modelValue":function(e){return i.check=e}},oe(t=i.list.map((function(e){return u(R,{inset:!0,style:{marginBottom:"12px"},onClick:function(){return p(e.id)}},{default:function(){return[u(D,{center:!0,class:se.cellTeacher,valueClass:se.checkboxValue},{icon:function(){return u(V,{class:se.img,src:e.avatar||N,fit:"cover"},null)},title:function(){return u("div",{class:se.content},[u("p",{class:[se.name,"van-ellipsis"]},[e.nickname])])},value:function(){return u(U,{name:e.id,ref:function(t){return i.checkboxRefs[e.id]=t},onClick:function(t){t.preventDefault(),t.stopPropagation(),p(e.id)}},null)}}),u(D,{center:!0},{title:function(){return u("div",{class:se.subjectContainer},[u("span",null,[d("声部:")]),u("div",{style:{display:"flex",alignItems:"center",flexWrap:"wrap"}},[e.subjectNames&&e.subjectNames.map((function(e){return u(H,{type:"primary",class:se.tagSubject,color:"#FFE7DA",textColor:"#F67146"},oe(e)?e:{default:function(){return[e]}})}))])])}})]}})})))?t:{default:function(){return[t]}})]}}):u(f,{btnStatus:!1,tips:"暂无伴学指导"},null)])}}}),ue=c({name:"select-send",props:{selectList:{type:Object,default:function(){return{}}},selectStatus:{type:Boolean,default:!1}},emits:["close","confirm","update:selectList"],setup:function(e,t){var n=t.emit,a=s({height:"auto",bottomHeight:0,tabValue:"class",selectClass:[],selectStudent:[],selectTeacher:[],selectManage:[]}),i=function(){var e=r(regeneratorRuntime.mark((function e(){var t;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:t={class:a.selectClass,student:a.selectStudent,teacher:a.selectTeacher,school:a.selectManage},n("close"),n("update:selectList",t),n("confirm",t);case 4:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}();o((function(){return e.selectList}),(function(){console.log("watch",e.selectList),c()}),{deep:!0});var c=function(){var t=e.selectList||{};a.selectClass=t.class||[],a.selectTeacher=t.teacher||[],a.selectManage=t.school||[],a.selectStudent=t.student||[]};return l((function(){var e=b(document.querySelector(".van-tab")).height;a.height=e,c(),console.log(a,"select")})),function(){return u("div",{class:I.orchestraDetail,style:{background:"#f6f6f6",minHeight:"100vh"}},[u(G,{sticky:!0,lineWidth:20,lineHeight:4,active:a.tabValue,"onUpdate:active":function(e){return a.tabValue=e},swipeable:!0},{default:function(){return[u(Y,{title:"班级",name:"class"},{default:function(){return[u(te,{height:a.height,bottomHeight:a.bottomHeight,selectItem:a.selectClass,"onUpdate:selectItem":function(e){return a.selectClass=e}},null)]}}),u(Y,{title:"学员",name:"student"},{default:function(){return[u(ce,{height:a.height,bottomHeight:a.bottomHeight,selectItem:a.selectStudent,"onUpdate:selectItem":function(e){return a.selectStudent=e}},null)]}}),u(Y,{title:"伴学指导",name:"teacher"},{default:function(){return[u(le,{height:a.height,bottomHeight:a.bottomHeight,selectItem:a.selectTeacher,"onUpdate:selectItem":function(e){return a.selectTeacher=e}},null)]}}),u(Y,{title:"管理老师",name:"manage"},{default:function(){return[u(ae,{height:a.height,bottomHeight:a.bottomHeight,selectItem:a.selectManage,"onUpdate:selectItem":function(e){return a.selectManage=e}},null)]}})]}}),u(L,{position:"bottom",onGetHeight:function(e){a.bottomHeight=e}},{default:function(){return[u("div",{class:"btnGroup"},[u(v,{round:!0,block:!0,type:"primary",onClick:i},{default:function(){return[d("确认")]}})])]}})])}}});e("default",c({name:"create-message",setup:function(){var e=_(),t=y(),i=s({id:t.query.id,type:"ADD",bucket:"i-m",sendStatus:!1,sendType:"IMMEDIATELY",textMessage:null,sendTime:null,sendTimeStatus:!1,maxDate:S(new Date).add(60,"day").toDate(),currentDate:[],currentTime:[S().format("HH"),S().format("mm")],attachments:[],receives:[],selectStatus:!1,selectList:{},delSelectItem:{},delStatus:!1,sureLoading:!1,updateLoading:!1,closeLoading:!1,actions:[{name:"即时发送",value:"IMMEDIATELY",selected:!0},{name:"定时发送",value:"SCHEDULED"}]}),c=function(e){return!!(e.size/1024/1024<5)||(w("上传文件大小不能超过 5MB"),!1)},o=function(e,t){return!0},f=function(){var e=r(regeneratorRuntime.mark((function e(t,n){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,t.status="uploading",t.message="上传中...",e.next=5,h(t);case 5:e.next=10;break;case 7:e.prev=7,e.t0=e.catch(0),C();case 10:case"end":return e.stop()}}),e,null,[[0,7]])})));return function(t,n){return e.apply(this,arguments)}}(),h=function(){var e=r(regeneratorRuntime.mark((function e(t){var n,a,r,c,s,o,l,u,d;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,console.log(t,"files"),n=t.file,"/api-school/open/getUploadSign",a=n.name||"",r="/i-m/"+(a&&a.replace(/ /gi,"_")),c=(new Date).getTime()+r,e.next=9,m.post("/api-school/open/getUploadSign",{hideLoading:!0,data:{filename:r,bucketName:i.bucket,postData:{filename:r,acl:"public-read",key:c,unknowValueField:[]}}});case 9:for(u in s=e.sent,o={policy:s.data.policy,signature:s.data.signature,key:c,KSSAccessKeyId:s.data.kssAccessKeyId,acl:"public-read",name:r},l=new FormData,o)l.append(u,o[u]);return l.append("file",n,r),e.next=16,T(j(i.bucket),{method:"POST",data:l});case 16:d=j(i.bucket)+c,t.url=d,t.status="done",e.next=25;break;case 21:e.prev=21,e.t0=e.catch(0),t.status="failed",console.log(e.t0,"uploadFile");case 25:case"end":return e.stop()}}),e,null,[[0,21]])})));return function(t){return e.apply(this,arguments)}}(),g=function(){var t=r(regeneratorRuntime.mark((function t(){var n,a,r;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(t.prev=0,i.sendType){t.next=4;break}return w("请选择发送方式"),t.abrupt("return");case 4:if(i.textMessage){t.next=7;break}return w("请输入发送内容"),t.abrupt("return");case 7:if(!(i.receives.length<=0)){t.next=10;break}return w("请选择发送对象"),t.abrupt("return");case 10:if(n=[],i.attachments.forEach((function(e){n.push({imgUrl:e.url,imgMessage:e.url})})),a=[],i.receives.forEach((function(e){a.push({receiveType:e.receiveType,receiveId:e.receiveId})})),r={sendType:i.sendType,textMessage:i.textMessage,attachments:n,receives:a,sendTime:i.sendTime},console.log(r,"params"),i.id?i.updateLoading=!0:i.sureLoading=!0,!i.id){t.next=23;break}return r.id=i.id,t.next=21,m.post("/api-school/imMessageBatchSending/update",{hideLoading:!1,data:r});case 21:t.next=25;break;case 23:return t.next=25,m.post("/api-school/imMessageBatchSending/save",{hideLoading:!1,data:r});case 25:setTimeout((function(){w(i.id?"修改成功":"添加成功")}),100),setTimeout((function(){e.replace("/mass-message"),i.sureLoading=!1,i.updateLoading=!1}),1100),t.next=33;break;case 29:t.prev=29,t.t0=t.catch(0),i.sureLoading=!1,i.updateLoading=!1;case 33:case"end":return t.stop()}}),t,null,[[0,29]])})));return function(){return t.apply(this,arguments)}}(),b=function(){var e=r(regeneratorRuntime.mark((function e(){var t,n,a,r,c,s;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(e.prev=0,i.id){e.next=3;break}return e.abrupt("return");case 3:return e.next=5,m.get("/api-school/imMessageBatchSending/detail/"+i.id);case 5:t=e.sent,n=t.data,i.sendType=n.sendType,i.textMessage=n.textMessage,i.sendTime=n.sendTime,i.type=n.sendStatus,a=n.receives||[],r={class:[],teacher:[],student:[],school:[]},a.forEach((function(e){var t={receiveType:e.receiveType,receiveId:e.receiveId,receiveName:e.receiveName,avatar:e.avatar};i.receives.push(t);var n={id:e.receiveId,value:e.receiveName,avatar:e.avatar};"CLASS"===e.receiveType?r.class.push(n):"STUDENT"===e.receiveType?r.student.push(n):"TEACHER"===e.receiveType?r.teacher.push(n):"SCHOOL"===e.receiveType&&r.school.push(n)})),i.selectList=r,c=n.attachments||[],s=[],c.forEach((function(e){s.push({url:e.imgUrl||e.imgMessage})})),i.attachments=s,e.next=24;break;case 21:e.prev=21,e.t0=e.catch(0),console.log(e.t0,"e");case 24:case"end":return e.stop()}}),e,null,[[0,21]])})));return function(){return e.apply(this,arguments)}}(),E=x((function(){return"SEND"===i.type})),z=function(){var t=r(regeneratorRuntime.mark((function t(){return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,i.closeLoading=!0,t.next=4,m.post("/api-school/imMessageBatchSending/remove",{requestType:"form",hideLoading:!1,data:{id:i.id}});case 4:setTimeout((function(){w("撤销成功")}),100),setTimeout((function(){e.replace("/mass-message"),i.closeLoading=!1}),1100),t.next=11;break;case 8:t.prev=8,t.t0=t.catch(0),i.closeLoading=!1;case 11:case"end":return t.stop()}}),t,null,[[0,8]])})));return function(){return t.apply(this,arguments)}}();return l((function(){b()})),function(){return u("div",{class:I["create-message"]},[u(R,{inset:!0,class:I.cellGroup},{default:function(){return[u($,{inputAlign:"right",label:"发送方式",modelValue:a[i.sendType],placeholder:"请选择发送方式",onClick:function(){E.value||(i.sendStatus=!0)},readonly:!0,isLink:!E.value,class:I.inputForm},null),"SCHEDULED"===i.sendType&&u($,{inputAlign:"right",label:"发送时间",modelValue:i.sendTime,placeholder:"请选择发送时间",onClick:function(){E.value||(i.sendTimeStatus=!0)},readonly:!0,isLink:!0,class:I.inputForm},null),u(D,{title:"发送内容"},{label:function(){return u($,{style:{padding:"0",marginTop:"12px"},placeholder:"请输入发送内容",modelValue:i.textMessage,"onUpdate:modelValue":function(e){return i.textMessage=e},type:"textarea",rows:3,showWordLimit:!0,maxlength:400,readonly:E.value},null)}}),u(D,{title:"上传附件"},{label:function(){return u(J,{style:{marginTop:"12px"},modelValue:i.attachments,"onUpdate:modelValue":function(e){return i.attachments=e},afterRead:f,beforeRead:c,beforeDelete:o,accept:"image/*",maxCount:9,disabled:E.value},null)}}),u($,{label:"发送对象",readonly:!0,inputAlign:"right",class:I.sendObjPlaceholder,placeholder:E.value?"":"请选择发送对象",isLink:!E.value,border:!1,onClick:function(){E.value||(i.selectStatus=!0)}},null),i.receives.map((function(e){var t=q;return"CLASS"===e.receiveType?t="./assets/icon_jiaofu.97430aa5.png":"STUDENT"===e.receiveType?t=q:"TEACHER"!==e.receiveType&&"SCHOOL"!==e.receiveType||(t=N),u(D,{class:I.receives,title:e.receiveName,center:!0,border:!1},{icon:function(){return u(V,{class:I.img,src:e.avatar||t},null)},extra:function(){return!E.value&&u(k,{name:"clear",color:"#d7d7d7",size:20,onClick:function(){i.delSelectItem=e,i.delStatus=!0}},null)}})}))]}}),u(L,{position:"bottom"},{default:function(){return["ADD"===i.type&&u("div",{class:"btnGroup"},[u(v,{round:!0,block:!0,type:"primary",onClick:g,disabled:i.sureLoading},{default:function(){return[d("确认发送")]}})]),"WAIT"===i.type&&u("div",{class:["btnGroup","btnMore"]},[u(v,{round:!0,type:"primary",onClick:g,disabled:i.updateLoading},{default:function(){return[d("修改")]}}),u(v,{round:!0,color:"#64A9FF",onClick:z,disabled:i.closeLoading},{default:function(){return[d("撤销")]}})])]}}),u(K,{show:i.sendStatus,"onUpdate:show":function(e){return i.sendStatus=e},actions:i.actions,onSelect:function(e){i.actions.forEach((function(e){e.selected=!1})),e.selected=!0,i.sendType=e.value,i.sendStatus=!1}},null),u(p,{show:i.sendTimeStatus,"onUpdate:show":function(e){return i.sendTimeStatus=e},position:"bottom",round:!0,class:"popupBottomSearch"},{default:function(){return[u(X,{title:"发送时间",tabs:["选择日期","选择时间"],onCancel:function(){return i.sendTimeStatus=!1},onConfirm:function(e){var t=e[0].selectedValues.join("-"),n=e[1].selectedValues.join(":");i.sendTime=S(t+" "+n).format("YYYY-MM-DD HH:mm:ss"),i.sendTimeStatus=!1}},{default:function(){return[u(Q,{minDate:new Date,maxDate:i.maxDate,modelValue:i.currentDate,"onUpdate:modelValue":function(e){return i.currentDate=e}},null),u(Z,{modelValue:i.currentTime,"onUpdate:modelValue":function(e){return i.currentTime=e}},null)]}})]}}),u(n,{modelValue:i.selectStatus,"onUpdate:modelValue":function(e){return i.selectStatus=e}},{default:function(){return[u(ue,{selectList:i.selectList,"onUpdate:selectList":function(e){return i.selectList=e},onClose:function(){return i.selectStatus=!1},onConfirm:function(e){var t=e.class||[],n=e.student||[],a=e.teacher||[],r=e.school||[],c=[];t.forEach((function(e){c.push({receiveType:"CLASS",receiveId:e.id,receiveName:e.value,avatar:e.avatar})})),n.forEach((function(e){c.push({receiveType:"STUDENT",receiveId:e.id,receiveName:e.value,avatar:e.avatar})})),a.forEach((function(e){c.push({receiveType:"TEACHER",receiveId:e.id,receiveName:e.value,avatar:e.avatar})})),r.forEach((function(e){c.push({receiveType:"SCHOOL",receiveId:e.id,receiveName:e.value,avatar:e.avatar})})),i.receives=c}},null)]}}),u(W,{show:i.delStatus,"onUpdate:show":function(e){return i.delStatus=e},showCancelButton:!0,message:"您是否删除该数据",onConfirm:function(){var e=i.selectList;if("CLASS"===i.delSelectItem.receiveType){var t=e.class||[],n=t.findIndex((function(e){return e.id===i.delSelectItem.receiveId}));t.splice(n,1)}else if("SCHOOL"===i.delSelectItem.receiveType){var a=e.school||[],r=a.findIndex((function(e){return e.id===i.delSelectItem.receiveId}));a.splice(r,1)}else if("TEACHER"===i.delSelectItem.receiveType){var c=e.teacher||[],s=c.findIndex((function(e){return e.id===i.delSelectItem.receiveId}));c.splice(s,1)}else if("STUDENT"===i.delSelectItem.receiveType){var o=e.student||[],l=o.findIndex((function(e){return e.id===i.delSelectItem.receiveId}));o.splice(l,1)}i.selectList=e,console.log(i.selectList,"forms.selectList");var u=i.receives.findIndex((function(e){return e.receiveId===i.delSelectItem.receiveId}));i.receives.splice(u,1)}},null)])}}}))}}}))}();