1 |
- import{d as f,ag as S,r as C,c as t,F as T,q as u,B as g,ak as _,bn as b,m as y,f as B}from"./index.ffe80dbe.js";import{O}from"./index.a0ef77e4.js";import{O as v}from"./index.1829b1b7.js";import{O as L}from"./index.4ddd16f0.js";import{T as k}from"./teacher-list.2bd9bdc5.js";import{c as r,r as i}from"./create.65da0bd8.js";import{O as I}from"./index.d745568a.js";import{C as j}from"./index.914765a1.js";import{C as G}from"./index.ea031708.js";import"./index.1d5c6f70.js";import"./index.339fc024.js";import"./icon_teacher.df08d662.js";import"./index.c7af3af2.js";import"./index.92ec0bf4.js";import"./index.cafcb8b5.js";import"./use-tab-status.5a3cd090.js";import"./index.7e972106.js";import"./index.55ba7429.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 N(c){return typeof c=="function"||Object.prototype.toString.call(c)==="[object Object]"&&!_(c)}var ee=f({name:"teacher-list",emits:["close"],setup(){const c=S(),a=C({teacherStatus:!1,status:!1});console.log(r.selectLastTeacherSubjects);const p=async()=>{b({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 y.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(O,{title:"\u9009\u62E9\u4F34\u5B66\u6307\u5BFC"},null),t(j,{inset:!0,class:l.cellGroup},N(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(T,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\u6307\u5BFC")])])}})))?s:{default:()=>[s]}),t(L,{position:"bottom"},{default:()=>[t("div",{class:["btnGroup"]},[t(g,{type:"primary",round:!0,block:!0,onClick:p},{default:()=>[u("\u521B\u5EFA\u5B8C\u6210")]})])]}),t(v,{modelValue:a.teacherStatus,"onUpdate:modelValue":e=>a.teacherStatus=e,position:"bottom"},{default:()=>[t(k,{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{ee as default};
|