1 |
- import{d as f,ag as S,r as T,c as t,aj as g,F as C,q as u,B as _,al as b,bs as y,m as v,g as B}from"./index.332c7f08.js";import{O}from"./index.ed5fc819.js";import{O as L}from"./index.d7c1b6ac.js";import{T as j}from"./teacher-list.7f97b004.js";import{c as r,r as i}from"./create.977e0546.js";import{O as I}from"./index.a8f5f4b5.js";import{C as k}from"./index.324108a5.js";import{C as G}from"./index.91135ff9.js";import"./icon_teacher.df08d662.js";import"./index.d2064f3d.js";import"./index.1ed6273e.js";import"./index.b186dfda.js";import"./use-tab-status.9d769af8.js";import"./index.96a8db5e.js";import"./index.98482791.js";const w="_selectTeacher_1fv1o_1",F="_cellGroup_1fv1o_4",V="_tips_1fv1o_12",x="_name_1fv1o_15";var l={selectTeacher:w,cellGroup:F,tips:V,name:x};function E(c){return typeof c=="function"||Object.prototype.toString.call(c)==="[object Object]"&&!b(c)}var X=f({name:"teacher-list",emits:["close"],setup(){const c=S(),a=T({teacherStatus:!1,status:!1});console.log(r.selectLastTeacherSubjects);const p=async()=>{y({title:"\u63D0\u793A",message:"\u662F\u5426\u521B\u5EFA\u4E50\u56E2\uFF1F",showCancelButton:!0}).then(async()=>{try{const s=r.selectLastTeacherSubjects||[],e=[];s.forEach(o=>{e.push({teacherId:o.teacher.id,type:o.type,subjectId:o.id,studentIdList:[...o.students]})}),console.log(e,"tempselects"),await v.post("/api-school/orchestra/addOrchestra",{hideLoading:!1,data:{schoolId:B.user.data.school.id,name:r.orchestraName,classGroupList:[...e]}}),a.status=!0}catch{}})},m=s=>s&&s.toString().split(","),h=()=>{i(),c.replace("/train-planning")},d=()=>{i(),c.replace("/my-orchestra")};return()=>{let s;return t("div",{class:l.selectTeacher},[t(g,{title:"\u9009\u62E9\u4F34\u5B66\u8001\u5E08"},null),t(k,{inset:!0,class:l.cellGroup},E(s=r.selectLastTeacherSubjects.map(e=>t(G,{center:!0,onClick:()=>{a.teacherStatus=!0,r.selectTeacher=e},isLink:!0},{title:()=>t("span",{class:l.title},[e.name]),value:()=>{var o,n;return t(C,null,[(o=e.teacher)!=null&&o.nickname?t("p",{class:l.name},[((n=e.teacher)==null?void 0:n.nickname)||""]):t("p",{class:l.tips},[u("\u8BF7\u9009\u62E9\u4F34\u5B66\u8001\u5E08")])])}})))?s:{default:()=>[s]}),t(L,{position:"bottom"},{default:()=>[t("div",{class:["btnGroup"]},[t(_,{type:"primary",round:!0,block:!0,onClick:p},{default:()=>[u("\u521B\u5EFA\u5B8C\u6210")]})])]}),t(O,{modelValue:a.teacherStatus,"onUpdate:modelValue":e=>a.teacherStatus=e,position:"bottom"},{default:()=>[t(j,{subjectIdList:m(r.selectTeacher.id),onClose:()=>a.teacherStatus=!1,onSelect:e=>{r.selectTeacher.teacher=e,a.teacherStatus=!1}},null)]}),t(I,{show:a.status,"onUpdate:show":e=>a.status=e,title:"\u521B\u5EFA\u6210\u529F",messageAlign:"left",confirmButtonText:"\u53BB\u6392\u8BFE",cancelButtonText:"\u6682\u4E0D\u6392\u8BFE",showCancelButton:!0,message:"\u4E50\u56E2\u521B\u5EFA\u5B8C\u6210\uFF0C\u662F\u5426\u9700\u8981\u6392\u8BFE\uFF1F",onConfirm:h,onCancel:d},null)])}}});export{X as default};
|