1 |
- !function(){var e=document.createElement("style");e.innerHTML='._unbindTips_156zt_1{font-size:.34667rem;padding:.26667rem .32rem;font-weight:500;color:#f67146;line-height:.48rem;background:#ffebdd;border-radius:.26667rem;margin:.32rem .34667rem}._detailCellGroup_156zt_11{margin:.32rem .34667rem;overflow:hidden;border-radius:.26667rem}._detailCell_156zt_11{padding:.4rem .34667rem}._detailCell_156zt_11 .van-cell__title{flex:1 auto;flex-basis:48%}._detailCell_156zt_11 ._valueClass_156zt_23{display:flex;align-items:center;justify-content:flex-end}._detailCell_156zt_11 ._teacherName_156zt_28{font-size:.42667rem;font-weight:500;color:#333;line-height:.58667rem;max-width:1.6rem}._detailCell_156zt_11 ._teacherContent_156zt_35{display:flex;align-items:center;justify-content:space-between}._detailCell_156zt_11 ._teacherContent_156zt_35 ._content_156zt_40{width:1.86667rem}._detailCell_156zt_11 ._teacherContent_156zt_35 ._classNum_156zt_43{text-align:center;width:1.6rem}._detailCell_156zt_11 ._className_156zt_47{font-size:.42667rem;font-weight:600;color:#333;line-height:.58667rem}._detailCell_156zt_11 ._musicName_156zt_53{font-size:.37333rem;color:#777;line-height:.53333rem;max-width:3.2rem}._detailCell_156zt_11 ._nums_156zt_59{font-size:.53333rem;font-weight:700;color:#f67146;line-height:.64rem}._detailCell_156zt_11 ._numTip_156zt_65{font-size:.37333rem;color:#777;line-height:.53333rem}._classCellGroup_156zt_70{margin:.32rem .34667rem;overflow:hidden;border-radius:.26667rem}._classCellGroup_156zt_70 ._classTitle_156zt_75{display:flex;align-items:center;font-size:.42667rem;font-weight:500;color:#333}._classCellGroup_156zt_70 ._classTitle_156zt_75:before{content:" ";display:inline-block;width:.10667rem;height:.37333rem;background:#ff8057;border-radius:.05333rem;margin-right:.16rem}._classCellGroup_156zt_70 ._title_156zt_91{font-size:.64rem}._classCellGroup_156zt_70 ._name_156zt_94{padding-top:.21333rem;font-size:.32rem;color:#777}._classCellGroup_156zt_70 .van-cell{padding:.4rem .53333rem}._classCellGroup_156zt_70 .van-grid-item:after{content:" ";position:absolute;top:50%;right:0;margin-top:-.26667rem;width:.02667rem;height:.53333rem;background:#eaeaea;border-radius:.02667rem}._classCellGroup_156zt_70 .van-grid-item:last-child:after{display:none}._name_15dqr_1{font-size:.42667rem;font-weight:500;color:#333;line-height:.58667rem;max-width:7.2rem}._img_15dqr_8{width:1.28rem;height:1.28rem;overflow:hidden;border-radius:50%;margin-right:.26667rem}._subjects_15dqr_15 .van-tag+.van-tag{margin-left:.16rem}._subjectContainer_15dqr_18{display:flex}._subjectContainer_15dqr_18>span{flex-shrink:0}._subjectContainer_15dqr_18 ._tagSubject_15dqr_24{margin-right:.26667rem;margin-top:.05333rem;margin-bottom:.05333rem;padding:.02667rem .21333rem}._manageCell_15dqr_30{padding:.4rem .34667rem}._manageCell_15dqr_30 .van-cell__title{flex:1 auto;flex-basis:48%}._manageCell_15dqr_30 ._teacherContent_15dqr_37{display:flex;align-items:center;justify-content:space-between}._manageCell_15dqr_30 ._teacherContent_15dqr_37 ._content_15dqr_42{width:1.86667rem}._manageCell_15dqr_30 ._teacherContent_15dqr_37 ._name_15dqr_1{font-size:.42667rem;font-weight:500;color:#333;line-height:.58667rem;max-width:1.86667rem}._manageCell_15dqr_30 ._teacherContent_15dqr_37 ._classNum_15dqr_52{text-align:center;width:1.6rem}._manageCell_15dqr_30 ._teacherContent_15dqr_37 ._num_15dqr_56{font-size:.53333rem;font-weight:700;color:#f67146;line-height:.64rem}._manageCell_15dqr_30 ._teacherContent_15dqr_37 ._numText_15dqr_62{font-size:.32rem;color:#333;line-height:.45333rem}._manageCell_15dqr_30 ._teacherContent_15dqr_37 ._messageImg_15dqr_67{margin-top:.13333rem;width:.64rem;height:.64rem}._manageCell_15dqr_30 ._img_15dqr_8{width:1.28rem;height:1.28rem;overflow:hidden;border-radius:50%;margin-right:.26667rem}._manageCell_15dqr_30 ._name_15dqr_1{font-size:.42667rem;font-weight:500;color:#333;line-height:.58667rem}._manageCell_15dqr_30 ._phone_15dqr_85{font-size:.37333rem;color:#777;line-height:.53333rem}._manageCell_15dqr_30 ._status_15dqr_90{font-size:.42667rem;font-weight:500;color:#333}._manageCell_15dqr_30 ._frozen_15dqr_95{color:#f44541}\n',document.head.appendChild(e),System.register(["./index-legacy.eb062188.js","./index-legacy.ad813f4d.js","./index-legacy.b1009ea0.js","./index-legacy.a530d593.js","./icon_teacher-legacy.07765f44.js","./index-legacy.fad72574.js","./index-legacy.148f784c.js","./index-legacy.918b8c74.js","./index-legacy.fecc738b.js","./index-legacy.11f1ea5f.js","./index-legacy.4e015ad0.js","./index-legacy.e0860c0a.js","./index-legacy.3a3e070a.js","./index-legacy.761bf286.js","./use-tab-status-legacy.91417466.js"],(function(e){"use strict";var t,a,r,l,n,s,i,o,c,_,d,m,u,h,g,p,f,C,y,b,z,q,w,x,S,j,T,v,I;return{setters:[function(e){t=e.d,a=e.r,r=e.$,l=e.c,n=e.aj,s=e.q,i=e.ak,o=e.al,c=e.m,_=e.g,d=e.ah,m=e.ag,u=e.B,h=e.F,g=e.o},function(e){p=e.O},function(e){f=e.O},function(e){C=e.O},function(e){y=e.i},function(e){b=e.L},function(e){z=e.C},function(e){q=e.C},function(e){w=e.I},function(e){x=e.T},function(e){S=e.c},function(e){j=e.O},function(e){T=e.F},function(e){v=e.G,I=e.a},function(){}],execute:function(){var k="_unbindTips_156zt_1",N="_classCellGroup_156zt_70",G="_classTitle_156zt_75",L="_title_156zt_91",F="_name_156zt_94";var O={name:"_name_15dqr_1",img:"_img_15dqr_8",subjects:"_subjects_15dqr_15",subjectContainer:"_subjectContainer_15dqr_18",tagSubject:"_tagSubject_15dqr_24",manageCell:"_manageCell_15dqr_30",teacherContent:"_teacherContent_15dqr_37",content:"_content_15dqr_42",classNum:"_classNum_15dqr_52",num:"_num_15dqr_56",numText:"_numText_15dqr_62",messageImg:"_messageImg_15dqr_67",phone:"_phone_15dqr_85",status:"_status_15dqr_90",frozen:"_frozen_15dqr_95"};function B(e){return"function"==typeof e||"[object Object]"===Object.prototype.toString.call(e)&&!o(e)}var E=t({name:"teacher",props:{teacherId:{type:String,default:""},courseType:{type:String,default:""}},emits:["close","select"],setup(e,{slots:t,attrs:o,emit:d}){const m=a({schoolId:null,list:[],listState:{dataShow:!0,loading:!1,finished:!1},params:{keyword:null,page:1,rows:20},selectItem:{}}),u=async()=>{try{const t=await c.post("/api-school/teacher/page",{data:{...m.params,schoolId:_.user.data.school.id,removeTeacherId:e.teacherId,courseType:e.courseType,delFlag:!1}});m.listState.loading=!1;const a=t.data||{};if(m.list.length>0&&1===a.current)return;const r=a.rows||[];r.forEach((e=>{e.subjectNames=e.subjectName?e.subjectName.split(","):[]})),m.list=m.list.concat(r),m.listState.finished=a.current>=a.pages,m.params.page=a.current+1,m.listState.dataShow=m.list.length>0}catch{m.listState.dataShow=!1,m.listState.finished=!0}};return r((()=>{u()})),()=>{let e;return l("div",{class:!m.listState.dataShow&&"emptyRootContainer"},[l(p,{position:"top"},{default:()=>[l(n,{title:"交接伴学老师",desotry:!1,border:!1},null),l(C,{placeholder:"请输入伴学老师姓名",onSearch:e=>{m.params.keyword=e,m.params.page=1,m.list=[],m.listState.dataShow=!0,m.listState.loading=!1,m.listState.finished=!1,u()}},null)]}),m.listState.dataShow?l(b,{finished:m.listState.finished,finishedText:" ",class:[O.liveList],onLoad:u,style:{paddingTop:"12px"},immediateCheck:!1},B(e=m.list.map((e=>l(z,{inset:!0,style:{marginBottom:"12px"},onClick:()=>(e=>{d("select",e),d("close")})(e)},{default:()=>[l(q,{center:!0,class:O.manageCell,clickable:!1},{icon:()=>l(w,{class:O.img,src:e.avatar?e.avatar:y,fit:"cover"},null),title:()=>l("div",{class:O.teacherContent},[l("div",{class:O.content},[l("p",{class:[O.name,"van-ellipsis"]},[e.nickname])])])}),l(q,{center:!0},{title:()=>l("div",{class:O.subjectContainer},[l("span",null,[s("声部:")]),l("div",{style:{display:"flex",alignItems:"center",flexWrap:"wrap"}},[e.subjectNames&&e.subjectNames.length>0&&e.subjectNames.map((e=>l(x,{type:"primary",class:O.tagSubject,color:"#FFE7DA",textColor:"#F67146"},B(e)?e:{default:()=>[e]})))])])})]}))))?e:{default:()=>[e]}):l(i,{btnStatus:!1,tips:"暂无伴学老师"},null)])}}});e("default",t({name:"unbind",setup(){const e=d(),t=m(),i=a({teacherStatus:!1,classList:[],selectTeacher:{},teacherId:e.query.id,dialogStatus:!1,dialogMessage:"",dialogStatus1:!1,dialogMessage1:""}),o=e=>{console.log(e,"steacher"),i.selectTeacher.sTeacher=e},_=()=>{console.log("submit");let e=!1;const t=[];if(i.classList.forEach((a=>{(!a.sTeacher||a.sTeacher&&!a.sTeacher.id)&&(e=!0),a.sTeacher&&t.push({courseType:a.courseType,teacherId:a.sTeacher.id})})),e)g("请选择交接伴学老师");else try{i.dialogStatus=!0}catch{}},C=async()=>{try{const a=[];i.classList.forEach((e=>{e.sTeacher&&a.push({courseType:e.courseType,teacherId:e.sTeacher.id})}));const r=await c.post("/api-school/classGroup/handoverTeacher",{hideLoading:!1,data:{teacherId:e.query.id,courseUpdateList:[...a]}});999===r.code?(i.dialogStatus1=!0,i.dialogMessage1=r.message):!0===r.data.finish?t.replace("/companion-teacher"):t.push({path:"/course-preview",query:{cacheId:r.data.cacheId,type:"unbind"}})}catch{}};return r((()=>{(async()=>{try{const{data:e}=await c.post("/api-school/classGroup/teacherHandoverList/"+i.teacherId,{});i.classList=e||[]}catch{}})()})),()=>l(h,null,[l(n,null,null),l("div",{class:k},[s("该伴学老师存在班级或未开始课程,请选择交接人")]),i.classList.map((e=>l(z,{inset:!0,class:N,border:!1},{default:()=>[l(T,{isLink:!0,placeholder:"请选择交接老师",inputAlign:"right",readonly:!0,modelValue:e.sTeacher?e.sTeacher.nickname:"",onClick:()=>(e=>{i.teacherStatus=!0,i.selectTeacher=e})(e)},{label:()=>l("div",{class:G},[S[e.courseType]])}),l(v,{border:!1,columnNum:2},{default:()=>[l(I,null,{default:()=>[l("p",{class:L},[e.classNum]),l("p",{class:F},[s("班级数量")])]}),l(I,null,{default:()=>[l("p",{class:[L]},[e.courseNum]),l("p",{class:F},[s("剩余课时")])]})]})]}))),l(p,{position:"bottom"},{default:()=>[l("div",{class:["btnGroup"],style:{paddingLeft:"13px",paddingRight:"13px"}},[l(u,{type:"primary",round:!0,block:!0,onClick:_},{default:()=>[s("确认交接")]})])]}),l(f,{modelValue:i.teacherStatus,"onUpdate:modelValue":e=>i.teacherStatus=e,destroy:!0,style:{background:"#F8F8F8"}},{default:()=>[l(E,{courseType:i.selectTeacher.courseType,teacherId:i.teacherId,onClose:()=>i.teacherStatus=!1,onSelect:o},null)]}),l(j,{title:"提示",show:i.dialogStatus,"onUpdate:show":e=>i.dialogStatus=e,message:"是否确认交接?",confirmButtonText:"确定",showCancelButton:!0,onConfirm:C},null),l(j,{title:"提示",show:i.dialogStatus1,"onUpdate:show":e=>i.dialogStatus1=e,message:i.dialogMessage1,confirmButtonText:"确定",onConfirm:()=>{t.back()}},null)])}}))}}}))}();
|