select-teacher-legacy.5328b087.js 3.4 KB

1
  1. !function(){var e=document.createElement("style");e.innerHTML="._selectTeacher_1fv1o_1{--van-dialog-message-font-size: .42667rem !important}._cellGroup_1fv1o_4{margin:.32rem .34667rem}._cellGroup_1fv1o_4 .van-cell{padding:.48rem .32rem;color:#333;font-size:.42667rem}._cellGroup_1fv1o_4 ._tips_1fv1o_12{color:#999}._cellGroup_1fv1o_4 ._name_1fv1o_15{color:#333}\n",document.head.appendChild(e),System.register(["./index-legacy.eb062188.js","./index-legacy.b1009ea0.js","./index-legacy.ad813f4d.js","./teacher-list-legacy.6db228e3.js","./create-legacy.a31d3e47.js","./index-legacy.e0860c0a.js","./index-legacy.148f784c.js","./index-legacy.918b8c74.js","./icon_teacher-legacy.07765f44.js","./index-legacy.a530d593.js","./index-legacy.3a3e070a.js","./index-legacy.fad72574.js","./use-tab-status-legacy.91417466.js","./index-legacy.fecc738b.js","./index-legacy.11f1ea5f.js"],(function(e){"use strict";var t,c,a,n,s,o,l,r,i,u,d,f,h,p,m,_,g,y,j,v;return{setters:[function(e){t=e.d,c=e.ag,a=e.r,n=e.c,s=e.aj,o=e.F,l=e.q,r=e.B,i=e.al,u=e.bx,d=e.m,f=e.g},function(e){h=e.O},function(e){p=e.O},function(e){m=e.T},function(e){_=e.c,g=e.r},function(e){y=e.O},function(e){j=e.C},function(e){v=e.C},function(){},function(){},function(){},function(){},function(){},function(){},function(){}],execute:function(){var b={selectTeacher:"_selectTeacher_1fv1o_1",cellGroup:"_cellGroup_1fv1o_4",tips:"_tips_1fv1o_12",name:"_name_1fv1o_15"};e("default",t({name:"teacher-list",emits:["close"],setup(){const e=c(),t=a({teacherStatus:!1,status:!1});console.log(_.selectLastTeacherSubjects);const x=async()=>{u({title:"提示",message:"是否创建乐团?",showCancelButton:!0}).then((async()=>{try{const e=_.selectLastTeacherSubjects||[],c=[];e.forEach((e=>{c.push({teacherId:e.teacher.id,type:e.type,subjectId:e.id,studentIdList:[...e.students]})})),console.log(c,"tempselects"),await d.post("/api-school/orchestra/addOrchestra",{hideLoading:!1,data:{schoolId:f.user.data.school.id,name:_.orchestraName,classGroupList:[...c]}}),t.status=!0}catch{}}))},T=e=>{if(e){return e.toString().split(",")}return e},S=()=>{g(),e.replace("/train-planning")},C=()=>{g(),e.replace("/my-orchestra")};return()=>{let e;return n("div",{class:b.selectTeacher},[n(s,{title:"选择伴学老师"},null),n(j,{inset:!0,class:b.cellGroup},(c=e=_.selectLastTeacherSubjects.map((e=>n(v,{center:!0,onClick:()=>{t.teacherStatus=!0,_.selectTeacher=e},isLink:!0},{title:()=>n("span",{class:b.title},[e.name]),value:()=>{var t,c;return n(o,null,[null!==(t=e.teacher)&&void 0!==t&&t.nickname?n("p",{class:b.name},[(null===(c=e.teacher)||void 0===c?void 0:c.nickname)||""]):n("p",{class:b.tips},[l("请选择伴学老师")])])}}))),"function"==typeof c||"[object Object]"===Object.prototype.toString.call(c)&&!i(c)?e:{default:()=>[e]})),n(p,{position:"bottom"},{default:()=>[n("div",{class:["btnGroup"]},[n(r,{type:"primary",round:!0,block:!0,onClick:x},{default:()=>[l("创建完成")]})])]}),n(h,{modelValue:t.teacherStatus,"onUpdate:modelValue":e=>t.teacherStatus=e,position:"bottom"},{default:()=>[n(m,{subjectIdList:T(_.selectTeacher.id),onClose:()=>t.teacherStatus=!1,onSelect:e=>{_.selectTeacher.teacher=e,t.teacherStatus=!1}},null)]}),n(y,{show:t.status,"onUpdate:show":e=>t.status=e,title:"创建成功",messageAlign:"left",confirmButtonText:"去排课",cancelButtonText:"暂不排课",showCancelButton:!0,message:"乐团创建完成,是否需要排课?",onConfirm:S,onCancel:C},null)]);var c}}}))}}}))}();