teacher-list-legacy.6db228e3.js 5.5 KB

1
  1. !function(){var e=document.createElement("style");e.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(e),System.register(["./index-legacy.eb062188.js","./index-legacy.ad813f4d.js","./icon_teacher-legacy.07765f44.js","./index-legacy.a530d593.js","./index-legacy.fad72574.js","./index-legacy.148f784c.js","./index-legacy.918b8c74.js","./index-legacy.fecc738b.js","./index-legacy.11f1ea5f.js"],(function(e){"use strict";var t,a,n,i,r,l,s,d,o,_,c,m,h,y,g,u,w,f,p;return{setters:[function(e){t=e.d,a=e.r,n=e.Z,i=e.$,r=e.c,l=e.aj,s=e.q,d=e.ak,o=e.al,_=e.m,c=e.g},function(e){m=e.O},function(e){h=e.i},function(e){y=e.O},function(e){g=e.L},function(e){u=e.C},function(e){w=e.C},function(e){f=e.I},function(e){p=e.T}],execute:function(){var k="_img_k4wyd_1",C="_name_k4wyd_9",b="_subjectContainer_k4wyd_25",j="_tagSubject_k4wyd_32",S="_manageCell_k4wyd_39",x="_teacherContent_k4wyd_46",v="_content_k4wyd_51";function T(e){return"function"==typeof e||"[object Object]"===Object.prototype.toString.call(e)&&!o(e)}e("T",t({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:()=>[]}},emits:["close","select"],setup(e,{slots:t,attrs:o,emit:I}){const 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}}),z=async()=>{try{if(L.isLoad)return;L.isLoad=!0;const t=await _.post("/api-school/teacher/page",{data:{...L.params,schoolId:c.user.data.school.id,removeTeacherId:e.removeTeacherId,delFlag:!1}});L.listState.loading=!1;const a=t.data||{};if(L.list.length>0&&1===a.current)return;const n=a.rows||[];n.forEach((e=>{e.subjectNames=e.subjectName?e.subjectName.split(","):[]})),L.list=L.list.concat(n),L.listState.finished=a.current>=a.pages,L.params.page=a.current+1,L.listState.dataShow=L.list.length>0,L.isLoad=!1}catch{L.listState.dataShow=!1,L.listState.finished=!0,L.isLoad=!1}},F=()=>{L.params.page=1,L.list=[],L.listState.dataShow=!0,L.listState.loading=!1,L.listState.finished=!1,z()};return n((()=>e.courseType),(()=>{L.params.courseType=e.courseType,F()})),n((()=>e.subjectIdList),(()=>{L.params.subjectIdList=e.subjectIdList,F()})),n((()=>e.removeTeacherId),(()=>{F()})),i((()=>{z()})),()=>{let t;return r("div",{class:!L.listState.dataShow&&"emptyRootContainer",style:{background:"#F8F8F8",minHeight:"100%"}},[r(m,{position:"top",mode:e.mode},{default:()=>[e.header&&r(l,{title:"选择伴学老师",border:!1},null),r(y,{placeholder:"伴学老师名称",onSearch:e=>{L.params.keyword=e,F()}},null)]}),L.listState.dataShow?r(g,{finished:L.listState.finished,finishedText:" ",onLoad:z,style:{paddingTop:"12px"},immediateCheck:!1},T(t=L.list.map((e=>r(u,{inset:!0,style:{marginBottom:"12px"},onClick:()=>(e=>{I("close"),I("select",e)})(e)},{default:()=>[r(w,{center:!0,class:S,clickable:!1},{icon:()=>r(f,{class:k,src:e.avatar?e.avatar:h,fit:"cover"},null),title:()=>r("div",{class:x},[r("div",{class:v},[r("p",{class:[C,"van-ellipsis"]},[e.nickname])])])}),r(w,{center:!0},{title:()=>r("div",{class:b},[r("span",null,[s("声部:")]),r("div",{style:{display:"flex",alignItems:"center",flexWrap:"wrap"}},[e.subjectNames&&e.subjectNames.length>0&&e.subjectNames.map((e=>r(p,{type:"primary",class:j,color:"#FFE7DA",textColor:"#F67146"},T(e)?e:{default:()=>[e]})))])])})]}))))?t:{default:()=>[t]}):r(d,{btnStatus:!1,tips:"暂无伴学老师"},null)])}}}))}}}))}();