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.3b0304e1.js";import{O}from"./index.a20d72f1.js";import{O as L}from"./index.454c666f.js";import{T as j}from"./teacher-list.5e4bc7d5.js";import{c as r,r as i}from"./create.52ae91a6.js";import{O as I}from"./index.495ac005.js";import{C as k}from"./index.ead63c4f.js";import{C as G}from"./index.ff3f298b.js";import"./icon_teacher.df08d662.js";import"./index.841053bc.js";import"./index.f8e9940f.js";import"./index.179b8d2a.js";import"./use-tab-status.e36e4d74.js";import"./index.710cd200.js";import"./index.1e205a49.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};
|