1 |
- import{A as F,G as O,E as H,aa as U,$ as q,d as R,S as v,ai as K,ab as G,V as $,L as X,bs as Y,ae as Z,j as t,aX as J,X as Q,al as ee,aV as te,H as A,Q as N,as as ae,aj as oe,bu as se,ad as ne,a5 as le,aE as re,aR as ie,M as ce,N as V,O as ue,P as de,g as pe,U as me,F as P,z as T,B as L,be as ve,C as fe,Z as ge,w as z}from"./index.e6d6174e.js";import{L as ye}from"./index.f904775d.js";import{C as he}from"./index.af99cf22.js";import{T as D}from"./index.05f2b7dd.js";import{S as be}from"./index.9093bc60.js";import{S as _e}from"./index.c42f80e3.js";import{g as we}from"./music.413b82d2.js";import{S as Ce}from"./index.e8449f92.js";import{C as Se}from"./index.045f03fd.js";import{b as Te}from"./bg-image.e9966434.js";import{T as ke}from"./index.275665ec.js";import{u as Pe}from"./use-id.f239f36f.js";import"./use-tab-status.e9ba8498.js";import"./index.17d70acf.js";import"./icon-xin.18c43f84.js";import"./index.67c54471.js";import"./index.d8c651bf.js";import"./use-height.8140ea04.js";import"./index.684ca989.js";const[M,I]=F("dropdown-menu"),Ie={overlay:O,zIndex:H,duration:U(.2),direction:q("down"),activeColor:String,closeOnClickOutside:O,closeOnClickOverlay:O},j=Symbol(M);var xe=R({name:M,props:Ie,setup(o,{slots:f}){const m=Pe(),n=v(),s=v(),r=v(0),{children:d,linkChildren:_}=K(j),h=G(n),c=$(()=>d.some(e=>e.state.showWrapper)),w=$(()=>{if(c.value&&X(o.zIndex))return{zIndex:+o.zIndex+1}}),C=()=>{o.closeOnClickOutside&&d.forEach(e=>{e.toggle(!1)})},g=()=>{if(s.value){const e=Q(s);o.direction==="down"?r.value=e.bottom:r.value=ee.value-e.top}},S=()=>{c.value&&g()},a=e=>{d.forEach((i,p)=>{p===e?(g(),i.toggle()):i.state.showPopup&&i.toggle(!1,{immediate:!0})})},l=(e,i)=>{const{showPopup:p}=e.state,{disabled:y,titleClass:b}=e;return t("div",{id:`${m}-${i}`,role:"button",tabindex:y?void 0:0,class:[I("item",{disabled:y}),{[J]:!y}],onClick:()=>{y||a(i)}},[t("span",{class:[I("title",{down:p===(o.direction==="down"),active:p}),b],style:{color:p?o.activeColor:""}},[t("div",{class:"van-ellipsis"},[e.renderTitle()])])])};return _({id:m,props:o,offset:r}),Y(n,C),Z("scroll",S,{target:h}),()=>{var e;return t("div",{ref:n,class:I()},[t("div",{ref:s,style:w.value,class:I("bar",{opened:c.value})},[d.map(l)]),(e=f.default)==null?void 0:e.call(f)])}}});const[Oe,x]=F("dropdown-item"),Ee={title:String,options:te(),disabled:Boolean,teleport:[String,Object],lazyRender:O,modelValue:A,titleClass:A};var De=R({name:Oe,props:Ee,emits:["open","opened","close","closed","change","update:modelValue"],setup(o,{emit:f,slots:m}){const n=N({showPopup:!1,transition:!0,showWrapper:!1}),{parent:s,index:r}=ae(j);if(!s){console.error("[Vant] <DropdownItem> must be a child component of <DropdownMenu>.");return}const d=e=>()=>f(e),_=d("open"),h=d("close"),c=d("opened"),w=()=>{n.showWrapper=!1,f("closed")},C=e=>{o.teleport&&e.stopPropagation()},g=(e=!n.showPopup,i={})=>{e!==n.showPopup&&(n.showPopup=e,n.transition=!i.immediate,e&&(n.showWrapper=!0))},S=()=>{if(m.title)return m.title();if(o.title)return o.title;const e=o.options.find(i=>i.value===o.modelValue);return e?e.text:""},a=e=>{const{activeColor:i}=s.props,p=e.value===o.modelValue,y=()=>{n.showPopup=!1,e.value!==o.modelValue&&(f("update:modelValue",e.value),f("change",e.value))},b=()=>{if(p)return t(ce,{class:x("icon"),color:i,name:"success"},null)};return t(he,{role:"menuitem",key:e.value,icon:e.icon,title:e.text,class:x("option",{active:p}),style:{color:p?i:""},tabindex:p?0:-1,clickable:!0,onClick:y},{value:b})},l=()=>{const{offset:e}=s,{zIndex:i,overlay:p,duration:y,direction:b,closeOnClickOverlay:W}=s.props,E=ne(i);return b==="down"?E.top=`${e.value}px`:E.bottom=`${e.value}px`,le(t("div",{style:E,class:x([b]),onClick:C},[t(ie,{show:n.showPopup,"onUpdate:show":k=>n.showPopup=k,role:"menu",class:x("content"),overlay:p,position:b==="down"?"top":"bottom",duration:n.transition?y:0,lazyRender:o.lazyRender,overlayStyle:{position:"absolute"},"aria-labelledby":`${s.id}-${r.value}`,closeOnClickOverlay:W,onOpen:_,onClose:h,onOpened:c,onClosed:w},{default:()=>{var k;return[o.options.map(a),(k=m.default)==null?void 0:k.call(m)]}})]),[[re,n.showWrapper]])};return oe({state:n,toggle:g,renderTitle:S}),()=>o.teleport?t(se,{to:o.teleport},{default:()=>[l()]}):l()}});const Re=V(De),$e=V(xe);const Ae="_sticky_icnit_1",Le="_listContainer_icnit_28",ze="_line_icnit_40",Be="_active_icnit_46",Fe="_label_icnit_49",Ne="_alumnList_icnit_62",Ve="_bgImg_icnit_69",Me="_tagTabs_icnit_77",je="_fleg_icnit_107",We="_iconFree_icnit_113",He="_iconFreeDisable_icnit_117",Ue="_searchResult_icnit_123",qe="_searchTitle_icnit_128",Ke="_radio_icnit_133";var u={sticky:Ae,listContainer:Le,line:ze,active:Be,label:Fe,alumnList:Ne,bgImg:Ve,tagTabs:Me,fleg:je,iconFree:We,iconFreeDisable:He,searchResult:Ue,searchTitle:qe,"radio-group":"_radio-group_icnit_133",radio:Ke,"organ-radio":"_organ-radio_icnit_164"};function B(o){return typeof o=="function"||Object.prototype.toString.call(o)==="[object Object]"&&!ge(o)}const Ge=()=>{};var vt=R({name:"MusicList",props:{teacherId:{type:String||Number,default:""},myself:{type:Boolean,default:!1}},setup({onItemClick:o},{expose:f}){localStorage.setItem("behaviorId",we());const m=ue(),n=de(),s=N({search:m.query.search||"",subjectType:m.query.subjectType||"",page:1,subjectId:null,level:"",type:""}),r=v(null),d=v(!1),_=v(!1),h=v(!1),c=v({}),w=v(pe.platformType==="STUDENT"?"/api-student":"/api-teacher"),C=a=>{s.page=1,s.search=a,r.value=null,g()},g=async()=>{var l;d.value=!0,h.value=!1;const a={...s};try{const e=await z.post(`${w.value}/tenantAlbumMusic/page`,{data:a});if(r.value){const i=(((l=r.value)==null?void 0:l.rows)||[]).concat(e.data.rows||[]);r.value.rows=i}r.value=r.value||e.data,s.page=e.data.pageNo+1,_.value=e.data.pageNo>=e.data.totalPage}catch{h.value=!0}d.value=!1},S=async()=>{const{data:a}=await z.post(`${w.value}/tenantAlbumMusic/selectCondition`,{data:{subjectType:s.subjectType}});c.value=a||{}};return me(async()=>{s.subjectType==="SUBJECT"?document.title="\u58F0\u90E8\u7EC3\u4E60":s.subjectType==="MUSIC"?document.title="\u72EC\u594F\u66F2\u76EE":s.subjectType==="ENSEMBLE"&&(document.title="\u5408\u594F\u7EC3\u4E60"),d.value=!0,await S(),await g()}),()=>t(P,null,[t("div",{class:u.sticky},[t(ke,null,{default:()=>[t(Se,{background:"transparent",isFixed:!1,border:!1,color:"#131415"},null),t(_e,{onSearch:C,type:"tenant",background:"transparent",inputBackground:"transparent"},{left:()=>t($e,null,{default:()=>[t(Re,{title:"\u7B5B\u9009"},{default:()=>[t("div",{class:u.searchResult,style:{maxHeight:"45vh",overflowY:"auto"}},[c.value.subjects&&c.value.subjects.length>0&&t(P,null,[t("div",{class:u.searchTitle},[T("\u58F0\u90E8")]),t("div",{class:[u["radio-group"],u.radio,u["organ-radio"]]},[c.value.subjects.map(a=>{const l=a.id===Number(s.subjectId||null);return t(D,{size:"large",plain:l,type:l?"primary":"default",round:!0,onClick:()=>{console.log(a,"1212")}},{default:()=>[a.name]})})])]),c.value.levels&&c.value.levels.length>0&&t(P,null,[t("div",{class:u.searchTitle},[T("\u7EA7\u522B")]),t("div",{class:[u["radio-group"],u.radio,u["organ-radio"]]},[c.value.levels.map(a=>{const l=a===s.level;return t(D,{size:"large",plain:l,type:l?"primary":"default",round:!0,onClick:()=>{console.log(a,"1212")}},B(a)?a:{default:()=>[a]})})])]),c.value.types&&c.value.types.length>0&&t(P,null,[t("div",{class:u.searchTitle},[T("\u7C7B\u578B")]),t("div",{class:[u["radio-group"],u.radio,u["organ-radio"]]},[c.value.types.map(a=>{const l=a===s.type;return t(D,{size:"large",plain:l,type:l?"primary":"default",round:!0,onClick:()=>{console.log(a,"1212")}},B(a)?a:{default:()=>[a]})})])]),t(be,{position:"bottom",offsetBottom:0},{default:()=>[t("div",{class:["btnGroup","btnMore"]},[t(L,{type:"primary",plain:!0,round:!0,onClick:()=>{s.subjectId=null,s.level="",s.type=""}},{default:()=>[T("\u91CD \u7F6E")]}),t(L,{type:"primary",round:!0,block:!0,onClick:()=>{}},{default:()=>[T("\u786E \u8BA4")]})])]})])]})]})})]}),t("img",{class:u.bgImg,src:Te},null)]),t("div",{class:u.alumnList},[t(ye,{finished:_.value,"finished-text":(r.value&&r.value.rows.length,""),onLoad:g,error:h.value,immediateCheck:!1},{default:()=>[r.value&&r.value.rows.length?t(Ce,{showTitleImg:!0,list:r.value.rows,onDetail:a=>{if(o===Ge){const l=location.origin+location.pathname+"#/music-detail?id="+a.id;ve(l,()=>{n.push({path:"/music-detail",query:{id:a.id}})})}else o==null||o(a)}},null):!d.value&&t(fe,{tips:"\u6682\u65E0\u66F2\u76EE",classImgSize:"SMALL",btnStatus:!1},null)]})])])}});export{vt as default};
|