index-legacy.766bf8a5.js 14 KB

1
  1. !function(){var e=document.createElement("style");e.innerHTML="._searchBand_1v64m_1{display:inline-block;font-size:.37333rem;font-weight:600;color:#333}._searchBand_1v64m_1 ._bandName_1v64m_7{display:inline-block;max-width:4.8rem;vertical-align:text-top}._studentList_1v64m_12{--van-checkbox-border-color: transparent}._studentList_1v64m_12 .van-checkbox{height:.66667rem}._studentList_1v64m_12 ._iconChecked_1v64m_18{font-size:.48rem;border:.02667rem solid transparent;background:transparent}._studentList_1v64m_12 ._iconChecked_1v64m_18 .van-icon__image{width:100%;height:100%}._studentList_1v64m_12 ._img_1v64m_27{width:1.28rem;height:1.28rem;overflow:hidden;border-radius:50%;margin-right:.32rem;flex-shrink:0}._studentList_1v64m_12 ._name_1v64m_35{font-size:.42667rem;font-weight:500;color:#333;line-height:.58667rem}._studentList_1v64m_12 ._class_1v64m_41{padding-top:.08rem;font-size:.32rem;color:#777;line-height:.45333rem}._studentList_1v64m_12 ._btnMore_1v64m_47{display:flex;align-items:center;padding:.42667rem .34667rem!important}._studentList_1v64m_12 ._btnMore_1v64m_47 .van-button{display:flex;justify-content:center;align-items:center;flex-shrink:1;width:30%}._studentList_1v64m_12 ._btnMore_1v64m_47 .van-button+.van-button{flex-shrink:2;width:68%;margin-left:2%}._subjectList_hptt0_1{display:flex;align-items:center;flex-wrap:wrap}._subject_hptt0_1{--van-checkbox-border-color: transparent;position:relative;padding-left:.34667rem;margin-top:.53333rem}._subject_hptt0_1 .van-checkbox{position:absolute;top:.16rem;right:.16rem;z-index:9;height:.66667rem}._subject_hptt0_1 ._iconChecked_hptt0_19{font-size:.48rem;border:.02667rem solid transparent}._subject_hptt0_1 ._iconChecked_hptt0_19 .van-icon__image{width:100%;height:100%}._subject_hptt0_1 ._img_hptt0_27{width:2.88rem;height:2.88rem;border-radius:.21333rem;overflow:hidden;background-color:#fff}._subject_hptt0_1 ._name_hptt0_34{padding-top:.16rem;font-size:.42667rem;font-weight:500;color:#333;max-width:2.88rem;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}\n",document.head.appendChild(e),System.register(["./index-legacy.eb062188.js","./index-legacy.b1009ea0.js","./index-legacy.ad813f4d.js","./index.module-legacy.3521c141.js","./index-legacy.a530d593.js","./icon-checkbox-check-legacy.8c6ec582.js","./icon-checkbox-default-legacy.20cf236b.js","./icon_student-legacy.6118fd72.js","./index-legacy.fad72574.js","./index-legacy.8fb0ec91.js","./index-legacy.918b8c74.js","./index-legacy.fecc738b.js","./index-legacy.d39f6f47.js","./index-legacy.38b799d5.js","./create-legacy.a31d3e47.js","./deep-clone-legacy.b234d76d.js","./index-legacy.148f784c.js","./index-legacy.3a3e070a.js","./use-tab-status-legacy.91417466.js","./Checker-legacy.9bbda964.js","./Picker-legacy.95f03705.js","./index-legacy.ac7c51db.js","./index-legacy.fab451f1.js","./index-legacy.10d8486a.js"],(function(e){"use strict";var t,s,c,a,n,o,l,i,r,d,u,h,p,m,b,f,g,_,v,j,S,k,y,x,C,w,A,I,L,B,E,U,M,P,z;return{setters:[function(e){t=e.d,s=e.r,c=e.Z,a=e.$,n=e.g,o=e.c,l=e.aj,i=e.a5,r=e.ak,d=e.B,u=e.q,h=e.P,p=e.al,m=e.m,b=e.ag,f=e.F,g=e.o},function(e){_=e.O},function(e){v=e.O},function(e){j=e.s},function(e){S=e.O},function(e){k=e.c},function(e){y=e.c},function(e){x=e.i},function(e){C=e.L},function(e){w=e.C},function(e){A=e.C},function(e){I=e.I},function(e){L=e.C},function(e){B=e.P},function(e){E=e.r,U=e.c},function(e){M=e.d},function(e){P=e.C},function(e){z=e.F},function(){},function(){},function(){},function(){},function(){},function(){}],execute:function(){var N={searchBand:"_searchBand_1v64m_1",bandName:"_bandName_1v64m_7",studentList:"_studentList_1v64m_12",iconChecked:"_iconChecked_1v64m_18",img:"_img_1v64m_27",name:"_name_1v64m_35",class:"_class_1v64m_41",btnMore:"_btnMore_1v64m_47"};const T={1:"一年级",2:"二年级",3:"三年级",4:"四年级",5:"五年级",6:"六年级"};var R=t({name:"student-list",props:{orchestraList:{type:Array,default:()=>[]},subjectId:{type:[String,Number],default:""},selectStudentIds:{type:Array,default:()=>[]}},emits:["close","select"],setup(e,{slots:t,attrs:b,emit:f}){const g=s({showPopover:!1,oPopover:!1,isLoad:!1,classList:[{text:"全部",value:-1},{text:"一年级",value:1},{text:"二年级",value:2},{text:"三年级",value:3},{text:"四年级",value:4},{text:"五年级",value:5}],check:[],checkboxRefs:[],orchestra:{id:null,name:"全部乐团"},class:{id:null,name:"全部"},list:[],listState:{dataShow:!0,loading:!1,finished:!1},params:{keyword:null,page:1,rows:20}}),_=async()=>{try{if(g.isLoad)return;g.isLoad=!0;const t=await m.post("/api-school/student/page",{data:{...g.params,subjectId:e.subjectId,orchestraId:g.orchestra.id,currentGradeNum:-1===g.class.id?null:g.class.id}});g.listState.loading=!1;const s=t.data||{};if(g.list.length>0&&1===s.current)return;g.list=g.list.concat(s.rows||[]),g.listState.finished=s.current>=s.pages,g.params.page=s.current+1,g.listState.dataShow=g.list.length>0,g.isLoad=!1}catch{g.listState.dataShow=!1,g.listState.finished=!0,g.isLoad=!1}},j=()=>{g.params.page=1,g.list=[],g.listState.dataShow=!0,g.listState.loading=!1,g.listState.finished=!1,_()},E=()=>{f("close"),f("select",g.check),setTimeout((()=>{g.check=[]}),100)};return c((()=>e.subjectId),(()=>{console.log("subjectId"),j()})),c((()=>e.selectStudentIds),(()=>{console.log(e.selectStudentIds,"watch"),g.check=[...e.selectStudentIds]})),a((()=>{var t;if(console.log(e.selectStudentIds,"onmount"),"sixYearSystem"===(null===(t=n.user.data.school)||void 0===t?void 0:t.schoolSystem)&&g.classList.push({text:"六年级",value:6}),e.orchestraList.length>0){const t=e.orchestraList[0];g.orchestra.id=t.value,g.orchestra.name=t.text}_(),g.check=[...e.selectStudentIds]})),()=>{let t;return o("div",{class:N.studentList},[o(v,{position:"top"},{default:()=>[o(l,{title:"选择学员",desotry:!1,border:!1},null),o(S,{class:"searchGroupInput",placeholder:"学员名称/手机号",onSearch:e=>{g.params.keyword=e,j()}},null),o("div",{class:"searchGroup"},[o("div",{class:["searchItem searchItem-large",g.showPopover?"searchItem-active":""],onClick:()=>g.showPopover=!0},[o("span",null,[g.class.name]),o("i",{class:"arrow"},null)]),o("div",{class:["searchItem searchItem-large",g.oPopover?"searchItem-active":""],onClick:()=>g.oPopover=!0},[o("span",null,[g.orchestra.name]),o("i",{class:"arrow"},null)])])]}),g.listState.dataShow?o(C,{finished:g.listState.finished,finishedText:" ",class:[N.liveList],onLoad:_,style:{paddingTop:"12px"},immediateCheck:!1},{default:()=>{return[o(w,{modelValue:g.check,"onUpdate:modelValue":e=>g.check=e},(e=t=g.list.map((e=>o(A,{modelValue:g.check,"onUpdate:modelValue":e=>g.check=e,center:!0,onClick:()=>{return t=e.id,void g.checkboxRefs[t].toggle();var t}},{icon:()=>o(I,{class:N.img,src:e.avatar||x},null),title:()=>o("div",{class:N.content},[o("p",{class:N.name},[e.nickname]),o("p",{class:N.class},[e.currentGradeNum>0?T[e.currentGradeNum]:""])]),"right-icon":()=>o(L,{name:e.id,ref:t=>g.checkboxRefs[e.id]=t,onClick:e=>{e.stopPropagation(),e.preventDefault()}},{icon:e=>o(i,{class:N.iconChecked,name:e.checked?k:y},null)})}))),"function"==typeof e||"[object Object]"===Object.prototype.toString.call(e)&&!p(e)?t:{default:()=>[t]}))];var e}}):o(r,{btnStatus:!1,tips:"暂无学员"},null),o(v,{position:"bottom"},{default:()=>[o("div",{class:["btnGroup",N.btnMore]},[o(d,{type:"primary",plain:!0,round:!0,style:{backgroundColor:"transparent"},onClick:()=>{g.list.forEach((e=>{g.check.includes(e.id)||g.check.push(e.id)})),g.check}},{default:()=>[u("全选")]}),o(d,{type:"primary",round:!0,block:!0,onClick:E},{default:()=>[u("确认")]})])]}),o(h,{show:g.oPopover,"onUpdate:show":e=>g.oPopover=e,position:"bottom",round:!0,class:"popupBottomSearch"},{default:()=>[o(B,{columns:e.orchestraList,onCancel:()=>g.oPopover=!1,onConfirm:e=>{const t=e.selectedOptions[0];g.orchestra.id=t.value,g.orchestra.name=t.text,g.oPopover=!1,j()}},null)]}),o(h,{show:g.showPopover,"onUpdate:show":e=>g.showPopover=e,position:"bottom",round:!0,class:"popupBottomSearch"},{default:()=>[o(B,{columns:g.classList,onCancel:()=>g.showPopover=!1,onConfirm:e=>{const t=e.selectedOptions[0];g.class.id=t.value,g.class.name=t.text,g.showPopover=!1,j()}},null)]})])}}});var F={subjectList:"_subjectList_hptt0_1",subject:"_subject_hptt0_1",iconChecked:"_iconChecked_hptt0_19",img:"_img_hptt0_27",name:"_name_hptt0_34"};var V=t({name:"subject-list",props:{subjectList:{type:Array,default:()=>[]},selectSubjects:{type:Array,default:()=>[]}},emits:["close","select"],setup(e,{slots:t,attrs:n,emit:r}){const h=s({check:[],checkboxRefs:[]}),m=()=>{r("select",h.check),r("close")};return c((()=>e.selectSubjects),(()=>{h.check=[...e.selectSubjects]})),a((()=>{h.check=[...e.selectSubjects]})),()=>{let t;return o("div",{style:{minHeight:"100vh"}},[o(l,{title:"选择声部",desotry:!1},null),o(w,{class:F.subjectList,modelValue:h.check,"onUpdate:modelValue":e=>h.check=e,style:{paddingBottom:"24px"}},(s=t=e.subjectList.map((e=>o("div",{class:F.subject,onClick:()=>{return t=e.subjectId,void h.checkboxRefs[t].toggle();var t}},[o(L,{name:e.subjectId,class:F.checkbox,ref:t=>h.checkboxRefs[e.subjectId]=t,onClick:e=>{e.stopPropagation()}},{icon:e=>o(i,{class:F.iconChecked,name:e.checked?k:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACgAAAAoCAYAAACM/rhtAAAAAXNSR0IArs4c6QAAA4BJREFUWEfVmT1sFEcUx/9vFntF4cI6FIGCEwmKYJnbnQsgIxIhuUgoaCIlIEKoKPgSoJRQUKWAEgHCQJEqwUpMQUMRKCyhJIoF5Gb2sBwKkIJBIMC6ggLWzs6LHtqzjuPjOPsMw7az773fztv3MW8Is3iYWSVJsoaIBph5FYBPmHkJEXWJOmZ+TET3ANwgomvMPBJF0RUicq2ao1YEjDEfAtgLYBuApa3IArgD4CcAJ7TWd99U9o0AR0dHC52dnT8Q0XYAYa78FhH9RkS/O+fGwzC87Zx7LGtKqa40TT9SSvUy8+fMvAHAslwuZeYfp6amDvX39082A20KaK3dwszHASxi5kwp9atS6kSxWPyzmfL69Uqlss45t9c5t5mIAgCPxBta619ep+eVgCMjIwu6u7sFbFeu4JJSan8URf+0Atb4bpIkK5xzxwB8ka+dqlar+wYGBv57md6XAk5MTCycnJwcBrARwBNm/r5UKp2ZC1ijbLlc3kFERwEsBHChUChs6unpedL43guA+c6dz+EeBEGwsVgsXm0nXE1XpVJZnWXZBQAfCGS1Wv2qcSdfADTGDOZufUBE6+M4vjEfcDWd1lpJUZdzyFNa69319p4DzANiSNwaBMH6+dq5xg/Od1Igxd1b6gNnBlBSSRiGEgASrTvb/c8180L+T56W6E7TdEUtBc0Alsvlk0Qk23tJa/1lM4XzsW6MuSjRzcyDpVJpj9h4BphXiJvMvCAIgpVzTSWzhZcUlGXZdSKSlLNcKk4N8DCAA0Q0FMfx1tkaaIectfYsM38L4IjW+iBJ4bfW/iu1NQiCz1qtEO2Aaqw4WZb9IbU7juOPyVrbz8x/AbiltV7eboOz0WeMuSm1m4jWUpIkB5xzh4loMI7jZz/mu36stSeZebdS6iAZY84B+Fop9V0URWffNZzYT5Jkq3PuZyI6J4AVACsBfKq1LvsAaIwpAfgbwHUBfCjJOQzDRb29vU37s7fxAePj44U0TaUdeyRB8pSZw46OjrCvr2/qbQA0szE2NtY5PT2dElHqP6D3LvY5SIioIi4eZuZvvE0z3idq70ud981C3g/62269Fw2rQHrd8gug94cmgfT62Fkr4F4f3AXS+9GHQHo9PKq52uvxW31D6e0Asx7S6xFwPai3Q/TGM0T9NYRzbrVcQwBYXH8NAeC+XEMopa7O5Rrif2YMj8Ww1rJlAAAAAElFTkSuQmCC"},null)}),o(I,{class:F.img,src:e.subjectImg},null),o("p",{class:F.name},[e.subjectName])]))),"function"==typeof s||"[object Object]"===Object.prototype.toString.call(s)&&!p(s)?t:{default:()=>[t]})),o(v,{position:"bottom"},{default:()=>[o("div",{class:["btnGroup","btnMore"],style:"padding-left: 13px; padding-right: 13px;"},[o(d,{round:!0,color:"#CCCCCC",onClick:()=>r("close")},{default:()=>[u("取消")]}),o(d,{type:"primary",round:!0,onClick:m},{default:()=>[u("确认")]})])]})]);var s}}});e("default",t({name:"create-orchestra",setup(){const e=b(),t=e=>{U.selectSubjectIds=[...e];const t=[];console.log(U.selectSubjects,"1212",U.subjectList),U.subjectList.forEach((s=>{const c=U.selectSubjects.findIndex((e=>e.id===s.subjectId));e.includes(s.subjectId)&&(c<0?t.push({id:s.subjectId,name:s.subjectName,subjectCode:s.subjectCode,type:null,teacher:{},students:[]}):t.push(U.selectSubjects.find((e=>e.id===s.subjectId))))})),U.selectSubjects=[...t]},s=()=>{if(!U.orchestraName)return void g("请输入乐团名称");if(U.selectSubjects&&U.selectSubjects.length<=0)return void g("请选择声部");const t=U.selectSubjects||[];let s=!1;if(t.forEach((e=>{(!e.students||e.students&&e.students.length<=0)&&(s=!0)})),s)return void g("请选择学员");const c=[],a=[];let n={};U.selectSubjects.forEach((e=>{if(console.log(e,"item.name"),a.push(...e.students),"BARITONE"!==e.subjectCode&&"TUBA"!==e.subjectCode)c.push(e);else{const t=n.students?n.students:[];n={id:n.id?n.id+","+e.id:e.id,name:n.name?n.name+"-"+e.name:e.name,type:null,teacher:{},students:[...t,...e.students]}}})),U.selectLastTeacherSubjects=M(c),n.id&&U.selectLastTeacherSubjects.push(n),U.selectLastTeacherSubjects.push({id:null,name:"乐理班",type:"MUSIC_THEORY",teacher:{},students:[...a]},{id:null,name:"合奏班",type:"INSTRUMENTAL_ENSEMBLE",teacher:{},students:[...a]}),e.push({path:"/create-orchestra-teacher"})};return a((()=>{E(),(async()=>{try{const{data:e}=await m.post("/api-school/subjectBasicConfig/page",{data:{page:1,rows:50}});U.subjectList=e.rows||[]}catch{}})(),(async()=>{try{const{data:e}=await m.post("/api-school/orchestra/page",{data:{page:1,rows:100,schoolId:n.user.data.school.id,status:"DONE"}}),t=e.rows||[],s=[];t.forEach((e=>{s.push({text:e.name,value:e.id})})),U.orchestraList=[...s]}catch{}})()})),()=>o("div",{class:j["create-orchestra"]},[o(l,null,null),o(P,{inset:!0},{default:()=>[o(z,{label:"乐团名称",modelValue:U.orchestraName,"onUpdate:modelValue":e=>U.orchestraName=e,placeholder:"请输入乐团名称",inputAlign:"right",maxlength:30},null),o(z,{label:"乐团声部",readonly:!0,placeholder:U.selectSubjects.length>0?`已选${U.selectSubjects.length}个`:"选择声部",isLink:!0,inputAlign:"right",onClick:()=>U.subjectStatus=!0},null),U.selectSubjects.map((e=>o(A,{title:e.name,isLink:!0,onClick:()=>{U.studentStatus=!0,U.selectSubjectStudents=e}},{value:()=>{var t;return o(f,null,[u("已选")," ",o("span",{style:{color:"var(--van-primary-color)"}},[(null===(t=e.students)||void 0===t?void 0:t.length)||0])," ",u("名学员")])}})))]}),o(v,{position:"bottom"},{default:()=>[o("div",{class:["btnGroup"]},[o(d,{type:"primary",block:!0,round:!0,onClick:s},{default:()=>[u("下一步")]})])]}),o(_,{modelValue:U.subjectStatus,"onUpdate:modelValue":e=>U.subjectStatus=e,style:"background: #F8F8F8;"},{default:()=>[U.subjectStatus&&o(V,{onClose:()=>U.subjectStatus=!1,subjectList:U.subjectList,selectSubjects:U.selectSubjectIds,onSelect:t},null)]}),o(_,{modelValue:U.studentStatus,"onUpdate:modelValue":e=>U.studentStatus=e,style:"background: #f8f8f8;"},{default:()=>[U.studentStatus&&o(R,{orchestraList:U.orchestraList,subjectId:U.selectSubjectStudents.id,selectStudentIds:U.selectSubjectStudents.students,onClose:()=>U.studentStatus=!1,onSelect:e=>{U.selectSubjectStudents.students=[...e]}},null)]})])}}))}}}))}();