index-legacy.3bd42042.js 18 KB

1
  1. !function(){function t(e){return t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},t(e)}function e(t){return function(t){if(Array.isArray(t))return n(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||function(t,e){if(!t)return;if("string"==typeof t)return n(t,e);var c=Object.prototype.toString.call(t).slice(8,-1);"Object"===c&&t.constructor&&(c=t.constructor.name);if("Map"===c||"Set"===c)return Array.from(t);if("Arguments"===c||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(c))return n(t,e)}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function n(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,c=new Array(e);n<e;n++)c[n]=t[n];return c}function c(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var c=Object.getOwnPropertySymbols(t);e&&(c=c.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,c)}return n}function r(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?c(Object(n),!0).forEach((function(e){o(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):c(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function o(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function s(t,e,n,c,r,o,s){try{var a=t[o](s),u=a.value}catch(i){return void n(i)}a.done?e(u):Promise.resolve(u).then(c,r)}function a(t){return function(){var e=this,n=arguments;return new Promise((function(c,r){var o=t.apply(e,n);function a(t){s(o,c,r,a,u,"next",t)}function u(t){s(o,c,r,a,u,"throw",t)}a(void 0)}))}}var u=document.createElement("style");u.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(u),System.register(["./index-legacy.020910a9.js","./index-legacy.9367761d.js","./index-legacy.a921a064.js","./index-legacy.f6cd85d1.js","./index.module-legacy.3521c141.js","./index-legacy.2a9910ac.js","./icon-checkbox-check-legacy.8c6ec582.js","./icon-checkbox-default-legacy.20cf236b.js","./icon_student-legacy.6118fd72.js","./index-legacy.5da399f0.js","./index-legacy.c821dc00.js","./index-legacy.daebca5d.js","./index-legacy.c513976c.js","./index-legacy.7180a574.js","./index-legacy.0757ff8b.js","./create-legacy.2d6cfb5d.js","./index-legacy.4fb10b76.js","./index-legacy.509f8f47.js","./index-legacy.f9a087f7.js","./index-legacy.c75fe8a2.js","./use-tab-status-legacy.92a728cd.js","./Checker-legacy.4c426a90.js","./Picker-legacy.95e71111.js","./index-legacy.7cbbd9e4.js","./index-legacy.70b1889d.js","./index-legacy.da40aa25.js"],(function(n){"use strict";var c,o,s,u,i,l,d,f,p,h,m,b,v,g,_,j,y,S,k,x,w,A,C,I,L,O,E,P,B,U,M,R,T,z;return{setters:[function(t){c=t.O},function(t){o=t.O},function(t){s=t.O},function(t){u=t.d,i=t.r,l=t.Z,d=t.$,f=t.f,p=t.c,h=t.a5,m=t.aj,b=t.B,v=t.q,g=t.P,_=t.ak,j=t.m,y=t.ag,S=t.F,k=t.o},function(t){x=t.s},function(t){w=t.O},function(t){A=t.c},function(t){C=t.c},function(t){I=t.i},function(t){L=t.L},function(t){O=t.C},function(t){E=t.C},function(t){P=t.I},function(t){B=t.C},function(t){U=t.P},function(t){M=t.r,R=t.c},function(t){T=t.C},function(t){z=t.F},function(){},function(){},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"};var F={1:"一年级",2:"二年级",3:"三年级",4:"四年级",5:"五年级",6:"六年级"},V=u({name:"student-list",props:{orchestraList:{type:Array,default:function(){return[]}},subjectId:{type:[String,Number],default:""},selectStudentIds:{type:Array,default:function(){return[]}}},emits:["close","select"],setup:function(t,n){n.slots,n.attrs;var o=n.emit,u=i({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}}),y=function(){var e=a(regeneratorRuntime.mark((function e(){var n,c;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(e.prev=0,!u.isLoad){e.next=3;break}return e.abrupt("return");case 3:return u.isLoad=!0,e.next=6,j.post("/api-school/student/page",{data:r(r({},u.params),{},{subjectId:t.subjectId,orchestraId:u.orchestra.id,currentGradeNum:-1===u.class.id?null:u.class.id})});case 6:if(n=e.sent,u.listState.loading=!1,c=n.data||{},!(u.list.length>0&&1===c.current)){e.next=11;break}return e.abrupt("return");case 11:u.list=u.list.concat(c.rows||[]),u.listState.finished=c.current>=c.pages,u.params.page=c.current+1,u.listState.dataShow=u.list.length>0,u.isLoad=!1,e.next=23;break;case 18:e.prev=18,e.t0=e.catch(0),u.listState.dataShow=!1,u.listState.finished=!0,u.isLoad=!1;case 23:case"end":return e.stop()}}),e,null,[[0,18]])})));return function(){return e.apply(this,arguments)}}(),S=function(){u.params.page=1,u.list=[],u.listState.dataShow=!0,u.listState.loading=!1,u.listState.finished=!1,y()},k=function(){o("close"),o("select",u.check),setTimeout((function(){u.check=[]}),100)};return l((function(){return t.subjectId}),(function(){console.log("subjectId"),S()})),l((function(){return t.selectStudentIds}),(function(){console.log(t.selectStudentIds,"watch"),u.check=e(t.selectStudentIds)})),d((function(){var n;if(console.log(t.selectStudentIds,"onmount"),"sixYearSystem"===(null===(n=f.user.data.school)||void 0===n?void 0:n.schoolSystem)&&u.classList.push({text:"六年级",value:6}),t.orchestraList.length>0){var c=t.orchestraList[0];u.orchestra.id=c.value,u.orchestra.name=c.text}y(),u.check=e(t.selectStudentIds)})),function(){var e;return p("div",{class:N.studentList},[p(s,{position:"top"},{default:function(){return[p(c,{title:"选择学员",desotry:!1,border:!1},null),p(w,{class:"searchGroupInput",placeholder:"学员名称/手机号",onSearch:function(t){u.params.keyword=t,S()}},null),p("div",{class:"searchGroup"},[p("div",{class:["searchItem searchItem-large",u.showPopover?"searchItem-active":""],onClick:function(){return u.showPopover=!0}},[p("span",null,[u.class.name]),p("i",{class:"arrow"},null)]),p("div",{class:["searchItem searchItem-large",u.oPopover?"searchItem-active":""],onClick:function(){return u.oPopover=!0}},[p("span",null,[u.orchestra.name]),p("i",{class:"arrow"},null)])])]}}),u.listState.dataShow?p(L,{finished:u.listState.finished,finishedText:" ",class:[N.liveList],onLoad:y,style:{paddingTop:"12px"},immediateCheck:!1},{default:function(){return[p(O,{modelValue:u.check,"onUpdate:modelValue":function(t){return u.check=t}},(t=e=u.list.map((function(t){return p(E,{modelValue:u.check,"onUpdate:modelValue":function(t){return u.check=t},center:!0,onClick:function(){return e=t.id,void u.checkboxRefs[e].toggle();var e}},{icon:function(){return p(P,{class:N.img,src:t.avatar||I},null)},title:function(){return p("div",{class:N.content},[p("p",{class:N.name},[t.nickname]),p("p",{class:N.class},[t.currentGradeNum>0?F[t.currentGradeNum]:""])])},"right-icon":function(){return p(B,{name:t.id,ref:function(e){return u.checkboxRefs[t.id]=e},onClick:function(t){t.stopPropagation(),t.preventDefault()}},{icon:function(t){return p(h,{class:N.iconChecked,name:t.checked?A:C},null)}})}})})),"function"==typeof t||"[object Object]"===Object.prototype.toString.call(t)&&!_(t)?e:{default:function(){return[e]}}))];var t}}):p(m,{btnStatus:!1,tips:"暂无学员"},null),p(s,{position:"bottom"},{default:function(){return[p("div",{class:["btnGroup",N.btnMore]},[p(b,{type:"primary",plain:!0,round:!0,style:{backgroundColor:"transparent"},onClick:function(){u.list.forEach((function(t){u.check.includes(t.id)||u.check.push(t.id)})),u.check}},{default:function(){return[v("全选")]}}),p(b,{type:"primary",round:!0,block:!0,onClick:k},{default:function(){return[v("确认")]}})])]}}),p(g,{show:u.oPopover,"onUpdate:show":function(t){return u.oPopover=t},position:"bottom",round:!0,class:"popupBottomSearch"},{default:function(){return[p(U,{columns:t.orchestraList,onCancel:function(){return u.oPopover=!1},onConfirm:function(t){var e=t.selectedOptions[0];u.orchestra.id=e.value,u.orchestra.name=e.text,u.oPopover=!1,S()}},null)]}}),p(g,{show:u.showPopover,"onUpdate:show":function(t){return u.showPopover=t},position:"bottom",round:!0,class:"popupBottomSearch"},{default:function(){return[p(U,{columns:u.classList,onCancel:function(){return u.showPopover=!1},onConfirm:function(t){var e=t.selectedOptions[0];u.class.id=e.value,u.class.name=e.text,u.showPopover=!1,S()}},null)]}})])}}}),J={subjectList:"_subjectList_hptt0_1",subject:"_subject_hptt0_1",iconChecked:"_iconChecked_hptt0_19",img:"_img_hptt0_27",name:"_name_hptt0_34"};var W=u({name:"subject-list",props:{subjectList:{type:Array,default:function(){return[]}},selectSubjects:{type:Array,default:function(){return[]}}},emits:["close","select"],setup:function(t,n){n.slots,n.attrs;var r=n.emit,o=i({check:[],checkboxRefs:[]}),a=function(){r("select",o.check),r("close")};return l((function(){return t.selectSubjects}),(function(){o.check=e(t.selectSubjects)})),d((function(){o.check=e(t.selectSubjects)})),function(){var e,n;return p("div",{style:{minHeight:"100vh"}},[p(c,{title:"选择声部",desotry:!1},null),p(O,{class:J.subjectList,modelValue:o.check,"onUpdate:modelValue":function(t){return o.check=t},style:{paddingBottom:"24px"}},(n=e=t.subjectList.map((function(t){return p("div",{class:J.subject,onClick:function(){return e=t.subjectId,void o.checkboxRefs[e].toggle();var e}},[p(B,{name:t.subjectId,class:J.checkbox,ref:function(e){return o.checkboxRefs[t.subjectId]=e},onClick:function(t){t.stopPropagation()}},{icon:function(t){return p(h,{class:J.iconChecked,name:t.checked?A:"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)}}),p(P,{class:J.img,src:t.subjectImg},null),p("p",{class:J.name},[t.subjectName])])})),"function"==typeof n||"[object Object]"===Object.prototype.toString.call(n)&&!_(n)?e:{default:function(){return[e]}})),p(s,{position:"bottom"},{default:function(){return[p("div",{class:["btnGroup","btnMore"],style:"padding-left: 13px; padding-right: 13px;"},[p(b,{round:!0,color:"#CCCCCC",onClick:function(){return r("close")}},{default:function(){return[v("取消")]}}),p(b,{type:"primary",round:!0,onClick:a},{default:function(){return[v("确认")]}})])]}})])}}}),G=function e(n){if(null===n)return null;var c=Object.assign({},n);return Object.keys(c).forEach((function(r){return c[r]="object"===t(n[r])?e(n[r]):n[r]})),Array.isArray(n)?(c.length=n.length,Array.from(c)):c};n("default",u({name:"create-orchestra",setup:function(){var t=y(),n=function(){var t=a(regeneratorRuntime.mark((function t(){var e,n;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,j.post("/api-school/subjectBasicConfig/page",{data:{page:1,rows:50}});case 3:e=t.sent,n=e.data,R.subjectList=n.rows||[],t.next=10;break;case 8:t.prev=8,t.t0=t.catch(0);case 10:case"end":return t.stop()}}),t,null,[[0,8]])})));return function(){return t.apply(this,arguments)}}(),r=function(){var t=a(regeneratorRuntime.mark((function t(){var e,n,c,r;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,j.post("/api-school/orchestra/page",{data:{page:1,rows:100,schoolId:f.user.data.school.id,status:"DONE"}});case 3:e=t.sent,n=e.data,c=n.rows||[],r=[],c.forEach((function(t){r.push({text:t.name,value:t.id})})),R.orchestraList=[].concat(r),t.next=13;break;case 11:t.prev=11,t.t0=t.catch(0);case 13:case"end":return t.stop()}}),t,null,[[0,11]])})));return function(){return t.apply(this,arguments)}}(),u=function(t){R.selectSubjectIds=e(t);var n=[];console.log(R.selectSubjects,"1212",R.subjectList),R.subjectList.forEach((function(e){var c=R.selectSubjects.findIndex((function(t){return t.id===e.subjectId}));t.includes(e.subjectId)&&(c<0?n.push({id:e.subjectId,name:e.subjectName,subjectCode:e.subjectCode,type:null,teacher:{},students:[]}):n.push(R.selectSubjects.find((function(t){return t.id===e.subjectId}))))})),R.selectSubjects=[].concat(n)},i=function(){if(R.orchestraName)if(R.selectSubjects&&R.selectSubjects.length<=0)k("请选择声部");else{var n=R.selectSubjects||[],c=!1;if(n.forEach((function(t){(!t.students||t.students&&t.students.length<=0)&&(c=!0)})),c)k("请选择学员");else{var r=[],o=[],s={};R.selectSubjects.forEach((function(t){if(console.log(t,"item.name"),o.push.apply(o,e(t.students)),"BARITONE"!==t.subjectCode&&"TUBA"!==t.subjectCode)r.push(t);else{var n=s.students?s.students:[];s={id:s.id?s.id+","+t.id:t.id,name:s.name?s.name+"-"+t.name:t.name,type:null,teacher:{},students:[].concat(e(n),e(t.students))}}})),R.selectLastTeacherSubjects=G(r),s.id&&R.selectLastTeacherSubjects.push(s),R.selectLastTeacherSubjects.push({id:null,name:"乐理班",type:"MUSIC_THEORY",teacher:{},students:[].concat(o)},{id:null,name:"合奏班",type:"INSTRUMENTAL_ENSEMBLE",teacher:{},students:[].concat(o)}),t.push({path:"/create-orchestra-teacher"})}}else k("请输入乐团名称")};return d((function(){M(),n(),r()})),function(){return p("div",{class:x["create-orchestra"]},[p(c,null,null),p(T,{inset:!0},{default:function(){return[p(z,{label:"乐团名称",modelValue:R.orchestraName,"onUpdate:modelValue":function(t){return R.orchestraName=t},placeholder:"请输入乐团名称",inputAlign:"right",maxlength:30},null),p(z,{label:"乐团声部",readonly:!0,placeholder:R.selectSubjects.length>0?"已选".concat(R.selectSubjects.length,"个"):"选择声部",isLink:!0,inputAlign:"right",onClick:function(){return R.subjectStatus=!0}},null),R.selectSubjects.map((function(t){return p(E,{title:t.name,isLink:!0,onClick:function(){R.studentStatus=!0,R.selectSubjectStudents=t}},{value:function(){var e;return p(S,null,[v("已选")," ",p("span",{style:{color:"var(--van-primary-color)"}},[(null===(e=t.students)||void 0===e?void 0:e.length)||0])," ",v("名学员")])}})}))]}}),p(s,{position:"bottom"},{default:function(){return[p("div",{class:["btnGroup"]},[p(b,{type:"primary",block:!0,round:!0,onClick:i},{default:function(){return[v("下一步")]}})])]}}),p(o,{modelValue:R.subjectStatus,"onUpdate:modelValue":function(t){return R.subjectStatus=t},style:"background: #F8F8F8;"},{default:function(){return[R.subjectStatus&&p(W,{onClose:function(){return R.subjectStatus=!1},subjectList:R.subjectList,selectSubjects:R.selectSubjectIds,onSelect:u},null)]}}),p(o,{modelValue:R.studentStatus,"onUpdate:modelValue":function(t){return R.studentStatus=t},style:"background: #f8f8f8;"},{default:function(){return[R.studentStatus&&p(V,{orchestraList:R.orchestraList,subjectId:R.selectSubjectStudents.id,selectStudentIds:R.selectSubjectStudents.students,onClose:function(){return R.studentStatus=!1},onSelect:function(t){R.selectSubjectStudents.students=e(t)}},null)]}})])}}}))}}}))}();