index-6b8d7da0-1726219372904.js 50 KB

1
  1. import{C as Q,q,r as V,s as de,u as ve,v as Se}from"./api-9de750df-1726219372904.js";import{P as $}from"./index-be61723a-1726219372904.js";import{T as ee}from"./index-446e8014-1726219372904.js";import{r as te}from"./searchArray-26034d65-1726219372904.js";import{u as X}from"./catchData-04337fe1-1726219372904.js";import{a as Y}from"./contants-32f8b17d-1726219372904.js";import{d as N,e as G,r as C,q as F,f as t,x as k,j as E,S as ge,N as se,F as M,g as O,ay as ae,D as le,aQ as be,A as Ie,$ as x,C as W,T as oe,a0 as ne,a1 as ie,k as I,E as ce,y as fe,l as j,m as z,b as me,o as he,U as Ce,t as Pe,v as J}from"./index-1ec0a32d-1726219372904.js";import{T as ue}from"./index-2727764b-1726219372904.js";import{C as re}from"./index-d4bfaa45-1726219372904.js";import{A as Be}from"./index-662b2149-1726219372904.js";import{g as K,s as B}from"./index-db345329-1726219372904.js";import{s as _}from"./api-f5057ed1-1726219372904.js";import{U as we,S as xe,f as Ue}from"./index-dc49663c-1726219372904.js";import"./index-b48cb97f-1726219372904.js";import"./Slider-bd832880-1726219372904.js";import"./urlUtils-72ef455d-1726219372904.js";import"./icon_default-d1bcaf5f-1726219372904.js";import"./useSpeak-0792de8d-1726219372904.js";import"./api-da5bf64f-1726219372904.js";import"./icon-pan-16e35a82-1726219372904.js";import"./index-ecb99eb8-1726219372904.js";import"./Scrollbar-c3ae1e59-1726219372904.js";import"./Cascader-f5760f7f-1726219372904.js";const Te="_listWrap_sirzm_1",Re="_list_sirzm_1",Ee="_searchGroup_sirzm_46",Ge="_btnType_sirzm_50",Me="_inputSearch_sirzm_84",ke="_searchCatatory_sirzm_103",Ne="_addTrain_sirzm_110",Z={listWrap:Te,list:Re,searchGroup:Ee,btnType:Ge,inputSearch:Me,searchCatatory:ke,addTrain:Ne},Fe="_list_z74lt_1",We="_itemWrap_z74lt_11",Le="_itemWrapBox_z74lt_16",Oe="_searchGroup_z74lt_28",_e="_btnType_z74lt_32",je="_inputSearch_z74lt_67",ze="_searchCatatory_z74lt_91",De="_addTrain_z74lt_98",Qe="_teachingModal_z74lt_110",Ve="_spaceSection_z74lt_113",Ye="_collapseWrap_z74lt_123",Ke="_collaoseGroup_z74lt_129",Xe="_collaoseBtn_z74lt_135",Je="_isStart_z74lt_140",Ze="_isHidden_z74lt_143",He="_hideButton_z74lt_147",qe="_popSelect_z74lt_152",$e="_spaceSection2_z74lt_162",et="_textBtn_z74lt_167",tt="_iconArrow_z74lt_179",st="_textBtnActive_z74lt_188",w={list:Fe,itemWrap:We,itemWrapBox:Le,searchGroup:Oe,btnType:_e,inputSearch:je,searchCatatory:ze,addTrain:De,teachingModal:Qe,spaceSection:Ve,collapseWrap:Ye,collaoseGroup:Ke,collaoseBtn:Xe,isStart:Je,isHidden:Ze,hideButton:He,popSelect:qe,spaceSection2:$e,textBtn:et,iconArrow:tt,textBtnActive:st};function D(r){return typeof r=="function"||Object.prototype.toString.call(r)==="[object Object]"&&!le(r)}const ye=N({name:"ChildNodeSearch",props:{activeRow:{type:Object,default:()=>({})},list:{type:Array,default:()=>[]}},emits:["selectChildTag"],setup(r,{emit:e}){const{activeRow:a}=be(r),c=C({});return Ie(()=>r.activeRow,()=>{a.value=r.activeRow,c.value={}}),()=>{var n;return t(M,null,[((n=a.value)==null?void 0:n.id)&&t(M,null,[t(O,{label:a.value.columnName+":"},{default:()=>[t(k,{class:w.spaceSection},{default:()=>{var p;return[(p=a.value)==null?void 0:p.children.map(o=>t("span",{class:[w.textBtn,(a.value.activeIndex||"")==o.id&&w.textBtnActive],onClick:()=>{a.value.activeIndex=o.id;let u,m="";o.children?(u=[{columnName:o.children[0].columnName,name:"全部",id:""},...o.children],m=o.children[0].columnName,c.value={...o,columnName:m,activeIndex:"",children:u}):c.value={},e("selectChildTag",a.value.activeIndex)}},[o.name]))]}})]}),t(ye,{activeRow:c.value,onSelectChildTag:p=>{e("selectChildTag",p||a.value.activeIndex)}},null)])])}}}),at=N({name:"search-group",emits:["search","add"],expose:["init"],setup(r,{emit:e}){const a=X(),c=G({type:"MUSIC",name:"",audioPlayTypes:"",bookVersionId:null,subjectId:null}),n=G({tempSubjectId:null}),p=G({audioPlayTypeList:[],selectParents:{},tags:[],tagActiveId:"",tagActive:{},childSelectId:null}),o=()=>{e("search",{...c,subjectId:c.audioPlayTypes!=="SING"?c.subjectId:null,audioPlayTypes:c.audioPlayTypes?c.audioPlayTypes==="PLAY_SING"?["PLAY","SING"]:[c.audioPlayTypes]:[],bookVersionId:p.childSelectId||p.tagActiveId})},u=C(),m=C([]),l=C(0),i=C(0),s=C(!1),d=C(!1),h=()=>{try{m.value=[...new Set(m.value)];let g=-1;m.value.forEach((y,f)=>{f===0?(i.value=1,g=y.offsetLeft):y.offsetLeft===g&&f!=0&&i.value++,s.value?y.style.display="block":i.value>1?y.style.display="none":y.style.display="block"}),d.value=!0}catch(g){}},b=g=>{const y={};return g==null||g.forEach(f=>{f.id===c.subjectId&&(y.selected=!0,y.name=f.name)}),y},U=()=>{const g=a.getMusicTagTree;p.tags=[{columnName:g[0].columnName,name:"全部",id:""},...g],p.tagActiveId=p.tags[0].id},v=g=>{p.tagActiveId=g.id,p.childSelectId=null;let y,f="";g.children?(y=[{columnName:g.children[0].columnName,name:"全部",id:""},...g.children],f=g.children[0].columnName,p.selectParents={...g,columnName:f,activeIndex:"",children:y}):p.selectParents={},o()},S=()=>{var y,f;const g=a.getSubjectInstrumentOnly;if(g.length>0){const R=g[0];R.instruments&&R.instruments.length>1?(n.tempSubjectId=(y=R.instruments[0])==null?void 0:y.value,c.subjectId=(f=R.instruments[0])==null?void 0:f.value):c.subjectId=R.value}};return F(async()=>{var y;const g=Object.keys(Y).map(f=>({value:f,name:Y[f]}));p.audioPlayTypeList=[{name:"全部",value:""},...g],await a.getMusicTagTreeApi(),U(),await a.getSubjects(),S(),c.type==="MUSIC"&&(l.value=(y=u.value)==null?void 0:y.offsetHeight,h()),o()}),()=>{let g,y,f,R;return t("div",{class:w.searchGroup},[t("div",{class:[w.searchCatatory]},[t(k,{size:"small",class:w.btnType},D(g=te.map(L=>t(E,{type:c.type===L.value?"primary":"default",secondary:c.type!==L.value,round:!0,size:"small",focusable:!1,onClick:()=>{c.type=L.value,c.audioPlayTypes="",p.tagActiveId="",p.childSelectId=null,p.selectParents={},S(),o(),ge(()=>{var P;c.type==="MUSIC"?(l.value=(P=u.value)==null?void 0:P.offsetHeight,h()):m.value=[]})}},{default:()=>[L.label]})))?g:{default:()=>[g]})]),t(se,{labelAlign:"left",labelPlacement:"left"},{default:()=>{var L;return[c.type==="MUSIC"&&t(M,null,[p.tags.length>0&&t(O,{label:((L=p.tags[0])==null?void 0:L.columnName)+":"},{default:()=>[t(k,{class:w.spaceSection},D(y=p.tags.map(P=>t("span",{class:[w.textBtn,p.tagActiveId===P.id&&w.textBtnActive],onClick:()=>{v(P)}},[P.name])))?y:{default:()=>[y]})]}),t(ye,{activeRow:p.selectParents,onSelectChildTag:P=>{p.childSelectId=P,o()}},null)]),c.type==="MUSIC"&&t(O,{label:"场景:"},{default:()=>[t(k,{class:w.spaceSection},D(f=p.audioPlayTypeList.map(P=>t("span",{class:[w.textBtn,c.audioPlayTypes===P.value&&w.textBtnActive],onClick:()=>{c.audioPlayTypes=P.value,o()}},[P.name])))?f:{default:()=>[f]})]}),c.audioPlayTypes!=="SING"&&t(O,{label:"乐器:"},{default:()=>[t(k,{class:w.spaceSection},D(R=a.getSubjectInstrumentOnly.map(P=>P.instruments&&P.instruments.length>1?t(ae,{options:P.instruments,trigger:"hover",scrollable:!0,value:n.tempSubjectId,"onUpdate:value":[Ae=>n.tempSubjectId=Ae,()=>{c.subjectId=n.tempSubjectId,o()}],key:P.value,class:[w.popSelect]},{default:()=>[t("span",{class:[w.textBtn,b(P.instruments).selected&&w.textBtnActive]},[b(P.instruments).name||P.name,t("i",{class:w.iconArrow},null)])]}):t("span",{class:[w.textBtn,c.subjectId===P.value&&w.textBtnActive],onClick:()=>{c.subjectId=P.value,n.tempSubjectId=null,o()}},[P.name])))?R:{default:()=>[R]})]}),t(ee,{class:w.inputSearch,round:!0,onSearch:P=>{c.name=P,o()}},null)]}})])}}}),lt=N({name:"shareResources-guide",emits:["close"],setup(r,{emit:e}){const a=G({box:{height:"0px"},show:!1,steps:[{ele:"",eleRect:{},img:K("shareResources1.png"),handStyle:{top:"0.91rem"},imgStyle:{top:x(-4),left:x(-263),width:x(553),height:x(229)},btnsStyle:{bottom:x(30),left:x(-102)},eleRectPadding:{left:14,top:14,width:28,height:28},boxStyle:{borderRadius:"30px"}},{ele:"",img:K("shareResources2.png"),imgStyle:{left:x(99),width:x(618),height:x(273)},btnsStyle:{bottom:x(88),left:x(240)},eleRectPadding:{left:7,top:7,width:14,height:14},boxStyle:{borderRadius:"15px"},type:"bottom"}],step:0}),c=C(!1),n=C({});(async()=>{try{const s=localStorage.getItem("teacher-guideInfo");s?n.value=JSON.parse(s)||null:n.value={},n.value&&n.value.shareResourcesGuide?c.value=!1:c.value=!0}catch(s){console.log(s)}})();const o=()=>{var d,h,b,U;const s=document.getElementById("shareResources-".concat(a.step));if(s){const v=s.getBoundingClientRect(),S=((d=a.steps[a.step].eleRectPadding)==null?void 0:d.left)||0,g=((h=a.steps[a.step].eleRectPadding)==null?void 0:h.top)||0,y=((b=a.steps[a.step].eleRectPadding)==null?void 0:b.width)||0,f=((U=a.steps[a.step].eleRectPadding)==null?void 0:U.height)||0;"shareResources-".concat(a.step)=="shareResources-1"?(a.box={left:v.x-S+"px",top:v.y-g+"px",width:(v.width+y)*2+y+"px",height:v.height+f+"px"},console.log(a.box.width,"---",v.width)):a.box={left:v.x-S+"px",top:v.y-g+"px",width:v.width+y+"px",height:v.height+f+"px"}}else l()},u=async s=>{try{if(s!=="shareResources")return;n.value?n.value.classGuide=!1:n.value={classGuide:!1};try{_({guideTag:"teacher-guideInfo",guideValue:JSON.stringify(n.value)})}catch(d){console.log(d)}a.step=0,o(),c.value=!0}catch(d){}};F(()=>{o(),window.addEventListener("resize",m),W.on("natural-resources-guide",s=>u(s))});const m=()=>{o()};oe(()=>{window.removeEventListener("resize",m),W.off("natural-resources-guide",u)});const l=()=>{if(a.step>=4){i();return}a.step=a.step+1,o()},i=async()=>{n.value?n.value.shareResourcesGuide=!0:n.value={shareResourcesGuide:!0};try{_({guideTag:"teacher-guideInfo",guideValue:JSON.stringify(n.value)})}catch(s){console.log(s)}c.value=!1};return()=>t(M,null,[c.value?ne(t("div",{"onUpdate:show":s=>c.value=s,class:["n-modal-mask","n-modal-mask-guide"]},[t("div",{class:B.content,onClick:()=>l()},[t("div",{class:B.backBtn,onClick:s=>{s.stopPropagation(),i()}},[I("跳过")]),t("div",{class:B.box,style:{...a.box,...a.steps[a.step].boxStyle},id:"modeType-".concat(a.step)},[a.steps.map((s,d)=>{var h,b,U,v;return t("div",{onClick:S=>S.stopPropagation(),class:B.item,style:s.type=="bottom"?{display:d===a.step?"":"none",left:"".concat((h=s.eleRect)==null?void 0:h.left,"px"),top:"-".concat((b=s.imgStyle)==null?void 0:b.height)}:{display:d===a.step?"":"none",left:"".concat((U=s.eleRect)==null?void 0:U.left,"px"),top:"".concat((v=a.box)==null?void 0:v.height)}},[t("img",{class:B.img,style:s.imgStyle,src:s.img},null),t("div",{class:B.btns,style:s.btnsStyle},[a.step+1==a.steps.length?t(M,null,[t("div",{class:[B.endBtn],onClick:()=>i()},[I("完成")]),t("div",{class:B.nextBtn,onClick:()=>{a.step=0,o()}},[I("再看一遍")])]):t("div",{class:B.btn,onClick:()=>l()},[I("下一步 ("),a.step+1,I("/"),a.steps.length,I(")")])])])})])])]),[[ie,c.value,"show"]]):null])}}),ot=N({name:"share-resources",setup(){const r=G({searchWord:"",loading:!1,pageTotal:0,pagination:{page:1,rows:20},searchGroup:{type:"MUSIC",name:"",audioPlayTypes:[],musicalInstrumentId:null,bookVersionId:null,subjectId:null,sourceType:2},tableList:[],teachingStatus:!1,show:!1,item:{}}),e=C(!1),a=C(),c=async()=>{try{r.loading=!0;const{data:o}=await q({...r.searchGroup,...r.pagination});r.loading=!1,r.pageTotal=Number(o.total);const u=o.rows||[],m=[];u.forEach(l=>{m.push({id:l.id,coverImg:l.coverImg,type:l.type,title:l.name,isCollect:!!l.favoriteFlag,isSelected:l.sourceFrom==="PLATFORM",refFlag:l.refFlag,audioPlayTypeArray:l.audioPlayTypes?l.audioPlayTypes.split(","):[],background:l.background,content:l.content})}),r.tableList=m||[],setTimeout(()=>{e.value=!0},500)}catch(o){r.loading=!1}},n=async o=>{r.pagination.page=1;const{subjectId:u,...m}=o;r.searchGroup=Object.assign(r.searchGroup,{...m,musicalInstrumentId:u,subjectId:null}),c()},p=async o=>{try{await V({materialId:o.id,favoriteFlag:o.isCollect?0:1,type:o.type}),o.isCollect=!o.isCollect}catch(u){}};return F(()=>{}),()=>t(M,null,[t(at,{ref:a,onSearch:o=>n(o),onAdd:()=>r.teachingStatus=!0},null),t(ce,{show:r.loading,"onUpdate:show":o=>r.loading=o,style:{"min-height":"50vh"}},{default:()=>[t("div",{class:w.list},[r.tableList.map((o,u)=>t("div",{class:w.itemWrap},[t("div",{class:w.itemWrapBox},[u==0?t(Q,fe({id:"shareResources-1"},{item:o,disabledMouseHover:!1,onClick:m=>{m.type!=="IMG"&&(r.show=!0,r.item={instrumentId:r.searchGroup.musicalInstrumentId||null,...m})},onCollect:m=>p(m)}),null):t(Q,{item:o,disabledMouseHover:!1,onClick:m=>{m.type!=="IMG"&&(r.show=!0,r.item={instrumentId:r.searchGroup.musicalInstrumentId||null,...m})},onCollect:m=>p(m)},null)])])),!r.loading&&r.tableList.length<=0&&t(ue,{style:{minHeight:"50vh"},description:"暂无共享资源"},null)])]}),t($,{page:r.pagination.page,"onUpdate:page":o=>r.pagination.page=o,pageSize:r.pagination.rows,"onUpdate:pageSize":o=>r.pagination.rows=o,pageTotal:r.pageTotal,"onUpdate:pageTotal":o=>r.pageTotal=o,onList:c},null),t(re,{show:r.show,"onUpdate:show":o=>r.show=o,item:r.item,isDownload:!1},null),t(j,{maskClosable:z,show:r.teachingStatus,"onUpdate:show":o=>r.teachingStatus=o,preset:"card",showIcon:!1,class:["modalTitle background",w.teachingModal],title:"自定义教材",blockScroll:!1},{default:()=>[t(Be,{onClose:()=>r.teachingStatus=!1},null)]}),e.value?t(lt,null,null):null])}}),nt="_list_19bf2_1",it="_searchGroup_19bf2_10",ct="_btnType_19bf2_14",ut="_inputSearch_19bf2_54",rt="_searchCatatory_19bf2_78",dt="_btnGroup_19bf2_85",pt="_addTrain_19bf2_88",gt="_error_19bf2_96",ft="_iconUpload_19bf2_103",mt="_iconEdit_19bf2_107",ht="_iconSelectAll_19bf2_111",yt="_iconDelete_19bf2_115",At="_iconPen_19bf2_119",vt="_itemWrap_19bf2_123",St="_itemWrapBox_19bf2_128",bt="_itemBg_19bf2_140",It="_itemBgChecked_19bf2_149",Ct="_resourceDefault_19bf2_152",Pt="_spaceSection_19bf2_159",Bt="_attendClassModal_19bf2_165",wt="_attendClassSaveModal_19bf2_171",xt="_removeVisiable_19bf2_177",Ut="_studentRemove_19bf2_183",Tt="_btnGroupModal_19bf2_195",Rt="_popSelect_19bf2_202",Et="_spaceSection2_19bf2_212",Gt="_textBtn_19bf2_221",Mt="_iconArrow_19bf2_233",kt="_textBtnActive_19bf2_242",A={list:nt,searchGroup:it,btnType:ct,inputSearch:ut,searchCatatory:rt,btnGroup:dt,addTrain:pt,error:gt,iconUpload:ft,iconEdit:mt,iconSelectAll:ht,iconDelete:yt,iconPen:At,itemWrap:vt,itemWrapBox:St,itemBg:bt,itemBgChecked:It,resourceDefault:Ct,spaceSection:Pt,attendClassModal:Bt,attendClassSaveModal:wt,removeVisiable:xt,studentRemove:Ut,btnGroupModal:Tt,popSelect:Rt,spaceSection2:Et,textBtn:Gt,iconArrow:Mt,textBtnActive:kt},Nt="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAC4AAAAmCAYAAAC76qlaAAAAAXNSR0IArs4c6QAAB9dJREFUWEe1mQ2MHGUZx//POzO3V669j5mt0g8badGmRKFfVA2ijWCIC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6kYoLjks/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 pe(r){return typeof r=="function"||Object.prototype.toString.call(r)==="[object Object]"&&!le(r)}const jt=N({name:"search-group",emits:["search","upload","edit","selectAll","delete","update","editOver","cancel"],setup(r,{emit:e,expose:a}){const c=C([]),n=X(),p=G({type:"MUSIC",name:"",audioPlayTypes:["PLAY"],bookVersionId:null,subjectId:null}),o=G({tempSubjectId:null,isEdit:!1,isSelectAll:!1}),u=()=>{e("search",p)},m=()=>{var d,h;const s=n.getSubjectInstrumentOnly;if(s.length>0){const b=s[0];b.instruments&&b.instruments.length>1?(o.tempSubjectId=(d=b.instruments[0])==null?void 0:d.value,p.subjectId=(h=b.instruments[0])==null?void 0:h.value):p.subjectId=b.value}u()};F(async()=>{c.value=[],te.forEach(s=>{c.value.push(s)}),await n.getSubjects(),p.subjectId&&(o.tempSubjectId=p.subjectId),m()});const l=s=>{const d={};return s==null||s.forEach(h=>{h.id===p.subjectId&&(d.selected=!0,d.name=h.name)}),d};return a({resetStatus:()=>{o.isSelectAll=!1}}),()=>{let s,d;return t("div",{class:A.searchGroup},[t("div",{class:A.searchCatatory},[t(k,{size:"small",class:A.btnType},pe(s=c.value.map(h=>t(E,{type:p.type===h.value?"primary":"default",secondary:p.type!==h.value,round:!0,size:"small",focusable:!1,onClick:()=>{p.type!==h.value&&(o.isEdit=!1,o.isSelectAll=!1,e("edit",o.isEdit)),p.audioPlayTypes=h.value==="MUSIC"?["PLAY"]:[],p.type=h.value,m()}},{default:()=>[h.label]})))?s:{default:()=>[s]}),t(k,{size:"small",class:A.btnGroup},{default:()=>[o.isEdit?t(M,null,[t(E,{type:"primary",class:A.addTrain,focusable:!1,strong:!0,onClick:()=>{o.isSelectAll=!o.isSelectAll,e("selectAll",o.isSelectAll)}},{default:()=>[t("img",{src:o.isSelectAll?Wt:Lt,class:A.iconSelectAll},null),I("全选")]}),t(E,{type:"error",class:[A.addTrain,A.error],focusable:!1,strong:!0,onClick:()=>e("delete")},{default:()=>[t("img",{src:_t,class:A.iconDelete},null),I("删除")]}),p.type!=="MUSIC"&&t(E,{type:"primary",class:A.addTrain,focusable:!1,strong:!0,onClick:()=>e("update")},{default:()=>[t("img",{src:Ot,class:A.iconPen},null),I("修改")]}),t(E,{type:"primary",class:A.addTrain,focusable:!1,strong:!0,onClick:()=>{o.isEdit=!1,o.isSelectAll=!1,e("editOver",o.isEdit)}},{default:()=>[I("完成编辑")]}),t(E,{type:"error",class:[A.addTrain,A.error],focusable:!1,strong:!0,onClick:()=>{o.isEdit=!1,o.isSelectAll=!1,e("cancel",o.isEdit)}},{default:()=>[I("取消编辑")]})]):t(M,null,[t(E,fe({type:"primary",class:A.addTrain,focusable:!1},{id:"myResources-0"},{strong:!0,onClick:()=>e("upload")}),{default:()=>[t("img",{src:Nt,class:A.iconUpload},null),I("上传资源")]}),t(E,{type:"primary",class:A.addTrain,focusable:!1,strong:!0,onClick:()=>{o.isEdit=!0,e("edit",o.isEdit)}},{default:()=>[t("img",{src:Ft,class:A.iconEdit},null),I("编辑资源")]})])]})]),t(se,{labelAlign:"left",labelPlacement:"left"},{default:()=>[t(O,{label:"乐器:"},{default:()=>[t(k,{class:A.spaceSection2},pe(d=n.getSubjectInstrumentOnly.map(h=>h.instruments&&h.instruments.length>1?t(ae,{options:h.instruments,trigger:"hover",scrollable:!0,value:o.tempSubjectId,"onUpdate:value":[b=>o.tempSubjectId=b,()=>{o.tempSubjectId!==h.value&&(o.isEdit=!1,o.isSelectAll=!1,e("edit",o.isEdit)),p.subjectId=o.tempSubjectId,u()}],key:h.value,class:[A.popSelect]},{default:()=>[t("span",{class:[A.textBtn,l(h.instruments).selected&&A.textBtnActive]},[l(h.instruments).name||h.name,t("i",{class:A.iconArrow},null)])]}):t("span",{class:[A.textBtn,p.subjectId===h.value&&A.textBtnActive],onClick:()=>{p.subjectId=h.value,o.tempSubjectId=null,u()}},[h.name])))?d:{default:()=>[d]})]}),t(ee,{class:A.inputSearch,round:!0,onSearch:h=>{p.name=h,u()}},null)]})])}}}),zt="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACgAAAAoCAYAAACM/rhtAAAAAXNSR0IArs4c6QAAA8dJREFUWEfNmU1sE1cQx///3Ue8CCOBnUJjpVUlop7opahqj3DmAFS0VdNDb1UL7YUg4bXSsARkBwk4FYp66wFQP1TEoedwBFX0Ui6tglSV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4LMnU/jkh4YG9Afw9qQWdsvj2k+D2nWEMd+Ty3vO4HZbLBe4Lyug4PpvTyb23CjjymB3zHcnUXhBlbOoV0ftbVPNBiXCWp3g6F//xIt+91oaSlEj4gzLq3wlg8LyU5azMSuh7yoEl84TEt9mojAM/R7CpN6gZnCLIl1tjuy8AoDiX5sEmO9bcZYIphSYGRmNYuWcKMxkB2d9oQ+Pd6ZRy2sspZQqiOuXlcj2tKcWumwj9Gx1YXJmMykxExr6BMJ77bCbhoHmZCTtW2VBuS9bdv1MSVr8/jV+82dHOF04lxVqb5L6FAg41F2NecdL5uChj/UcivvwjihqXAd+0OLCgLFl3k7Myur6fwa6T4XxY1KcJbxI9NNNZb8WzdVYUXx5X3OqwX0L93gA+WGdH3UKBTwDFWUxm+PZsVImerD4s8oNWaEYHUZuMwNctDvBopgL5fUxSyDgT+Mo9AXgD2ihFDa1C1HpH3SKnAcfXp6eSMZYAzB3x1Lf0iPjqjHZKUQOojDr+QXD7dS0LTUtN2PlQejPEHQR585wKo+3zZPPkz2W2RGJZUAC+6N/GZPaSHkPvcjqpNcNSlH6tGRiNgqc2k3702FYoMHXdKmRhLbEQTmxMJ2RueNnOSQyN6aeUtANkLqxKFAu4zd1ZYcRQWymCYRmhGND6aRBHftXPxpnRTb3dXfWl6fZyA+oWFuGvixJ+GMm932lKM0H90sSV5/S1M366QlKtKTIahPJe3LmNOf/0wUHO6cejeCbm9PNbarnM2QfMVJBz+gk4FajyiB6OtAJYrfeif10f0dUY4kb9DfEf/jo/ywKomDwAAAAASUVORK5CYII=",Qt=N({name:"myResources-guide",emits:["close"],setup(r,{emit:e}){const a=G({box:{height:"0px"},show:!1,steps:[{ele:"",eleRect:{},img:K("myResourecs1.png"),handStyle:{top:"0.91rem"},imgStyle:{top:x(-4),left:x(-240),width:x(556),height:x(257)},btnsStyle:{bottom:x(30),left:x(-80)},eleRectPadding:{left:14,top:14,width:28,height:28},boxStyle:{borderRadius:"30px"}}],step:0}),c=C(!1),n=C({});(async()=>{try{const s=localStorage.getItem("teacher-guideInfo");s?n.value=JSON.parse(s)||null:n.value={},console.log(n.value,"guideInfo.value"),n.value&&n.value.myResourcesGuide?c.value=!1:c.value=!0}catch(s){console.log(s)}})();const o=()=>{var d,h,b,U;const s=document.getElementById("myResources-".concat(a.step));if(s){const v=s.getBoundingClientRect(),S=((d=a.steps[a.step].eleRectPadding)==null?void 0:d.left)||0,g=((h=a.steps[a.step].eleRectPadding)==null?void 0:h.top)||0,y=((b=a.steps[a.step].eleRectPadding)==null?void 0:b.width)||0,f=((U=a.steps[a.step].eleRectPadding)==null?void 0:U.height)||0;a.box={left:v.x-S+"px",top:v.y-g+"px",width:v.width+y+"px",height:v.height+f+"px"}}else l()},u=async s=>{try{if(s!=="myResources")return;n.value?n.value.classGuide=!1:n.value={classGuide:!1};try{_({guideTag:"teacher-guideInfo",guideValue:JSON.stringify(n.value)})}catch(d){console.log(d)}a.step=0,o(),c.value=!0}catch(d){}};F(()=>{o(),window.addEventListener("resize",m),W.on("natural-resources-guide",s=>u(s))});const m=()=>{o()};oe(()=>{window.removeEventListener("resize",m),W.off("natural-resources-guide",u)});const l=()=>{if(a.step>=4){i();return}a.step=a.step+1,o()},i=async()=>{n.value?n.value.myResourcesGuide=!0:n.value={myResourcesGuide:!0};try{_({guideTag:"teacher-guideInfo",guideValue:JSON.stringify(n.value)})}catch(s){console.log(s)}c.value=!1};return()=>t(M,null,[c.value?ne(t("div",{"onUpdate:show":s=>c.value=s,class:["n-modal-mask","n-modal-mask-guide"]},[t("div",{class:B.content,onClick:()=>l()},[t("div",{class:B.backBtn,onClick:s=>{s.stopPropagation(),i()}},[I("跳过")]),t("div",{class:B.box,style:{...a.box,...a.steps[a.step].boxStyle},id:"modeType-".concat(a.step)},[a.steps.map((s,d)=>{var h,b,U,v;return t("div",{onClick:S=>S.stopPropagation(),class:B.item,style:s.type=="bottom"?{display:d===a.step?"":"none",left:"".concat((h=s.eleRect)==null?void 0:h.left,"px"),top:"-".concat((b=s.imgStyle)==null?void 0:b.height)}:{display:d===a.step?"":"none",left:"".concat((U=s.eleRect)==null?void 0:U.left,"px"),top:"".concat((v=a.box)==null?void 0:v.height)}},[t("img",{class:B.img,style:s.imgStyle,src:s.img},null),t("div",{class:B.btns,style:s.btnsStyle},[a.step+1==a.steps.length?t(M,null,[t("div",{class:[B.endBtn],onClick:()=>i()},[I("完成")])]):t("div",{class:B.btn,onClick:()=>l()},[I("下一步 ("),a.step+1,I("/"),a.steps.length,I(")")])])])})])])]),[[ie,c.value,"show"]]):null])}}),Vt=N({name:"share-resources",setup(){const r=me();he();const e=G({searchWord:"",loading:!1,pageTotal:0,pagination:{page:1,rows:20},searchGroup:{type:"MUSIC",name:"",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:{}}),a=C(!1),c=async()=>{try{e.loading=!0;const{data:l}=await q({...e.searchGroup,...e.pagination});e.loading=!1,e.pageTotal=Number(l.total);const i=l.rows||[],s=[];i.forEach(d=>{s.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,audioPlayTypeArray:d.audioPlayTypes?d.audioPlayTypes.split(","):[],enableFlag:d.enableFlag?1:0,openFlag:d.openFlag})}),e.tableList=s||[],setTimeout(()=>{a.value=!0},500)}catch(l){e.loading=!1}},n=Ce(()=>{const l=e.tableList||[];let i=0;return l.forEach(s=>{s.delFlag||i++}),!(i>0)}),p=async l=>{try{await V({materialId:l.id,favoriteFlag:l.isCollect?0:1,type:l.type}),l.isCollect=!l.isCollect}catch(i){}},o=async l=>{e.pagination.page=1;const{subjectId:i,...s}=l;e.searchGroup=Object.assign(e.searchGroup,{...s,musicalInstrumentId:i,subjectId:null}),c()},u=async()=>{try{e.searchGroup.type==="MUSIC"?await de([e.removeItem.id]):await Se({ids:e.removeItem.id}),r.success("删除成功"),o(e.searchGroup)}catch(l){}},m=C();return F(()=>{}),()=>t(M,null,[t(jt,{ref:m,onSearch:l=>o(l),onUpload:()=>{e.editList=[],e.saveStatus=!0},onUpdate:()=>{const l=[];if(e.tableList.forEach(i=>{e.editIds.indexOf(i.id)>-1&&i.delFlag!==1&&l.push(i)}),e.editList=l||[],e.editList.length<=0){r.error("至少选择一条资源进行编辑");return}e.uploadStatus=!0,e.isAdd=!1},onEditOver:async l=>{e.editStatus=l;try{if(e.editOverIds.length>0){const i=[];e.tableList.forEach(s=>{e.editOverIds.includes(s.id)&&i.push({instrumentIds:s.instrumentIds,openFlag:s.openFlag,coverImg:s.coverImg,name:s.title,type:s.type,enableFlag:1,content:s.content,id:s.id||null,delFlag:s.delFlag})}),i.length>0&&(e.searchGroup.type==="MUSIC"?await de(e.editIds):await ve(i))}r.success("修改成功"),e.pagination.page=1,c(),e.editIds=[],e.editOverIds=[]}catch(i){}},onCancel:l=>{e.editStatus=l,e.pagination.page=1,e.editIds=[],e.editOverIds=[],c()},onEdit:async l=>{e.editStatus=l,e.editStatus||(e.editIds=[],e.editOverIds=[])},onSelectAll:l=>{if(l){const i=[];e.tableList.forEach(s=>{i.push(s.id)}),e.editIds=i}else e.editIds=[]},onDelete:()=>{if(e.editIds.length<=0){r.error("至少选择一条资源进行删除");return}e.type="delete",e.removeContent="是否删除该资源?",e.removeVisiable=!0}},null),t(ce,{show:e.loading,"onUpdate:show":l=>e.loading=l,style:{"min-height":"50vh"}},{default:()=>[t("div",{class:A.list},[e.tableList.map(l=>l.delFlag!==1&&t("div",{class:A.itemWrap},[t("div",{class:A.itemWrapBox},[t(Q,{item:l,isDownload:!0,disabledMouseHover:!1,offShelf:!l.enableFlag,onOffShelf:()=>{e.type="remove",e.removeContent="该资源已下架,是否删除?",e.removeVisiable=!0,e.removeItem=l},onClick:i=>{i.type==="IMG"||!l.enableFlag||(e.show=!0,e.item={instrumentId:e.searchGroup.musicalInstrumentId||null,...i},console.log(e.item,"item"))},onCollect:i=>p(i)},null),e.editStatus&&t("div",{class:[A.itemBg,e.editIds.includes(l.id)?A.itemBgChecked:""],onClick:()=>{const i=e.editIds.indexOf(l.id);i>-1?e.editIds.splice(i,1):e.editIds.push(l.id)}},[t("img",{src:e.editIds.includes(l.id)?Dt:zt,class:A.resourceDefault},null)])])])),!e.loading&&n.value&&t(ue,{style:{minHeight:"50vh"},description:"暂无资源"},null)])]}),t($,{disabled:e.editStatus,page:e.pagination.page,"onUpdate:page":l=>e.pagination.page=l,pageSize:e.pagination.rows,"onUpdate:pageSize":l=>e.pagination.rows=l,pageTotal:e.pageTotal,"onUpdate:pageTotal":l=>e.pageTotal=l,onList:c},null),t(re,{show:e.show,"onUpdate:show":l=>e.show=l,item:e.item},null),t(j,{maskClosable:z,show:e.uploadStatus,"onUpdate:show":l=>e.uploadStatus=l,preset:"card",showIcon:!1,class:["modalTitle background",A.attendClassModal],title:e.editStatus?"修改资源":"上传资源",blockScroll:!1},{default:()=>[t(we,{editStatus:e.editStatus,onClose:()=>{e.uploadStatus=!1},onConfirm:()=>{var l;e.editIds=[],e.editList=[],e.editOverIds=[],e.saveStatus=!1,(l=m.value)==null||l.resetStatus(),o(e.searchGroup)},list:e.editList,showDelete:e.isAdd,onEditAll:l=>{try{e.tableList.forEach(i=>{const s=l.find(d=>d.id===i.id);s&&(i.openFlag=s.openFlag,i.title=s.name,i.instrumentIds=s.instrumentIds,i.content=s.content,i.coverImg=s.coverImg,e.editOverIds.includes(i.id)||e.editOverIds.push(i.id))}),e.uploadStatus=!1}catch(i){console.log(i)}}},null)]}),t(j,{maskClosable:z,show:e.saveStatus,"onUpdate:show":l=>e.saveStatus=l,preset:"card",showIcon:!1,class:["modalTitle background",A.attendClassSaveModal],title:"上传资源",blockScroll:!1},{default:()=>[t(xe,{onClose:()=>e.saveStatus=!1,onConfrim:l=>{const i=l||[],s=[];i.forEach(d=>{s.push({instrumentIds:null,openFlag:!1,coverImg:d.coverImg,title:d.name||"",type:Ue(d.content),enableFlag:1,content:d.content,id:null})}),e.editList=[...s],e.uploadStatus=!0,e.isAdd=!0,e.editStatus=!1}},null)]}),a.value?t(Qt,null,null):null,t(j,{maskClosable:z,show:e.removeVisiable,"onUpdate:show":l=>e.removeVisiable=l,preset:"card",class:["modalTitle",A.removeVisiable],title:"提示"},{default:()=>[t("div",{class:A.studentRemove},[t("p",null,[e.removeContent]),t(k,{class:A.btnGroupModal,justify:"center"},{default:()=>[t(E,{round:!0,type:"primary",onClick:()=>{e.type==="remove"?u():e.tableList.forEach(l=>{e.editIds.includes(l.id)&&(l.delFlag=1,e.editOverIds.includes(l.id)||e.editOverIds.push(l.id))}),e.removeVisiable=!1}},{default:()=>[I("确定")]}),t(E,{round:!0,onClick:()=>e.removeVisiable=!1},{default:()=>[I("取消")]})]})])]})])}}),Yt="_list_17t0f_1",Kt="_itemWrap_17t0f_11",Xt="_itemWrapBox_17t0f_16",Jt="_searchGroup_17t0f_28",Zt="_btnType_17t0f_32",Ht="_inputSearch_17t0f_67",qt="_searchCatatory_17t0f_91",$t="_addTrain_17t0f_98",es="_spaceSection_17t0f_110",ts="_collapseWrap_17t0f_116",ss="_collaoseGroup_17t0f_122",as="_collaoseBtn_17t0f_129",ls="_isStart_17t0f_134",os="_collapsSection_17t0f_137",ns="_isHidden_17t0f_140",is="_hideButton_17t0f_144",cs="_popSelect_17t0f_149",us="_spaceSection2_17t0f_159",rs="_textBtn_17t0f_172",ds="_iconArrow_17t0f_184",ps="_textBtnActive_17t0f_193",gs="_removeVisiable_17t0f_201",fs="_studentRemove_17t0f_207",ms="_btnGroupModal_17t0f_219",T={list:Yt,itemWrap:Kt,itemWrapBox:Xt,searchGroup:Jt,btnType:Zt,inputSearch:Ht,searchCatatory:qt,addTrain:$t,spaceSection:es,collapseWrap:ts,collaoseGroup:ss,collaoseBtn:as,isStart:ls,collapsSection:os,isHidden:ns,hideButton:is,popSelect:cs,spaceSection2:us,textBtn:rs,iconArrow:ds,textBtnActive:ps,removeVisiable:gs,studentRemove:fs,btnGroupModal:ms};function H(r){return typeof r=="function"||Object.prototype.toString.call(r)==="[object Object]"&&!le(r)}const hs=N({name:"search-group",emits:["search"],setup(r,{emit:e}){const a=X(),c=C([]),n=G({type:"MUSIC",name:"",audioPlayTypes:"",bookVersionId:null,subjectId:null}),p=G({tempSubjectId:null}),o=G({audioPlayTypeList:[]}),u=()=>{e("search",{...n,subjectId:n.audioPlayTypes!=="SING"?n.subjectId:null,audioPlayTypes:n.audioPlayTypes?n.audioPlayTypes==="PLAY_SING"?["PLAY","SING"]:[n.audioPlayTypes]:[]})},m=C(),l=C([]),i=C(0),s=C(0),d=C(!1),h=C(!1),b=()=>{try{l.value=[...new Set(l.value)];let S=-1;l.value.forEach((g,y)=>{y===0?(s.value=1,S=g.offsetLeft):g.offsetLeft===S&&y!=0&&s.value++,d.value?g.style.display="block":s.value>1?g.style.display="none":g.style.display="block"}),h.value=!0}catch(S){}},U=S=>{const g={};return S==null||S.forEach(y=>{y.id===n.subjectId&&(g.selected=!0,g.name=y.name)}),g},v=()=>{var g,y;const S=a.getSubjectInstrumentOnly;if(S.length>0){const f=S[0];f.instruments&&f.instruments.length>1?(p.tempSubjectId=(g=f.instruments[0])==null?void 0:g.value,n.subjectId=(y=f.instruments[0])==null?void 0:y.value):n.subjectId=f.value}};return F(async()=>{const S=Object.keys(Y).map(g=>({value:g,name:Y[g]}));o.audioPlayTypeList=[{name:"全部",value:""},...S],c.value=[...te],await a.getMusicSheetCategory(),await a.getSubjects(),v(),u()}),()=>{let S,g,y;return t("div",{class:T.searchGroup},[t("div",{class:T.searchCatatory},[t(k,{size:"small",class:T.btnType},H(S=c.value.map(f=>t(E,{type:n.type===f.value?"primary":"default",secondary:n.type!==f.value,round:!0,size:"small",focusable:!1,onClick:()=>{n.type=f.value,n.audioPlayTypes="",v(),u(),ge(()=>{var R;n.type==="MUSIC"?(i.value=(R=m.value)==null?void 0:R.offsetHeight,b()):l.value=[]})}},{default:()=>[f.label]})))?S:{default:()=>[S]})]),t(se,{labelAlign:"left",labelPlacement:"left"},{default:()=>[n.type==="MUSIC"&&t(O,{label:"场景:"},{default:()=>[t(k,{class:T.spaceSection},H(g=o.audioPlayTypeList.map(f=>t("span",{class:[T.textBtn,n.audioPlayTypes===f.value&&T.textBtnActive],onClick:()=>{n.audioPlayTypes=f.value,u()}},[f.name])))?g:{default:()=>[g]})]}),n.audioPlayTypes!=="SING"&&t(O,{label:"乐器:"},{default:()=>[t(k,{class:T.spaceSection2},H(y=a.getSubjectInstrumentOnly.map(f=>f.instruments&&f.instruments.length>1?t(ae,{options:f.instruments,trigger:"hover",scrollable:!0,value:p.tempSubjectId,"onUpdate:value":[R=>p.tempSubjectId=R,()=>{n.subjectId=p.tempSubjectId,u()}],key:f.value,class:[T.popSelect]},{default:()=>[t("span",{class:[T.textBtn,U(f.instruments).selected&&T.textBtnActive]},[U(f.instruments).name||f.name,t("i",{class:T.iconArrow},null)])]}):t("span",{class:[T.textBtn,n.subjectId===f.value&&T.textBtnActive],onClick:()=>{n.subjectId=f.value,p.tempSubjectId=null,u()}},[f.name])))?y:{default:()=>[y]})]}),t(ee,{class:T.inputSearch,round:!0,onSearch:f=>{n.name=f,u()}},null)]})])}}}),ys=N({name:"myColloge-guide",emits:["close"],setup(r,{emit:e}){const a=G({box:{height:"0px"},show:!1,steps:[{ele:"",img:K("myColloge1.png"),imgStyle:{top:x(-4),left:x(630),width:x(458),height:x(291)},btnsStyle:{bottom:x(96),left:x(790)},eleRectPadding:{left:7,top:7,width:14,height:14},type:"bottom"}],step:0}),c=C(!1),n=C({});(async()=>{try{const s=localStorage.getItem("teacher-guideInfo");s?n.value=JSON.parse(s)||null:n.value={},n.value&&n.value.myColloge?c.value=!1:c.value=!0}catch(s){console.log(s)}})();const o=()=>{var d,h,b,U;const s=document.getElementById("myColloge-".concat(a.step));if(s){const v=s.getBoundingClientRect(),S=((d=a.steps[a.step].eleRectPadding)==null?void 0:d.left)||0,g=((h=a.steps[a.step].eleRectPadding)==null?void 0:h.top)||0,y=((b=a.steps[a.step].eleRectPadding)==null?void 0:b.width)||0,f=((U=a.steps[a.step].eleRectPadding)==null?void 0:U.height)||0;a.box={left:v.x-S+"px",top:v.y-g+"px",width:v.width+y+"px",height:v.height+f+"px"}}else l()},u=async s=>{try{if(console.log(s),s!=="myCollect")return;console.log(s,"name"),n.value?n.value.myColloge=!1:n.value={myColloge:!1};try{_({guideTag:"teacher-guideInfo",guideValue:JSON.stringify(n.value)})}catch(d){console.log(d)}a.step=0,o(),c.value=!0}catch(d){}};F(()=>{o(),window.addEventListener("resize",m),W.on("natural-resources-guide",s=>u(s))});const m=()=>{o()};oe(()=>{window.removeEventListener("resize",m),W.off("natural-resources-guide",u)});const l=()=>{if(a.step>=4){i();return}a.step=a.step+1,o()},i=async()=>{n.value?n.value.myColloge=!0:n.value={myColloge:!0};try{_({guideTag:"teacher-guideInfo",guideValue:JSON.stringify(n.value)})}catch(s){console.log(s)}c.value=!1};return()=>t(M,null,[c.value?ne(t("div",{"onUpdate:show":s=>c.value=s,class:["n-modal-mask","n-modal-mask-guide"]},[t("div",{class:B.content,onClick:()=>l()},[t("div",{class:B.backBtn,onClick:s=>{s.stopPropagation(),i()}},[I("跳过")]),t("div",{class:B.box,style:{...a.box},id:"modeType-".concat(a.step)},[a.steps.map((s,d)=>{var h,b,U,v;return t("div",{onClick:S=>S.stopPropagation(),class:B.item,style:s.type=="bottom"?{display:d===a.step?"":"none",left:"".concat((h=s.eleRect)==null?void 0:h.left,"px"),top:"-".concat((b=s.imgStyle)==null?void 0:b.height)}:{display:d===a.step?"":"none",left:"".concat((U=s.eleRect)==null?void 0:U.left,"px"),top:"".concat((v=a.box)==null?void 0:v.height)}},[t("img",{class:B.img,style:s.imgStyle,src:s.img},null),t("div",{class:B.btns,style:s.btnsStyle},[a.step+1==a.steps.length?t(M,null,[t("div",{class:[B.endBtn],onClick:()=>i()},[I("完成")])]):t("div",{class:B.btn,onClick:()=>l()},[I("下一步 ("),a.step+1,I("/"),a.steps.length,I(")")])])])})])])]),[[ie,c.value,"show"]]):null])}}),As=N({name:"share-resources",setup(){const r=me();he();const e=G({searchWord:"",loading:!1,pageTotal:0,pagination:{page:1,rows:20},searchGroup:{type:"MUSIC",name:"",bookVersionId:null,musicalInstrumentId:null,subjectId:null,sourceType:4},tableList:[],show:!1,item:{},removeVisiable:!1,removeContent:"该资源已下架,是否删除?",removeItem:{}}),a=async()=>{try{e.loading=!0;const{data:u}=await q({...e.searchGroup,...e.pagination});e.loading=!1,e.pageTotal=Number(u.total);const m=u.rows||[],l=[];m.forEach(i=>{l.push({id:i.id,coverImg:i.coverImg,type:i.type,title:i.name,isCollect:!!i.favoriteFlag,isSelected:i.sourceFrom==="PLATFORM",refFlag:i.refFlag,content:i.content,subjectId:i.subjectIds,background:i.background,audioPlayTypeArray:i.audioPlayTypes?i.audioPlayTypes.split(","):[],enableFlag:i.enableFlag?1:0,openFlag:i.openFlag})}),e.tableList=l||[],setTimeout(()=>{c.value=!0},500)}catch(u){e.loading=!1}},c=C(!1),n=async u=>{e.pagination.page=1;const{subjectId:m,...l}=u;e.searchGroup=Object.assign(e.searchGroup,{...l,musicalInstrumentId:m,subjectId:null}),a()},p=async u=>{try{await V({materialId:u.id,favoriteFlag:u.isCollect?0:1,type:u.type}),u.isCollect=!u.isCollect}catch(m){}},o=async()=>{try{await V({materialId:e.removeItem.id,favoriteFlag:0,type:e.removeItem.type}),r.success("删除成功"),n(e.searchGroup)}catch(u){}};return F(()=>{}),()=>t(M,null,[t(hs,{onSearch:u=>n(u)},null),t(ce,{show:e.loading,"onUpdate:show":u=>e.loading=u,style:{"min-height":"50vh"}},{default:()=>[t("div",{class:T.list,id:"myColloge-0"},[e.tableList.map(u=>t("div",{class:T.itemWrap},[t("div",{class:T.itemWrapBox},[t(Q,{item:u,offShelf:!u.enableFlag,onOffShelf:()=>{e.removeVisiable=!0,e.removeItem=u},disabledMouseHover:!1,onClick:m=>{m.type==="IMG"||!u.enableFlag||(e.show=!0,e.item={instrumentId:e.searchGroup.musicalInstrumentId||null,...m})},onCollect:m=>p(m)},null)])])),!e.loading&&e.tableList.length<=0&&t(ue,{style:{minHeight:"50vh"},description:"暂无收藏资源"},null)])]}),t($,{page:e.pagination.page,"onUpdate:page":u=>e.pagination.page=u,pageSize:e.pagination.rows,"onUpdate:pageSize":u=>e.pagination.rows=u,pageTotal:e.pageTotal,"onUpdate:pageTotal":u=>e.pageTotal=u,onList:a},null),t(re,{show:e.show,"onUpdate:show":u=>e.show=u,item:e.item},null),c.value?t(ys,null,null):null,t(j,{maskClosable:z,show:e.removeVisiable,"onUpdate:show":u=>e.removeVisiable=u,preset:"card",class:["modalTitle",T.removeVisiable],title:"提示"},{default:()=>[t("div",{class:T.studentRemove},[t("p",null,[e.removeContent]),t(k,{class:T.btnGroupModal,justify:"center"},{default:()=>[t(E,{round:!0,type:"primary",onClick:()=>{o(),e.removeVisiable=!1}},{default:()=>[I("确定")]}),t(E,{round:!0,onClick:()=>e.removeVisiable=!1},{default:()=>[I("取消")]})]})])]})])}}),zs=N({name:"student-studentList",setup(){const r=X(),e=C("myResources");return F(async()=>{W.on("teacher-guideInfo",a=>{a==="natural-resources"&&W.emit("natural-resources-guide",e.value)}),await r.getMusicSheetCategory(!0)}),()=>t("div",{class:Z.listWrap},[t(Pe,{defaultValue:"myResources",paneClass:Z.paneTitle,justifyContent:"center",paneWrapperClass:Z.paneWrapperContainer,"onUpdate:value":[a=>{e.value=a},a=>e.value=a],value:e.value},{default:()=>[t(J,{name:"myResources",tab:"我的资源"},{default:()=>[t(Vt,null,null)]}),t(J,{name:"shareResources",tab:"共享资源"},{default:()=>[t(ot,null,null)],tab:()=>t("span",{id:"shareResources-0"},[I("共享资源")])}),t(J,{name:"myCollect",tab:"我的收藏"},{default:()=>[t(As,null,null)]})]})])}});export{zs as default};