index-legacy.5e9e181c.js 18 KB

1
  1. !function(){function e(e){return function(e){if(Array.isArray(e))return t(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,n){if(!e)return;if("string"==typeof e)return t(e,n);var c=Object.prototype.toString.call(e).slice(8,-1);"Object"===c&&e.constructor&&(c=e.constructor.name);if("Map"===c||"Set"===c)return Array.from(e);if("Arguments"===c||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(c))return t(e,n)}(e)||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 t(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,c=new Array(t);n<t;n++)c[n]=e[n];return c}function n(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var c=Object.getOwnPropertySymbols(e);t&&(c=c.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,c)}return n}function c(e){for(var t=1;t<arguments.length;t++){var c=null!=arguments[t]?arguments[t]:{};t%2?n(Object(c),!0).forEach((function(t){r(e,t,c[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(c)):n(Object(c)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(c,t))}))}return e}function r(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function s(e,t,n,c,r,s,o){try{var a=e[s](o),u=a.value}catch(i){return void n(i)}a.done?t(u):Promise.resolve(u).then(c,r)}function o(e){return function(){var t=this,n=arguments;return new Promise((function(c,r){var o=e.apply(t,n);function a(e){s(o,c,r,a,u,"next",e)}function u(e){s(o,c,r,a,u,"throw",e)}a(void 0)}))}}var a=document.createElement("style");a.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(a),System.register(["./index-legacy.90c82f08.js","./index-legacy.c223b3ce.js","./index-legacy.84457c4c.js","./index.module-legacy.3521c141.js","./index-legacy.e11fad33.js","./icon-checkbox-check-legacy.8c6ec582.js","./icon-checkbox-default-legacy.20cf236b.js","./icon_student-legacy.6118fd72.js","./index-legacy.789a0824.js","./index-legacy.b10d0450.js","./index-legacy.f3e5e283.js","./index-legacy.eb4bc59e.js","./index-legacy.f7f96215.js","./index-legacy.c8871c95.js","./create-legacy.7ae9c7fb.js","./deep-clone-legacy.b234d76d.js","./index-legacy.55839436.js","./index-legacy.3c5580aa.js","./use-tab-status-legacy.bafe466c.js","./Checker-legacy.1b485b9f.js","./Picker-legacy.aeff9f1a.js","./index-legacy.fe10c814.js","./index-legacy.64e3b474.js","./index-legacy.f9492e3a.js"],(function(t){"use strict";var n,r,s,a,u,i,l,d,f,p,h,m,b,v,g,_,j,y,S,k,x,w,A,C,I,L,E,O,P,B,U,M,R,T,z;return{setters:[function(e){n=e.d,r=e.r,s=e.Z,a=e.$,u=e.c,i=e.aj,l=e.a5,d=e.ak,f=e.B,p=e.q,h=e.P,m=e.al,b=e.m,v=e.ag,g=e.F,_=e.g,j=e.o},function(e){y=e.O},function(e){S=e.O},function(e){k=e.s},function(e){x=e.O},function(e){w=e.c},function(e){A=e.c},function(e){C=e.i},function(e){I=e.L},function(e){L=e.C},function(e){E=e.C},function(e){O=e.I},function(e){P=e.C},function(e){B=e.P},function(e){U=e.r,M=e.c},function(e){R=e.d},function(e){T=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"};var F={1:"一年级",2:"二年级",3:"三年级",4:"四年级",5:"五年级",6:"六年级",7:"七年级",8:"八年级",9:"九年级"},V=n({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 v=n.emit,g=r({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},{text:"六年级",value:6},{text:"七年级",value:7},{text:"八年级",value:8},{text:"九年级",value:9}],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}}),_=function(){var e=o(regeneratorRuntime.mark((function e(){var n,r;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(e.prev=0,!g.isLoad){e.next=3;break}return e.abrupt("return");case 3:return g.isLoad=!0,e.next=6,b.post("/api-school/student/page",{data:c(c({},g.params),{},{subjectId:t.subjectId,orchestraId:g.orchestra.id,currentGradeNum:-1===g.class.id?null:g.class.id})});case 6:if(n=e.sent,g.listState.loading=!1,r=n.data||{},!(g.list.length>0&&1===r.current)){e.next=11;break}return e.abrupt("return");case 11:g.list=g.list.concat(r.rows||[]),g.listState.finished=r.current>=r.pages,g.params.page=r.current+1,g.listState.dataShow=g.list.length>0,g.isLoad=!1,e.next=23;break;case 18:e.prev=18,e.t0=e.catch(0),g.listState.dataShow=!1,g.listState.finished=!0,g.isLoad=!1;case 23:case"end":return e.stop()}}),e,null,[[0,18]])})));return function(){return e.apply(this,arguments)}}(),j=function(){g.params.page=1,g.list=[],g.listState.dataShow=!0,g.listState.loading=!1,g.listState.finished=!1,_()},y=function(){v("close"),v("select",g.check),setTimeout((function(){g.check=[]}),100)};return s((function(){return t.subjectId}),(function(){console.log("subjectId"),j()})),s((function(){return t.selectStudentIds}),(function(){console.log(t.selectStudentIds,"watch"),g.check=e(t.selectStudentIds)})),a((function(){if(console.log(t.selectStudentIds,"onmount"),t.orchestraList.length>0){var n=t.orchestraList[0];g.orchestra.id=n.value,g.orchestra.name=n.text}_(),g.check=e(t.selectStudentIds)})),function(){var e;return u("div",{class:N.studentList},[u(S,{position:"top"},{default:function(){return[u(i,{title:"选择学员",desotry:!1,border:!1},null),u(x,{class:"searchGroupInput",placeholder:"学员名称/手机号",onSearch:function(e){g.params.keyword=e,j()}},null),u("div",{class:"searchGroup"},[u("div",{class:["searchItem searchItem-large",g.showPopover?"searchItem-active":""],onClick:function(){return g.showPopover=!0}},[u("span",null,[g.class.name]),u("i",{class:"arrow"},null)]),u("div",{class:["searchItem searchItem-large",g.oPopover?"searchItem-active":""],onClick:function(){return g.oPopover=!0}},[u("span",null,[g.orchestra.name]),u("i",{class:"arrow"},null)])])]}}),g.listState.dataShow?u(I,{finished:g.listState.finished,finishedText:" ",class:[N.liveList],onLoad:_,style:{paddingTop:"12px"},immediateCheck:!1},{default:function(){return[u(L,{modelValue:g.check,"onUpdate:modelValue":function(e){return g.check=e}},(t=e=g.list.map((function(e){return u(E,{modelValue:g.check,"onUpdate:modelValue":function(e){return g.check=e},center:!0,onClick:function(){return t=e.id,void g.checkboxRefs[t].toggle();var t}},{icon:function(){return u(O,{class:N.img,src:e.avatar||C},null)},title:function(){return u("div",{class:N.content},[u("p",{class:N.name},[e.nickname]),u("p",{class:N.class},[e.currentGradeNum>0?F[e.currentGradeNum]:""])])},"right-icon":function(){return u(P,{name:e.id,ref:function(t){return g.checkboxRefs[e.id]=t},onClick:function(e){e.stopPropagation(),e.preventDefault()}},{icon:function(e){return u(l,{class:N.iconChecked,name:e.checked?w:A},null)}})}})})),"function"==typeof t||"[object Object]"===Object.prototype.toString.call(t)&&!m(t)?e:{default:function(){return[e]}}))];var t}}):u(d,{btnStatus:!1,tips:"暂无学员"},null),u(S,{position:"bottom"},{default:function(){return[u("div",{class:["btnGroup",N.btnMore]},[u(f,{type:"primary",plain:!0,round:!0,style:{backgroundColor:"transparent"},onClick:function(){g.list.forEach((function(e){g.check.includes(e.id)||g.check.push(e.id)})),g.check}},{default:function(){return[p("全选")]}}),u(f,{type:"primary",round:!0,block:!0,onClick:y},{default:function(){return[p("确认")]}})])]}}),u(h,{show:g.oPopover,"onUpdate:show":function(e){return g.oPopover=e},position:"bottom",round:!0,class:"popupBottomSearch"},{default:function(){return[u(B,{columns:t.orchestraList,onCancel:function(){return g.oPopover=!1},onConfirm:function(e){var t=e.selectedOptions[0];g.orchestra.id=t.value,g.orchestra.name=t.text,g.oPopover=!1,j()}},null)]}}),u(h,{show:g.showPopover,"onUpdate:show":function(e){return g.showPopover=e},position:"bottom",round:!0,class:"popupBottomSearch"},{default:function(){return[u(B,{columns:g.classList,onCancel:function(){return g.showPopover=!1},onConfirm:function(e){var t=e.selectedOptions[0];g.class.id=t.value,g.class.name=t.text,g.showPopover=!1,j()}},null)]}})])}}}),J={subjectList:"_subjectList_hptt0_1",subject:"_subject_hptt0_1",iconChecked:"_iconChecked_hptt0_19",img:"_img_hptt0_27",name:"_name_hptt0_34"};var W=n({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 c=n.emit,o=r({check:[],checkboxRefs:[]}),d=function(){c("select",o.check),c("close")};return s((function(){return t.selectSubjects}),(function(){o.check=e(t.selectSubjects)})),a((function(){o.check=e(t.selectSubjects)})),function(){var e,n;return u("div",{style:{minHeight:"100vh"}},[u(i,{title:"选择声部",desotry:!1},null),u(L,{class:J.subjectList,modelValue:o.check,"onUpdate:modelValue":function(e){return o.check=e},style:{paddingBottom:"24px"}},(n=e=t.subjectList.map((function(e){return u("div",{class:J.subject,onClick:function(){return t=e.subjectId,void o.checkboxRefs[t].toggle();var t}},[u(P,{name:e.subjectId,class:J.checkbox,ref:function(t){return o.checkboxRefs[e.subjectId]=t},onClick:function(e){e.stopPropagation()}},{icon:function(e){return u(l,{class:J.iconChecked,name:e.checked?w:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACgAAAAoCAYAAACM/rhtAAAAAXNSR0IArs4c6QAA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gug94cmgfT62Fkr4F4f3AXS+9GHQHo9PKq52uvxW31D6e0Asx7S6xFwPai3Q/TGM0T9NYRzbrVcQwBYXH8NAeC+XEMopa7O5Rrif2YMj8Ww1rJlAAAAAElFTkSuQmCC"},null)}}),u(O,{class:J.img,src:e.subjectImg},null),u("p",{class:J.name},[e.subjectName])])})),"function"==typeof n||"[object Object]"===Object.prototype.toString.call(n)&&!m(n)?e:{default:function(){return[e]}})),u(S,{position:"bottom"},{default:function(){return[u("div",{class:["btnGroup","btnMore"],style:"padding-left: 13px; padding-right: 13px;"},[u(f,{round:!0,color:"#CCCCCC",onClick:function(){return c("close")}},{default:function(){return[p("取消")]}}),u(f,{type:"primary",round:!0,onClick:d},{default:function(){return[p("确认")]}})])]}})])}}});t("default",n({name:"create-orchestra",setup:function(){var t=v(),n=function(){var e=o(regeneratorRuntime.mark((function e(){var t,n;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,b.post("/api-school/subjectBasicConfig/page",{data:{page:1,rows:50,enableFlag:!0}});case 3:t=e.sent,n=t.data,M.subjectList=n.rows||[],e.next=10;break;case 8:e.prev=8,e.t0=e.catch(0);case 10:case"end":return e.stop()}}),e,null,[[0,8]])})));return function(){return e.apply(this,arguments)}}(),c=function(){var e=o(regeneratorRuntime.mark((function e(){var t,n,c,r;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,b.post("/api-school/orchestra/page",{data:{page:1,rows:100,schoolId:_.user.data.school.id,status:"DONE"}});case 3:t=e.sent,n=t.data,c=n.rows||[],r=[],c.forEach((function(e){r.push({text:e.name,value:e.id})})),M.orchestraList=[].concat(r),e.next=13;break;case 11:e.prev=11,e.t0=e.catch(0);case 13:case"end":return e.stop()}}),e,null,[[0,11]])})));return function(){return e.apply(this,arguments)}}(),r=function(t){M.selectSubjectIds=e(t);var n=[];console.log(M.selectSubjects,"1212",M.subjectList),M.subjectList.forEach((function(e){var c=M.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(M.selectSubjects.find((function(t){return t.id===e.subjectId}))))})),M.selectSubjects=[].concat(n)},s=function(){if(M.orchestraName)if(M.selectSubjects&&M.selectSubjects.length<=0)j("请选择声部");else{var n=M.selectSubjects||[],c=!1;if(n.forEach((function(e){(!e.students||e.students&&e.students.length<=0)&&(c=!0)})),c)j("请选择学员");else{var r=[],s=[],o={};M.selectSubjects.forEach((function(t){if(console.log(t,"item.name"),s.push.apply(s,e(t.students)),"BARITONE"!==t.subjectCode&&"TUBA"!==t.subjectCode)r.push(t);else{var n=o.students?o.students:[];o={id:o.id?o.id+","+t.id:t.id,name:o.name?o.name+"-"+t.name:t.name,type:null,teacher:{},students:[].concat(e(n),e(t.students))}}})),M.selectLastTeacherSubjects=R(r),o.id&&M.selectLastTeacherSubjects.push(o),M.selectLastTeacherSubjects.push({id:null,name:"乐理班",type:"MUSIC_THEORY",teacher:{},students:[].concat(s)},{id:null,name:"合奏班",type:"INSTRUMENTAL_ENSEMBLE",teacher:{},students:[].concat(s)}),t.push({path:"/create-orchestra-teacher"})}}else j("请输入乐团名称")};return a((function(){U(),n(),c()})),function(){return u("div",{class:k["create-orchestra"]},[u(i,null,null),u(T,{inset:!0},{default:function(){return[u(z,{label:"乐团名称",modelValue:M.orchestraName,"onUpdate:modelValue":function(e){return M.orchestraName=e},placeholder:"请输入乐团名称",inputAlign:"right",maxlength:30},null),u(z,{label:"乐团声部",readonly:!0,placeholder:M.selectSubjects.length>0?"已选".concat(M.selectSubjects.length,"个"):"选择声部",isLink:!0,inputAlign:"right",onClick:function(){return M.subjectStatus=!0}},null),M.selectSubjects.map((function(e){return u(E,{title:e.name,isLink:!0,onClick:function(){M.studentStatus=!0,M.selectSubjectStudents=e}},{value:function(){var t;return u(g,null,[p("已选")," ",u("span",{style:{color:"var(--van-primary-color)"}},[(null===(t=e.students)||void 0===t?void 0:t.length)||0])," ",p("名学员")])}})}))]}}),u(S,{position:"bottom"},{default:function(){return[u("div",{class:["btnGroup"]},[u(f,{type:"primary",block:!0,round:!0,onClick:s},{default:function(){return[p("下一步")]}})])]}}),u(y,{modelValue:M.subjectStatus,"onUpdate:modelValue":function(e){return M.subjectStatus=e},style:"background: #F8F8F8;"},{default:function(){return[M.subjectStatus&&u(W,{onClose:function(){return M.subjectStatus=!1},subjectList:M.subjectList,selectSubjects:M.selectSubjectIds,onSelect:r},null)]}}),u(y,{modelValue:M.studentStatus,"onUpdate:modelValue":function(e){return M.studentStatus=e},style:"background: #f8f8f8;"},{default:function(){return[M.studentStatus&&u(V,{orchestraList:M.orchestraList,subjectId:M.selectSubjectStudents.id,selectStudentIds:M.selectSubjectStudents.students,onClose:function(){return M.studentStatus=!1},onSelect:function(t){M.selectSubjectStudents.students=e(t)}},null)]}})])}}}))}}}))}();