1 |
- import{d as D,j as e,z as F,g as l,w as j,S as f,a2 as W,a7 as Z,T as $,B as U,O as ee,P as ae,Q as _,U as te,f as se,M as oe,be as le,C as ue,aR as K,F as ne}from"./index.e6d6174e.js";import{L as ie}from"./index.f904775d.js";import"./index.9093bc60.js";import"./index.b4a53c6a.js";import{T as re,a as H}from"./index.54627972.js";import{S as ce}from"./index.c42f80e3.js";import{b as J}from"./index.684ca989.js";import{T as G}from"./index.05f2b7dd.js";import{C as O}from"./index.3d7e5752.js";import"./index.d92a5aca.js";import{c as I}from"./index.926ca9c5.js";import{C as fe}from"./index.c67b3500.js";import{g as pe}from"./music.413b82d2.js";import{S as de}from"./select-subject.f61520d8.js";import{a as P,S as h}from"./hooks.00b5b341.js";import{S as ve}from"./index.e8449f92.js";import{C as me}from"./index.045f03fd.js";import{b as Ae}from"./bg-image.e9966434.js";import{T as ge}from"./index.275665ec.js";import"./use-tab-status.e9ba8498.js";import"./use-id.f239f36f.js";import"./use-refs.eb803454.js";import"./index.af99cf22.js";import"./index.17d70acf.js";import"./icon-xin.18c43f84.js";import"./index.67c54471.js";import"./index.d8c651bf.js";import"./use-height.8140ea04.js";const be="_select_ku3kj_1",Se="_title_ku3kj_17",Ce="_tit_ku3kj_17",Pe="_childContent_ku3kj_31",he="_item_ku3kj_36",ye="_radio_ku3kj_46",Te="_btn_ku3kj_73";var r={select:be,title:Se,tit:Ce,childContent:Pe,item:he,"radio-group":"_radio-group_ku3kj_46",radio:ye,btn:Te},we=D({name:"SelectTagChild",props:{child:{type:Array,default:()=>[]},onSelect:{type:Function,default:()=>{}},rowSingle:{type:Boolean,default:!1},needAllButton:{type:Boolean,default:!0}},setup({child:w,onSelect:S,needAllButton:m,rowSingle:y},{attrs:E}){return()=>{const C=E.selected;return e(fe,{class:I(r.childContent,r["radio-group"]),modelValue:C,"onUpdate:modelValue":p=>{S(p)}},{default:()=>[m&&e(O,{name:0,class:r.radio,onClick:()=>S([])},{default:()=>[e(G,{class:I(r.item,"van-ellipsis"),type:"primary",plain:C.length!==0,round:!0,size:"large"},{default:()=>[F("\u5168\u90E8")]})]}),w.map(p=>e(O,{key:p.id,name:p.id,class:r.radio,onClick:()=>{y&&S([p.id])}},{default:()=>[e(G,{class:I(r.item,"van-ellipsis"),plain:!C.includes(p.id),type:"primary",round:!0,size:"large"},{default:()=>[p.name]})]}))]})}}}),Ee=D({name:"SelectTag",props:{defaultValue:{type:String,default:""},rowSingle:{type:Boolean,default:!1},exquisiteFlag:{type:Boolean,default:!1},needAllButton:{type:Boolean,default:!0}},emits:["cancel","confirm"],setup({exquisiteFlag:w,defaultValue:S,...m},{emit:y,expose:E}){const C=l.platformType==="STUDENT"?"/api-student":"/api-teacher",{isLoading:p,state:d}=J(j(C+"/MusicTag/tree"),null),A=()=>{c.value=[],y("cancel")};(S||"").split(",").map(n=>Number(n));const c=f([]),B={};return W(d,()=>{if(d.value){const n=d.value&&d.value.data||[];for(const i of n)B[i.id]=i.name}}),E({resetTags:A}),()=>{const n=d.value&&d.value.data||[];return e("div",{class:r.select},[e("h4",{class:r.title},[F("\u5168\u90E8\u6807\u7B7E")]),e("div",{class:r.content},[n.length>0&&e("div",{class:r.list},[e(we,Z({selected:c.value||[],child:n||[],onSelect:i=>{if(c.value.length>=3){$("\u6700\u591A\u53EA\u80FD\u90093\u4E2A\u6807\u7B7E");return}setTimeout(()=>{i.forEach(s=>{c.value.includes(s)||c.value.push(s)})},100)}},m),null)])]),e("footer",{class:"van-safe-area-bottom van-hairline--top"},[e(U,{class:r.btn,round:!0,onClick:A},{default:()=>[F("\u91CD\u7F6E")]}),e(U,{class:r.btn,type:"primary",round:!0,onClick:()=>y("confirm",c.value,B)},{default:()=>[F("\u786E\u8BA4")]})])])}}});const ke="_sticky_quuc1_1",je="_listContainer_quuc1_17",Be="_line_quuc1_29",Qe="_active_quuc1_35",Fe="_label_quuc1_38",Me="_alumnList_quuc1_51",Re="_bgImg_quuc1_57",qe="_tagTabs_quuc1_65",Ie="_fleg_quuc1_95",De="_iconFree_quuc1_101",xe="_iconFreeDisable_quuc1_105";var b={sticky:ke,listContainer:je,line:Be,active:Qe,label:Fe,alumnList:Me,bgImg:Re,tagTabs:qe,fleg:Ie,iconFree:De,iconFreeDisable:xe},ze="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAGAAAAA0CAMAAABCWc3rAAAC8VBMVEUAAADooPPpofPlpPXoo/XcqPbqpfjpofPqovToofPiovLpo/TppfTppfTonvPGtv/LsPq5uv/pofS5uv/qovTItf3Atv3novP/tv/btv/opPTTrfnonfPSrfnonfHUrPi4u//FtP3dp/a7vP/hpfXHtfy4u//Hsfu3tfrAtPy3uP+4vP/15fT////9+v325/X68/r68fn+/f736vb79fv57/n89/zopPPonfL+/P726fa3uv/47vj47Pe4vP/37Pf8+P22uP9kd+1iee/OrvnSrPhuZ+zDtPyiQ/efRPZdfvFwYu1rbetsauzKsfrMr/rhp/VzWe1mduxqcOu4t//UqfeaRfXkpvS+uf26QPzGsvvgovS+tf2+P/zQrfnb1vbeqPbmn/NagPNgfPBpc+u7tv6xQfrYqvfX0/WYRPXFwfOQRfNxXe1ndOu7u/7Isfu1QfusQvnYqPemQ/fcqfacRPaMRvOJR/KFR/FodezBt/3CP/3Fs/zOdPzJfvvv5/nm2vipQvjKt/a3vfW+n/VXg/X04fTw0vR0Vu768f357v3Bs/324PzVnPvapvaruPXcpfWVRfS7uvOCSPB1U+53T+7z6/nUz/jWq/js4/ftuvXepPXst/S/r/TjofR/SPCHkO/EQf307vv00vnfzPnl3vjf0/fOvPXz2/TvxvSYovKImfJhgvJyg+6Ggu726PzZpPvRkfrVrPnSwvjaqfesYfacZvOSovKHXfBpfe96Se98bu7u2Pze3PnatvnmzfjkwPjJkvjwvvfJpfe2ffbQxvTrrPS3tvOoq/KQffDOV/7KQP7o5v3Lyv3mt/nRt/m6bPnLwfe6jfenRffBx/a/vvSyqfKhi/FxifGZm/B7Ve7syv3quf3di/3SZv3hrfz55fvcwfrGmfjDhvisavacsPWyg/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BD00YCACIYGcEgFSVK46/jszAMi/OMyGM1aQF02GmNjglwgQzCpSCFre8NhCUqgUMFII+37xkUDZq6bJF9YhZaeQ41Dt8CWxOjpJY0wq/vFmQwpzZRhcAqtVT9XoKGQVCRB8g5gpUVSxEWfejrrKmiXL0PKmXtZaC7nHGUSPGJxpGMTceuhpFQNK0XqoTanUviUvQVQrgW9lUBFKJZKYeZ06UGo1aMoicAH88zb/1lNqBUt6t3aMFaor9kHwHykY8RLQ9z9CDw1dWGugDiZU0t1KADxLCf9eBVLWKOgCegbo0oazxkKVUBKK2nyue3+OzcYPDc3p76d9AKeR4sJEdReJf38WB2XDWwkQOjWjeNS+tZBoWNy+sFALESOFOvZn8yh5ivScE3mN6denA8WvhvWUCJkMRm7YS9Dy5o42XBf8DLBoEf1Swn4qod9KerSl/i4dJUKWkIAAhAAATHCiCSDucw8QZswYAO7WqkbaWpop+DlKMMHHxRoT6Ph8hBat4OvrVjt9PV2tpq7cIrEIGoj+3VsMbNWXz9o/9F/8d2wBs7IAAAAASUVORK5CYII=";const L=()=>{};var da=D({name:"MusicList",props:{hideSearch:{type:Boolean,default:!1},defauleParams:{type:Object,default:()=>({})},onItemClick:{type:Function,default:L},teacherId:{type:String||Number,default:""},myself:{type:Boolean,default:!1}},setup({hideSearch:w,defauleParams:S,onItemClick:m,teacherId:y,myself:E},{expose:C}){const{isLoading:p,state:d}=J(j(l.platformApi+"/MusicTag/tree",{params:{type:"MUSIC"}}),null),A=f({id:"",name:""});if(l.platformType==="TEACHER"){const a=l.user.data;A.value={name:a.defaultSubjectName||"\u5168\u90E8\u58F0\u90E8",id:a.defaultSubject||""}}else if(!P(h.SEARCH).id){const t=l.user.data,u=t.subjectId?Number(t.subjectId.split(",")[0]):"",g=t.subjectName?t.subjectName.split(",")[0]:"";u&&P(h.SEARCH,JSON.stringify({id:u,name:g}),"set")}localStorage.setItem("behaviorId",pe());const c=ee(),B=ae(),n={};l.version&&(n.version=l.version||"",n.platform=l.platformType==="STUDENT"?"ios-student":"ios-teacher");const i=f(!1);if(!w){if(l.platformType==="TEACHER")n.subjectIds=A.value.id;else{const t=P(h.SEARCH);n.subjectIds=t.id}const a=P(h.MUSIC_FREE);i.value=a.chargeType}const s=_({search:c.query.search||"",musicTagIds:c.query.tagids||"",page:1,...S,...n}),o=f(null),k=f(!1),x=f(!1),M=f(!1),R=f(!1),Q=f(!0),X=f(l.platformType==="STUDENT"?"/api-student":"/api-teacher"),z=a=>{s.page=1,s.search=a,o.value=null,T()},T=async()=>{var t;if(k.value)return;k.value=!0,M.value=!1;const a={...s,auditStatus:"PASS",idAndName:s.search,createBy:y};i.value&&(a.chargeType="FREE"),E?a.myself=!0:a.myself=!1;try{const u=await j.post(`${X.value}/music/sheet/list`,{data:a});if(o.value){const g=(((t=o.value)==null?void 0:t.rows)||[]).concat(u.data.rows||[]);o.value.rows=g}o.value=o.value||u.data,s.page=u.data.pageNo+1,x.value=u.data.pageNo>=u.data.totalPage}catch{M.value=!0}k.value=!1},Y=async a=>{try{await j.post("/api-teacher/teacher/defaultSubject",{params:{subjectId:a}})}catch{}},V=a=>{const t={};for(const g in a)Number(g)===-1?i.value=!!a[g][0]:t[g]=a[g];const u=Object.values(t).flat().filter(Boolean).join(",");s.musicTagIds=u,s.page=1,o.value=null,T(),R.value=!1},N=a=>{s.page=1,s.subjectIds=a.id,o.value=null,l.platformType==="TEACHER"?(A.value={name:a.name,id:a.id},Y(a.id)):(v.id=a.id,v.name=a.name,P(h.SEARCH,JSON.stringify({id:a.id,name:a.name}),"set")),T(),v.show=!1},q=P(h.SEARCH),v=_({show:!1,name:q.id?q.name:"\u5168\u90E8\u58F0\u90E8",id:q.id||""});return te(async()=>{try{if(!se().iPhone){Q.value=!1;return}const{data:a}=await j.get("/api-admin/appVersionInfo/queryByPlatform",{params:{platform:l.platformType==="TEACHER"?"ios-teacher":"ios-student"}});l.version>a.version?Q.value=!0:Q.value=!1}catch{}}),C({onSearch:z,onComfirm:V,onComfirmSubject:N}),()=>{const a=d.value&&d.value.data||[];return e(ne,null,[!w&&e("div",{class:b.sticky},[e(ge,null,{default:()=>[e(me,{background:"transparent",isFixed:!1,border:!1,color:"#131415"},{right:()=>!Q.value&&e("span",{class:b.fleg,onClick:()=>{i.value=!i.value,P(h.MUSIC_FREE,JSON.stringify({chargeType:i.value}),"set"),o.value=null,s.page=1,T()}},[e("img",{src:ze,class:[b.iconFree,i.value&&b.iconFreeDisable]},null)])}),e(ce,{onSearch:z,type:"tenant",background:"transparent",inputBackground:"transparent"},{left:()=>e("div",{class:b.label,onClick:()=>v.show=!0},[l.platformType==="TEACHER"?A.value.name:v.name,e(oe,{classPrefix:"iconfont",name:"down",size:12,color:"#131415"},null)])}),e(re,{shrink:!0,class:b.tagTabs,lineHeight:0,"onClick-tab":t=>{s.musicTagIds=t.name,o.value=null,s.page=1,T()}},{default:()=>[e(H,{title:"\u5168\u90E8",name:""},null),a.map(t=>e(H,{title:t.name,name:t.id},null))]})]}),e("img",{class:b.bgImg,src:Ae},null)]),e("div",{class:b.alumnList},[e(ie,{loading:k.value,finished:x.value,"finished-text":(o.value&&o.value.rows.length,""),onLoad:T,error:M.value},{default:()=>[o.value&&o.value.rows.length?e(ve,{showTitleImg:!0,list:o.value.rows,onDetail:t=>{if(m===L){const u=location.origin+location.pathname+"#/music-detail?id="+t.id;le(u,()=>{B.push({path:"/music-detail",query:{id:t.id}})})}else m==null||m(t)}},null):!k.value&&e(ue,{tips:"\u6682\u65E0\u66F2\u76EE",classImgSize:"SMALL",btnStatus:!1},null)]})]),e(K,{show:R.value,round:!0,closeable:!0,position:"bottom",style:{height:"60%"},teleport:"body","onUpdate:show":t=>R.value=t},{default:()=>[e(Ee,{exquisiteFlag:!0,onConfirm:V,onCancel:()=>{},defaultValue:c.query.tagids},null)]}),e(K,{show:v.show,position:"bottom",round:!0,closeable:!0,"safe-area-inset-bottom":!0,onClose:()=>v.show=!1,onClosed:()=>v.show=!1},{default:()=>[e(de,{type:"MUSIC",searchParams:l.platformType==="TEACHER"?A.value:v,onComfirm:N},null)]})])}}});export{da as default};
|