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