index-d86821c1-1740736449183.js 42 KB

1
  1. import{C as z}from"./index-53edf10d-1740736449183.js";import{P as Z}from"./index-ce359b32-1740736449183.js";import{T as J}from"./index-5ddeb407-1740736449183.js";import{r as H}from"./searchArray-0015b208-1740736449183.js";import{u as V,m as q,f as Q,a as oe,b as pe,c as me}from"./catchData-45bdcc01-1740736449183.js";import{a as D}from"./contants-84ba384e-1740736449183.js";import{d as N,e as E,r as C,q as k,f as t,x as T,j as P,ak as ne,N as $,ai as x,g as w,aL as ee,a8 as te,b4 as fe,a5 as Ae,a9 as ae,y as ce,l as _,m as L,k as M,b as ie,o as re,J as ge,t as ye,v as Y}from"./index-fc4c818c-1740736449183.js";import{T as se}from"./index-636bf432-1740736449183.js";import{C as le}from"./index-1d0c2246-1740736449183.js";import{A as he}from"./index-6746fd97-1740736449183.js";import{U as ve,S as Se,f as be}from"./index-a037828e-1740736449183.js";import"./index-5f647f19-1740736449183.js";import"./Slider-a97d5b57-1740736449183.js";import"./urlUtils-b5855a3c-1740736449183.js";import"./icon_default-d1bcaf5f-1740736449183.js";import"./useSpeak-2f7d8696-1740736449183.js";import"./api-97e7e193-1740736449183.js";import"./icon-pan-16e35a82-1740736449183.js";import"./index-18bc3c7f-1740736449183.js";import"./Scrollbar-e2d8d626-1740736449183.js";import"./Cascader-3642e9ed-1740736449183.js";const Ie="_listWrap_sirzm_1",Ce="_list_sirzm_1",Te="_searchGroup_sirzm_46",Ue="_btnType_sirzm_50",Be="_inputSearch_sirzm_84",Pe="_searchCatatory_sirzm_103",Me="_addTrain_sirzm_110",K={listWrap:Ie,list:Ce,searchGroup:Te,btnType:Ue,inputSearch:Be,searchCatatory:Pe,addTrain:Me},Ee="_list_z74lt_1",we="_itemWrap_z74lt_11",Fe="_itemWrapBox_z74lt_16",xe="_searchGroup_z74lt_28",Ne="_btnType_z74lt_32",Ge="_inputSearch_z74lt_67",ke="_searchCatatory_z74lt_91",We="_addTrain_z74lt_98",Re="_teachingModal_z74lt_110",_e="_spaceSection_z74lt_113",Le="_collapseWrap_z74lt_123",Oe="_collaoseGroup_z74lt_129",je="_collaoseBtn_z74lt_135",ze="_isStart_z74lt_140",Qe="_isHidden_z74lt_143",De="_hideButton_z74lt_147",Ve="_popSelect_z74lt_152",Ye="_spaceSection2_z74lt_162",Ke="_textBtn_z74lt_167",Xe="_iconArrow_z74lt_179",Ze="_textBtnActive_z74lt_188",S={list:Ee,itemWrap:we,itemWrapBox:Fe,searchGroup:xe,btnType:Ne,inputSearch:Ge,searchCatatory:ke,addTrain:We,teachingModal:Re,spaceSection:_e,collapseWrap:Le,collaoseGroup:Oe,collaoseBtn:je,isStart:ze,isHidden:Qe,hideButton:De,popSelect:Ve,spaceSection2:Ye,textBtn:Ke,iconArrow:Xe,textBtnActive:Ze};function R(n){return typeof n=="function"||Object.prototype.toString.call(n)==="[object Object]"&&!te(n)}const ue=N({name:"ChildNodeSearch",props:{activeRow:{type:Object,default:()=>({})},list:{type:Array,default:()=>[]}},emits:["selectChildTag"],setup(n,{emit:e}){const{activeRow:p}=fe(n),i=C({});return Ae(()=>n.activeRow,()=>{p.value=n.activeRow,i.value={}}),()=>{var c;return t(x,null,[((c=p.value)==null?void 0:c.id)&&t(x,null,[t(w,{label:p.value.columnName+":"},{default:()=>[t(T,{class:S.spaceSection},{default:()=>{var l;return[(l=p.value)==null?void 0:l.children.map(s=>t("span",{class:[S.textBtn,(p.value.activeIndex||"")==s.id&&S.textBtnActive],onClick:()=>{p.value.activeIndex=s.id;let r,a="";s.children?(r=[{columnName:s.children[0].columnName,name:"全部",id:""},...s.children],a=s.children[0].columnName,i.value={...s,columnName:a,activeIndex:"",children:r}):i.value={},e("selectChildTag",p.value.activeIndex)}},[s.name]))]}})]}),t(ue,{activeRow:i.value,onSelectChildTag:l=>{e("selectChildTag",l||p.value.activeIndex)}},null)])])}}}),Je=N({name:"search-group",emits:["search","add"],expose:["init"],setup(n,{emit:e}){const p=V(),i=E({type:"MUSIC",name:"",audioPlayTypes:"",bookVersionId:null,subjectId:null,materialTagId:null}),c=E({tempSubjectId:null}),l=E({audioPlayTypeList:[],selectParents:{},tags:[],tagActiveId:"",tagActive:{},childSelectId:null}),s=()=>{e("search",{...i,subjectId:i.audioPlayTypes!=="SING"?i.subjectId:null,audioPlayTypes:i.audioPlayTypes?i.audioPlayTypes==="PLAY_SING"?["PLAY","SING"]:[i.audioPlayTypes]:[],bookVersionId:l.childSelectId||l.tagActiveId})},r=C(),a=C([]),o=C(0),f=C(0),d=C(!1),U=C(!1),B=()=>{try{a.value=[...new Set(a.value)];let u=-1;a.value.forEach((y,v)=>{v===0?(f.value=1,u=y.offsetLeft):y.offsetLeft===u&&v!=0&&f.value++,d.value?y.style.display="block":f.value>1?y.style.display="none":y.style.display="block"}),U.value=!0}catch(u){}},A=u=>{const y={};return u==null||u.forEach(v=>{v.id===i.subjectId&&(y.selected=!0,y.name=v.name)}),y},W=()=>{const u=p.getMusicTagTree;l.tags=[{columnName:u[0].columnName,name:"全部",id:""},...u],l.tagActiveId=l.tags[0].id},O=u=>{l.tagActiveId=u.id,l.childSelectId=null;let y,v="";u.children?(y=[{columnName:u.children[0].columnName,name:"全部",id:""},...u.children],v=u.children[0].columnName,l.selectParents={...u,columnName:v,activeIndex:"",children:y}):l.selectParents={},s()},I=()=>{var y,v;const u=p.getSubjectInstrumentOnly;if(u.length>0){const g=u[0];g.instruments&&g.instruments.length>1?(c.tempSubjectId=(y=g.instruments[0])==null?void 0:y.value,i.subjectId=(v=g.instruments[0])==null?void 0:v.value):i.subjectId=g.value}};return k(async()=>{var y;const u=Object.keys(D).map(v=>({value:v,name:D[v]}));l.audioPlayTypeList=[{name:"全部",value:""},...u],await p.getMusicTagTreeApi(),await p.getMaterialTagsApi(),W(),await p.getSubjects(),I(),i.type==="MUSIC"&&(o.value=(y=r.value)==null?void 0:y.offsetHeight,B()),s()}),()=>{let u,y,v,g,F;return t("div",{class:S.searchGroup},[t("div",{class:[S.searchCatatory]},[t(T,{size:"small",class:S.btnType},R(u=H.map(G=>t(P,{type:i.type===G.value?"primary":"default",secondary:i.type!==G.value,round:!0,size:"small",focusable:!1,onClick:()=>{i.type=G.value,i.audioPlayTypes="",l.tagActiveId="",l.childSelectId=null,i.materialTagId=null,l.selectParents={},I(),s(),ne(()=>{var h;i.type==="MUSIC"?(o.value=(h=r.value)==null?void 0:h.offsetHeight,B()):a.value=[]})}},{default:()=>[G.label]})))?u:{default:()=>[u]})]),t($,{labelAlign:"left",labelPlacement:"left"},{default:()=>{var G;return[i.type==="MUSIC"&&t(x,null,[l.tags.length>0&&t(w,{label:((G=l.tags[0])==null?void 0:G.columnName)+":"},{default:()=>[t(T,{class:S.spaceSection},R(y=l.tags.map(h=>t("span",{class:[S.textBtn,l.tagActiveId===h.id&&S.textBtnActive],onClick:()=>{O(h)}},[h.name])))?y:{default:()=>[y]})]}),t(ue,{activeRow:l.selectParents,onSelectChildTag:h=>{l.childSelectId=h,s()}},null)]),i.type==="MUSIC"&&t(w,{label:"场景:"},{default:()=>[t(T,{class:S.spaceSection},R(v=l.audioPlayTypeList.map(h=>t("span",{class:[S.textBtn,i.audioPlayTypes===h.value&&S.textBtnActive],onClick:()=>{i.audioPlayTypes=h.value,s()}},[h.name])))?v:{default:()=>[v]})]}),i.audioPlayTypes!=="SING"&&t(w,{label:"乐器:"},{default:()=>[t(T,{class:S.spaceSection},R(g=p.getSubjectInstrumentOnly.map(h=>h.instruments&&h.instruments.length>1?t(ee,{options:h.instruments,trigger:"hover",scrollable:!0,value:c.tempSubjectId,"onUpdate:value":[de=>c.tempSubjectId=de,()=>{i.subjectId=c.tempSubjectId,s()}],key:h.value,class:[S.popSelect]},{default:()=>[t("span",{class:[S.textBtn,A(h.instruments).selected&&S.textBtnActive]},[A(h.instruments).name||h.name,t("i",{class:S.iconArrow},null)])]}):t("span",{class:[S.textBtn,i.subjectId===h.value&&S.textBtnActive],onClick:()=>{i.subjectId=h.value,c.tempSubjectId=null,s()}},[h.name])))?g:{default:()=>[g]})]}),i.type!=="MUSIC"&&t(w,{label:"标签:"},{default:()=>[t(T,{class:S.spaceSection2},R(F=p.getAllMaterialTags.map(h=>t("span",{class:[S.textBtn,i.materialTagId===h.value&&S.textBtnActive],onClick:()=>{i.materialTagId=h.value,s()}},[h.label])))?F:{default:()=>[F]})]}),t(J,{class:S.inputSearch,round:!0,value:i.name,"onUpdate:value":h=>{i.name=h},onSearch:h=>{i.name=h,s()}},null)]}})])}}}),He=N({name:"share-resources",setup(){const n=E({searchWord:"",loading:!1,pageTotal:0,pagination:{page:1,rows:20},searchGroup:{type:"MUSIC",name:"",materialTagId:null,audioPlayTypes:[],musicalInstrumentId:null,bookVersionId:null,subjectId:null,sourceType:2},tableList:[],teachingStatus:!1,show:!1,item:{}}),e=C(),p=async()=>{try{n.loading=!0;const{data:l}=await q({...n.searchGroup,...n.pagination});n.loading=!1,n.pageTotal=Number(l.total);const s=l.rows||[],r=[];s.forEach(a=>{r.push({id:a.id,coverImg:a.coverImg,type:a.type,title:a.name,isCollect:!!a.favoriteFlag,isSelected:a.sourceFrom==="PLATFORM",refFlag:a.refFlag,audioPlayTypeArray:a.audioPlayTypes?a.audioPlayTypes.split(","):[],background:a.background,content:a.content})}),n.tableList=r||[]}catch(l){n.loading=!1}},i=async l=>{n.pagination.page=1;const{subjectId:s,...r}=l;n.searchGroup=Object.assign(n.searchGroup,{...r,musicalInstrumentId:s,subjectId:null}),p()},c=async l=>{try{await Q({materialId:l.id,favoriteFlag:l.isCollect?0:1,type:l.type}),l.isCollect=!l.isCollect}catch(s){}};return k(()=>{}),()=>t(x,null,[t(Je,{ref:e,onSearch:l=>i(l),onAdd:()=>n.teachingStatus=!0},null),t(ae,{show:n.loading,"onUpdate:show":l=>n.loading=l,style:{"min-height":"50vh"}},{default:()=>[t("div",{class:S.list},[n.tableList.map((l,s)=>t("div",{class:S.itemWrap},[t("div",{class:S.itemWrapBox},[s==0?t(z,ce({id:"shareResources-1"},{item:l,disabledMouseHover:!1,onClick:r=>{r.type!=="IMG"&&(n.show=!0,n.item={instrumentId:n.searchGroup.musicalInstrumentId||null,...r})},onCollect:r=>c(r)}),null):t(z,{item:l,disabledMouseHover:!1,onClick:r=>{r.type!=="IMG"&&(n.show=!0,n.item={instrumentId:n.searchGroup.musicalInstrumentId||null,...r})},onCollect:r=>c(r)},null)])])),!n.loading&&n.tableList.length<=0&&t(se,{style:{minHeight:"50vh"},description:"暂无共享资源"},null)])]}),t(Z,{page:n.pagination.page,"onUpdate:page":l=>n.pagination.page=l,pageSize:n.pagination.rows,"onUpdate:pageSize":l=>n.pagination.rows=l,pageTotal:n.pageTotal,"onUpdate:pageTotal":l=>n.pageTotal=l,onList:p},null),t(le,{show:n.show,"onUpdate:show":l=>n.show=l,item:n.item,isDownload:!1},null),t(_,{maskClosable:L,show:n.teachingStatus,"onUpdate:show":l=>n.teachingStatus=l,preset:"card",showIcon:!1,class:["modalTitle background",S.teachingModal],title:"自定义教材",blockScroll:!1},{default:()=>[t(he,{onClose:()=>n.teachingStatus=!1},null)]})])}}),qe="_list_19bf2_1",$e="_searchGroup_19bf2_10",et="_btnType_19bf2_14",tt="_inputSearch_19bf2_54",at="_searchCatatory_19bf2_78",st="_btnGroup_19bf2_85",lt="_addTrain_19bf2_88",ot="_error_19bf2_96",nt="_iconUpload_19bf2_103",ct="_iconEdit_19bf2_107",it="_iconSelectAll_19bf2_111",rt="_iconDelete_19bf2_115",ut="_iconPen_19bf2_119",dt="_itemWrap_19bf2_123",pt="_itemWrapBox_19bf2_128",mt="_itemBg_19bf2_140",ft="_itemBgChecked_19bf2_149",At="_resourceDefault_19bf2_152",gt="_spaceSection_19bf2_159",yt="_attendClassModal_19bf2_165",ht="_attendClassSaveModal_19bf2_171",vt="_removeVisiable_19bf2_177",St="_studentRemove_19bf2_183",bt="_btnGroupModal_19bf2_195",It="_popSelect_19bf2_202",Ct="_spaceSection2_19bf2_212",Tt="_textBtn_19bf2_221",Ut="_iconArrow_19bf2_233",Bt="_textBtnActive_19bf2_242",m={list:qe,searchGroup:$e,btnType:et,inputSearch:tt,searchCatatory:at,btnGroup:st,addTrain:lt,error:ot,iconUpload:nt,iconEdit:ct,iconSelectAll:it,iconDelete:rt,iconPen:ut,itemWrap:dt,itemWrapBox:pt,itemBg:mt,itemBgChecked:ft,resourceDefault:At,spaceSection:gt,attendClassModal:yt,attendClassSaveModal:ht,removeVisiable:vt,studentRemove:St,btnGroupModal:bt,popSelect:It,spaceSection2:Ct,textBtn:Tt,iconArrow:Ut,textBtnActive:Bt},Pt="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAC4AAAAmCAYAAAC76qlaAAAAAXNSR0IArs4c6QAAB9dJREFUWEe1mQ2MHGUZx//POzO3V669j5mt0g8badGmRKFfVA2ijWCICAUKJbFAoygJkdAPtcnOXmuW2Ns5E6IUaSiCoJRKpdSWIn7RmIZqlBZL/Ugr6LVaS096O3PXa3vs7sy8j5m9/Zhu73Z2r8cmd7m7eT5+7/M+zzPP+x5hnD6pFIsNuf5PAfKzTJhGjKlgijHQS4STLPhgvN347btr6dx4uKSLNTKhMzMtz0hC4g4AH6hpj5AlxqsgsjzL+OPF+B4z+PTv8YT/9dnfZsYqABMahSDQTlVVvpnd0H6sUd1AfkzgQZRdiV3MWDiiU0IfMZ0EIcfAFARfzOoFskQOKcoyb0P77xqFbxi8aV1mju8hcHRp2BkBbxKJJ1Uhd7/XFX8n/Gxyiic6rnMDSSxnxm0AV/wSeQLiXtfq2NIIfEPgranT+rmcux+MWWUnhD6Fxaqc1bGNiDjKuZYYWMDkb2LmT1RsUJ5A13uWvi9Kv/S8IXDVzOxhxnUVZfqLGqMl2Yf04/U6DOQuf5Rjx046mwH+ckWPMrHm5quGUi0n67FVN7iSsJcB/EIo0j0tMW3RYKrNqcfRSDKKmdkKxvIQ/NN+t/HVeuzVBb7gCdYO/ds+DMblRaM5RcW8/Ib4kXqcjCbz4RQ3n8g5rzPzlQUZIqkQXZVP63+PslsXuNLZfwt8f1c5RYge9ixjbZTxep6ryYHrWHp7Qvn+hG8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SgH4Fghaf6od/8vhSxORT1lzwAAAAAASUVORK5CYII=",xt="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACQAAAAkCAYAAADhAJiYAAAAAXNSR0IArs4c6QAAA4NJREFUWEftmE9sG0UUxr83a5yCRJPsmguICiLOSECril3HQQIOHPA6lILgEDUXpKotpQegh0oIcaEgQYFCJS6lICGhEuL1hQMgEcdeCfFP4kxThAoXvHZaJGgTez7ktUMT2/Hf5FDJe/O89775+c3uezMj6PIpxN29SssUhRMgpaswEQplSSsuxHLed93EdBTmY0dGipd/P0NwthvBzXwEctYc3XVQvnzvWjudjkAF230d4MuDwFyPlZMx3zveNxCd5K1FSImkURURyG8QfA1SdwUookA8QvCuMF6kYoLjks/8vXkm2yiXEslEpYyF0EVwLbrDuGPnN/NBVzB1pysPT1srVyt/gBipDhkRTI1nM9m+gAI7tY/Qn69lx/K9u3uBWfMNbPfi/1mCetLy03M3FlApkbxPl9VEEzW5l8IX6xm6DOLDfjIEwXMER0MdypsQaSoBKqKXxrOZnyVwUk+R+rO+JtriIBH1tBTiyZPQeGmLtfuTU3hDgoR7J8v8SCDNS1ZbKwvEjv5maIgSXAXR8islcEEimO1YGLcEpAeRJiCSEsTdj0E8qqBeNf30mR70OroW7dRBDf0KBF9ZOW9GRLg+qAloefKJ+8uV8o/1LyuwfC/WOEsx7j5OwYiZTc81CnL//mjwZ/kZw6hcbFUAA9stELSqmhEj8sDY4hc/tQUqOtNxzcpizUn+jfneLesDCnF3BprnQquoY1Y+fWqD3XFPgzwU2iPiWFnP32C33X8A3lwdU2JMmvn53EBAgZN8m8QLdeBPYr43s14wcFyf5IPhhEoOmznv/e0FslOnCH20GyCIOhLLp08PgTZbsmGGAGn7Ug8zNMxQq0odDOtQh14WOO5bJI/VehnOWfnMgQ11yHbzBO166zhk5rwPtrVSl5xkUhNphsc040AsPx822rUnsFOvEfqEQFbFiOw2F+d+2Vagqnhxct+9Sq9Gx/KZHxq3JtXfpcnpKanw0pifvtBoL2x1t28F0MvYjQ+07CR3l4nv6y9tWd2kbhv/Nr3cSxY28y09lBrTq/ovEpGqT0Swp3HZm/fUteuXKwSjdeFfRbAAojIQlMAgMQXgnvDPQlbM0V07G69nWp46Att9h+DzAwF0CBbIu5bv1Td6151bAtU26itnQT67LVAin1q3R2fl/PmVRv2257LwGo9MaMiEkGoQOIpoBS5pkWy7673/AG2QyadOuCtAAAAAAElFTkSuQmCC";function X(n){return typeof n=="function"||Object.prototype.toString.call(n)==="[object Object]"&&!te(n)}const Nt=N({name:"search-group",emits:["search","upload","edit","selectAll","delete","update","editOver","cancel"],setup(n,{emit:e,expose:p}){const i=C([]),c=V(),l=E({type:"MUSIC",name:"",audioPlayTypes:["PLAY"],bookVersionId:null,subjectId:null,materialTagId:null}),s=E({tempSubjectId:null,isEdit:!1,isSelectAll:!1}),r=()=>{e("search",l)},a=()=>{var U,B;const d=c.getSubjectInstrumentOnly;if(d.length>0){const A=d[0];A.instruments&&A.instruments.length>1?(s.tempSubjectId=(U=A.instruments[0])==null?void 0:U.value,l.subjectId=(B=A.instruments[0])==null?void 0:B.value):l.subjectId=A.value}r()};k(async()=>{i.value=[],H.forEach(d=>{i.value.push(d)}),await c.getSubjects(),await c.getMaterialTagsApi(),l.subjectId&&(s.tempSubjectId=l.subjectId),a()});const o=d=>{const U={};return d==null||d.forEach(B=>{B.id===l.subjectId&&(U.selected=!0,U.name=B.name)}),U};return p({resetStatus:()=>{s.isSelectAll=!1}}),()=>{let d,U,B;return t("div",{class:m.searchGroup},[t("div",{class:m.searchCatatory},[t(T,{size:"small",class:m.btnType},X(d=i.value.map(A=>t(P,{type:l.type===A.value?"primary":"default",secondary:l.type!==A.value,round:!0,size:"small",focusable:!1,onClick:()=>{l.type!==A.value&&(s.isEdit=!1,s.isSelectAll=!1,e("edit",s.isEdit)),l.audioPlayTypes=A.value==="MUSIC"?["PLAY"]:[],l.type=A.value,l.materialTagId=null,a()}},{default:()=>[A.label]})))?d:{default:()=>[d]}),t(T,{size:"small",class:m.btnGroup},{default:()=>[s.isEdit?t(x,null,[t(P,{type:"primary",class:m.addTrain,focusable:!1,strong:!0,onClick:()=>{s.isSelectAll=!s.isSelectAll,e("selectAll",s.isSelectAll)}},{default:()=>[t("img",{src:s.isSelectAll?Et:wt,class:m.iconSelectAll},null),M("全选")]}),t(P,{type:"error",class:[m.addTrain,m.error],focusable:!1,strong:!0,onClick:()=>e("delete")},{default:()=>[t("img",{src:xt,class:m.iconDelete},null),M("删除")]}),l.type!=="MUSIC"&&t(P,{type:"primary",class:m.addTrain,focusable:!1,strong:!0,onClick:()=>e("update")},{default:()=>[t("img",{src:Ft,class:m.iconPen},null),M("修改")]}),t(P,{type:"primary",class:m.addTrain,focusable:!1,strong:!0,onClick:()=>{s.isEdit=!1,s.isSelectAll=!1,e("editOver",s.isEdit)}},{default:()=>[M("完成编辑")]}),t(P,{type:"error",class:[m.addTrain,m.error],focusable:!1,strong:!0,onClick:()=>{s.isEdit=!1,s.isSelectAll=!1,e("cancel",s.isEdit)}},{default:()=>[M("取消编辑")]})]):t(x,null,[t(P,ce({type:"primary",class:m.addTrain,focusable:!1},{id:"myResources-0"},{strong:!0,onClick:()=>e("upload")}),{default:()=>[t("img",{src:Pt,class:m.iconUpload},null),M("上传资源")]}),t(P,{type:"primary",class:m.addTrain,focusable:!1,strong:!0,onClick:()=>{s.isEdit=!0,e("edit",s.isEdit)}},{default:()=>[t("img",{src:Mt,class:m.iconEdit},null),M("编辑资源")]})])]})]),t($,{labelAlign:"left",labelPlacement:"left"},{default:()=>[t(w,{label:"乐器:"},{default:()=>[t(T,{class:m.spaceSection2},X(U=c.getSubjectInstrumentOnly.map(A=>A.instruments&&A.instruments.length>1?t(ee,{options:A.instruments,trigger:"hover",scrollable:!0,value:s.tempSubjectId,"onUpdate:value":[W=>s.tempSubjectId=W,()=>{s.tempSubjectId!==A.value&&(s.isEdit=!1,s.isSelectAll=!1,e("edit",s.isEdit)),l.subjectId=s.tempSubjectId,r()}],key:A.value,class:[m.popSelect]},{default:()=>[t("span",{class:[m.textBtn,o(A.instruments).selected&&m.textBtnActive]},[o(A.instruments).name||A.name,t("i",{class:m.iconArrow},null)])]}):t("span",{class:[m.textBtn,l.subjectId===A.value&&m.textBtnActive],onClick:()=>{l.subjectId=A.value,s.tempSubjectId=null,r()}},[A.name])))?U:{default:()=>[U]})]}),l.type!=="MUSIC"&&t(w,{label:"标签:"},{default:()=>[t(T,{class:m.spaceSection2},X(B=c.getAllMaterialTags.map(A=>t("span",{class:[m.textBtn,l.materialTagId===A.value&&m.textBtnActive],onClick:()=>{l.materialTagId=A.value,r()}},[A.label])))?B:{default:()=>[B]})]}),t(J,{class:m.inputSearch,value:l.name,"onUpdate:value":A=>{l.name=A},round:!0,onSearch:A=>{l.name=A,r()}},null)]})])}}}),Gt="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACgAAAAoCAYAAACM/rhtAAAAAXNSR0IArs4c6QAAA8dJREFUWEfNmU1sE1cQx///3Ue8CCOBnUJjpVUlop7opahqj3DmAFS0VdNDb1UL7YUg4bXSsARkBwk4FYp66wFQP1TEoedwBFX0Ui6tglSVyCnUNogYsTa7O9Vbs46dpPVXIPuOfm/m/XZm3rx5Y6LPkZh8uMP3/X0C2UVBBkRGgIxWR6AIQVGIIsFbpmleq53acqefrdiLUNJZ3ObW659DcEBEdvYiS/I2iKvW0NBXVWfz/W5luwJ8yZHkA7cyIZSjECS7Vb7qOqJK4ZmtVursPw6rnXR1BDTt0rsALkCwfYUy8i4oPxOcM8CFwGBRrzECyQSQEYGMQbgXIq+slMU9AIf8wvBP/wf5n4Aiwg12ZUqA44AsrQstgPM01PdP81t+7WQBPb8h9/BNCbz3hTjc7gFqxSeeFlLTJGU1XasCjp6TjQv3K98C8l5TiPRA+caCNf04n9Rf3/PYlKtud+FOQfgJRNSSAv4wsi318fwRPlmudAWgtpyyK9+1wYHzhmHu69Zinci1RYPAvwbIaCukV0h9sNySKwBVtnxcIE4kSPBGwkoceOwk/+60cS/zm5z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ihFDa1C1HpH3SKnAcfXp6eSMZYAzB3x1Lf0iPjqjHZKUQOojDr+QXD7dS0LTUtN2PlQejPEHQR585wKo+3zZPPkz2W2RGJZUAC+6N/GZPaSHkPvcjqpNcNSlH6tGRiNgqc2k3702FYoMHXdKmRhLbEQTmxMJ2RueNnOSQyN6aeUtANkLqxKFAu4zd1ZYcRQWymCYRmhGND6aRBHftXPxpnRTb3dXfWl6fZyA+oWFuGvixJ+GMm932lKM0H90sSV5/S1M366QlKtKTIahPJe3LmNOf/0wUHO6cejeCbm9PNbarnM2QfMVJBz+gk4FajyiB6OtAJYrfeif10f0dUY4kb9DfEf/jo/ywKomDwAAAAASUVORK5CYII=",Wt=N({name:"share-resources",setup(){const n=ie();re();const e=E({searchWord:"",loading:!1,pageTotal:0,pagination:{page:1,rows:20},searchGroup:{type:"MUSIC",name:"",materialTagId:null,bookVersionId:null,musicalInstrumentId:null,subjectId:null,sourceType:3},tableList:[],uploadStatus:!1,saveStatus:!1,show:!1,item:{},editStatus:!1,isAdd:!1,editList:[],editIds:[],editOverIds:[],removeVisiable:!1,removeContent:"是否删除该资源?",type:"remove",removeItem:{}}),p=async()=>{try{e.loading=!0;const{data:a}=await q({...e.searchGroup,...e.pagination});e.loading=!1,e.pageTotal=Number(a.total);const o=a.rows||[],f=[];o.forEach(d=>{f.push({id:d.id,coverImg:d.coverImg,type:d.type,title:d.name,isCollect:!!d.favoriteFlag,isSelected:d.sourceFrom==="PLATFORM",refFlag:d.refFlag,content:d.content,instrumentIds:d.instrumentIds,sourceFrom:d.sourceFrom,background:d.background,tagIds:d.tagIds,audioPlayTypeArray:d.audioPlayTypes?d.audioPlayTypes.split(","):[],enableFlag:d.enableFlag?1:0,openFlag:d.openFlag})}),e.tableList=f||[]}catch(a){e.loading=!1}},i=ge(()=>{const a=e.tableList||[];let o=0;return a.forEach(f=>{f.delFlag||o++}),!(o>0)}),c=async a=>{try{await Q({materialId:a.id,favoriteFlag:a.isCollect?0:1,type:a.type}),a.isCollect=!a.isCollect}catch(o){}},l=async a=>{e.pagination.page=1;const{subjectId:o,...f}=a;e.searchGroup=Object.assign(e.searchGroup,{...f,musicalInstrumentId:o,subjectId:null}),p()},s=async()=>{try{e.searchGroup.type==="MUSIC"?await oe([e.removeItem.id]):await me({ids:e.removeItem.id}),n.success("删除成功"),l(e.searchGroup)}catch(a){}},r=C();return k(()=>{}),()=>t(x,null,[t(Nt,{ref:r,onSearch:a=>l(a),onUpload:()=>{e.editList=[],e.saveStatus=!0},onUpdate:()=>{const a=[];if(e.tableList.forEach(o=>{e.editIds.indexOf(o.id)>-1&&o.delFlag!==1&&a.push(o)}),e.editList=a||[],e.editList.length<=0){n.error("至少选择一条资源进行编辑");return}e.uploadStatus=!0,e.isAdd=!1},onEditOver:async a=>{e.editStatus=a;try{if(e.editOverIds.length>0){const o=[];e.tableList.forEach(f=>{e.editOverIds.includes(f.id)&&o.push({instrumentIds:f.instrumentIds,openFlag:f.openFlag,coverImg:f.coverImg,name:f.title,type:f.type,enableFlag:1,content:f.content,tagIds:f.tagIds,id:f.id||null,delFlag:f.delFlag})}),console.log(o,"body"),o.length>0&&(e.searchGroup.type==="MUSIC"?await oe(e.editIds):await pe(o))}n.success("修改成功"),e.pagination.page=1,p(),e.editIds=[],e.editOverIds=[]}catch(o){}},onCancel:a=>{e.editStatus=a,e.pagination.page=1,e.editIds=[],e.editOverIds=[],p()},onEdit:async a=>{e.editStatus=a,e.editStatus||(e.editIds=[],e.editOverIds=[])},onSelectAll:a=>{if(a){const o=[];e.tableList.forEach(f=>{o.push(f.id)}),e.editIds=o}else e.editIds=[]},onDelete:()=>{if(e.editIds.length<=0){n.error("至少选择一条资源进行删除");return}e.type="delete",e.removeContent="是否删除该资源?",e.removeVisiable=!0}},null),t(ae,{show:e.loading,"onUpdate:show":a=>e.loading=a,style:{"min-height":"50vh"}},{default:()=>[t("div",{class:m.list},[e.tableList.map(a=>a.delFlag!==1&&t("div",{class:m.itemWrap},[t("div",{class:m.itemWrapBox},[t(z,{item:a,isDownload:!0,disabledMouseHover:!1,offShelf:!a.enableFlag,onOffShelf:()=>{e.type="remove",e.removeContent="该资源已下架,是否删除?",e.removeVisiable=!0,e.removeItem=a},onClick:o=>{o.type==="IMG"||!a.enableFlag||(e.show=!0,e.item={instrumentId:e.searchGroup.musicalInstrumentId||null,...o},console.log(e.item,"item"))},onCollect:o=>c(o)},null),e.editStatus&&t("div",{class:[m.itemBg,e.editIds.includes(a.id)?m.itemBgChecked:""],onClick:()=>{const o=e.editIds.indexOf(a.id);o>-1?e.editIds.splice(o,1):e.editIds.push(a.id)}},[t("img",{src:e.editIds.includes(a.id)?kt:Gt,class:m.resourceDefault},null)])])])),!e.loading&&i.value&&t(se,{style:{minHeight:"50vh"},description:"暂无资源"},null)])]}),t(Z,{disabled:e.editStatus,page:e.pagination.page,"onUpdate:page":a=>e.pagination.page=a,pageSize:e.pagination.rows,"onUpdate:pageSize":a=>e.pagination.rows=a,pageTotal:e.pageTotal,"onUpdate:pageTotal":a=>e.pageTotal=a,onList:p},null),t(le,{show:e.show,"onUpdate:show":a=>e.show=a,item:e.item},null),t(_,{maskClosable:L,show:e.uploadStatus,"onUpdate:show":a=>e.uploadStatus=a,preset:"card",showIcon:!1,class:["modalTitle background",m.attendClassModal],title:e.editStatus?"修改资源":"上传资源",blockScroll:!1},{default:()=>[t(ve,{editStatus:e.editStatus,onClose:()=>{e.uploadStatus=!1},onConfirm:()=>{var a;e.editIds=[],e.editList=[],e.editOverIds=[],e.saveStatus=!1,(a=r.value)==null||a.resetStatus(),l(e.searchGroup)},list:e.editList,showDelete:e.isAdd,onEditAll:a=>{try{e.tableList.forEach(o=>{const f=a.find(d=>d.id===o.id);f&&(o.openFlag=f.openFlag,o.title=f.name,o.instrumentIds=f.instrumentIds,o.content=f.content,o.coverImg=f.coverImg,o.tagIds=f.tagIds,e.editOverIds.includes(o.id)||e.editOverIds.push(o.id))}),e.uploadStatus=!1}catch(o){console.log(o)}}},null)]}),t(_,{maskClosable:L,show:e.saveStatus,"onUpdate:show":a=>e.saveStatus=a,preset:"card",showIcon:!1,class:["modalTitle background",m.attendClassSaveModal],title:"上传资源",blockScroll:!1},{default:()=>[t(Se,{onClose:()=>e.saveStatus=!1,onConfrim:a=>{const o=a||[],f=[];o.forEach(d=>{f.push({instrumentIds:null,openFlag:!1,coverImg:d.coverImg,title:d.name||"",type:be(d.content),enableFlag:1,content:d.content,id:null})}),e.editList=[...f],e.uploadStatus=!0,e.isAdd=!0,e.editStatus=!1}},null)]}),t(_,{maskClosable:L,show:e.removeVisiable,"onUpdate:show":a=>e.removeVisiable=a,preset:"card",class:["modalTitle",m.removeVisiable],title:"提示"},{default:()=>[t("div",{class:m.studentRemove},[t("p",null,[e.removeContent]),t(T,{class:m.btnGroupModal,justify:"center"},{default:()=>[t(P,{round:!0,type:"primary",onClick:()=>{e.type==="remove"?s():e.tableList.forEach(a=>{e.editIds.includes(a.id)&&(a.delFlag=1,e.editOverIds.includes(a.id)||e.editOverIds.push(a.id))}),e.removeVisiable=!1}},{default:()=>[M("确定")]}),t(P,{round:!0,onClick:()=>e.removeVisiable=!1},{default:()=>[M("取消")]})]})])]})])}}),Rt="_list_17t0f_1",_t="_itemWrap_17t0f_11",Lt="_itemWrapBox_17t0f_16",Ot="_searchGroup_17t0f_28",jt="_btnType_17t0f_32",zt="_inputSearch_17t0f_67",Qt="_searchCatatory_17t0f_91",Dt="_addTrain_17t0f_98",Vt="_spaceSection_17t0f_110",Yt="_collapseWrap_17t0f_116",Kt="_collaoseGroup_17t0f_122",Xt="_collaoseBtn_17t0f_129",Zt="_isStart_17t0f_134",Jt="_collapsSection_17t0f_137",Ht="_isHidden_17t0f_140",qt="_hideButton_17t0f_144",$t="_popSelect_17t0f_149",ea="_spaceSection2_17t0f_159",ta="_textBtn_17t0f_172",aa="_iconArrow_17t0f_184",sa="_textBtnActive_17t0f_193",la="_removeVisiable_17t0f_201",oa="_studentRemove_17t0f_207",na="_btnGroupModal_17t0f_219",b={list:Rt,itemWrap:_t,itemWrapBox:Lt,searchGroup:Ot,btnType:jt,inputSearch:zt,searchCatatory:Qt,addTrain:Dt,spaceSection:Vt,collapseWrap:Yt,collaoseGroup:Kt,collaoseBtn:Xt,isStart:Zt,collapsSection:Jt,isHidden:Ht,hideButton:qt,popSelect:$t,spaceSection2:ea,textBtn:ta,iconArrow:aa,textBtnActive:sa,removeVisiable:la,studentRemove:oa,btnGroupModal:na};function j(n){return typeof n=="function"||Object.prototype.toString.call(n)==="[object Object]"&&!te(n)}const ca=N({name:"search-group",emits:["search"],setup(n,{emit:e}){const p=V(),i=C([]),c=E({type:"MUSIC",name:"",audioPlayTypes:"",bookVersionId:null,subjectId:null,materialTagId:null}),l=E({tempSubjectId:null}),s=E({audioPlayTypeList:[]}),r=()=>{e("search",{...c,subjectId:c.audioPlayTypes!=="SING"?c.subjectId:null,audioPlayTypes:c.audioPlayTypes?c.audioPlayTypes==="PLAY_SING"?["PLAY","SING"]:[c.audioPlayTypes]:[]})},a=C(),o=C([]),f=C(0),d=C(0),U=C(!1),B=C(!1),A=()=>{try{o.value=[...new Set(o.value)];let I=-1;o.value.forEach((u,y)=>{y===0?(d.value=1,I=u.offsetLeft):u.offsetLeft===I&&y!=0&&d.value++,U.value?u.style.display="block":d.value>1?u.style.display="none":u.style.display="block"}),B.value=!0}catch(I){}},W=I=>{const u={};return I==null||I.forEach(y=>{y.id===c.subjectId&&(u.selected=!0,u.name=y.name)}),u},O=()=>{var u,y;const I=p.getSubjectInstrumentOnly;if(I.length>0){const v=I[0];v.instruments&&v.instruments.length>1?(l.tempSubjectId=(u=v.instruments[0])==null?void 0:u.value,c.subjectId=(y=v.instruments[0])==null?void 0:y.value):c.subjectId=v.value}};return k(async()=>{const I=Object.keys(D).map(u=>({value:u,name:D[u]}));s.audioPlayTypeList=[{name:"全部",value:""},...I],i.value=[...H],await p.getMusicSheetCategory(),await p.getMaterialTagsApi(),await p.getSubjects(),O(),r()}),()=>{let I,u,y,v;return t("div",{class:b.searchGroup},[t("div",{class:b.searchCatatory},[t(T,{size:"small",class:b.btnType},j(I=i.value.map(g=>t(P,{type:c.type===g.value?"primary":"default",secondary:c.type!==g.value,round:!0,size:"small",focusable:!1,onClick:()=>{c.type=g.value,c.audioPlayTypes="",c.materialTagId=null,O(),r(),ne(()=>{var F;c.type==="MUSIC"?(f.value=(F=a.value)==null?void 0:F.offsetHeight,A()):o.value=[]})}},{default:()=>[g.label]})))?I:{default:()=>[I]})]),t($,{labelAlign:"left",labelPlacement:"left"},{default:()=>[c.type==="MUSIC"&&t(w,{label:"场景:"},{default:()=>[t(T,{class:b.spaceSection},j(u=s.audioPlayTypeList.map(g=>t("span",{class:[b.textBtn,c.audioPlayTypes===g.value&&b.textBtnActive],onClick:()=>{c.audioPlayTypes=g.value,r()}},[g.name])))?u:{default:()=>[u]})]}),c.audioPlayTypes!=="SING"&&t(w,{label:"乐器:"},{default:()=>[t(T,{class:b.spaceSection2},j(y=p.getSubjectInstrumentOnly.map(g=>g.instruments&&g.instruments.length>1?t(ee,{options:g.instruments,trigger:"hover",scrollable:!0,value:l.tempSubjectId,"onUpdate:value":[F=>l.tempSubjectId=F,()=>{c.subjectId=l.tempSubjectId,r()}],key:g.value,class:[b.popSelect]},{default:()=>[t("span",{class:[b.textBtn,W(g.instruments).selected&&b.textBtnActive]},[W(g.instruments).name||g.name,t("i",{class:b.iconArrow},null)])]}):t("span",{class:[b.textBtn,c.subjectId===g.value&&b.textBtnActive],onClick:()=>{c.subjectId=g.value,l.tempSubjectId=null,r()}},[g.name])))?y:{default:()=>[y]})]}),c.type!=="MUSIC"&&t(w,{label:"标签:"},{default:()=>[t(T,{class:b.spaceSection2},j(v=p.getAllMaterialTags.map(g=>t("span",{class:[b.textBtn,c.materialTagId===g.value&&b.textBtnActive],onClick:()=>{c.materialTagId=g.value,r()}},[g.label])))?v:{default:()=>[v]})]}),t(J,{class:b.inputSearch,round:!0,value:c.name,"onUpdate:value":g=>{c.name=g},onSearch:g=>{c.name=g,r()}},null)]})])}}}),ia=N({name:"share-resources",setup(){const n=ie();re();const e=E({searchWord:"",loading:!1,pageTotal:0,pagination:{page:1,rows:20},searchGroup:{type:"MUSIC",name:"",materialTagId:null,bookVersionId:null,musicalInstrumentId:null,subjectId:null,sourceType:4},tableList:[],show:!1,item:{},removeVisiable:!1,removeContent:"该资源已下架,是否删除?",removeItem:{}}),p=async()=>{try{e.loading=!0;const{data:s}=await q({...e.searchGroup,...e.pagination});e.loading=!1,e.pageTotal=Number(s.total);const r=s.rows||[],a=[];r.forEach(o=>{a.push({id:o.id,coverImg:o.coverImg,type:o.type,title:o.name,isCollect:!!o.favoriteFlag,isSelected:o.sourceFrom==="PLATFORM",refFlag:o.refFlag,content:o.content,subjectId:o.subjectIds,background:o.background,audioPlayTypeArray:o.audioPlayTypes?o.audioPlayTypes.split(","):[],enableFlag:o.enableFlag?1:0,openFlag:o.openFlag})}),e.tableList=a||[]}catch(s){e.loading=!1}},i=async s=>{e.pagination.page=1;const{subjectId:r,...a}=s;e.searchGroup=Object.assign(e.searchGroup,{...a,musicalInstrumentId:r,subjectId:null}),p()},c=async s=>{try{await Q({materialId:s.id,favoriteFlag:s.isCollect?0:1,type:s.type}),s.isCollect=!s.isCollect}catch(r){}},l=async()=>{try{await Q({materialId:e.removeItem.id,favoriteFlag:0,type:e.removeItem.type}),n.success("删除成功"),i(e.searchGroup)}catch(s){}};return k(()=>{}),()=>t(x,null,[t(ca,{onSearch:s=>i(s)},null),t(ae,{show:e.loading,"onUpdate:show":s=>e.loading=s,style:{"min-height":"50vh"}},{default:()=>[t("div",{class:b.list,id:"myColloge-0"},[e.tableList.map(s=>t("div",{class:b.itemWrap},[t("div",{class:b.itemWrapBox},[t(z,{item:s,offShelf:!s.enableFlag,onOffShelf:()=>{e.removeVisiable=!0,e.removeItem=s},disabledMouseHover:!1,onClick:r=>{r.type==="IMG"||!s.enableFlag||(e.show=!0,e.item={instrumentId:e.searchGroup.musicalInstrumentId||null,...r})},onCollect:r=>c(r)},null)])])),!e.loading&&e.tableList.length<=0&&t(se,{style:{minHeight:"50vh"},description:"暂无收藏资源"},null)])]}),t(Z,{page:e.pagination.page,"onUpdate:page":s=>e.pagination.page=s,pageSize:e.pagination.rows,"onUpdate:pageSize":s=>e.pagination.rows=s,pageTotal:e.pageTotal,"onUpdate:pageTotal":s=>e.pageTotal=s,onList:p},null),t(le,{show:e.show,"onUpdate:show":s=>e.show=s,item:e.item},null),t(_,{maskClosable:L,show:e.removeVisiable,"onUpdate:show":s=>e.removeVisiable=s,preset:"card",class:["modalTitle",b.removeVisiable],title:"提示"},{default:()=>[t("div",{class:b.studentRemove},[t("p",null,[e.removeContent]),t(T,{class:b.btnGroupModal,justify:"center"},{default:()=>[t(P,{round:!0,type:"primary",onClick:()=>{l(),e.removeVisiable=!1}},{default:()=>[M("确定")]}),t(P,{round:!0,onClick:()=>e.removeVisiable=!1},{default:()=>[M("取消")]})]})])]})])}}),wa=N({name:"student-studentList",setup(){const n=V(),e=C("myResources");return k(async()=>{await n.getMusicSheetCategory(!0)}),()=>t("div",{class:K.listWrap},[t(ye,{defaultValue:"myResources",paneClass:K.paneTitle,justifyContent:"center",paneWrapperClass:K.paneWrapperContainer,"onUpdate:value":[p=>{e.value=p},p=>e.value=p],value:e.value},{default:()=>[t(Y,{name:"myResources",tab:"我的资源"},{default:()=>[t(Wt,null,null)]}),t(Y,{name:"shareResources",tab:"共享资源"},{default:()=>[t(He,null,null)],tab:()=>t("span",{id:"shareResources-0"},[M("共享资源")])}),t(Y,{name:"myCollect",tab:"我的收藏"},{default:()=>[t(ia,null,null)]})]})])}});export{wa as default};