create-message-legacy.216d6199.js 34 KB

1
  1. !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;a<arguments.length;a++){var r=null!=arguments[a]?arguments[a]:{};a%2?e(Object(r),!0).forEach((function(e){n(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):e(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function n(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function a(e,t,n,a,r,i,c){try{var s=e[i](c),o=s.value}catch(l){return void n(l)}s.done?t(o):Promise.resolve(o).then(a,r)}function r(e){return function(){var t=this,n=arguments;return new Promise((function(r,i){var c=e.apply(t,n);function s(e){a(c,r,i,s,o,"next",e)}function o(e){a(c,r,i,s,o,"throw",e)}s(void 0)}))}}var i=document.createElement("style");i.innerHTML='._searchBand_1dppi_1{display:inline-block;font-size:.37333rem;font-weight:600;color:#333}._searchBand_1dppi_1 ._bandName_1dppi_7{display:inline-block;max-width:4.8rem;vertical-align:text-top}._gridContainer_1dppi_12{margin:0 .34667rem .32rem}._gridContainer_1dppi_12 ._title_1dppi_15{font-size:.69333rem;font-weight:700;color:#333;font-family:DINA}._gridContainer_1dppi_12 ._title_1dppi_15 i{font-style:normal;font-size:.32rem;color:#333}._gridContainer_1dppi_12 ._red_1dppi_26{color:#f67146}._gridContainer_1dppi_12 ._name_1dppi_29{padding-top:.21333rem;font-size:.32rem;color:#777}._gridClass_1dppi_34 ._img_1dppi_34{width:1.06667rem;height:1.06667rem;margin-right:.21333rem;border-radius:50%;overflow:hidden}._gridClass_1dppi_34 ._teacherName_1dppi_41{display:flex;align-items:center}._gridClass_1dppi_34 ._teacherName_1dppi_41 ._name_1dppi_29{padding:0;max-width:3.2rem;font-size:.42667rem;font-weight:600;color:#333;line-height:.58667rem}._gridClass_1dppi_34 ._teacherName_1dppi_41 .van-tag{margin-left:.21333rem;height:.45333rem;border-radius:.10667rem}._gridClass_1dppi_34 ._classCheckbox_1dppi_58{display:flex;justify-content:flex-end}._gridClass_1dppi_34 ._orchestraName_1dppi_62{padding-top:.08rem;font-size:.32rem;color:#777;line-height:.45333rem;max-width:5.86667rem}._gridClass_1dppi_34 ._title_1dppi_15{font-size:.64rem}._gridClass_1dppi_34 ._className_1dppi_72{padding:.45333rem .4rem 0;font-size:.42667rem;font-weight:500;color:#333;line-height:.58667rem}._gridClass_1dppi_34 ._className_1dppi_72 ._line_1dppi_79{display:inline-block;width:.10667rem;height:.32rem;background:#ff8057;border-radius:.08rem;margin-right:.16rem}._gridClass_1dppi_34 .van-grid-item:after{content:" ";position:absolute;top:50%;right:0;margin-top:-.26667rem;width:.02667rem;height:.53333rem;background:#eaeaea;border-radius:.02667rem}._gridClass_1dppi_34 .van-grid-item:last-child:after{display:none}._classCellGroup_1dppi_101{margin-bottom:.32rem;border-radius:.26667rem;overflow:hidden}._cellTeacher_bjfo6_1 ._img_bjfo6_1{width:1.28rem;height:1.28rem;overflow:hidden;border-radius:50%;margin-right:.32rem;flex-shrink:0}._cellTeacher_bjfo6_1 ._name_bjfo6_9{font-size:.42667rem;font-weight:500;color:#333;line-height:.58667rem;max-width:3.2rem}._cellTeacher_bjfo6_1 ._class_bjfo6_16{font-size:.32rem;color:#777;line-height:.45333rem}._cellTeacher_bjfo6_1 .van-tag{margin-top:.08rem;margin-right:.21333rem}._cellTeacher_bjfo6_1 ._checkboxValue_bjfo6_25{display:flex;justify-content:flex-end}._subjectContainer_bjfo6_29{display:flex}._subjectContainer_bjfo6_29>span{flex-shrink:0}._subjectContainer_bjfo6_29 ._tagSubject_bjfo6_35{margin-right:.26667rem;margin-top:.05333rem;margin-bottom:.05333rem;padding:.02667rem .21333rem}._cellTeacher_fnv0v_1 ._img_fnv0v_1{width:1.06667rem;height:1.06667rem;overflow:hidden;border-radius:50%;margin-right:.32rem;flex-shrink:0}._cellTeacher_fnv0v_1 ._name_fnv0v_9{font-size:.42667rem;font-weight:500;color:#333;line-height:.58667rem;max-width:3.2rem}._cellTeacher_fnv0v_1 ._class_fnv0v_16{font-size:.32rem;color:#777;line-height:.45333rem}._cellTeacher_fnv0v_1 .van-tag{margin-top:.08rem;margin-right:.21333rem}._cellTeacher_fnv0v_1 ._checkboxValue_fnv0v_25{display:flex;justify-content:flex-end}._subjectContainer_fnv0v_29{display:flex}._subjectContainer_fnv0v_29>span{flex-shrink:0}._subjectContainer_fnv0v_29 ._tagSubject_fnv0v_35{margin-right:.26667rem;margin-top:.05333rem;margin-bottom:.05333rem;padding:.02667rem .21333rem}\n',document.head.appendChild(i),System.register(["./index-legacy.90c82f08.js","./index-legacy.c223b3ce.js","./index-legacy.4e015ad0.js","./index.module-legacy.475a9872.js","./index-legacy.84457c4c.js","./icon_teacher-legacy.07765f44.js","./index-legacy.f9492e3a.js","./index-legacy.789a0824.js","./index-legacy.b10d0450.js","./index-legacy.55839436.js","./index-legacy.f3e5e283.js","./index-legacy.eb4bc59e.js","./index-legacy.92c1b9d6.js","./index-legacy.f7f96215.js","./index-legacy.e4343e46.js","./index-legacy.c8871c95.js","./index-legacy.e11fad33.js","./index-legacy.fe10c814.js","./icon_student-legacy.6118fd72.js","./index-legacy.f1d613e0.js","./index-legacy.5d5ea365.js","./index-legacy.2d97be40.js","./Picker-legacy.aeff9f1a.js","./index-legacy.57f6905b.js","./index-legacy.3c5580aa.js","./index-legacy.537e6dca.js","./use-tab-status-legacy.bafe466c.js","./Checker-legacy.1b485b9f.js","./index-legacy.64e3b474.js","./index-legacy.2870cc6d.js","./oss-file-upload-legacy.be0f8098.js","./index-legacy.617aab72.js","./ImagePreview-legacy.356ad326.js","./function-call-legacy.aee1e992.js","./utils-legacy.8e06f916.js"],(function(e){"use strict";var n,a,i,c,s,o,l,u,d,f,p,h,m,g,v,_,b,y,S,x,k,j,C,w,T,I,L,N,H,E,O,D,R,V,A,M,P,U,B,z,G,F,Y,q,W,Z,$,J,K;return{setters:[function(e){n=e.D,a=e.d,i=e.r,c=e.Z,s=e.$,o=e.c,l=e.q,u=e.ak,d=e.P,f=e.al,p=e.m,h=e.g,m=e.an,g=e.aj,v=e.B,_=e.ag,b=e.ah,y=e.ai,S=e.y,x=e.a5,k=e.a_,j=e.o},function(e){C=e.O},function(e){w=e.e},function(e){T=e.s},function(e){I=e.O},function(e){L=e.i},function(e){N=e.S},function(e){H=e.L},function(e){E=e.C},function(e){O=e.C},function(e){D=e.C},function(e){R=e.I},function(e){V=e.T},function(e){A=e.C},function(e){M=e.G,P=e.a},function(e){U=e.P},function(e){B=e.O},function(e){z=e.T,G=e.a},function(e){F=e.i},function(e){Y=e.O},function(e){q=e.O},function(e){W=e.O},function(e){Z=e.a},function(e){$=e.T},function(e){J=e.F},function(e){K=e.D},function(){},function(){},function(){},function(){},function(){},function(){},function(){},function(){},function(){}],execute:function(){var Q=n(Z),X={searchBand:"_searchBand_1dppi_1",bandName:"_bandName_1dppi_7",gridContainer:"_gridContainer_1dppi_12",title:"_title_1dppi_15",red:"_red_1dppi_26",name:"_name_1dppi_29",gridClass:"_gridClass_1dppi_34",img:"_img_1dppi_34",teacherName:"_teacherName_1dppi_41",classCheckbox:"_classCheckbox_1dppi_58",orchestraName:"_orchestraName_1dppi_62",className:"_className_1dppi_72",line:"_line_1dppi_79",classCellGroup:"_classCellGroup_1dppi_101"};var ee=a({name:"practice-class",props:{height:{type:[String,Number],default:"auto"},bottomHeight:{type:[String,Number],default:0},headerHeight:{type:[String,Number],default:0},selectItem:{type:Array,default:function(){return[]}}},emits:["close","confirm","update:selectItem"],setup:function(e,n){var a=n.emit,m=i({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:[]}),g=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,p.post("/api-school/orchestra/page",{data:{page:1,rows:100,schoolId:h.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})})),m.orchestraList=[].concat(r),r.length>0&&(m.orchestraId=r[0].value,m.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)}}(),v=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,!m.isClick){e.next=3;break}return e.abrupt("return");case 3:return m.isClick=!0,e.next=6,p.post("/api-school/classGroup/page",{data:t(t({},m.params),{},{schoolId:h.user.data.school.id,orchestraId:m.orchestraId})});case 6:if(n=e.sent,a=n.data,m.isClick=!1,m.listState.loading=!1,r=a||{},!(m.list.length>0&&1===r.current)){e.next=13;break}return e.abrupt("return");case 13:m.list=m.list.concat(r.rows||[]),m.listState.finished=r.current>=r.pages,m.params.page=r.current+1,m.listState.dataShow=m.list.length>0,e.next=24;break;case 19:e.prev=19,e.t0=e.catch(0),m.listState.dataShow=!1,m.listState.finished=!0,m.isClick=!1;case 24:case"end":return e.stop()}}),e,null,[[0,19]])})));return function(){return e.apply(this,arguments)}}(),_=function(e){m.checkboxRefs[e].toggle();var t=[];m.list.forEach((function(e){m.check.includes(e.id)&&t.push({id:e.id,value:e.name,avatar:""})})),a("update:selectItem",t)};c((function(){return e.selectItem}),(function(){b()}),{deep:!0});var b=function(){var t=e.selectItem||[],n=[];t.forEach((function(e){n.push(e.id)})),m.check=n};return s(r(regeneratorRuntime.mark((function e(){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,g();case 2:return e.next=4,v();case 4:b();case 5:case"end":return e.stop()}}),e)})))),function(){var t;return o("div",{class:[X.practiceClass,!m.listState.dataShow&&"emptyRootContainer"],style:{"min-height":"calc(100vh - ".concat(e.height,"px - ").concat(e.bottomHeight,"px)")}},[m.orchestraList.length>0&&o(N,{position:"top",offsetTop:e.headerHeight,style:{width:"100%"}},{default:function(){return[o("div",{class:"searchGroup-single"},[o("div",{class:["searchItem",m.showPopover?"searchItem-active":""],onClick:function(){return m.showPopover=!0}},[o("span",null,[m.orchestraName])])])]}}),m.listState.dataShow?o(H,{finished:m.listState.finished,finishedText:" ",class:[X.liveList],onLoad:v,immediateCheck:!1},{default:function(){return[o(E,{class:[X.gridContainer,X.gridClass],modelValue:m.check,"onUpdate:modelValue":function(e){return m.check=e}},(e=t=m.list.map((function(e){return o(O,{class:X.classCellGroup,onClick:function(){return _(e.id)},border:!1},{default:function(){return[o(D,{center:!0,titleStyle:{flex:"0 auto"},valueClass:X.classCheckbox},{icon:function(){return o(R,{src:L,class:X.img},null)},title:function(){return o("div",{class:X.content},[o("div",{class:X.teacherName},[o("span",{class:["van-ellipsis",X.name]},[e.teacherName]),o(V,{type:"primary"},{default:function(){return[e.name]}})]),o("div",{class:[X.orchestraName,"van-ellipsis"]},[e.orchestraName])])},value:function(){return o(A,{name:e.id,ref:function(t){return m.checkboxRefs[e.id]=t},onClick:function(t){t.preventDefault(),t.stopPropagation(),_(e.id)}},null)}}),o(M,{border:!1,columnNum:3},{default:function(){return[o(P,null,{default:function(){return[o("p",{class:X.title},[e.preStudentNum]),o("p",{class:X.name},[l("学员人数")])]}}),o(P,null,{default:function(){return[o("p",{class:[X.title]},[e.courseScheduleNum-e.completeCourseScheduleNum]),o("p",{class:X.name},[l("剩余课时")])]}}),o(P,null,{default:function(){return[o("p",{class:X.title},[e.courseScheduleNum]),o("p",{class:X.name},[l("总课时")])]}})]}})]}})})),"function"==typeof e||"[object Object]"===Object.prototype.toString.call(e)&&!f(e)?t:{default:function(){return[t]}}))];var e}}):o(u,{btnStatus:!1,tips:"暂无班级"},null),o(d,{show:m.showPopover,"onUpdate:show":function(e){return m.showPopover=e},position:"bottom",round:!0,class:"popupBottomSearch",teleport:"#select-send-message"},{default:function(){return[o(U,{columns:m.orchestraList,onCancel:function(){return m.showPopover=!1},onConfirm:function(e){m.orchestraId=e.selectedOptions[0].value,m.orchestraName=e.selectedOptions[0].text,m.showPopover=!1,m.params.page=1,m.list=[],m.listState.dataShow=!0,m.listState.loading=!1,m.listState.finished=!1,v()}},null)]}})])}}}),te={cellTeacher:"_cellTeacher_bjfo6_1",img:"_img_bjfo6_1",name:"_name_bjfo6_9",class:"_class_bjfo6_16",checkboxValue:"_checkboxValue_bjfo6_25",subjectContainer:"_subjectContainer_bjfo6_29",tagSubject:"_tagSubject_bjfo6_35"};var ne=a({name:"manage-list",props:{height:{type:[String,Number],default:"auto"},bottomHeight:{type:[String,Number],default:0},headerHeight:{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,l=i({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:[]}),d=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,!l.isLoad){e.next=3;break}return e.abrupt("return");case 3:return l.isLoad=!0,e.next=6,p.post("/api-school/schoolStaff/page",{data:t(t({},l.params),{},{schoolId:h.user.data.school.id,status:"ACTIVATION"})});case 6:if(n=e.sent,l.listState.loading=!1,a=n.data||{},!(l.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(","):[]})),l.list=l.list.concat(r),l.listState.finished=a.current>=a.pages,l.params.page=a.current+1,l.listState.dataShow=l.list.length>0,l.isLoad=!1,e.next=25;break;case 20:e.prev=20,e.t0=e.catch(0),l.listState.dataShow=!1,l.listState.finished=!0,l.isLoad=!1;case 25:case"end":return e.stop()}}),e,null,[[0,20]])})));return function(){return e.apply(this,arguments)}}(),m=function(e){l.checkboxRefs[e].toggle();var t=[];l.list.forEach((function(e){l.check.includes(e.id)&&t.push({id:e.id,value:e.nickname,avatar:e.avatar})})),a("update:selectItem",t)};c((function(){return e.selectItem}),(function(){g()}),{deep:!0});var g=function(){var t=e.selectItem||[],n=[];t.forEach((function(e){n.push(e.id)})),l.check=n};return s((function(){d(),g(),console.log(e.height,e.bottomHeight,"11121212")})),function(){var t;return o("div",{class:[!l.listState.dataShow&&"emptyRootContainer"],style:{"min-height":"calc(100vh - ".concat("auto"===e.height?0:e.height,"px - ").concat(e.bottomHeight,"px)")}},[o(N,{position:"top",offsetTop:e.headerHeight,style:{width:"100%"}},{default:function(){return[o(B,{placeholder:"管理老师姓名/手机号",onSearch:function(e){l.params.keyword=e,l.params.page=1,l.list=[],l.listState.dataShow=!0,l.listState.loading=!1,l.listState.finished=!1,d()}},null)]}}),l.listState.dataShow?o(H,{finished:l.listState.finished,finishedText:" ",onLoad:d,style:{paddingTop:"12px"},immediateCheck:!1},{default:function(){return[o(E,{class:[te.gridContainer,te.gridClass],modelValue:l.check,"onUpdate:modelValue":function(e){return l.check=e}},(e=t=l.list.map((function(e){return o(O,{inset:!0,style:{marginBottom:"12px"},onClick:function(){return m(e.id)}},{default:function(){return[o(D,{center:!0,class:te.cellTeacher,valueClass:te.checkboxValue},{icon:function(){return o(R,{class:te.img,src:e.avatar||L,fit:"cover"},null)},title:function(){return o("div",{class:te.content},[o("p",{class:[te.name,"van-ellipsis"]},[e.nickname])])},value:function(){return o(A,{name:e.id,ref:function(t){return l.checkboxRefs[e.id]=t},onClick:function(t){t.preventDefault(),t.stopPropagation(),m(e.id)}},null)}})]}})})),"function"==typeof e||"[object Object]"===Object.prototype.toString.call(e)&&!f(e)?t:{default:function(){return[t]}}))];var e}}):o(u,{btnStatus:!1,tips:"暂无管理老师"},null)])}}}),ae={cellTeacher:"_cellTeacher_bjfo6_1",img:"_img_bjfo6_1",name:"_name_bjfo6_9",class:"_class_bjfo6_16",checkboxValue:"_checkboxValue_bjfo6_25",subjectContainer:"_subjectContainer_bjfo6_29",tagSubject:"_tagSubject_bjfo6_35"};function re(e){return"function"==typeof e||"[object Object]"===Object.prototype.toString.call(e)&&!f(e)}var ie=a({name:"teacher-list",props:{height:{type:[String,Number],default:"auto"},bottomHeight:{type:[String,Number],default:0},headerHeight:{type:[String,Number],default:0},selectItem:{type:Array,default:function(){return[]}}},emits:["close","select","update:selectItem"],setup:function(e,n){var a=n.emit,l=i({teacherStatus:!1,isLoad:!1,list:[],listState:{dataShow:!0,loading:!1,finished:!1},params:{keyword:null,page:1,rows:20},check:e.selectItem||[],checkboxRefs:[]}),d=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,!l.isLoad){e.next=3;break}return e.abrupt("return");case 3:return l.isLoad=!0,e.next=6,p.post("/api-school/student/page",{data:t(t({},l.params),{},{schoolId:h.user.data.school.id})});case 6:if(n=e.sent,l.listState.loading=!1,a=n.data||{},!(l.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(","):[]})),l.list=l.list.concat(r),l.listState.finished=a.current>=a.pages,l.params.page=a.current+1,l.listState.dataShow=l.list.length>0,l.isLoad=!1,e.next=25;break;case 20:e.prev=20,e.t0=e.catch(0),l.listState.dataShow=!1,l.listState.finished=!0,l.isLoad=!1;case 25:case"end":return e.stop()}}),e,null,[[0,20]])})));return function(){return e.apply(this,arguments)}}(),f=function(e){l.checkboxRefs[e].toggle();var t=[];l.list.forEach((function(e){l.check.includes(e.id)&&t.push({id:e.id,value:e.nickname,avatar:e.avatar})})),a("update:selectItem",t)};c((function(){return e.selectItem}),(function(){m()}),{deep:!0});var m=function(){var t=e.selectItem||[],n=[];t.forEach((function(e){n.push(e.id)})),l.check=n};return s((function(){d(),m()})),function(){var t;return o("div",{class:[!l.listState.dataShow&&"emptyRootContainer"],style:{"min-height":"calc(100vh - ".concat(e.height,"px - ").concat(e.bottomHeight,"px)")}},[o(N,{position:"top",offsetTop:e.headerHeight,style:{width:"100%"}},{default:function(){return[o(B,{placeholder:"学员名称/手机号",onSearch:function(e){l.params.keyword=e,l.params.page=1,l.list=[],l.listState.dataShow=!0,l.listState.loading=!1,l.listState.finished=!1,d()}},null)]}}),l.listState.dataShow?o(H,{finished:l.listState.finished,finishedText:" ",onLoad:d,style:{paddingTop:"12px"},immediateCheck:!1},{default:function(){return[o(E,{class:[ae.gridContainer,ae.gridClass],modelValue:l.check,"onUpdate:modelValue":function(e){return l.check=e}},re(t=l.list.map((function(e){return o(O,{inset:!0,style:{marginBottom:"12px"},onClick:function(){return f(e.id)}},{default:function(){return[o(D,{center:!0,class:ae.cellTeacher,valueClass:ae.checkboxValue},{icon:function(){return o(R,{class:ae.img,src:e.avatar||L,fit:"cover"},null)},title:function(){return o("div",{class:ae.content},[o("p",{class:[ae.name,"van-ellipsis"]},[e.nickname]),o("p",{class:ae.class},[e.subjectNames&&e.subjectNames.map((function(e){return o(V,{type:"primary",class:ae.tagSubject,color:"#FFE7DA",textColor:"#F67146"},re(e)?e:{default:function(){return[e]}})}))])])},value:function(){return o(A,{name:e.id,ref:function(t){return l.checkboxRefs[e.id]=t},onClick:function(t){t.preventDefault(),t.stopPropagation(),f(e.id)}},null)}})]}})})))?t:{default:function(){return[t]}})]}}):o(u,{btnStatus:!1,tips:"暂无学员"},null)])}}}),ce={cellTeacher:"_cellTeacher_fnv0v_1",img:"_img_fnv0v_1",name:"_name_fnv0v_9",class:"_class_fnv0v_16",checkboxValue:"_checkboxValue_fnv0v_25",subjectContainer:"_subjectContainer_fnv0v_29",tagSubject:"_tagSubject_fnv0v_35"};function se(e){return"function"==typeof e||"[object Object]"===Object.prototype.toString.call(e)&&!f(e)}var oe=a({name:"teacher-list",props:{height:{type:[String,Number],default:"auto"},bottomHeight:{type:[String,Number],default:0},headerHeight:{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,d=i({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:[]}),f=function(){var n=r(regeneratorRuntime.mark((function n(){var a,r,i;return regeneratorRuntime.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:if(n.prev=0,!d.isLoad){n.next=3;break}return n.abrupt("return");case 3:return d.isLoad=!0,n.next=6,p.post("/api-school/teacher/page",{data:t(t({},d.params),{},{schoolId:h.user.data.school.id,removeTeacherId:e.removeTeacherId,delFlag:!1})});case 6:if(a=n.sent,d.listState.loading=!1,r=a.data||{},!(d.list.length>0&&1===r.current)){n.next=11;break}return n.abrupt("return");case 11:(i=r.rows||[]).forEach((function(e){e.subjectNames=e.subjectName?e.subjectName.split(","):[]})),d.list=d.list.concat(i),d.listState.finished=r.current>=r.pages,d.params.page=r.current+1,d.listState.dataShow=d.list.length>0,d.isLoad=!1,n.next=25;break;case 20:n.prev=20,n.t0=n.catch(0),d.listState.dataShow=!1,d.listState.finished=!0,d.isLoad=!1;case 25:case"end":return n.stop()}}),n,null,[[0,20]])})));return function(){return n.apply(this,arguments)}}(),m=function(e){d.checkboxRefs[e].toggle();var t=[];d.list.forEach((function(e){d.check.includes(e.id)&&t.push({id:e.id,value:e.nickname,avatar:e.avatar})})),a("update:selectItem",t)};c((function(){return e.selectItem}),(function(){g()}),{deep:!0});var g=function(){var t=e.selectItem||[],n=[];t.forEach((function(e){n.push(e.id)})),d.check=n};return s((function(){f(),g()})),function(){var t;return o("div",{class:[!d.listState.dataShow&&"emptyRootContainer"],style:{"min-height":"calc(100vh - ".concat(e.height,"px - ").concat(e.bottomHeight,"px)")}},[o(N,{position:"top",offsetTop:e.headerHeight,style:{width:"100%"}},{default:function(){return[o(B,{placeholder:"伴学老师姓名",onSearch:function(e){d.params.keyword=e,d.params.page=1,d.list=[],d.listState.dataShow=!0,d.listState.loading=!1,d.listState.finished=!1,f()}},null)]}}),d.listState.dataShow?o(H,{finished:d.listState.finished,finishedText:" ",style:{paddingTop:"12px"},onLoad:f,immediateCheck:!1},{default:function(){return[o(E,{class:[ce.gridContainer,ce.gridClass],modelValue:d.check,"onUpdate:modelValue":function(e){return d.check=e}},se(t=d.list.map((function(e){return o(O,{inset:!0,style:{marginBottom:"12px"},onClick:function(){return m(e.id)}},{default:function(){return[o(D,{center:!0,class:ce.cellTeacher,valueClass:ce.checkboxValue},{icon:function(){return o(R,{class:ce.img,src:e.avatar||L,fit:"cover"},null)},title:function(){return o("div",{class:ce.content},[o("p",{class:[ce.name,"van-ellipsis"]},[e.nickname])])},value:function(){return o(A,{name:e.id,ref:function(t){return d.checkboxRefs[e.id]=t},onClick:function(t){t.preventDefault(),t.stopPropagation(),m(e.id)}},null)}}),o(D,{center:!0},{title:function(){return o("div",{class:ce.subjectContainer},[o("span",null,[l("声部:")]),o("div",{style:{display:"flex",alignItems:"center",flexWrap:"wrap"}},[e.subjectNames&&e.subjectNames.map((function(e){return o(V,{type:"primary",class:ce.tagSubject,color:"#FFE7DA",textColor:"#F67146"},se(e)?e:{default:function(){return[e]}})}))])])}})]}})})))?t:{default:function(){return[t]}})]}}):o(u,{btnStatus:!1,tips:"暂无伴学老师"},null)])}}}),le=a({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=i({headerHeight:0,height:"auto",bottomHeight:0,tabValue:"class",selectClass:[],selectStudent:[],selectTeacher:[],selectManage:[]}),u=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)}}();c((function(){return e.selectList}),(function(){console.log("watch",e.selectList),d()}),{deep:!0});var d=function(){var t=e.selectList||{};a.selectClass=t.class||[],a.selectTeacher=t.teacher||[],a.selectManage=t.school||[],a.selectStudent=t.student||[]};return s((function(){var e=m(document.querySelector(".van-tab")).height;a.height="auto"===a.height?e:a.height+e,d(),console.log(a,"select")})),function(){return o("div",{class:T.orchestraDetail,style:{background:"#f6f6f6",minHeight:"100vh"},id:"select-send-message"},[o(I,{onGetHeight:function(e){console.log(e,"height"),a.height="auto"===a.height?e:a.height+e,a.headerHeight=e}},{default:function(){return[o(g,{title:"发送对象"},null)]}}),o(z,{sticky:!0,lineWidth:20,lineHeight:4,active:a.tabValue,"onUpdate:active":function(e){return a.tabValue=e},offsetTop:a.headerHeight},{default:function(){return[o(G,{title:"班级列表",name:"class"},{default:function(){return[o(ee,{height:a.height,headerHeight:a.headerHeight,bottomHeight:a.bottomHeight,selectItem:a.selectClass,"onUpdate:selectItem":function(e){return a.selectClass=e}},null)]}}),o(G,{title:"学员列表",name:"student"},{default:function(){return[o(ie,{height:a.height,headerHeight:a.headerHeight,bottomHeight:a.bottomHeight,selectItem:a.selectStudent,"onUpdate:selectItem":function(e){return a.selectStudent=e}},null)]}}),o(G,{title:"伴学老师",name:"teacher"},{default:function(){return[o(oe,{height:a.height,headerHeight:a.headerHeight,bottomHeight:a.bottomHeight,selectItem:a.selectTeacher,"onUpdate:selectItem":function(e){return a.selectTeacher=e}},null)]}}),o(G,{title:"管理老师",name:"manage"},{default:function(){return[o(ne,{height:a.height,headerHeight:a.headerHeight,bottomHeight:a.bottomHeight,selectItem:a.selectManage,"onUpdate:selectItem":function(e){return a.selectManage=e}},null)]}})]}}),o(I,{position:"bottom",onGetHeight:function(e){a.bottomHeight=e}},{default:function(){return[o("div",{class:"btnGroup"},[o(v,{round:!0,block:!0,type:"primary",onClick:u},{default:function(){return[l("确认")]}})])]}})])}}});e("default",a({name:"create-message",setup:function(){var e=_(),t=b(),n=i({id:t.query.id,type:"ADD",bucket:"i-m",sendStatus:!1,sendType:"IMMEDIATELY",textMessage:null,sendTime:null,sendTimeStatus:!1,maxDate:y(new Date).add(60,"day").toDate(),currentDate:[],currentTime:[y().format("HH"),y().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"}]}),a=function(){var t=r(regeneratorRuntime.mark((function t(){var a,r,i;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(t.prev=0,n.sendType){t.next=4;break}return j("请选择发送方式"),t.abrupt("return");case 4:if(n.textMessage){t.next=7;break}return j("请输入发送内容"),t.abrupt("return");case 7:if(!(n.receives.length<=0)){t.next=10;break}return j("请选择发送对象"),t.abrupt("return");case 10:if(a=[],n.attachments.forEach((function(e){a.push({imgUrl:e,imgMessage:e})})),r=[],n.receives.forEach((function(e){r.push({receiveType:e.receiveType,receiveId:e.receiveId})})),i={sendType:n.sendType,textMessage:n.textMessage,attachments:a,receives:r,sendTime:n.sendTime},console.log(i,"params"),n.id?n.updateLoading=!0:n.sureLoading=!0,!n.id){t.next=23;break}return i.id=n.id,t.next=21,p.post("/api-school/imMessageBatchSending/update",{hideLoading:!1,data:i});case 21:t.next=25;break;case 23:return t.next=25,p.post("/api-school/imMessageBatchSending/save",{hideLoading:!1,data:i});case 25:e.back(),n.sureLoading=!1,n.updateLoading=!1,t.next=34;break;case 30:t.prev=30,t.t0=t.catch(0),n.sureLoading=!1,n.updateLoading=!1;case 34:case"end":return t.stop()}}),t,null,[[0,30]])})));return function(){return t.apply(this,arguments)}}(),c=function(){var e=r(regeneratorRuntime.mark((function e(){var t,a,r,i,c,s;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(e.prev=0,n.id){e.next=3;break}return e.abrupt("return");case 3:return e.next=5,p.get("/api-school/imMessageBatchSending/detail/"+n.id);case 5:t=e.sent,a=t.data,n.sendType=a.sendType,n.textMessage=a.textMessage,n.sendTime=a.sendTime,n.type=a.sendStatus,r=a.receives||[],i={class:[],teacher:[],student:[],school:[]},r.forEach((function(e){var t={receiveType:e.receiveType,receiveId:e.receiveId,receiveName:e.receiveName,avatar:e.avatar};n.receives.push(t);var a={id:e.receiveId,value:e.receiveName,avatar:e.avatar};"CLASS"===e.receiveType?i.class.push(a):"STUDENT"===e.receiveType?i.student.push(a):"TEACHER"===e.receiveType?i.teacher.push(a):"SCHOOL"===e.receiveType&&i.school.push(a)})),n.selectList=i,c=a.attachments||[],s=[],c.forEach((function(e){s.push(e.imgUrl||e.imgMessage)})),n.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)}}(),u=S((function(){return"SEND"===n.type})),f=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,n.closeLoading=!0,t.next=4,p.post("/api-school/imMessageBatchSending/remove",{requestType:"form",hideLoading:!1,data:{id:n.id}});case 4:setTimeout((function(){j("撤销成功")}),100),setTimeout((function(){e.back(),n.closeLoading=!1}),1100),t.next=11;break;case 8:t.prev=8,t.t0=t.catch(0),n.closeLoading=!1;case 11:case"end":return t.stop()}}),t,null,[[0,8]])})));return function(){return t.apply(this,arguments)}}();return s((function(){c()})),function(){return o("div",{class:T["create-message"]},[o(g,null,null),o(O,{inset:!0,class:T.cellGroup},{default:function(){return[o(J,{inputAlign:"right",label:"发送方式",modelValue:w[n.sendType],placeholder:"请选择发送方式",onClick:function(){u.value||(n.sendStatus=!0)},readonly:!0,isLink:!u.value,class:T.inputForm},null),"SCHEDULED"===n.sendType&&o(J,{inputAlign:"right",label:"发送时间",modelValue:n.sendTime,placeholder:"请选择发送时间",onClick:function(){u.value||(n.sendTimeStatus=!0)},readonly:!0,isLink:!0,class:T.inputForm},null),o(D,{title:"发送内容"},{label:function(){return o(J,{style:{padding:"0",marginTop:"12px"},placeholder:"请输入发送内容",modelValue:n.textMessage,"onUpdate:modelValue":function(e){return n.textMessage=e},type:"textarea",rows:3,showWordLimit:!0,maxlength:400,readonly:u.value},null)}}),o(D,{title:"上传附件"},{label:function(){return o(W,{modelValue:n.attachments,"onUpdate:modelValue":function(e){return n.attachments=e},maxCount:9,bucket:n.bucket,disabled:u.value},null)}}),o(J,{label:"发送对象",readonly:!0,inputAlign:"right",class:T.sendObjPlaceholder,placeholder:u.value?"":"请选择发送对象",isLink:!u.value,border:!1,onClick:function(){u.value||(n.selectStatus=!0)}},null),n.receives.map((function(e){var t=F;return"CLASS"===e.receiveType?t="./assets/icon_jiaofu.97430aa5.png":"STUDENT"===e.receiveType?t=F:"TEACHER"!==e.receiveType&&"SCHOOL"!==e.receiveType||(t=L),o(D,{class:T.receives,title:e.receiveName,center:!0,border:!1},{icon:function(){return o(R,{class:T.img,src:e.avatar||t},null)},extra:function(){return!u.value&&o(x,{name:"clear",color:"#d7d7d7",size:20,onClick:function(){n.delSelectItem=e,n.delStatus=!0}},null)}})}))]}}),o(I,{position:"bottom"},{default:function(){return["ADD"===n.type&&o("div",{class:"btnGroup"},[o(v,{round:!0,block:!0,type:"primary",onClick:a,disabled:n.sureLoading},{default:function(){return[l("确认发送")]}})]),"WAIT"===n.type&&o("div",{class:["btnGroup","btnMore"]},[o(v,{round:!0,type:"primary",onClick:a,disabled:n.updateLoading},{default:function(){return[l("修改")]}}),o(v,{round:!0,color:"#64A9FF",onClick:f,disabled:n.closeLoading},{default:function(){return[l("撤销")]}})])]}}),o(q,{show:n.sendStatus,"onUpdate:show":function(e){return n.sendStatus=e},actions:n.actions,onSelect:function(e){n.actions.forEach((function(e){e.selected=!1})),e.selected=!0,n.sendType=e.value,n.sendStatus=!1}},null),o(d,{show:n.sendTimeStatus,"onUpdate:show":function(e){return n.sendTimeStatus=e},position:"bottom",round:!0,class:"popupBottomSearch"},{default:function(){return[o(Q,{title:"发送时间",tabs:["选择日期","选择时间"],onCancel:function(){return n.sendTimeStatus=!1},onConfirm:function(e){var t=e[0].selectedValues.join("-"),a=e[1].selectedValues.join(":");n.sendTime=y(t+" "+a).format("YYYY-MM-DD HH:mm:ss"),n.sendTimeStatus=!1}},{default:function(){return[o(K,{minDate:new Date,maxDate:n.maxDate,modelValue:n.currentDate,"onUpdate:modelValue":function(e){return n.currentDate=e},formatter:k},null),o($,{modelValue:n.currentTime,"onUpdate:modelValue":function(e){return n.currentTime=e},formatter:function(e,t){return"hour"===e&&(t.text+="时"),"minute"===e&&(t.text+="分"),t}},null)]}})]}}),o(C,{modelValue:n.selectStatus,"onUpdate:modelValue":function(e){return n.selectStatus=e}},{default:function(){return[o(le,{selectList:n.selectList,"onUpdate:selectList":function(e){return n.selectList=e},onClose:function(){return n.selectStatus=!1},onConfirm:function(e){var t=e.class||[],a=e.student||[],r=e.teacher||[],i=e.school||[],c=[];t.forEach((function(e){c.push({receiveType:"CLASS",receiveId:e.id,receiveName:e.value,avatar:e.avatar})})),a.forEach((function(e){c.push({receiveType:"STUDENT",receiveId:e.id,receiveName:e.value,avatar:e.avatar})})),r.forEach((function(e){c.push({receiveType:"TEACHER",receiveId:e.id,receiveName:e.value,avatar:e.avatar})})),i.forEach((function(e){c.push({receiveType:"SCHOOL",receiveId:e.id,receiveName:e.value,avatar:e.avatar})})),n.receives=c}},null)]}}),o(Y,{show:n.delStatus,"onUpdate:show":function(e){return n.delStatus=e},showCancelButton:!0,message:"您是否删除该数据",onConfirm:function(){var e=n.selectList;if("CLASS"===n.delSelectItem.receiveType){var t=e.class||[],a=t.findIndex((function(e){return e.id===n.delSelectItem.receiveId}));t.splice(a,1)}else if("SCHOOL"===n.delSelectItem.receiveType){var r=e.school||[],i=r.findIndex((function(e){return e.id===n.delSelectItem.receiveId}));r.splice(i,1)}else if("TEACHER"===n.delSelectItem.receiveType){var c=e.teacher||[],s=c.findIndex((function(e){return e.id===n.delSelectItem.receiveId}));c.splice(s,1)}else if("STUDENT"===n.delSelectItem.receiveType){var o=e.student||[],l=o.findIndex((function(e){return e.id===n.delSelectItem.receiveId}));o.splice(l,1)}n.selectList=e,console.log(n.selectList,"forms.selectList");var u=n.receives.findIndex((function(e){return e.receiveId===n.delSelectItem.receiveId}));n.receives.splice(u,1)}},null)])}}}))}}}))}();