teacher-list-legacy.01026c93.js 7.1 KB

1
  1. !function(){function e(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function t(t){for(var r=1;r<arguments.length;r++){var a=null!=arguments[r]?arguments[r]:{};r%2?e(Object(a),!0).forEach((function(e){n(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 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 r(e,t,n,r,a,i,o){try{var c=e[i](o),l=c.value}catch(s){return void n(s)}c.done?t(l):Promise.resolve(l).then(r,a)}var a=document.createElement("style");a.innerHTML="._cellTeacher_k4wyd_1 ._img_k4wyd_1{width:1.28rem;height:1.28rem;overflow:hidden;border-radius:50%;margin-right:.32rem;flex-shrink:0}._cellTeacher_k4wyd_1 ._name_k4wyd_9{font-size:.42667rem;font-weight:500;color:#333;line-height:.58667rem;max-width:5.86667rem}._cellTeacher_k4wyd_1 ._class_k4wyd_16{font-size:.32rem;color:#777;line-height:.45333rem}._cellTeacher_k4wyd_1 .van-tag{margin-top:.08rem;margin-right:.21333rem}._subjectContainer_k4wyd_25{display:flex}._subjectContainer_k4wyd_25>span{flex-shrink:0;font-weight:500}._subjectContainer_k4wyd_25 ._tagSubject_k4wyd_32{margin-right:.26667rem;margin-top:.05333rem;margin-bottom:.21333rem;padding:.02667rem .21333rem;font-weight:500}._manageCell_k4wyd_39{padding:.4rem .34667rem}._manageCell_k4wyd_39 .van-cell__title{flex:1 auto;flex-basis:48%}._manageCell_k4wyd_39 ._teacherContent_k4wyd_46{display:flex;align-items:center;justify-content:space-between}._manageCell_k4wyd_39 ._teacherContent_k4wyd_46 ._content_k4wyd_51{width:1.86667rem}._manageCell_k4wyd_39 ._teacherContent_k4wyd_46 ._name_k4wyd_9{font-size:.42667rem;font-weight:500;color:#333;line-height:.58667rem;max-width:1.86667rem}._manageCell_k4wyd_39 ._teacherContent_k4wyd_46 ._classNum_k4wyd_61{text-align:center;width:1.6rem}._manageCell_k4wyd_39 ._teacherContent_k4wyd_46 ._num_k4wyd_65{font-size:.53333rem;font-weight:700;color:#f67146;line-height:.64rem}._manageCell_k4wyd_39 ._teacherContent_k4wyd_46 ._numText_k4wyd_71{font-size:.32rem;color:#333;line-height:.45333rem}._manageCell_k4wyd_39 ._teacherContent_k4wyd_46 ._messageImg_k4wyd_76{margin-top:.13333rem;width:.64rem;height:.64rem}._manageCell_k4wyd_39 ._img_k4wyd_1{width:1.28rem;height:1.28rem;overflow:hidden;border-radius:50%;margin-right:.26667rem}._manageCell_k4wyd_39 ._name_k4wyd_9{font-size:.42667rem;font-weight:500;color:#333;line-height:.58667rem}._manageCell_k4wyd_39 ._phone_k4wyd_94{font-size:.37333rem;color:#777;line-height:.53333rem}._manageCell_k4wyd_39 ._status_k4wyd_99{font-size:.42667rem;font-weight:500;color:#333}._manageCell_k4wyd_39 ._frozen_k4wyd_104{color:#f44541}\n",document.head.appendChild(a),System.register(["./index-legacy.90c82f08.js","./index-legacy.84457c4c.js","./icon_teacher-legacy.07765f44.js","./index-legacy.e11fad33.js","./index-legacy.789a0824.js","./index-legacy.55839436.js","./index-legacy.f3e5e283.js","./index-legacy.eb4bc59e.js","./index-legacy.92c1b9d6.js"],(function(e){"use strict";var n,a,i,o,c,l,s,d,u,_,m,f,y,h,g,p,w,k,b;return{setters:[function(e){n=e.d,a=e.r,i=e.Z,o=e.$,c=e.c,l=e.aj,s=e.q,d=e.ak,u=e.al,_=e.m,m=e.g},function(e){f=e.O},function(e){y=e.i},function(e){h=e.O},function(e){g=e.L},function(e){p=e.C},function(e){w=e.C},function(e){k=e.I},function(e){b=e.T}],execute:function(){var j="_img_k4wyd_1",v="_name_k4wyd_9",C="_subjectContainer_k4wyd_25",x="_tagSubject_k4wyd_32",S="_manageCell_k4wyd_39",O="_teacherContent_k4wyd_46",T="_content_k4wyd_51";function I(e){return"function"==typeof e||"[object Object]"===Object.prototype.toString.call(e)&&!u(e)}e("T",n({name:"teacher-list",props:{header:{type:Boolean,default:!0},mode:{type:String,default:"fixed"},courseType:{type:String,default:""},removeTeacherId:{type:String,default:""},subjectIdList:{type:Array,default:function(){return[]}}},emits:["close","select"],setup:function(e,n){n.slots,n.attrs;var u=n.emit,L=a({teacherStatus:!1,isLoad:!1,list:[],listState:{dataShow:!0,loading:!1,finished:!1},params:{keyword:null,courseType:e.courseType,subjectIdList:e.subjectIdList,page:1,rows:20}}),P=function(){var n,a=(n=regeneratorRuntime.mark((function n(){var r,a,i;return regeneratorRuntime.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:if(n.prev=0,!L.isLoad){n.next=3;break}return n.abrupt("return");case 3:return L.isLoad=!0,n.next=6,_.post("/api-school/teacher/page",{data:t(t({},L.params),{},{schoolId:m.user.data.school.id,removeTeacherId:e.removeTeacherId,delFlag:!1})});case 6:if(r=n.sent,L.listState.loading=!1,a=r.data||{},!(L.list.length>0&&1===a.current)){n.next=11;break}return n.abrupt("return");case 11:(i=a.rows||[]).forEach((function(e){e.subjectNames=e.subjectName?e.subjectName.split(","):[]})),L.list=L.list.concat(i),L.listState.finished=a.current>=a.pages,L.params.page=a.current+1,L.listState.dataShow=L.list.length>0,L.isLoad=!1,n.next=25;break;case 20:n.prev=20,n.t0=n.catch(0),L.listState.dataShow=!1,L.listState.finished=!0,L.isLoad=!1;case 25:case"end":return n.stop()}}),n,null,[[0,20]])})),function(){var e=this,t=arguments;return new Promise((function(a,i){var o=n.apply(e,t);function c(e){r(o,a,i,c,l,"next",e)}function l(e){r(o,a,i,c,l,"throw",e)}c(void 0)}))});return function(){return a.apply(this,arguments)}}(),z=function(){L.params.page=1,L.list=[],L.listState.dataShow=!0,L.listState.loading=!1,L.listState.finished=!1,P()};return i((function(){return e.courseType}),(function(){L.params.courseType=e.courseType,z()})),i((function(){return e.subjectIdList}),(function(){L.params.subjectIdList=e.subjectIdList,z()})),i((function(){return e.removeTeacherId}),(function(){z()})),o((function(){P()})),function(){var t;return c("div",{class:!L.listState.dataShow&&"emptyRootContainer",style:{background:"#F8F8F8",minHeight:"100%"}},[c(f,{position:"top",mode:e.mode},{default:function(){return[e.header&&c(l,{title:"选择伴学老师",border:!1},null),c(h,{placeholder:"伴学老师名称",onSearch:function(e){L.params.keyword=e,z()}},null)]}}),L.listState.dataShow?c(g,{finished:L.listState.finished,finishedText:" ",onLoad:P,style:{paddingTop:"12px"},immediateCheck:!1},I(t=L.list.map((function(e){return c(p,{inset:!0,style:{marginBottom:"12px"},onClick:function(){return function(e){u("close"),u("select",e)}(e)}},{default:function(){return[c(w,{center:!0,class:S,clickable:!1},{icon:function(){return c(k,{class:j,src:e.avatar?e.avatar:y,fit:"cover"},null)},title:function(){return c("div",{class:O},[c("div",{class:T},[c("p",{class:[v,"van-ellipsis"]},[e.nickname])])])}}),c(w,{center:!0},{title:function(){return c("div",{class:C},[c("span",null,[s("声部:")]),c("div",{style:{display:"flex",alignItems:"center",flexWrap:"wrap"}},[e.subjectNames&&e.subjectNames.length>0&&e.subjectNames.map((function(e){return c(b,{type:"primary",class:x,color:"#FFE7DA",textColor:"#F67146"},I(e)?e:{default:function(){return[e]}})}))])])}})]}})})))?t:{default:function(){return[t]}}):c(d,{btnStatus:!1,tips:"暂无伴学老师"},null)])}}}))}}}))}();