unbind-legacy.94e7949d.js 13 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 l=e[i](o),c=l.value}catch(s){return void n(s)}l.done?t(c):Promise.resolve(c).then(r,a)}function a(e){return function(){var t=this,n=arguments;return new Promise((function(a,i){var o=e.apply(t,n);function l(e){r(o,a,i,l,c,"next",e)}function c(e){r(o,a,i,l,c,"throw",e)}l(void 0)}))}}var i=document.createElement("style");i.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(i),System.register(["./index-legacy.c1f63540.js","./index-legacy.7e71b67e.js","./index-legacy.fb4dcced.js","./index-legacy.bc03baf4.js","./icon_teacher-legacy.07765f44.js","./index-legacy.3d6462c3.js","./index-legacy.2318e5fa.js","./index-legacy.8a8e9c42.js","./index-legacy.45d07924.js","./index-legacy.47196fed.js","./index-legacy.ec5d708a.js","./index-legacy.8e95ea07.js","./index-legacy.45603cb6.js","./index-legacy.cdcc5f23.js","./index-legacy.c75fe8a2.js","./use-tab-status-legacy.77a01b2b.js"],(function(e){"use strict";var n,r,i,o,l,c,s,u,_,d,m,f,h,g,p,b,y,C,v,w,z,q,x,j,S,T,k,O,I;return{setters:[function(e){n=e.d,r=e.r,i=e.$,o=e.c,l=e.aj,c=e.q,s=e.ak,u=e.al,_=e.m,d=e.g,m=e.ah,f=e.ag,h=e.B,g=e.F,p=e.o},function(e){b=e.O},function(e){y=e.O},function(e){C=e.O},function(e){v=e.i},function(e){w=e.L},function(e){z=e.C},function(e){q=e.C},function(e){x=e.I},function(e){j=e.T},function(e){S=e.c},function(e){T=e.O},function(e){k=e.F},function(e){O=e.G,I=e.a},function(){},function(){}],execute:function(){var N="_unbindTips_156zt_1",G="_classCellGroup_156zt_70",L="_classTitle_156zt_75",P="_title_156zt_91",F="_name_156zt_94",R={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 E(e){return"function"==typeof e||"[object Object]"===Object.prototype.toString.call(e)&&!u(e)}var B=n({name:"teacher",props:{teacherId:{type:String,default:""},courseType:{type:String,default:""}},emits:["close","select"],setup:function(e,n){n.slots,n.attrs;var u=n.emit,m=r({schoolId:null,list:[],listState:{dataShow:!0,loading:!1,finished:!1},params:{keyword:null,page:1,rows:20},selectItem:{}}),f=function(){var n=a(regeneratorRuntime.mark((function n(){var r,a,i;return regeneratorRuntime.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.prev=0,n.next=3,_.post("/api-school/teacher/page",{data:t(t({},m.params),{},{schoolId:d.user.data.school.id,removeTeacherId:e.teacherId,courseType:e.courseType,delFlag:!1})});case 3:if(r=n.sent,m.listState.loading=!1,a=r.data||{},!(m.list.length>0&&1===a.current)){n.next=8;break}return n.abrupt("return");case 8:(i=a.rows||[]).forEach((function(e){e.subjectNames=e.subjectName?e.subjectName.split(","):[]})),m.list=m.list.concat(i),m.listState.finished=a.current>=a.pages,m.params.page=a.current+1,m.listState.dataShow=m.list.length>0,n.next=20;break;case 16:n.prev=16,n.t0=n.catch(0),m.listState.dataShow=!1,m.listState.finished=!0;case 20:case"end":return n.stop()}}),n,null,[[0,16]])})));return function(){return n.apply(this,arguments)}}();return i((function(){f()})),function(){var e;return o("div",{class:!m.listState.dataShow&&"emptyRootContainer"},[o(b,{position:"top"},{default:function(){return[o(l,{title:"交接伴学指导",desotry:!1,border:!1},null),o(C,{placeholder:"请输入伴学指导姓名",onSearch:function(e){m.params.keyword=e,m.params.page=1,m.list=[],m.listState.dataShow=!0,m.listState.loading=!1,m.listState.finished=!1,f()}},null)]}}),m.listState.dataShow?o(w,{finished:m.listState.finished,finishedText:" ",class:[R.liveList],onLoad:f,style:{paddingTop:"12px"},immediateCheck:!1},E(e=m.list.map((function(e){return o(z,{inset:!0,style:{marginBottom:"12px"},onClick:function(){return function(e){u("select",e),u("close")}(e)}},{default:function(){return[o(q,{center:!0,class:R.manageCell,clickable:!1},{icon:function(){return o(x,{class:R.img,src:e.avatar?e.avatar:v,fit:"cover"},null)},title:function(){return o("div",{class:R.teacherContent},[o("div",{class:R.content},[o("p",{class:[R.name,"van-ellipsis"]},[e.nickname])])])}}),o(q,{center:!0},{title:function(){return o("div",{class:R.subjectContainer},[o("span",null,[c("声部:")]),o("div",{style:{display:"flex",alignItems:"center",flexWrap:"wrap"}},[e.subjectNames&&e.subjectNames.length>0&&e.subjectNames.map((function(e){return o(j,{type:"primary",class:R.tagSubject,color:"#FFE7DA",textColor:"#F67146"},E(e)?e:{default:function(){return[e]}})}))])])}})]}})})))?e:{default:function(){return[e]}}):o(s,{btnStatus:!1,tips:"暂无伴学指导"},null)])}}});e("default",n({name:"unbind",setup:function(){var e=m(),t=f(),n=r({teacherStatus:!1,classList:[],selectTeacher:{},teacherId:e.query.id,dialogStatus:!1,dialogMessage:"",dialogStatus1:!1,dialogMessage1:""}),s=function(){var e=a(regeneratorRuntime.mark((function e(){var t,r;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,_.post("/api-school/classGroup/teacherHandoverList/"+n.teacherId,{});case 3:t=e.sent,r=t.data,n.classList=r||[],e.next=10;break;case 8:e.prev=8,e.t0=e.catch(0);case 10:case"end":return e.stop()}}),e,null,[[0,8]])})));return function(){return e.apply(this,arguments)}}(),u=function(e){console.log(e,"steacher"),n.selectTeacher.sTeacher=e},d=function(){console.log("submit");var e=!1,t=[];if(n.classList.forEach((function(n){(!n.sTeacher||n.sTeacher&&!n.sTeacher.id)&&(e=!0),n.sTeacher&&t.push({courseType:n.courseType,teacherId:n.sTeacher.id})})),e)p("请选择交接伴学指导");else try{n.dialogStatus=!0}catch(r){}},C=function(){var r=a(regeneratorRuntime.mark((function r(){var a,i;return regeneratorRuntime.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.prev=0,a=[],n.classList.forEach((function(e){e.sTeacher&&a.push({courseType:e.courseType,teacherId:e.sTeacher.id})})),r.next=5,_.post("/api-school/classGroup/handoverTeacher",{hideLoading:!1,data:{teacherId:e.query.id,courseUpdateList:[].concat(a)}});case 5:999===(i=r.sent).code?(n.dialogStatus1=!0,n.dialogMessage1=i.message):!0===i.data.finish?t.replace("/companion-teacher"):t.push({path:"/course-preview",query:{cacheId:i.data.cacheId,type:"unbind"}}),r.next=11;break;case 9:r.prev=9,r.t0=r.catch(0);case 11:case"end":return r.stop()}}),r,null,[[0,9]])})));return function(){return r.apply(this,arguments)}}();return i((function(){s()})),function(){return o(g,null,[o(l,null,null),o("div",{class:N},[c("该伴学指导存在班级或未开始课程,请选择交接人")]),n.classList.map((function(e){return o(z,{inset:!0,class:G,border:!1},{default:function(){return[o(k,{isLink:!0,placeholder:"请选择交接老师",inputAlign:"right",readonly:!0,modelValue:e.sTeacher?e.sTeacher.nickname:"",onClick:function(){return function(e){n.teacherStatus=!0,n.selectTeacher=e}(e)}},{label:function(){return o("div",{class:L},[S[e.courseType]])}}),o(O,{border:!1,columnNum:2},{default:function(){return[o(I,null,{default:function(){return[o("p",{class:P},[e.classNum]),o("p",{class:F},[c("班级数量")])]}}),o(I,null,{default:function(){return[o("p",{class:[P]},[e.courseNum]),o("p",{class:F},[c("剩余课时")])]}})]}})]}})})),o(b,{position:"bottom"},{default:function(){return[o("div",{class:["btnGroup"],style:{paddingLeft:"13px",paddingRight:"13px"}},[o(h,{type:"primary",round:!0,block:!0,onClick:d},{default:function(){return[c("确认交接")]}})])]}}),o(y,{modelValue:n.teacherStatus,"onUpdate:modelValue":function(e){return n.teacherStatus=e},destroy:!0,style:{background:"#F8F8F8"}},{default:function(){return[o(B,{courseType:n.selectTeacher.courseType,teacherId:n.teacherId,onClose:function(){return n.teacherStatus=!1},onSelect:u},null)]}}),o(T,{title:"提示",show:n.dialogStatus,"onUpdate:show":function(e){return n.dialogStatus=e},message:"是否确认交接?",confirmButtonText:"确定",showCancelButton:!0,onConfirm:C},null),o(T,{title:"提示",show:n.dialogStatus1,"onUpdate:show":function(e){return n.dialogStatus1=e},message:n.dialogMessage1,confirmButtonText:"确定",onConfirm:function(){t.back()}},null)])}}}))}}}))}();