import{j as Me,C as X,n as Ae,o as Ge,p as ke,r as xe,u as Te}from"./isCollaose-409adf80-1702450930307.js";import{P as oe}from"./index-c9a75fe8-1702450930307.js";import{T as ne}from"./index-f22b9a66-1702450930307.js";import{r as ie}from"./searchArray-f23b27c2-1702450930307.js";import{u as q}from"./catchData-616b79bd-1702450930307.js";import{d as T,e as k,r as v,n as j,f as e,w as G,j as B,H as ce,N as H,g as Q,t as le,aS as $,U as E,Q as _,R as ue,bZ as re,bP as de,k as b,F as x,A as pe,x as Ie,v as J,b as ee,O as Ee,dd as Ne,h as je,D as We,de as O,df as Le,C as De,dg as Oe,P as ve,m as Be,p as _e,q as ae}from"./index-6ea91fe3-1702450930307.js";import{A as ze,m as ge,f as fe,i as Qe,a as Ve,b as Ke,c as be,d as Ye,e as Re}from"./index-ed2ce182-1702450930307.js";import{T as me}from"./index-b26c6846-1702450930307.js";import{C as he,N as Je}from"./index-750b8d1c-1702450930307.js";import{g as Z,s as C,a as ye,b as V}from"./api-34c3e0e7-1702450930307.js";import{g as Se,a as Xe,o as Ze}from"./index-38534125-1702450930307.js";import"./icon-collect-active-4272e308-1702450930307.js";import"./index-18737920-1702450930307.js";import"./Slider-d0bc845c-1702450930307.js";const qe="_listWrap_sirzm_1",He="_list_sirzm_1",$e="_searchGroup_sirzm_46",et="_btnType_sirzm_50",tt="_inputSearch_sirzm_84",at="_searchCatatory_sirzm_103",st="_addTrain_sirzm_110",se={listWrap:qe,list:He,searchGroup:$e,btnType:et,inputSearch:tt,searchCatatory:at,addTrain:st},lt="_list_vwz07_1",ot="_itemWrap_vwz07_11",nt="_itemWrapBox_vwz07_16",it="_searchGroup_vwz07_28",ct="_btnType_vwz07_32",ut="_inputSearch_vwz07_67",rt="_searchCatatory_vwz07_91",dt="_addTrain_vwz07_98",pt="_teachingModal_vwz07_110",gt="_spaceSection_vwz07_113",ft="_collapseWrap_vwz07_120",mt="_collaoseBtn_vwz07_126",ht="_isStart_vwz07_131",yt="_isHidden_vwz07_134",At="_hideButton_vwz07_138",F={list:lt,itemWrap:ot,itemWrapBox:nt,searchGroup:it,btnType:ct,inputSearch:ut,searchCatatory:rt,addTrain:dt,teachingModal:pt,spaceSection:gt,collapseWrap:ft,collaoseBtn:mt,isStart:ht,isHidden:yt,hideButton:At};function we(o){return typeof o=="function"||Object.prototype.toString.call(o)==="[object Object]"&&!$(o)}const vt=T({name:"search-group",emits:["search","add"],expose:["init"],setup(o,{emit:s}){const t=q(),u=k({type:"MUSIC",name:"",bookVersionId:null,subjectId:null}),i=()=>{s("search",u)},p=v(),r=v([]),y=v(0),l=v(0),n=v(!1),A=v(!1),a=d=>{d!=null&&d.selfElRef&&r.value.push(d.selfElRef.parentNode)},c=d=>{n.value=d,f()},f=()=>{try{r.value=[...new Set(r.value)];let d=-1;r.value.forEach((m,g)=>{g===0?(l.value=1,d=m.offsetLeft):m.offsetLeft===d&&g!=0&&l.value++,n.value?m.style.display="block":l.value>1?m.style.display="none":m.style.display="block"}),A.value=!0}catch(d){}};return j(async()=>{var d;console.log("加载"),await t.getMusicSheetCategory(),await t.getSubjects(),u.type==="MUSIC"&&(y.value=(d=p.value)==null?void 0:d.offsetHeight,f())}),()=>{let d,m;return e("div",{class:F.searchGroup},[e("div",{class:[F.searchCatatory]},[e(G,{size:"small",class:F.btnType},we(d=ie.map(g=>e(B,{type:u.type===g.value?"primary":"default",secondary:u.type!==g.value,round:!0,size:"small",focusable:!1,onClick:()=>{u.type=g.value,i(),ce(()=>{var R;u.type==="MUSIC"?(y.value=(R=p.value)==null?void 0:R.offsetHeight,f()):r.value=[]})}},{default:()=>[g.label]})))?d:{default:()=>[d]})]),e(H,{labelAlign:"left",labelPlacement:"left"},{default:()=>[u.type==="MUSIC"&&e("div",{class:[F.collapsSection]},[e(Q,{label:"教材:"},{default:()=>[e("div",{class:[F.collapseWrap,A.value?"":F.hideButton,n.value?"":F.isHidden],ref:p},[e(G,{class:[F.spaceSection]},{default:()=>[t.getAllMusicCategories.map(g=>e(B,{ref:a,secondary:u.bookVersionId===g.id,quaternary:u.bookVersionId!==g.id,strong:!0,focusable:!1,type:u.bookVersionId===g.id?"primary":"default",onClick:()=>{u.bookVersionId=g.id,i()}},{default:()=>[g.name]})),l.value>1&&e("div",{style:{height:"var(--n-blank-height)",position:"absolute",display:"flex",alignItems:"center"},onClick:()=>{c(!n.value)}},[e(le,{previewDisabled:!0,src:Me,class:[F.collaoseBtn,n.value?F.isStart:""]},null)])]})])]})]),e(Q,{label:"乐器:"},{default:()=>[e(G,{class:F.spaceSection},we(m=t.getSubjectAllList.map(g=>e(B,{secondary:u.subjectId===g.id,quaternary:u.subjectId!==g.id,strong:!0,focusable:!1,type:u.subjectId===g.id?"primary":"default",onClick:()=>{u.subjectId=g.id,i()}},{default:()=>[g.name]})))?m:{default:()=>[m]})]}),e(ne,{class:F.inputSearch,round:!0,onSearch:g=>{u.name=g,i()}},null)]})])}}}),bt=T({name:"shareResources-guide",emits:["close"],setup(o,{emit:s}){const t=k({box:{height:"0px"},show:!1,steps:[{ele:"",eleRect:{},img:Z("shareResources1.png"),handStyle:{top:"0.91rem"},imgStyle:{top:E(-4),left:E(-263),width:E(553),height:E(229)},btnsStyle:{bottom:E(30),left:E(-102)},eleRectPadding:{left:14,top:14,width:28,height:28},boxStyle:{borderRadius:"30px"}},{ele:"",img:Z("shareResources2.png"),imgStyle:{left:E(99),width:E(618),height:E(273)},btnsStyle:{bottom:E(88),left:E(240)},eleRectPadding:{left:7,top:7,width:14,height:14},boxStyle:{borderRadius:"15px"},type:"bottom"}],step:0}),u=v(!1),i=v({});(async()=>{var a;try{const c=await ye({guideTag:"teacher-guideInfo"});c.data?i.value=JSON.parse((a=c.data)==null?void 0:a.guideValue)||null:i.value={},i.value&&i.value.shareResourcesGuide?u.value=!1:u.value=!0}catch(c){console.log(c)}})();const r=()=>{var c,f,d,m;const a=document.getElementById("shareResources-".concat(t.step));if(a){const g=a.getBoundingClientRect(),R=((c=t.steps[t.step].eleRectPadding)==null?void 0:c.left)||0,L=((f=t.steps[t.step].eleRectPadding)==null?void 0:f.top)||0,W=((d=t.steps[t.step].eleRectPadding)==null?void 0:d.width)||0,h=((m=t.steps[t.step].eleRectPadding)==null?void 0:m.height)||0;"shareResources-".concat(t.step)=="shareResources-1"?(t.box={left:g.x-R+"px",top:g.y-L+"px",width:(g.width+W)*2+W+"px",height:g.height+h+"px"},console.log(t.box.width,"---",g.width)):t.box={left:g.x-R+"px",top:g.y-L+"px",width:g.width+W+"px",height:g.height+h+"px"}}else n()},y=async a=>{try{if(a!=="shareResources")return;i.value?i.value.classGuide=!1:i.value={classGuide:!1};try{await V({guideTag:"teacher-guideInfo",guideValue:JSON.stringify(i.value)})}catch(c){console.log(c)}t.step=0,r(),u.value=!0}catch(c){}};j(()=>{r(),window.addEventListener("resize",l),_.on("natural-resources-guide",a=>y(a))});const l=()=>{r()};ue(()=>{window.removeEventListener("resize",l),_.off("natural-resources-guide",y)});const n=()=>{if(t.step>=4){A();return}t.step=t.step+1,r()},A=async()=>{i.value?i.value.shareResourcesGuide=!0:i.value={shareResourcesGuide:!0};try{const a=await V({guideTag:"teacher-guideInfo",guideValue:JSON.stringify(i.value)})}catch(a){console.log(a)}u.value=!1};return()=>e(x,null,[u.value?re(e("div",{"onUpdate:show":a=>u.value=a,class:["n-modal-mask","n-modal-mask-guide"]},[e("div",{class:C.content,onClick:()=>n()},[e("div",{class:C.backBtn,onClick:a=>{a.stopPropagation(),A()}},[b("跳过")]),e("div",{class:C.box,style:{...t.box,...t.steps[t.step].boxStyle},id:"modeType-".concat(t.step)},[t.steps.map((a,c)=>{var f,d,m,g;return e("div",{onClick:R=>R.stopPropagation(),class:C.item,style:a.type=="bottom"?{display:c===t.step?"":"none",left:"".concat((f=a.eleRect)==null?void 0:f.left,"px"),top:"-".concat((d=a.imgStyle)==null?void 0:d.height)}:{display:c===t.step?"":"none",left:"".concat((m=a.eleRect)==null?void 0:m.left,"px"),top:"".concat((g=t.box)==null?void 0:g.height)}},[e("img",{class:C.img,style:a.imgStyle,src:a.img},null),e("div",{class:C.btns,style:a.btnsStyle},[t.step+1==t.steps.length?e(x,null,[e("div",{class:[C.endBtn],onClick:()=>A()},[b("完成")]),e("div",{class:C.nextBtn,onClick:()=>{t.step=0,r()}},[b("再看一遍")])]):e("div",{class:C.btn,onClick:()=>n()},[b("下一步 ("),t.step+1,b("/"),t.steps.length,b(")")])])])})])])]),[[de,u.value,"show"]]):null])}}),St=T({name:"share-resources",setup(){const o=k({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:{}}),s=v(!1),t=v(),u=async()=>{try{o.loading=!0;const{data:r}=await ge({...o.searchGroup,...o.pagination});o.loading=!1,o.pageTotal=Number(r.total);const y=r.rows||[],l=[];y.forEach(n=>{l.push({id:n.id,coverImg:n.coverImg,type:n.type,title:n.name,isCollect:!!n.favoriteFlag,isSelected:n.sourceFrom==="PLATFORM",content:n.content})}),o.tableList=l||[],setTimeout(()=>{s.value=!0},500)}catch(r){o.loading=!1}},i=async r=>{o.pagination.page=1,o.searchGroup=Object.assign(o.searchGroup,r),u()},p=async r=>{try{await fe({materialId:r.id,favoriteFlag:r.isCollect?0:1,type:r.type}),r.isCollect=!r.isCollect}catch(y){}};return j(()=>{u()}),()=>e(x,null,[e(vt,{ref:t,onSearch:r=>i(r),onAdd:()=>o.teachingStatus=!0},null),e(pe,{show:o.loading,"onUpdate:show":r=>o.loading=r,style:{"min-height":"50vh"}},{default:()=>[e("div",{class:F.list},[o.tableList.map((r,y)=>e("div",{class:F.itemWrap},[e("div",{class:F.itemWrapBox},[y==0?e(X,Ie({id:"shareResources-1"},{item:r,disabledMouseHover:!1,onClick:l=>{l.type!=="IMG"&&(o.show=!0,o.item=l)},onCollect:l=>p(l)}),null):e(X,{item:r,disabledMouseHover:!1,onClick:l=>{l.type!=="IMG"&&(o.show=!0,o.item=l)},onCollect:l=>p(l)},null)])])),!o.loading&&o.tableList.length<=0&&e(me,{style:{minHeight:"50vh"},description:"暂无共享资源"},null)])]}),e(oe,{page:o.pagination.page,"onUpdate:page":r=>o.pagination.page=r,pageSize:o.pagination.rows,"onUpdate:pageSize":r=>o.pagination.rows=r,pageTotal:o.pageTotal,"onUpdate:pageTotal":r=>o.pageTotal=r,onList:u},null),e(he,{show:o.show,"onUpdate:show":r=>o.show=r,item:o.item},null),e(J,{show:o.teachingStatus,"onUpdate:show":r=>o.teachingStatus=r,preset:"card",showIcon:!1,class:["modalTitle background",F.teachingModal],title:"自定义教材",blockScroll:!1},{default:()=>[e(ze,{onClose:()=>o.teachingStatus=!1},null)]}),s.value?e(bt,null,null):null])}}),wt="_list_1nw8j_1",Ct="_searchGroup_1nw8j_10",Ut="_btnType_1nw8j_14",It="_inputSearch_1nw8j_50",Et="_searchCatatory_1nw8j_74",Bt="_btnGroup_1nw8j_81",Rt="_addTrain_1nw8j_84",Ft="_error_1nw8j_92",Pt="_iconUpload_1nw8j_99",Mt="_iconEdit_1nw8j_103",Gt="_iconSelectAll_1nw8j_107",kt="_iconDelete_1nw8j_111",xt="_iconPen_1nw8j_115",Tt="_itemWrap_1nw8j_119",Nt="_itemWrapBox_1nw8j_124",jt="_itemBg_1nw8j_136",Wt="_itemBgChecked_1nw8j_145",Lt="_resourceDefault_1nw8j_148",Dt="_spaceSection_1nw8j_155",Ot="_attendClassModal_1nw8j_161",_t="_attendClassSaveModal_1nw8j_167",zt="_removeVisiable_1nw8j_173",Qt="_studentRemove_1nw8j_179",Vt="_btnGroupModal_1nw8j_191",w={list:wt,searchGroup:Ct,btnType:Ut,inputSearch:It,searchCatatory:Et,btnGroup:Bt,addTrain:Rt,error:Ft,iconUpload:Pt,iconEdit:Mt,iconSelectAll:Gt,iconDelete:kt,iconPen:xt,itemWrap:Tt,itemWrapBox:Nt,itemBg:jt,itemBgChecked:Wt,resourceDefault:Lt,spaceSection:Dt,attendClassModal:Ot,attendClassSaveModal:_t,remove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";function Ce(o){return typeof o=="function"||Object.prototype.toString.call(o)==="[object Object]"&&!$(o)}const Ht=T({name:"search-group",emits:["search","upload","edit","selectAll","delete","update"],setup(o,{emit:s}){const t=v([]),u=q(),i=k({type:"MUSIC",name:"",bookVersionId:null,subjectId:null}),p=k({isEdit:!1,isSelectAll:!1}),r=()=>{s("search",i)};return j(async()=>{t.value=[],ie.forEach(y=>{t.value.push(y)}),await u.getSubjects()}),()=>{let y,l;return e("div",{class:w.searchGroup},[e("div",{class:w.searchCatatory},[e(G,{size:"small",class:w.btnType},Ce(y=t.value.map(n=>e(B,{type:i.type===n.value?"primary":"default",secondary:i.type!==n.value,round:!0,size:"small",focusable:!1,onClick:()=>{i.type!==n.value&&(p.isEdit=!1,p.isSelectAll=!1,s("edit",p.isEdit)),i.type=n.value,r()}},{default:()=>[n.label]})))?y:{default:()=>[y]}),e(G,{size:"small",class:w.btnGroup},{default:()=>[p.isEdit?e(x,null,[e(B,{type:"primary",class:w.addTrain,focusable:!1,strong:!0,onClick:()=>{p.isSelectAll=!p.isSelectAll,s("selectAll",p.isSelectAll)}},{default:()=>[e("img",{src:p.isSelectAll?Jt:Xt,class:w.iconSelectAll},null),b("全选")]}),e(B,{type:"error",class:[w.addTrain,w.error],focusable:!1,strong:!0,onClick:()=>s("delete")},{default:()=>[e("img",{src:qt,class:w.iconDelete},null),b("删除")]}),i.type!=="MUSIC"&&e(B,{type:"primary",class:w.addTrain,focusable:!1,strong:!0,onClick:()=>s("update")},{default:()=>[e("img",{src:Zt,class:w.iconPen},null),b("修改")]}),e(B,{type:"primary",class:w.addTrain,focusable:!1,strong:!0,onClick:()=>{p.isEdit=!1,p.isSelectAll=!1,s("edit",p.isEdit)}},{default:()=>[b("完成编辑")]})]):e(x,null,[e(B,Ie({type:"primary",class:w.addTrain,focusable:!1},{id:"myResources-0"},{strong:!0,onClick:()=>s("upload")}),{default:()=>[e("img",{src:Kt,class:w.iconUpload},null),b("上传资源")]}),e(B,{type:"primary",class:w.addTrain,focusable:!1,strong:!0,onClick:()=>{p.isEdit=!0,s("edit",p.isEdit)}},{default:()=>[e("img",{src:Yt,class:w.iconEdit},null),b("编辑资源")]})])]})]),e(H,{labelAlign:"left",labelPlacement:"left"},{default:()=>[e(Q,{label:"乐器:"},{default:()=>[e(G,{class:w.spaceSection},Ce(l=u.getSubjectAllList.map(n=>e(B,{secondary:i.subjectId===n.id,quaternary:i.subjectId!==n.id,strong:!0,focusable:!1,type:i.subjectId===n.id?"primary":"default",onClick:()=>{i.subjectId!==n.id&&(p.isEdit=!1,p.isSelectAll=!1,s("edit",p.isEdit)),i.subjectId=n.id,r()}},{default:()=>[n.name]})))?l:{default:()=>[l]})]}),e(ne,{class:w.inputSearch,round:!0,onSearch:n=>{i.name=n,r()}},null)]})])}}}),$t="_uploadModal_3dbwl_1",ea="_formModal_3dbwl_4",ta="_formSpace_3dbwl_8",aa="_previewModal_3dbwl_11",sa="_image_3dbwl_23",la="_titleType_3dbwl_32",oa="_iconUploadDelete_3dbwl_40",na="_commonType_3dbwl_49",ia="_formItem_3dbwl_72",ca="_btnGroup_3dbwl_97",ua="_uploadFile_3dbwl_104",ra="_uploadBtn_3dbwl_111",da="_iconUploadAdd_3dbwl_128",N={uploadModal:$t,formModal:ea,formSpace:ta,previewModal:aa,image:sa,titleType:la,iconUploadDelete:oa,commonType:na,formItem:ia,btnGroup:ca,uploadFile:ua,uploadBtn:ra,iconUploadAdd:da};function pa(o){return typeof o=="function"||Object.prototype.toString.call(o)==="[object Object]"&&!$(o)}const Fe=o=>o?(o==null?void 0:o.indexOf(".mp3"))>-1?O.SONG:(o==null?void 0:o.indexOf(".mp4"))>-1?O.VIDEO:(o==null?void 0:o.indexOf(".ppt"))>-1?O.PPT:O.IMG:"",ga=T({name:"upload-modal",props:{list:{type:Array,default:()=>[]},editStatus:{type:Boolean,default:!0}},emits:["close","confirm"],setup(o,{emit:s}){const t=q(),u=v(),i=ee();v(),v([]);const p=k({list:[],uploading:!1,uploadUrl:"",name:"",subjectIds:[]}),r=a=>{let c=Ae;switch(a){case"IMG":c=Ae;break;case"VIDEO":c=Te;break;case"SONG":c=xe;break;case"MUSIC":c=ke;break;case"PPT":c=Ge;break}return c},y=async()=>{var a;(a=u.value)==null||a.validate(async c=>{if(c){ce(Le);return}p.uploading=!0;try{const f=[];p.list.forEach(d=>{f.push({subjectIds:d.subjectIds.join(","),openFlag:d.openFlag,coverImg:d.coverImg,name:d.name,type:d.type,enableFlag:1,content:d.content,id:d.id||null})}),n.value?await Ve(f):await Ke(f),p.list=[],i.success("保存成功"),s("close",!0),s("confirm")}catch(f){}p.uploading=!1})},l=a=>{p.list.splice(a,1)},n=Ee(()=>o.list.length>0);j(async()=>{const a=o.list||[],c=[];a.forEach(f=>{c.push({subjectIds:f.subjectId?f.subjectId.split(",").map(d=>Number(d)):[],openFlag:f.openFlag,coverImg:f.coverImg,name:f.title,type:f.type,sourceFrom:f.sourceFrom,enableFlag:f.enableFlag,content:f.content,id:f.id})}),p.list=c||[],console.log(c,"uploadForms"),await t.getSubjects()});const A=(a,c)=>{a.subjectIds=c.map(f=>f.id)};return()=>{let a;return e("div",{class:N.uploadModal},[e(Je,{style:{"max-height":"55vh"}},{default:()=>[e(H,{ref:u,labelPlacement:"left",labelWidth:120,model:p,class:N.formModal},{default:()=>[e(G,{class:N.formSpace},pa(a=p.list.map((c,f)=>e("div",{class:N.formItem,key:f},[e("div",{class:N.previewModal},[e(le,{class:[N.titleType],src:r(c.type),previewDisabled:!0,objectFit:"cover"},null),!n.value&&e("img",{class:[N.iconUploadDelete],src:Qe,onClick:()=>l(f)},null),e(le,{class:[N.cover,N.image],lazy:!0,previewDisabled:!0,src:c.coverImg,objectFit:"cover"},null),e("div",{class:N.commonType},[b("是否公开:"),e(Ne,{size:"small",value:c.openFlag,"onUpdate:value":d=>c.openFlag=d,disabled:c.sourceFrom==="TEACHER"&&c.type==="MUSIC"},null)])]),e(Q,{showFeedback:!1,path:"list.".concat(f,".name"),rule:[{required:!0,message:"请输入资源名称",trigger:["input","blur"]}]},{default:()=>[e(je,{value:c.name,"onUpdate:value":d=>c.name=d,placeholder:"请输入资源名称",maxlength:25,clearable:!0},null)]}),e(Q,{path:"list[".concat(f,"].subjectIds"),showFeedback:!1,rule:[{required:!0,message:"请选择素材可用乐器",trigger:"change",type:"array"}]},{default:()=>[e(We,{value:c.subjectIds,"onUpdate:value":d=>c.subjectIds=d,placeholder:"请选择素材可用乐器(可多选)",options:t.getSubjectList,labelField:"name",valueField:"id",multiple:!0,maxTagCount:2,clearable:!0},{action:()=>e(x,null,[e(B,{text:!0,style:" --n-width: 100% ",onClick:()=>A(c,t.getSubjectList)},{default:()=>[b("全选")]})])})]})])))?a:{default:()=>[a]})]})]}),e(G,{class:N.btnGroup,justify:"center"},{default:()=>[e(B,{round:!0,onClick:()=>s("close")},{default:()=>[o.editStatus?"取消":"上一步"]}),e(B,{round:!0,type:"primary",loading:p.uploading,disabled:p.list.length===0,onClick:y},{default:()=>[b("确定")]})]})])}}}),fa="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACgAAAAoCAYAAACM/rhtAAAAAXNSR0IArs4c6QAAA8dJREFUWEfNmU1sE1cQx///3Ue8CCOBnUJjpVUlop7opahqj3DmAFS0VdNDb1UL7YUg4bXSsARkBwk4FYp66wFQP1TEoedwBFX0Ui6tglSVyCnUNogYsTa7O9Vbs46dpPVXIPuOfm/m/XZm3rx5Y6LPkZh8uMP3/X0C2UVBBkRGgIxWR6AIQVGIIsFbpmleq53acqefrdiLUNJZ3ObW659DcEBEdvYiS/I2iKvW0NBXVWfz/W5luwJ8yZHkA7cyIZSjECS7Vb7qOqJK4ZmtVursPw6rnXR1BDTt0rsALkCwfYUy8i4oPxOcM8CFwGBRrzECyQSQEYGMQbgXIq+slMU9AIf8wvBP/wf5n4Aiwg12ZUqA44AsrQstgPM01PdP81t+7WQBPb8h9/BNCbz3hTjc7gFqxSeeFlLTJGU1XasCjp6TjQv3K98C8l5TiPRA+caCNf04n9Rf3/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6T4XxY1KcJbxI9NNNZb8WzdVYUXx5X3OqwX0L93gA+WGdH3UKBTwDFWUxm+PZsVImerD4s8oNWaEYHUZuMwNctDvBopgL5fUxSyDgT+Mo9AXgD2ihFDa1C1HpH3SKnAcfXp6eSMZYAzB3x1Lf0iPjqjHZKUQOojDr+QXD7dS0LTUtN2PlQejPEHQR585wKo+3zZPPkz2W2RGJZUAC+6N/GZPaSHkPvcjqpNcNSlH6tGRiNgqc2k3702FYoMHXdKmRhLbEQTmxMJ2RueNnOSQyN6aeUtANkLqxKFAu4zd1ZYcRQWymCYRmhGND6aRBHftXPxpnRTb3dXfWl6fZyA+oWFuGvixJ+GMm932lKM0H90sSV5/S1M366QlKtKTIahPJe3LmNOf/0wUHO6cejeCbm9PNbarnM2QfMVJBz+gk4FajyiB6OtAJYrfeif10f0dUY4kb9DfEf/jo/ywKomDwAAAAASUVORK5CYII=",ha=T({name:"myResources-guide",emits:["close"],setup(o,{emit:s}){const t=k({box:{height:"0px"},show:!1,steps:[{ele:"",eleRect:{},img:Z("myResourecs1.png"),handStyle:{top:"0.91rem"},imgStyle:{top:E(-4),left:E(-240),width:E(556),height:E(257)},btnsStyle:{bottom:E(30),left:E(-80)},eleRectPadding:{left:14,top:14,width:28,height:28},boxStyle:{borderRadius:"30px"}}],step:0}),u=v(!1),i=v({});(async()=>{var a;try{const c=await ye({guideTag:"teacher-guideInfo"});c.data?i.value=JSON.parse((a=c.data)==null?void 0:a.guideValue)||null:i.value={},console.log(i.value,"guideInfo.value"),i.value&&i.value.myResourcesGuide?u.value=!1:u.value=!0}catch(c){console.log(c)}})();const r=()=>{var c,f,d,m;const a=document.getElementById("myResources-".concat(t.step));if(a){const g=a.getBoundingClientRect(),R=((c=t.steps[t.step].eleRectPadding)==null?void 0:c.left)||0,L=((f=t.steps[t.step].eleRectPadding)==null?void 0:f.top)||0,W=((d=t.steps[t.step].eleRectPadding)==null?void 0:d.width)||0,h=((m=t.steps[t.step].eleRectPadding)==null?void 0:m.height)||0;t.box={left:g.x-R+"px",top:g.y-L+"px",width:g.width+W+"px",height:g.height+h+"px"}}else n()},y=async a=>{try{if(a!=="myResources")return;i.value?i.value.classGuide=!1:i.value={classGuide:!1};try{await V({guideTag:"teacher-guideInfo",guideValue:JSON.stringify(i.value)})}catch(c){console.log(c)}t.step=0,r(),u.value=!0}catch(c){}};j(()=>{r(),window.addEventListener("resize",l),_.on("natural-resources-guide",a=>y(a))});const l=()=>{r()};ue(()=>{window.removeEventListener("resize",l),_.off("natural-resources-guide",y)});const n=()=>{if(t.step>=4){A();return}t.step=t.step+1,r()},A=async()=>{i.value?i.value.myResourcesGuide=!0:i.value={myResourcesGuide:!0};try{const a=await V({guideTag:"teacher-guideInfo",guideValue:JSON.stringify(i.value)})}catch(a){console.log(a)}u.value=!1};return()=>e(x,null,[u.value?re(e("div",{"onUpdate:show":a=>u.value=a,class:["n-modal-mask","n-modal-mask-guide"]},[e("div",{class:C.content,onClick:()=>n()},[e("div",{class:C.backBtn,onClick:a=>{a.stopPropagation(),A()}},[b("跳过")]),e("div",{class:C.box,style:{...t.box,...t.steps[t.step].boxStyle},id:"modeType-".concat(t.step)},[t.steps.map((a,c)=>{var f,d,m,g;return e("div",{onClick:R=>R.stopPropagation(),class:C.item,style:a.type=="bottom"?{display:c===t.step?"":"none",left:"".concat((f=a.eleRect)==null?void 0:f.left,"px"),top:"-".concat((d=a.imgStyle)==null?void 0:d.height)}:{display:c===t.step?"":"none",left:"".concat((m=a.eleRect)==null?void 0:m.left,"px"),top:"".concat((g=t.box)==null?void 0:g.height)}},[e("img",{class:C.img,style:a.imgStyle,src:a.img},null),e("div",{class:C.btns,style:a.btnsStyle},[t.step+1==t.steps.length?e(x,null,[e("div",{class:[C.endBtn],onClick:()=>A()},[b("完成")])]):e("div",{class:C.btn,onClick:()=>n()},[b("下一步 ("),t.step+1,b("/"),t.steps.length,b(")")])])])})])])]),[[de,u.value,"show"]]):null])}}),ya="_saveModal_9enii_1",Aa="_uploadBtn_9enii_25",va="_iconUploadAdd_9enii_47",ba="_btnGroup_9enii_57",Y={saveModal:ya,uploadBtn:Aa,iconUploadAdd:va,btnGroup:ba},Sa=T({name:"save-modal",props:{fileList:{type:String,default:""},imageList:{type:Array,default:()=>[]},accept:{type:String,default:".jpg,.png,.jpeg,.gif"},showType:{type:String,default:"default"},showFileList:{type:Boolean,default:!0},max:{type:Number,default:1},multiple:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},bucketName:{type:String,default:"gyt"},directoryDnd:{type:Boolean,default:!1},path:{type:String,default:""},fileName:{type:String,default:""}},emits:["close","confrim"],setup(o,{emit:s}){const t="https://".concat(o.bucketName,".ks3-cn-beijing.ksyuncs.com/"),u=ee(),i=v(!1),p=v(!1),r=v(),y=v(),l=k([]),n=v([]),A=v([]),a=async h=>{const U=h.file;let S=!0;const I=U.type.includes("image")?O.IMG:U.type.includes("audio")?O.SONG:U.type.includes("video")?O.VIDEO:U.type.includes("vnd.openxmlformats-officedocument.presentationml.presentation")||U.type.includes("vnd.ms-powerpoint")?O.PPT:"other";if(console.log(I,"type"),I==="other")return u.error("文件格式不支持"),!1;const P=I==="IMG"?2:I==="SONG"?20:500;if(P&&(S=U.file.size/1024/1024
{f(h)},f=async h=>{console.log(h,"onFinishAfter");const U=l.find(P=>P.id==h.file.id),S=Fe(h.file.url);let I="";S==="IMG"?I=h.file.url:S==="SONG"?I=ve.SONG_DEFAULT_COVER:S==="PPT"?I=ve.PPT_DEFAULT_COVER:S==="VIDEO"&&(I=await m(U.tempFiileBuffer)),A.value.push({coverImg:I,content:h.file.url,id:h.file.id,name:h.file.name?h.file.name.slice(0,h.file.name.lastIndexOf(".")):""}),i.value=!1,p.value=!1},d=h=>new Promise(U=>{const S=document.createElement("video");S.currentTime=1,S.src=URL.createObjectURL(h),S.addEventListener("loadeddata",function(){const I=document.createElement("canvas"),P=S.videoWidth,M=S.videoHeight;I.width=P,I.height=M,I.getContext("2d").drawImage(S,0,0,P,M),I.toBlob(z=>{U(z)})})}),m=async h=>{try{p.value=!0;const U=await d(h||r.value),S="".concat(o.path).concat(Date.now()+".png"),I={filename:S,bucketName:o.bucketName,postData:{filename:S,acl:"public-read",key:S,unknowValueField:[]}},{data:P}=await Se(I),M={policy:P.policy,signature:P.signature,key:S,acl:"public-read",KSSAccessKeyId:P.kssAccessKeyId,name:S,file:U};return await Xe(t,M)}finally{p.value=!1}},g=async h=>{const U=A.value.findIndex(S=>S.id===h.file.id);return A.value.splice(U,1),p.value=!1,!0},R=Ee(()=>{let h=!1;return n.value.forEach(U=>{U.status!=="finished"&&(h=!0)}),h||n.value.length<=0||p.value}),L=({file:h,action:U,onFinish:S,onError:I,onProgress:P})=>{const M=l.find(z=>z.id==h.id);M.file=h,Ze({file:h,action:U,data:M,onProgress:P,onFinish:S,onError:I})},W=async()=>{const h=[];n.value.forEach(U=>{const S=A.value.find(I=>I.id===U.id);S&&h.push(S)}),s("confrim",h)};return()=>e("div",{class:Y.saveModal},[e(De,{ref:y,action:t,customRequest:L,fileList:n.value,"onUpdate:fileList":h=>n.value=h,accept:".jpg,jpeg,.png,audio/mp3,video/mp4,application/vnd.ms-powerpoint,application/vnd.openxmlformats-officedocument.presentationml.presentation",multiple:!0,max:10,showFileList:!0,showPreviewButton:!0,onBeforeUpload:h=>a(h),onFinish:h=>{c(h)},onRemove:h=>g(h)},{default:()=>[e(Oe,null,{default:()=>[e("div",{class:Y.uploadBtn},[e("div",{class:Y.iconUploadAdd},null),e("h3",null,[b("点击或者拖动文件到该区域来上传")]),e("p",null,[b("仅支持JPG、PNG、MP3、MP4、PPT格式文件,单次最多支持"),e("br",null,null),b("上传10个文件")])])]})]}),e(G,{class:Y.btnGroup,justify:"center"},{default:()=>[e(B,{round:!0,onClick:()=>s("close")},{default:()=>[b("取消")]}),e(B,{round:!0,type:"primary",disabled:R.value,onClick:W},{default:()=>[b("确定")]})]})])}}),wa=T({name:"share-resources",setup(){const o=ee();Be();const s=k({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,editList:[],editIds:[],removeVisiable:!1,removeContent:"是否删除该资源?",type:"remove",removeItem:{}}),t=v(!1),u=async()=>{try{s.loading=!0;const{data:l}=await ge({...s.searchGroup,...s.pagination});s.loading=!1,s.pageTotal=Number(l.total);const n=l.rows||[],A=[];n.forEach(a=>{A.push({id:a.id,coverImg:a.coverImg,type:a.type,title:a.name,isCollect:!!a.favoriteFlag,isSelected:a.sourceFrom==="PLATFORM",content:a.content,subjectId:a.subjectIds,sourceFrom:a.sourceFrom,enableFlag:a.enableFlag?1:0,openFlag:a.openFlag})}),s.tableList=A||[],setTimeout(()=>{t.value=!0},500)}catch(l){s.loading=!1}},i=async l=>{try{await fe({materialId:l.id,favoriteFlag:l.isCollect?0:1,type:l.type}),l.isCollect=!l.isCollect}catch(n){}},p=async l=>{s.pagination.page=1,s.searchGroup=Object.assign(s.searchGroup,l),u()},r=async()=>{try{s.searchGroup.type==="MUSIC"?await be(s.editIds):await Ye(s.editIds),o.success("删除成功"),p(s.searchGroup),s.editIds=[]}catch(l){}},y=async()=>{try{s.searchGroup.type==="MUSIC"?await be([s.removeItem.id]):await Re({ids:s.removeItem.id}),o.success("删除成功"),p(s.searchGroup)}catch(l){}};return j(()=>{u()}),()=>e(x,null,[e(Ht,{onSearch:l=>p(l),onUpload:()=>{s.editList=[],s.saveStatus=!0},onUpdate:()=>{const l=[];if(s.tableList.forEach(n=>{s.editIds.indexOf(n.id)>-1&&l.push(n)}),s.editList=l||[],s.editList.length<=0){o.error("至少选择一条资源进行编辑");return}s.uploadStatus=!0},onEdit:l=>{s.editStatus=l,s.editStatus||(s.editIds=[])},onSelectAll:l=>{if(l){const n=[];s.tableList.forEach(A=>{n.push(A.id)}),s.editIds=n}else s.editIds=[]},onDelete:()=>{if(s.editIds.length<=0){o.error("至少选择一条资源进行删除");return}s.type="delete",s.removeContent="是否删除该资源?",s.removeVisiable=!0}},null),e(pe,{show:s.loading,"onUpdate:show":l=>s.loading=l,style:{"min-height":"50vh"}},{default:()=>[e("div",{class:w.list},[s.tableList.map(l=>e("div",{class:w.itemWrap},[e("div",{class:w.itemWrapBox},[e(X,{item:l,disabledMouseHover:!1,offShelf:!l.enableFlag,onOffShelf:()=>{s.type="remove",s.removeContent="该资源已下架,是否删除?",s.removeVisiable=!0,s.removeItem=l},onClick:n=>{n.type==="IMG"||!l.enableFlag||(s.show=!0,s.item=n)},onCollect:n=>i(n)},null),s.editStatus&&e("div",{class:[w.itemBg,s.editIds.includes(l.id)?w.itemBgChecked:""],onClick:()=>{const n=s.editIds.indexOf(l.id);n>-1?s.editIds.splice(n,1):s.editIds.push(l.id)}},[e("img",{src:s.editIds.includes(l.id)?ma:fa,class:w.resourceDefault},null)])])])),!s.loading&&s.tableList.length<=0&&e(me,{style:{minHeight:"50vh"},description:"暂无资源"},null)])]}),e(oe,{page:s.pagination.page,"onUpdate:page":l=>s.pagination.page=l,pageSize:s.pagination.rows,"onUpdate:pageSize":l=>s.pagination.rows=l,pageTotal:s.pageTotal,"onUpdate:pageTotal":l=>s.pageTotal=l,onList:u},null),e(he,{show:s.show,"onUpdate:show":l=>s.show=l,item:s.item},null),e(J,{show:s.uploadStatus,"onUpdate:show":l=>s.uploadStatus=l,preset:"card",showIcon:!1,class:["modalTitle background",w.attendClassModal],title:s.editStatus?"修改资源":"上传资源",blockScroll:!1},{default:()=>[e(ga,{editStatus:s.editStatus,onClose:()=>s.uploadStatus=!1,onConfirm:()=>{s.editIds=[],s.editList=[],s.saveStatus=!1,p(s.searchGroup)},list:s.editList},null)]}),e(J,{show:s.saveStatus,"onUpdate:show":l=>s.saveStatus=l,preset:"card",showIcon:!1,class:["modalTitle background",w.attendClassSaveModal],title:"上传资源",blockScroll:!1},{default:()=>[e(Sa,{onClose:()=>s.saveStatus=!1,onConfrim:l=>{const n=l||[],A=[];n.forEach(a=>{A.push({subjectIds:null,openFlag:!1,coverImg:a.coverImg,title:a.name||"",type:Fe(a.content),enableFlag:1,content:a.content,id:null})}),s.editList=A,s.uploadStatus=!0,s.editStatus=!1}},null)]}),t.value?e(ha,null,null):null,e(J,{show:s.removeVisiable,"onUpdate:show":l=>s.removeVisiable=l,preset:"card",class:["modalTitle",w.removeVisiable],title:"提示"},{default:()=>[e("div",{class:w.studentRemove},[e("p",null,[s.removeContent]),e(G,{class:w.btnGroupModal,justify:"center"},{default:()=>[e(B,{round:!0,type:"primary",onClick:()=>{s.type==="remove"?y():r(),s.removeVisiable=!1}},{default:()=>[b("确定")]}),e(B,{round:!0,onClick:()=>s.removeVisiable=!1},{default:()=>[b("取消")]})]})])]})])}}),Ca="_list_1mce6_1",Ua="_itemWrap_1mce6_11",Ia="_itemWrapBox_1mce6_16",Ea="_searchGroup_1mce6_28",Ba="_btnType_1mce6_32",Ra="_inputSearch_1mce6_67",Fa="_searchCatatory_1mce6_91",Pa="_addTrain_1mce6_98",Ma="_spaceSection_1mce6_110",Ga="_collapseWrap_1mce6_116",ka="_collaoseBtn_1mce6_122",xa="_isStart_1mce6_127",Ta="_collapsSection_1mce6_130",Na="_isHidden_1mce6_133",ja="_hideButton_1mce6_137",D={list:Ca,itemWrap:Ua,itemWrapBox:Ia,searchGroup:Ea,btnType:Ba,inputSearch:Ra,searchCatatory:Fa,addTrain:Pa,spaceSection:Ma,collapseWrap:Ga,collaoseBtn:ka,isStart:xa,collapsSection:Ta,isHidden:Na,hideButton:ja};function Ue(o){return typeof o=="function"||Object.prototype.toString.call(o)==="[object Object]"&&!$(o)}const Wa=T({name:"search-group",emits:["search"],setup(o,{emit:s}){const t=q(),u=v([]),i=k({type:"",name:"",bookVersionId:null,subjectId:null}),p=()=>{s("search",i)},r=v(),y=v([]),l=v(0),n=v(0),A=v(!1),a=v(!1),c=()=>{try{y.value=[...new Set(y.value)];let f=-1;y.value.forEach((d,m)=>{m===0?(n.value=1,f=d.offsetLeft):d.offsetLeft===f&&m!=0&&n.value++,A.value?d.style.display="block":n.value>1?d.style.display="none":d.style.display="block"}),a.value=!0}catch(f){}};return j(async()=>{u.value=[{label:"全部",value:""},...ie],await t.getMusicSheetCategory(),await t.getSubjects()}),()=>{let f,d;return e("div",{class:D.searchGroup},[e("div",{class:D.searchCatatory},[e(G,{size:"small",class:D.btnType},Ue(f=u.value.map(m=>e(B,{type:i.type===m.value?"primary":"default",secondary:i.type!==m.value,round:!0,size:"small",focusable:!1,onClick:()=>{i.type=m.value,p(),ce(()=>{var g;i.type==="MUSIC"?(l.value=(g=r.value)==null?void 0:g.offsetHeight,c()):y.value=[]})}},{default:()=>[m.label]})))?f:{default:()=>[f]})]),e(H,{labelAlign:"left",labelPlacement:"left"},{default:()=>[e(Q,{label:"乐器:"},{default:()=>[e(G,{class:D.spaceSection},Ue(d=t.getSubjectAllList.map(m=>e(B,{secondary:i.subjectId===m.id,quaternary:i.subjectId!==m.id,strong:!0,focusable:!1,type:i.subjectId===m.id?"primary":"default",onClick:()=>{i.subjectId=m.id,p()}},{default:()=>[m.name]})))?d:{default:()=>[d]})]}),e(ne,{class:D.inputSearch,round:!0,onSearch:m=>{i.name=m,p()}},null)]})])}}}),La=T({name:"myColloge-guide",emits:["close"],setup(o,{emit:s}){const t=k({box:{height:"0px"},show:!1,steps:[{ele:"",img:Z("myColloge1.png"),imgStyle:{top:E(-4),left:E(630),width:E(458),height:E(291)},btnsStyle:{bottom:E(96),left:E(790)},eleRectPadding:{left:7,top:7,width:14,height:14},type:"bottom"}],step:0}),u=v(!1),i=v({});(async()=>{var a;try{const c=await ye({guideTag:"teacher-guideInfo"});c.data?i.value=JSON.parse((a=c.data)==null?void 0:a.guideValue)||null:i.value={},i.value&&i.value.myColloge?u.value=!1:u.value=!0}catch(c){console.log(c)}})();const r=()=>{var c,f,d,m;const a=document.getElementById("myColloge-".concat(t.step));if(a){const g=a.getBoundingClientRect(),R=((c=t.steps[t.step].eleRectPadding)==null?void 0:c.left)||0,L=((f=t.steps[t.step].eleRectPadding)==null?void 0:f.top)||0,W=((d=t.steps[t.step].eleRectPadding)==null?void 0:d.width)||0,h=((m=t.steps[t.step].eleRectPadding)==null?void 0:m.height)||0;t.box={left:g.x-R+"px",top:g.y-L+"px",width:g.width+W+"px",height:g.height+h+"px"}}else n()},y=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 V({guideTag:"teacher-guideInfo",guideValue:JSON.stringify(i.value)})}catch(c){console.log(c)}t.step=0,r(),u.value=!0}catch(c){}};j(()=>{r(),window.addEventListener("resize",l),_.on("natural-resources-guide",a=>y(a))});const l=()=>{r()};ue(()=>{window.removeEventListener("resize",l),_.off("natural-resources-guide",y)});const n=()=>{if(t.step>=4){A();return}t.step=t.step+1,r()},A=async()=>{i.value?i.value.myColloge=!0:i.value={myColloge:!0};try{const a=await V({guideTag:"teacher-guideInfo",guideValue:JSON.stringify(i.value)})}catch(a){console.log(a)}u.value=!1};return()=>e(x,null,[u.value?re(e("div",{"onUpdate:show":a=>u.value=a,class:["n-modal-mask","n-modal-mask-guide"]},[e("div",{class:C.content,onClick:()=>n()},[e("div",{class:C.backBtn,onClick:a=>{a.stopPropagation(),A()}},[b("跳过")]),e("div",{class:C.box,style:{...t.box},id:"modeType-".concat(t.step)},[t.steps.map((a,c)=>{var f,d,m,g;return e("div",{onClick:R=>R.stopPropagation(),class:C.item,style:a.type=="bottom"?{display:c===t.step?"":"none",left:"".concat((f=a.eleRect)==null?void 0:f.left,"px"),top:"-".concat((d=a.imgStyle)==null?void 0:d.height)}:{display:c===t.step?"":"none",left:"".concat((m=a.eleRect)==null?void 0:m.left,"px"),top:"".concat((g=t.box)==null?void 0:g.height)}},[e("img",{class:C.img,style:a.imgStyle,src:a.img},null),e("div",{class:C.btns,style:a.btnsStyle},[t.step+1==t.steps.length?e(x,null,[e("div",{class:[C.endBtn],onClick:()=>A()},[b("完成")])]):e("div",{class:C.btn,onClick:()=>n()},[b("下一步 ("),t.step+1,b("/"),t.steps.length,b(")")])])])})])])]),[[de,u.value,"show"]]):null])}}),Da=T({name:"share-resources",setup(){const o=ee(),s=Be(),t=k({searchWord:"",loading:!1,pageTotal:0,pagination:{page:1,rows:20},searchGroup:{type:"",name:"",bookVersionId:null,subjectId:null,sourceType:4},tableList:[],show:!1,item:{}}),u=async()=>{try{t.loading=!0;const{data:l}=await ge({...t.searchGroup,...t.pagination});t.loading=!1,t.pageTotal=Number(l.total);const n=l.rows||[],A=[];n.forEach(a=>{A.push({id:a.id,coverImg:a.coverImg,type:a.type,title:a.name,isCollect:!!a.favoriteFlag,isSelected:a.sourceFrom==="PLATFORM",content:a.content,subjectId:a.subjectIds,enableFlag:a.enableFlag?1:0,openFlag:a.openFlag})}),t.tableList=A||[],setTimeout(()=>{i.value=!0},500)}catch(l){t.loading=!1}},i=v(!1),p=async l=>{t.pagination.page=1,t.searchGroup=Object.assign(t.searchGroup,l),u()},r=async l=>{try{await fe({materialId:l.id,favoriteFlag:l.isCollect?0:1,type:l.type}),l.isCollect=!l.isCollect}catch(n){}},y=async l=>{try{s.warning({title:"提示",content:"该资源已下架,是否删除?",positiveText:"确定",negativeText:"取消",onPositiveClick:async()=>{await Re({id:l.id}),o.success("删除成功"),p(t.searchGroup)}})}catch(n){}};return j(()=>{u()}),()=>e(x,null,[e(Wa,{onSearch:l=>p(l)},null),e(pe,{show:t.loading,"onUpdate:show":l=>t.loading=l,style:{"min-height":"50vh"}},{default:()=>[e("div",{class:D.list,id:"myColloge-0"},[t.tableList.map(l=>e("div",{class:D.itemWrap},[e("div",{class:D.itemWrapBox},[e(X,{item:l,offShelf:!l.enableFlag,onOffShelf:()=>y(l),disabledMouseHover:!1,onClick:n=>{n.type==="IMG"||!l.enableFlag||(t.show=!0,t.item=n)},onCollect:n=>r(n)},null)])])),!t.loading&&t.tableList.length<=0&&e(me,{style:{minHeight:"50vh"},description:"暂无收藏资源"},null)])]}),e(oe,{page:t.pagination.page,"onUpdate:page":l=>t.pagination.page=l,pageSize:t.pagination.rows,"onUpdate:pageSize":l=>t.pagination.rows=l,pageTotal:t.pageTotal,"onUpdate:pageTotal":l=>t.pageTotal=l,onList:u},null),e(he,{show:t.show,"onUpdate:show":l=>t.show=l,item:t.item},null),i.value?e(La,null,null):null])}}),ts=T({name:"student-studentList",setup(){const o=v("myResources");return j(()=>{_.on("teacher-guideInfo",s=>{s==="natural-resources"&&_.emit("natural-resources-guide",o.value)})}),()=>e("div",{class:se.listWrap},[e(_e,{defaultValue:"myResources",paneClass:se.paneTitle,justifyContent:"center",paneWrapperClass:se.paneWrapperContainer,"onUpdate:value":[s=>{o.value=s},s=>o.value=s],value:o.value},{default:()=>[e(ae,{name:"myResources",tab:"我的资源"},{default:()=>[e(wa,null,null)]}),e(ae,{name:"shareResources",tab:"共享资源"},{default:()=>[e(St,null,null)],tab:()=>e("span",{id:"shareResources-0"},[b("共享资源")])}),e(ae,{name:"myCollect",tab:"我的收藏"},{default:()=>[e(Da,null,null)]})]})])}});export{ts as default};