index-ea7e8a5d-1694078809672.js 49 KB

1
  1. import{j as Me,C as X,n as ve,o as Ge,p as ke,r as xe}from"./isCollaose-2ffd9935-1694078809672.js";import{P as oe}from"./index-1a2d0654-1694078809672.js";import{T as ne}from"./index-04d5089f-1694078809672.js";import{r as ie}from"./searchArray-59dcc700-1694078809672.js";import{u as q}from"./catchData-3be69512-1694078809672.js";import{d as N,e as P,r as A,n as j,f as e,w as x,j as R,E as ce,N as H,g as Q,t as le,aU as $,R as I,M as O,O as ue,S as re,U as de,k as b,F,A as pe,x as Ue,v as J,b as ee,L as Ie,df as Pe,h as Fe,W as Ne,dg as _,dh as Te,C as je,di as We,P as Le,dj as Oe,m as Be,p as De,q as ae}from"./index-ce8959eb-1694078809672.js";import{A as ze,m as ge,f as fe,i as _e,a as Qe,b as Ve,c as Ae,d as Ke,e as Re}from"./index-b5933c28-1694078809672.js";import{T as me}from"./index-b4d77148-1694078809672.js";import{C as he,N as Ye}from"./contants-ee65eda7-1694078809672.js";import{g as Z,s as U,a as ye,b as V}from"./api-b993eda7-1694078809672.js";import{p as be}from"./index-f94fff84-1694078809672.js";import"./index-8084cfc3-1694078809672.js";import"./Slider-0c64af90-1694078809672.js";const Je="_listWrap_sirzm_1",Xe="_list_sirzm_1",Ze="_searchGroup_sirzm_46",qe="_btnType_sirzm_50",He="_inputSearch_sirzm_84",$e="_searchCatatory_sirzm_103",et="_addTrain_sirzm_110",se={listWrap:Je,list:Xe,searchGroup:Ze,btnType:qe,inputSearch:He,searchCatatory:$e,addTrain:et},tt="_list_vwz07_1",at="_itemWrap_vwz07_11",st="_itemWrapBox_vwz07_16",lt="_searchGroup_vwz07_28",ot="_btnType_vwz07_32",nt="_inputSearch_vwz07_67",it="_searchCatatory_vwz07_91",ct="_addTrain_vwz07_98",ut="_teachingModal_vwz07_110",rt="_spaceSection_vwz07_113",dt="_collapseWrap_vwz07_120",pt="_collaoseBtn_vwz07_126",gt="_isStart_vwz07_131",ft="_isHidden_vwz07_134",mt="_hideButton_vwz07_138",M={list:tt,itemWrap:at,itemWrapBox:st,searchGroup:lt,btnType:ot,inputSearch:nt,searchCatatory:it,addTrain:ct,teachingModal:ut,spaceSection:rt,collapseWrap:dt,collaoseBtn:pt,isStart:gt,isHidden:ft,hideButton:mt};function Se(i){return typeof i=="function"||Object.prototype.toString.call(i)==="[object Object]"&&!$(i)}const ht=N({name:"search-group",emits:["search","add"],expose:["init"],setup(i,{emit:l}){const t=q(),u=P({type:"MUSIC",name:"",bookVersionId:null,subjectId:null}),n=()=>{l("search",u)},p=A(),r=A([]),y=A(0),s=A(0),o=A(!1),v=A(!1),a=d=>{d!=null&&d.selfElRef&&r.value.push(d.selfElRef.parentNode)},c=d=>{o.value=d,g()},g=()=>{try{r.value=[...new Set(r.value)];let d=-1;r.value.forEach((m,f)=>{f===0?(s.value=1,d=m.offsetLeft):m.offsetLeft===d&&f!=0&&s.value++,o.value?m.style.display="block":s.value>1?m.style.display="none":m.style.display="block"}),v.value=!0}catch(d){}};return j(async()=>{console.log("加载"),await t.getMusicSheetCategory(),await t.getSubjects(),u.type==="MUSIC"&&(y.value=p.value.offsetHeight,g())}),()=>{let d,m;return e("div",{class:M.searchGroup},[e("div",{class:[M.searchCatatory]},[e(x,{size:"small",class:M.btnType},Se(d=ie.map(f=>e(R,{type:u.type===f.value?"primary":"default",secondary:u.type!==f.value,round:!0,size:"small",focusable:!1,onClick:()=>{u.type=f.value,n(),ce(()=>{u.type==="MUSIC"?(y.value=p.value.offsetHeight,g()):r.value=[]})}},{default:()=>[f.label]})))?d:{default:()=>[d]})]),e(H,{labelAlign:"left",labelPlacement:"left"},{default:()=>[u.type==="MUSIC"&&e("div",{class:[M.collapsSection]},[e(Q,{label:"教材:"},{default:()=>[e("div",{class:[M.collapseWrap,v.value?"":M.hideButton,o.value?"":M.isHidden],ref:p},[e(x,{class:[M.spaceSection]},{default:()=>[t.getAllMusicCategories.map(f=>e(R,{ref:a,secondary:u.bookVersionId===f.id,quaternary:u.bookVersionId!==f.id,strong:!0,focusable:!1,type:u.bookVersionId===f.id?"primary":"default",onClick:()=>{u.bookVersionId=f.id,n()}},{default:()=>[f.name]})),s.value>1&&e("div",{style:{height:"var(--n-blank-height)",position:"absolute",display:"flex",alignItems:"center"},onClick:()=>{c(!o.value)}},[e(le,{previewDisabled:!0,src:Me,class:[M.collaoseBtn,o.value?M.isStart:""]},null)])]})])]})]),e(Q,{label:"乐器:"},{default:()=>[e(x,{class:M.spaceSection},Se(m=t.getSubjectAllList.map(f=>e(R,{secondary:u.subjectId===f.id,quaternary:u.subjectId!==f.id,strong:!0,focusable:!1,type:u.subjectId===f.id?"primary":"default",onClick:()=>{u.subjectId=f.id,n()}},{default:()=>[f.name]})))?m:{default:()=>[m]})]}),e(ne,{class:M.inputSearch,round:!0,onSearch:f=>{u.name=f,n()}},null)]})])}}}),yt=N({name:"shareResources-guide",emits:["close"],setup(i,{emit:l}){const t=P({box:{height:"0px"},show:!1,steps:[{ele:"",eleRect:{},img:Z("shareResources1.png"),handStyle:{top:"0.91rem"},imgStyle:{top:I(-4),left:I(-263),width:I(553),height:I(229)},btnsStyle:{bottom:I(30),left:I(-102)},eleRectPadding:{left:14,top:14,width:28,height:28},boxStyle:{borderRadius:"30px"}},{ele:"",img:Z("shareResources2.png"),imgStyle:{left:I(99),width:I(618),height:I(273)},btnsStyle:{bottom:I(88),left:I(240)},eleRectPadding:{left:7,top:7,width:14,height:14},boxStyle:{borderRadius:"15px"},type:"bottom"}],step:0}),u=A(!1),n=A({});(async()=>{var a;try{const c=await ye({guideTag:"teacher-guideInfo"});c.data?n.value=JSON.parse((a=c.data)==null?void 0:a.guideValue)||null:n.value={},n.value&&n.value.shareResourcesGuide?u.value=!1:u.value=!0}catch(c){console.log(c)}})();const r=()=>{var c,g,d,m;const a=document.getElementById(`shareResources-${t.step}`);if(a){const f=a.getBoundingClientRect(),k=((c=t.steps[t.step].eleRectPadding)==null?void 0:c.left)||0,W=((g=t.steps[t.step].eleRectPadding)==null?void 0:g.top)||0,h=((d=t.steps[t.step].eleRectPadding)==null?void 0:d.width)||0,S=((m=t.steps[t.step].eleRectPadding)==null?void 0:m.height)||0;`shareResources-${t.step}`=="shareResources-1"?(t.box={left:f.x-k+"px",top:f.y-W+"px",width:(f.width+h)*2+h+"px",height:f.height+S+"px"},console.log(t.box.width,"---",f.width)):t.box={left:f.x-k+"px",top:f.y-W+"px",width:f.width+h+"px",height:f.height+S+"px"},console.log(`coai-${t.step}`,t.box)}else o()},y=async a=>{try{if(a!=="shareResources")return;n.value?n.value.classGuide=!1:n.value={classGuide:!1};try{await V({guideTag:"teacher-guideInfo",guideValue:JSON.stringify(n.value)})}catch(c){console.log(c)}t.step=0,r(),u.value=!0}catch(c){}};j(()=>{r(),window.addEventListener("resize",s),O.on("natural-resources-guide",a=>y(a))});const s=()=>{r()};ue(()=>{window.removeEventListener("resize",s),O.off("natural-resources-guide",y)});const o=()=>{if(t.step>=4){v();return}t.step=t.step+1,r()},v=async()=>{n.value?n.value.shareResourcesGuide=!0:n.value={shareResourcesGuide:!0};try{const a=await V({guideTag:"teacher-guideInfo",guideValue:JSON.stringify(n.value)})}catch(a){console.log(a)}u.value=!1};return()=>e(F,null,[u.value?re(e("div",{"onUpdate:show":a=>u.value=a,class:["n-modal-mask","n-modal-mask-guide"]},[e("div",{class:U.content,onClick:()=>o()},[e("div",{class:U.backBtn,onClick:a=>{a.stopPropagation(),v()}},[b("跳过")]),e("div",{class:U.box,style:{...t.box,...t.steps[t.step].boxStyle},id:`modeType-${t.step}`},[t.steps.map((a,c)=>{var g,d,m,f;return e("div",{onClick:k=>k.stopPropagation(),class:U.item,style:a.type=="bottom"?{display:c===t.step?"":"none",left:`${(g=a.eleRect)==null?void 0:g.left}px`,top:`-${(d=a.imgStyle)==null?void 0:d.height}`}:{display:c===t.step?"":"none",left:`${(m=a.eleRect)==null?void 0:m.left}px`,top:`${(f=t.box)==null?void 0:f.height}`}},[e("img",{class:U.img,style:a.imgStyle,src:a.img},null),e("div",{class:U.btns,style:a.btnsStyle},[t.step+1==t.steps.length?e(F,null,[e("div",{class:[U.endBtn],onClick:()=>v()},[b("完成")]),e("div",{class:U.nextBtn,onClick:()=>{t.step=0,r()}},[b("再看一遍")])]):e("div",{class:U.btn,onClick:()=>o()},[b("下一步 ("),t.step+1,b("/"),t.steps.length,b(")")])])])})])])]),[[de,u.value,"show"]]):null])}}),vt=N({name:"share-resources",setup(){const i=P({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:{}}),l=A(!1),t=A(),u=async()=>{try{i.loading=!0;const{data:r}=await ge({...i.searchGroup,...i.pagination});i.loading=!1,i.pageTotal=Number(r.total);const y=r.rows||[],s=[];y.forEach(o=>{s.push({id:o.id,coverImg:o.coverImg,type:o.type,title:o.name,isCollect:!!o.favoriteFlag,isSelected:o.sourceFrom==="PLATFORM",content:o.content})}),i.tableList=s||[],setTimeout(()=>{l.value=!0},500)}catch(r){i.loading=!1}},n=async r=>{i.pagination.page=1,i.searchGroup=Object.assign(i.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(F,null,[e(ht,{ref:t,onSearch:r=>n(r),onAdd:()=>i.teachingStatus=!0},null),e(pe,{show:i.loading,"onUpdate:show":r=>i.loading=r,style:{"min-height":"50vh"}},{default:()=>[e("div",{class:M.list},[i.tableList.map((r,y)=>e("div",{class:M.itemWrap},[e("div",{class:M.itemWrapBox},[y==0?e(X,Ue({id:"shareResources-1"},{item:r,disabledMouseHover:!1,onClick:s=>{s.type!=="IMG"&&(i.show=!0,i.item=s)},onCollect:s=>p(s)}),null):e(X,{item:r,disabledMouseHover:!1,onClick:s=>{s.type!=="IMG"&&(i.show=!0,i.item=s)},onCollect:s=>p(s)},null)])])),!i.loading&&i.tableList.length<=0&&e(me,{style:{minHeight:"50vh"},description:"暂无共享资源"},null)])]}),e(oe,{page:i.pagination.page,"onUpdate:page":r=>i.pagination.page=r,pageSize:i.pagination.rows,"onUpdate:pageSize":r=>i.pagination.rows=r,pageTotal:i.pageTotal,"onUpdate:pageTotal":r=>i.pageTotal=r,onList:u},null),e(he,{show:i.show,"onUpdate:show":r=>i.show=r,item:i.item},null),e(J,{show:i.teachingStatus,"onUpdate:show":r=>i.teachingStatus=r,preset:"card",showIcon:!1,class:["modalTitle background",M.teachingModal],title:"自定义教材",blockScroll:!1},{default:()=>[e(ze,{onClose:()=>i.teachingStatus=!1},null)]}),l.value?e(yt,null,null):null])}}),At="_list_1nw8j_1",bt="_searchGroup_1nw8j_10",St="_btnType_1nw8j_14",wt="_inputSearch_1nw8j_50",Ct="_searchCatatory_1nw8j_74",Ut="_btnGroup_1nw8j_81",It="_addTrain_1nw8j_84",Bt="_error_1nw8j_92",Rt="_iconUpload_1nw8j_99",Et="_iconEdit_1nw8j_103",Mt="_iconSelectAll_1nw8j_107",Gt="_iconDelete_1nw8j_111",kt="_iconPen_1nw8j_115",xt="_itemWrap_1nw8j_119",Pt="_itemWrapBox_1nw8j_124",Ft="_itemBg_1nw8j_136",Nt="_itemBgChecked_1nw8j_145",Tt="_resourceDefault_1nw8j_148",jt="_spaceSection_1nw8j_155",Wt="_attendClassModal_1nw8j_161",Lt="_attendClassSaveModal_1nw8j_167",Ot="_removeVisiable_1nw8j_173",Dt="_studentRemove_1nw8j_179",zt="_btnGroupModal_1nw8j_191",C={list:At,searchGroup:bt,btnType:St,inputSearch:wt,searchCatatory:Ct,btnGroup:Ut,addTrain:It,error:Bt,iconUpload:Rt,iconEdit:Et,iconSelectAll:Mt,iconDelete:Gt,iconPen:kt,itemWrap:xt,itemWrapBox:Pt,itemBg:Ft,itemBgChecked:Nt,resourceDefault:Tt,spaceSection:jt,attendClassModal:Wt,attendClassSaveModal:Lt,removeVisiable:Ot,studentRemove:Dt,btnGroupModal:zt},_t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j6PIpxN29SssUhRMgpaswEQplSSsuxHLed93EdBTmY0dGipd/P0NwthvBzXwEctYc3XVQvnzvWjudjkAF230d4MuDwFyPlZMx3zveNxCd5K1FSImkURURyG8QfA1SdwUookA8QvCuMF6kYoLjks/8vXkm2yiXEslEpYyF0EVwLbrDuGPnN/NBVzB1pysPT1srVyt/gBipDhkRTI1nM9m+gAI7tY/Qn69lx/K9u3uBWfMNbPfi/1mCetLy03M3FlApkbxPl9VEEzW5l8IX6xm6DOLDfjIEwXMER0MdypsQaSoBKqKXxrOZnyVwUk+R+rO+JtriIBH1tBTiyZPQeGmLtfuTU3hDgoR7J8v8SCDNS1ZbKwvEjv5maIgSXAXR8islcEEimO1YGLcEpAeRJiCSEsTdj0E8qqBeNf30mR70OroW7dRBDf0KBF9ZOW9GRLg+qAloefKJ+8uV8o/1LyuwfC/WOEsx7j5OwYiZTc81CnL//mjwZ/kZw6hcbFUAA9stELSqmhEj8sDY4hc/tQUqOtNxzcpizUn+jfneLesDCnF3BprnQquoY1Y+fWqD3XFPgzwU2iPiWFnP32C33X8A3lwdU2JMmvn53EBAgZN8m8QLdeBPYr43s14wcFyf5IPhhEoOmznv/e0FslOnCH20GyCIOhLLp08PgTZbsmGGAGn7Ug8zNMxQq0odDOtQh14WOO5bJI/VehnOWfnMgQ11yHbzBO166zhk5rwPtrVSl5xkUhNphsc040AsPx822rUnsFOvEfqEQFbFiOw2F+d+2Vagqnhxct+9Sq9Gx/KZHxq3JtXfpcnpKanw0pifvtBoL2x1t28F0MvYjQ+07CR3l4nv6y9tWd2kbhv/Nr3cSxY28y09lBrTq/ovEpGqT0Swp3HZm/fUteuXKwSjdeFfRbAAojIQlMAgMQXgnvDPQlbM0V07G69nWp46Att9h+DzAwF0CBbIu5bv1Td6151bAtU26itnQT67LVAin1q3R2fl/PmVRv2257LwGo9MaMiEkGoQOIpoBS5pkWy7673/AG2QyadOuCtAAAAAAElFTkSuQmCC";function we(i){return typeof i=="function"||Object.prototype.toString.call(i)==="[object Object]"&&!$(i)}const Xt=N({name:"search-group",emits:["search","upload","edit","selectAll","delete","update"],setup(i,{emit:l}){const t=A([]),u=q(),n=P({type:"MUSIC",name:"",bookVersionId:null,subjectId:null}),p=P({isEdit:!1,isSelectAll:!1}),r=()=>{l("search",n)};return j(async()=>{t.value=[],ie.forEach(y=>{t.value.push(y)}),await u.getSubjects()}),()=>{let y,s;return e("div",{class:C.searchGroup},[e("div",{class:C.searchCatatory},[e(x,{size:"small",class:C.btnType},we(y=t.value.map(o=>e(R,{type:n.type===o.value?"primary":"default",secondary:n.type!==o.value,round:!0,size:"small",focusable:!1,onClick:()=>{n.type!==o.value&&(p.isEdit=!1,p.isSelectAll=!1,l("edit",p.isEdit)),n.type=o.value,r()}},{default:()=>[o.label]})))?y:{default:()=>[y]}),e(x,{size:"small",class:C.btnGroup},{default:()=>[p.isEdit?e(F,null,[e(R,{type:"primary",class:C.addTrain,focusable:!1,strong:!0,onClick:()=>{p.isSelectAll=!p.isSelectAll,l("selectAll",p.isSelectAll)}},{default:()=>[e("img",{src:p.isSelectAll?Vt:Kt,class:C.iconSelectAll},null),b("全选")]}),e(R,{type:"error",class:[C.addTrain,C.error],focusable:!1,strong:!0,onClick:()=>l("delete")},{default:()=>[e("img",{src:Jt,class:C.iconDelete},null),b("删除")]}),n.type!=="MUSIC"&&e(R,{type:"primary",class:C.addTrain,focusable:!1,strong:!0,onClick:()=>l("update")},{default:()=>[e("img",{src:Yt,class:C.iconPen},null),b("修改")]}),e(R,{type:"primary",class:C.addTrain,focusable:!1,strong:!0,onClick:()=>{p.isEdit=!1,p.isSelectAll=!1,l("edit",p.isEdit)}},{default:()=>[b("完成编辑")]})]):e(F,null,[e(R,Ue({type:"primary",class:C.addTrain,focusable:!1},{id:"myResources-0"},{strong:!0,onClick:()=>l("upload")}),{default:()=>[e("img",{src:_t,class:C.iconUpload},null),b("上传资源")]}),e(R,{type:"primary",class:C.addTrain,focusable:!1,strong:!0,onClick:()=>{p.isEdit=!0,l("edit",p.isEdit)}},{default:()=>[e("img",{src:Qt,class:C.iconEdit},null),b("编辑资源")]})])]})]),e(H,{labelAlign:"left",labelPlacement:"left"},{default:()=>[e(Q,{label:"乐器:"},{default:()=>[e(x,{class:C.spaceSection},we(s=u.getSubjectAllList.map(o=>e(R,{secondary:n.subjectId===o.id,quaternary:n.subjectId!==o.id,strong:!0,focusable:!1,type:n.subjectId===o.id?"primary":"default",onClick:()=>{n.subjectId!==o.id&&(p.isEdit=!1,p.isSelectAll=!1,l("edit",p.isEdit)),n.subjectId=o.id,r()}},{default:()=>[o.name]})))?s:{default:()=>[s]})]}),e(ne,{class:C.inputSearch,round:!0,onSearch:o=>{n.name=o,r()}},null)]})])}}}),Zt="_uploadModal_7ib79_1",qt="_formModal_7ib79_4",Ht="_formSpace_7ib79_8",$t="_previewModal_7ib79_11",ea="_image_7ib79_23",ta="_titleType_7ib79_32",aa="_iconUploadDelete_7ib79_40",sa="_commonType_7ib79_49",la="_formItem_7ib79_72",oa="_btnGroup_7ib79_94",na="_uploadFile_7ib79_101",ia="_uploadBtn_7ib79_108",ca="_iconUploadAdd_7ib79_125",T={uploadModal:Zt,formModal:qt,formSpace:Ht,previewModal:$t,image:ea,titleType:ta,iconUploadDelete:aa,commonType:sa,formItem:la,btnGroup:oa,uploadFile:na,uploadBtn:ia,iconUploadAdd:ca};function ua(i){return typeof i=="function"||Object.prototype.toString.call(i)==="[object Object]"&&!$(i)}const Ee=i=>i.indexOf(".mp3")>-1?_.SONG:i.indexOf(".mp4")>-1?_.VIDEO:_.IMG,ra=N({name:"upload-modal",props:{list:{type:Array,default:()=>[]}},emits:["close","confirm"],setup(i,{emit:l}){const t=q(),u=A(),n=ee();A(),A([]);const p=P({list:[],uploading:!1,uploadUrl:"",name:"",subjectIds:[]}),r=a=>{let c=ve;switch(a){case"IMG":c=ve;break;case"VIDEO":c=xe;break;case"SONG":c=ke;break;case"MUSIC":c=Ge;break}return c},y=async()=>{var a;(a=u.value)==null||a.validate(async c=>{if(c){ce(Te);return}p.uploading=!0;try{const g=[];p.list.forEach(d=>{g.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})}),o.value?await Qe(g):await Ve(g),p.list=[],n.success("保存成功"),l("close",!0),l("confirm")}catch(g){}p.uploading=!1})},s=a=>{p.list.splice(a,1)},o=Ie(()=>i.list.length>0);j(async()=>{const a=i.list||[],c=[];a.forEach(g=>{c.push({subjectIds:g.subjectId?g.subjectId.split(",").map(d=>Number(d)):[],openFlag:g.openFlag,coverImg:g.coverImg,name:g.title,type:g.type,sourceFrom:g.sourceFrom,enableFlag:g.enableFlag,content:g.content,id:g.id})}),p.list=c||[],console.log(c,"uploadForms"),await t.getSubjects()});const v=(a,c)=>{a.subjectIds=c.map(g=>g.id)};return()=>{let a;return e("div",{class:T.uploadModal},[e(Ye,{style:{"max-height":"55vh"}},{default:()=>[e(H,{ref:u,labelPlacement:"left",labelWidth:120,model:p,class:T.formModal},{default:()=>[e(x,{class:T.formSpace},ua(a=p.list.map((c,g)=>e("div",{class:T.formItem,key:g},[e("div",{class:T.previewModal},[e(le,{class:[T.titleType],src:r(c.type),previewDisabled:!0,objectFit:"cover"},null),!o.value&&e("img",{class:[T.iconUploadDelete],src:_e,onClick:()=>s(g)},null),e(le,{class:[T.cover,T.image],lazy:!0,previewDisabled:!0,src:c.coverImg,objectFit:"cover"},null),e("div",{class:T.commonType},[b("是否公开:"),e(Pe,{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.${g}.name`,rule:[{required:!0,message:"请输入资源名称",trigger:["input","blur"]}]},{default:()=>[e(Fe,{value:c.name,"onUpdate:value":d=>c.name=d,placeholder:"请输入资源名称",maxlength:25,clearable:!0},null)]}),e(Q,{path:`list[${g}].subjectIds`,showFeedback:!1,rule:[{required:!0,message:"请选择素材可用乐器",trigger:"change",type:"array"}]},{default:()=>[e(Ne,{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(F,null,[e(R,{text:!0,style:" --n-width: 100% ",onClick:()=>v(c,t.getSubjectList)},{default:()=>[b("全选")]})])})]})])))?a:{default:()=>[a]})]})]}),e(x,{class:T.btnGroup,justify:"center"},{default:()=>[e(R,{round:!0,onClick:()=>l("close")},{default:()=>[b("取消")]}),e(R,{round:!0,type:"primary",loading:p.uploading,disabled:p.list.length===0,onClick:y},{default:()=>[b("确定")]})]})])}}}),da="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACgAAAAoCAYAAACM/rhtAAAAAXNSR0IArs4c6QAAA8dJREFUWEfNmU1sE1cQx///3Ue8CCOBnUJjpVUlop7opahqj3DmAFS0VdNDb1UL7YUg4bXSsARkBwk4FYp66wFQP1TEoedwBFX0Ui6tglSVyCnUNogYsTa7O9Vbs46dpPVXIPuOfm/m/XZm3rx5Y6LPkZh8uMP3/X0C2UVBBkRGgIxWR6AIQVGIIsFbpmleq53acqefrdiLUNJZ3ObW659DcEBEdvYiS/I2iKvW0NBXVWfz/W5luwJ8yZHkA7cyIZSjECS7Vb7qOqJK4ZmtVursPw6rnXR1BDTt0rsALkCwfYUy8i4oPxOcM8CFwGBRrzECyQSQEYGMQbgXIq+slMU9AIf8wvBP/wf5n4Aiwg12ZUqA44AsrQstgPM01PdP81t+7WQBPb8h9/BNCbz3hTjc7gFqxSeeFlLTJGU1XasCjp6TjQv3K98C8l5TiPRA+caCNf04n9Rf3/PYlKtud+FOQfgJRNSSAv4wsi318fwRPlmudAWgtpyyK9+1wYHzhmHu69Zinci1RYPAvwbIaCukV0h9sNySKwBVtnxcIE4kSPBGwkoceOwk/+60cS/zm5zqyzW3dlUg77Ts5Xgz6ROtetoAwwMh/DGKOQ03aqX2/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ZKUQOojDr+QXD7dS0LTUtN2PlQejPEHQR585wKo+3zZPPkz2W2RGJZUAC+6N/GZPaSHkPvcjqpNcNSlH6tGRiNgqc2k3702FYoMHXdKmRhLbEQTmxMJ2RueNnOSQyN6aeUtANkLqxKFAu4zd1ZYcRQWymCYRmhGND6aRBHftXPxpnRTb3dXfWl6fZyA+oWFuGvixJ+GMm932lKM0H90sSV5/S1M366QlKtKTIahPJe3LmNOf/0wUHO6cejeCbm9PNbarnM2QfMVJBz+gk4FajyiB6OtAJYrfeif10f0dUY4kb9DfEf/jo/ywKomDwAAAAASUVORK5CYII=",ga=N({name:"myResources-guide",emits:["close"],setup(i,{emit:l}){const t=P({box:{height:"0px"},show:!1,steps:[{ele:"",eleRect:{},img:Z("myResourecs1.png"),handStyle:{top:"0.91rem"},imgStyle:{top:I(-4),left:I(-240),width:I(556),height:I(257)},btnsStyle:{bottom:I(30),left:I(-80)},eleRectPadding:{left:14,top:14,width:28,height:28},boxStyle:{borderRadius:"30px"}}],step:0}),u=A(!1),n=A({});(async()=>{var a;try{const c=await ye({guideTag:"teacher-guideInfo"});c.data?n.value=JSON.parse((a=c.data)==null?void 0:a.guideValue)||null:n.value={},console.log(n.value,"guideInfo.value"),n.value&&n.value.myResourcesGuide?u.value=!1:u.value=!0}catch(c){console.log(c)}})();const r=()=>{var c,g,d,m;const a=document.getElementById(`myResources-${t.step}`);if(a){const f=a.getBoundingClientRect(),k=((c=t.steps[t.step].eleRectPadding)==null?void 0:c.left)||0,W=((g=t.steps[t.step].eleRectPadding)==null?void 0:g.top)||0,h=((d=t.steps[t.step].eleRectPadding)==null?void 0:d.width)||0,S=((m=t.steps[t.step].eleRectPadding)==null?void 0:m.height)||0;t.box={left:f.x-k+"px",top:f.y-W+"px",width:f.width+h+"px",height:f.height+S+"px"},console.log(`coai-${t.step}`,t.box)}else o()},y=async a=>{try{if(a!=="myResources")return;n.value?n.value.classGuide=!1:n.value={classGuide:!1};try{await V({guideTag:"teacher-guideInfo",guideValue:JSON.stringify(n.value)})}catch(c){console.log(c)}t.step=0,r(),u.value=!0}catch(c){}};j(()=>{r(),window.addEventListener("resize",s),O.on("natural-resources-guide",a=>y(a))});const s=()=>{r()};ue(()=>{window.removeEventListener("resize",s),O.off("natural-resources-guide",y)});const o=()=>{if(t.step>=4){v();return}t.step=t.step+1,r()},v=async()=>{n.value?n.value.myResourcesGuide=!0:n.value={myResourcesGuide:!0};try{const a=await V({guideTag:"teacher-guideInfo",guideValue:JSON.stringify(n.value)})}catch(a){console.log(a)}u.value=!1};return()=>e(F,null,[u.value?re(e("div",{"onUpdate:show":a=>u.value=a,class:["n-modal-mask","n-modal-mask-guide"]},[e("div",{class:U.content,onClick:()=>o()},[e("div",{class:U.backBtn,onClick:a=>{a.stopPropagation(),v()}},[b("跳过")]),e("div",{class:U.box,style:{...t.box,...t.steps[t.step].boxStyle},id:`modeType-${t.step}`},[t.steps.map((a,c)=>{var g,d,m,f;return e("div",{onClick:k=>k.stopPropagation(),class:U.item,style:a.type=="bottom"?{display:c===t.step?"":"none",left:`${(g=a.eleRect)==null?void 0:g.left}px`,top:`-${(d=a.imgStyle)==null?void 0:d.height}`}:{display:c===t.step?"":"none",left:`${(m=a.eleRect)==null?void 0:m.left}px`,top:`${(f=t.box)==null?void 0:f.height}`}},[e("img",{class:U.img,style:a.imgStyle,src:a.img},null),e("div",{class:U.btns,style:a.btnsStyle},[t.step+1==t.steps.length?e(F,null,[e("div",{class:[U.endBtn],onClick:()=>v()},[b("完成")])]):e("div",{class:U.btn,onClick:()=>o()},[b("下一步 ("),t.step+1,b("/"),t.steps.length,b(")")])])])})])])]),[[de,u.value,"show"]]):null])}}),fa="_saveModal_p8hg8_1",ma="_uploadBtn_p8hg8_25",ha="_iconUploadAdd_p8hg8_47",ya="_btnGroup_p8hg8_57",Y={saveModal:fa,uploadBtn:ma,iconUploadAdd:ha,btnGroup:ya},va=N({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(i,{emit:l}){const t=`https://${i.bucketName}.ks3-cn-beijing.ksyuncs.com/`,u=ee(),n=A(!1),p=A(!1),r=A(),y=A(),s=P([]),o=A([]),v=A([]),a=async h=>{const S=h.file;let w=!0;const B=S.type.includes("image")?_.IMG:S.type.includes("audio")?_.SONG:S.type.includes("video")?_.VIDEO:"other";if(console.log(B,"type"),B==="other")return u.error("文件格式不支持"),!1;const E=B==="IMG"?2:B==="SONG"?20:500;if(E&&(w=S.file.size/1024/1024<E,!w)){const G=B==="IMG"?"图片":B==="SONG"?"音频":"视频";return u.error(`${G}大小不能超过${E}M`),!1}if(!w)return w;try{p.value=!0;const G=S.file.name,D=G.slice(G.lastIndexOf(".")),z=`${i.path}${Date.now()+S.id+D}`,K={filename:z,bucketName:i.bucketName,postData:{filename:z,acl:"public-read",key:z,unknowValueField:[]}},{data:te}=await be(K);s.push({id:S.id,tempFiileBuffer:S.file,policy:te.policy,signature:te.signature,acl:"public-read",key:z,KSSAccessKeyId:te.kssAccessKeyId,name:z})}catch(G){return p.value=!1,!1}return!0},c=h=>{g(h)},g=async h=>{const S=s.find(G=>G.id==h.file.id),w=t+S.key,B=Ee(w);let E="";B==="IMG"?E=w:B==="SONG"?E=Le.SONG_DEFAULT_COVER:B==="VIDEO"&&(E=await m(S.tempFiileBuffer)),v.value.push({coverImg:E,content:w,id:h.file.id,name:h.file.name?h.file.name.slice(0,h.file.name.lastIndexOf(".")):""}),h.file.url=w,n.value=!1,p.value=!1},d=h=>new Promise(S=>{const w=document.createElement("video");w.currentTime=1,w.src=URL.createObjectURL(h),w.addEventListener("loadeddata",function(){const B=document.createElement("canvas"),E=w.videoWidth,G=w.videoHeight;B.width=E,B.height=G,B.getContext("2d").drawImage(w,0,0,E,G),B.toBlob(D=>{S(D)})})}),m=async h=>{try{p.value=!0;const S=await d(h||r.value),w=`${i.path}${Date.now()+".png"}`,B={filename:w,bucketName:i.bucketName,postData:{filename:w,acl:"public-read",key:w,unknowValueField:[]}},{data:E}=await be(B),G={policy:E.policy,signature:E.signature,key:w,acl:"public-read",KSSAccessKeyId:E.kssAccessKeyId,name:w},D=new FormData;for(const K in G)D.append(K,G[K]);return D.append("file",S),await Oe.post(t,D),t+w}finally{p.value=!1}},f=async h=>{const S=v.value.findIndex(w=>w.id===h.file.id);return v.value.splice(S,1),p.value=!1,!0},k=Ie(()=>{let h=!1;return o.value.forEach(S=>{S.status!=="finished"&&(h=!0)}),h||o.value.length<=0}),W=async()=>{const h=[];o.value.forEach(S=>{const w=v.value.find(B=>B.id===S.id);w&&h.push(w)}),l("confrim",h)};return()=>e("div",{class:Y.saveModal},[e(je,{ref:y,action:t,data:h=>{const S=s.find(G=>G.id==h.file.id),{id:w,tempFiileBuffer:B,...E}=S;return{...E}},fileList:o.value,"onUpdate:fileList":h=>o.value=h,accept:".jpg,jpeg,.png,audio/mp3,video/mp4",multiple:!0,max:10,showFileList:!0,showPreviewButton:!0,onBeforeUpload:h=>a(h),onFinish:h=>{c(h)},onRemove:h=>f(h)},{default:()=>[e(We,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格式文件,单次最多支持"),e("br",null,null),b("上传10个文件")])])]})]}),e(x,{class:Y.btnGroup,justify:"center"},{default:()=>[e(R,{round:!0,onClick:()=>l("close")},{default:()=>[b("取消")]}),e(R,{round:!0,type:"primary",disabled:k.value,onClick:W},{default:()=>[b("确定")]})]})])}}),Aa=N({name:"share-resources",setup(){const i=ee();Be();const l=P({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=A(!1),u=async()=>{try{l.loading=!0;const{data:s}=await ge({...l.searchGroup,...l.pagination});l.loading=!1,l.pageTotal=Number(s.total);const o=s.rows||[],v=[];o.forEach(a=>{v.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})}),l.tableList=v||[],setTimeout(()=>{t.value=!0},500)}catch(s){l.loading=!1}},n=async s=>{try{await fe({materialId:s.id,favoriteFlag:s.isCollect?0:1,type:s.type}),s.isCollect=!s.isCollect}catch(o){}},p=async s=>{l.pagination.page=1,l.searchGroup=Object.assign(l.searchGroup,s),u()},r=async()=>{try{l.searchGroup.type==="MUSIC"?await Ae(l.editIds):await Ke(l.editIds),i.success("删除成功"),p(l.searchGroup),l.editIds=[]}catch(s){}},y=async()=>{try{l.searchGroup.type==="MUSIC"?await Ae([l.removeItem.id]):await Re({ids:l.removeItem.id}),i.success("删除成功"),p(l.searchGroup)}catch(s){}};return j(()=>{u()}),()=>e(F,null,[e(Xt,{onSearch:s=>p(s),onUpload:()=>{l.editList=[],l.saveStatus=!0},onUpdate:()=>{const s=[];if(l.tableList.forEach(o=>{l.editIds.indexOf(o.id)>-1&&s.push(o)}),l.editList=s||[],l.editList.length<=0){i.error("至少选择一条资源进行编辑");return}l.uploadStatus=!0},onEdit:s=>{l.editStatus=s,l.editStatus||(l.editIds=[])},onSelectAll:s=>{if(s){const o=[];l.tableList.forEach(v=>{o.push(v.id)}),l.editIds=o}else l.editIds=[]},onDelete:()=>{if(l.editIds.length<=0){i.error("至少选择一条资源进行删除");return}l.type="delete",l.removeContent="是否删除该资源?",l.removeVisiable=!0}},null),e(pe,{show:l.loading,"onUpdate:show":s=>l.loading=s,style:{"min-height":"50vh"}},{default:()=>[e("div",{class:C.list},[l.tableList.map(s=>e("div",{class:C.itemWrap},[e("div",{class:C.itemWrapBox},[e(X,{item:s,disabledMouseHover:!1,offShelf:!s.enableFlag,onOffShelf:()=>{l.type="remove",l.removeContent="该资源已下架,是否删除?",l.removeVisiable=!0,l.removeItem=s},onClick:o=>{o.type==="IMG"||!s.enableFlag||(l.show=!0,l.item=o)},onCollect:o=>n(o)},null),l.editStatus&&e("div",{class:[C.itemBg,l.editIds.includes(s.id)?C.itemBgChecked:""],onClick:()=>{const o=l.editIds.indexOf(s.id);o>-1?l.editIds.splice(o,1):l.editIds.push(s.id)}},[e("img",{src:l.editIds.includes(s.id)?pa:da,class:C.resourceDefault},null)])])])),!l.loading&&l.tableList.length<=0&&e(me,{style:{minHeight:"50vh"},description:"暂无资源"},null)])]}),e(oe,{page:l.pagination.page,"onUpdate:page":s=>l.pagination.page=s,pageSize:l.pagination.rows,"onUpdate:pageSize":s=>l.pagination.rows=s,pageTotal:l.pageTotal,"onUpdate:pageTotal":s=>l.pageTotal=s,onList:u},null),e(he,{show:l.show,"onUpdate:show":s=>l.show=s,item:l.item},null),e(J,{show:l.uploadStatus,"onUpdate:show":s=>l.uploadStatus=s,preset:"card",showIcon:!1,class:["modalTitle background",C.attendClassModal],title:l.editStatus?"修改资源":"上传资源",blockScroll:!1},{default:()=>[e(ra,{onClose:()=>l.uploadStatus=!1,onConfirm:()=>{l.editIds=[],l.editList=[],l.saveStatus=!1,p(l.searchGroup)},list:l.editList},null)]}),e(J,{show:l.saveStatus,"onUpdate:show":s=>l.saveStatus=s,preset:"card",showIcon:!1,class:["modalTitle background",C.attendClassSaveModal],title:"上传资源",blockScroll:!1},{default:()=>[e(va,{onClose:()=>l.saveStatus=!1,onConfrim:s=>{const o=s||[],v=[];o.forEach(a=>{v.push({subjectIds:null,openFlag:!1,coverImg:a.coverImg,title:a.name||"",type:Ee(a.content),enableFlag:1,content:a.content,id:null})}),l.editList=v,l.uploadStatus=!0,l.editStatus=!1}},null)]}),t.value?e(ga,null,null):null,e(J,{show:l.removeVisiable,"onUpdate:show":s=>l.removeVisiable=s,preset:"card",class:["modalTitle",C.removeVisiable],title:"提示"},{default:()=>[e("div",{class:C.studentRemove},[e("p",null,[l.removeContent]),e(x,{class:C.btnGroupModal,justify:"center"},{default:()=>[e(R,{round:!0,type:"primary",onClick:()=>{l.type==="remove"?y():r(),l.removeVisiable=!1}},{default:()=>[b("确定")]}),e(R,{round:!0,onClick:()=>l.removeVisiable=!1},{default:()=>[b("取消")]})]})])]})])}}),ba="_list_1mce6_1",Sa="_itemWrap_1mce6_11",wa="_itemWrapBox_1mce6_16",Ca="_searchGroup_1mce6_28",Ua="_btnType_1mce6_32",Ia="_inputSearch_1mce6_67",Ba="_searchCatatory_1mce6_91",Ra="_addTrain_1mce6_98",Ea="_spaceSection_1mce6_110",Ma="_collapseWrap_1mce6_116",Ga="_collaoseBtn_1mce6_122",ka="_isStart_1mce6_127",xa="_collapsSection_1mce6_130",Pa="_isHidden_1mce6_133",Fa="_hideButton_1mce6_137",L={list:ba,itemWrap:Sa,itemWrapBox:wa,searchGroup:Ca,btnType:Ua,inputSearch:Ia,searchCatatory:Ba,addTrain:Ra,spaceSection:Ea,collapseWrap:Ma,collaoseBtn:Ga,isStart:ka,collapsSection:xa,isHidden:Pa,hideButton:Fa};function Ce(i){return typeof i=="function"||Object.prototype.toString.call(i)==="[object Object]"&&!$(i)}const Na=N({name:"search-group",emits:["search"],setup(i,{emit:l}){const t=q(),u=A([]),n=P({type:"",name:"",bookVersionId:null,subjectId:null}),p=()=>{l("search",n)},r=A(),y=A([]),s=A(0),o=A(0),v=A(!1),a=A(!1),c=()=>{try{y.value=[...new Set(y.value)];let g=-1;y.value.forEach((d,m)=>{m===0?(o.value=1,g=d.offsetLeft):d.offsetLeft===g&&m!=0&&o.value++,v.value?d.style.display="block":o.value>1?d.style.display="none":d.style.display="block"}),a.value=!0}catch(g){}};return j(async()=>{u.value=[{label:"全部",value:""},...ie],await t.getMusicSheetCategory(),await t.getSubjects()}),()=>{let g,d;return e("div",{class:L.searchGroup},[e("div",{class:L.searchCatatory},[e(x,{size:"small",class:L.btnType},Ce(g=u.value.map(m=>e(R,{type:n.type===m.value?"primary":"default",secondary:n.type!==m.value,round:!0,size:"small",focusable:!1,onClick:()=>{n.type=m.value,p(),ce(()=>{n.type==="MUSIC"?(s.value=r.value.offsetHeight,c()):y.value=[]})}},{default:()=>[m.label]})))?g:{default:()=>[g]})]),e(H,{labelAlign:"left",labelPlacement:"left"},{default:()=>[e(Q,{label:"乐器:"},{default:()=>[e(x,{class:L.spaceSection},Ce(d=t.getSubjectAllList.map(m=>e(R,{secondary:n.subjectId===m.id,quaternary:n.subjectId!==m.id,strong:!0,focusable:!1,type:n.subjectId===m.id?"primary":"default",onClick:()=>{n.subjectId=m.id,p()}},{default:()=>[m.name]})))?d:{default:()=>[d]})]}),e(ne,{class:L.inputSearch,round:!0,onSearch:m=>{n.name=m,p()}},null)]})])}}}),Ta=N({name:"myColloge-guide",emits:["close"],setup(i,{emit:l}){const t=P({box:{height:"0px"},show:!1,steps:[{ele:"",img:Z("myColloge1.png"),imgStyle:{top:I(-4),left:I(630),width:I(458),height:I(291)},btnsStyle:{bottom:I(96),left:I(790)},eleRectPadding:{left:7,top:7,width:14,height:14},type:"bottom"}],step:0}),u=A(!1),n=A({});(async()=>{var a;try{const c=await ye({guideTag:"teacher-guideInfo"});c.data?n.value=JSON.parse((a=c.data)==null?void 0:a.guideValue)||null:n.value={},n.value&&n.value.myColloge?u.value=!1:u.value=!0}catch(c){console.log(c)}})();const r=()=>{var c,g,d,m;const a=document.getElementById(`myColloge-${t.step}`);if(a){const f=a.getBoundingClientRect(),k=((c=t.steps[t.step].eleRectPadding)==null?void 0:c.left)||0,W=((g=t.steps[t.step].eleRectPadding)==null?void 0:g.top)||0,h=((d=t.steps[t.step].eleRectPadding)==null?void 0:d.width)||0,S=((m=t.steps[t.step].eleRectPadding)==null?void 0:m.height)||0;t.box={left:f.x-k+"px",top:f.y-W+"px",width:f.width+h+"px",height:f.height+S+"px"},console.log(`coai-${t.step}`,t.box)}else o()},y=async a=>{try{if(console.log(a),a!=="myCollect")return;console.log(a,"name"),n.value?n.value.myColloge=!1:n.value={myColloge:!1};try{await V({guideTag:"teacher-guideInfo",guideValue:JSON.stringify(n.value)})}catch(c){console.log(c)}t.step=0,r(),u.value=!0}catch(c){}};j(()=>{r(),window.addEventListener("resize",s),O.on("natural-resources-guide",a=>y(a))});const s=()=>{r()};ue(()=>{window.removeEventListener("resize",s),O.off("natural-resources-guide",y)});const o=()=>{if(t.step>=4){v();return}t.step=t.step+1,r()},v=async()=>{n.value?n.value.myColloge=!0:n.value={myColloge:!0};try{const a=await V({guideTag:"teacher-guideInfo",guideValue:JSON.stringify(n.value)})}catch(a){console.log(a)}u.value=!1};return()=>e(F,null,[u.value?re(e("div",{"onUpdate:show":a=>u.value=a,class:["n-modal-mask","n-modal-mask-guide"]},[e("div",{class:U.content,onClick:()=>o()},[e("div",{class:U.backBtn,onClick:a=>{a.stopPropagation(),v()}},[b("跳过")]),e("div",{class:U.box,style:{...t.box},id:`modeType-${t.step}`},[t.steps.map((a,c)=>{var g,d,m,f;return e("div",{onClick:k=>k.stopPropagation(),class:U.item,style:a.type=="bottom"?{display:c===t.step?"":"none",left:`${(g=a.eleRect)==null?void 0:g.left}px`,top:`-${(d=a.imgStyle)==null?void 0:d.height}`}:{display:c===t.step?"":"none",left:`${(m=a.eleRect)==null?void 0:m.left}px`,top:`${(f=t.box)==null?void 0:f.height}`}},[e("img",{class:U.img,style:a.imgStyle,src:a.img},null),e("div",{class:U.btns,style:a.btnsStyle},[t.step+1==t.steps.length?e(F,null,[e("div",{class:[U.endBtn],onClick:()=>v()},[b("完成")])]):e("div",{class:U.btn,onClick:()=>o()},[b("下一步 ("),t.step+1,b("/"),t.steps.length,b(")")])])])})])])]),[[de,u.value,"show"]]):null])}}),ja=N({name:"share-resources",setup(){const i=ee(),l=Be(),t=P({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:s}=await ge({...t.searchGroup,...t.pagination});t.loading=!1,t.pageTotal=Number(s.total);const o=s.rows||[],v=[];o.forEach(a=>{v.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=v||[],setTimeout(()=>{n.value=!0},500)}catch(s){t.loading=!1}},n=A(!1),p=async s=>{t.pagination.page=1,t.searchGroup=Object.assign(t.searchGroup,s),u()},r=async s=>{try{await fe({materialId:s.id,favoriteFlag:s.isCollect?0:1,type:s.type}),s.isCollect=!s.isCollect}catch(o){}},y=async s=>{try{l.warning({title:"提示",content:"该资源已下架,是否删除?",positiveText:"确定",negativeText:"取消",onPositiveClick:async()=>{await Re({id:s.id}),i.success("删除成功"),p(t.searchGroup)}})}catch(o){}};return j(()=>{u()}),()=>e(F,null,[e(Na,{onSearch:s=>p(s)},null),e(pe,{show:t.loading,"onUpdate:show":s=>t.loading=s,style:{"min-height":"50vh"}},{default:()=>[e("div",{class:L.list,id:"myColloge-0"},[t.tableList.map(s=>e("div",{class:L.itemWrap},[e("div",{class:L.itemWrapBox},[e(X,{item:s,offShelf:!s.enableFlag,onOffShelf:()=>y(s),disabledMouseHover:!1,onClick:o=>{o.type==="IMG"||!s.enableFlag||(t.show=!0,t.item=o)},onCollect:o=>r(o)},null)])])),!t.loading&&t.tableList.length<=0&&e(me,{style:{minHeight:"50vh"},description:"暂无收藏资源"},null)])]}),e(oe,{page:t.pagination.page,"onUpdate:page":s=>t.pagination.page=s,pageSize:t.pagination.rows,"onUpdate:pageSize":s=>t.pagination.rows=s,pageTotal:t.pageTotal,"onUpdate:pageTotal":s=>t.pageTotal=s,onList:u},null),e(he,{show:t.show,"onUpdate:show":s=>t.show=s,item:t.item},null),n.value?e(Ta,null,null):null])}}),qa=N({name:"student-studentList",setup(){const i=A("myResources");return j(()=>{O.on("teacher-guideInfo",l=>{l==="natural-resources"&&O.emit("natural-resources-guide",i.value)})}),()=>e("div",{class:se.listWrap},[e(De,{defaultValue:"myResources",paneClass:se.paneTitle,justifyContent:"center",paneWrapperClass:se.paneWrapperContainer,"onUpdate:value":[l=>{i.value=l},l=>i.value=l],value:i.value},{default:()=>[e(ae,{name:"myResources",tab:"我的资源"},{default:()=>[e(Aa,null,null)]}),e(ae,{name:"shareResources",tab:"共享资源"},{default:()=>[e(vt,null,null)],tab:()=>e("span",{id:"shareResources-0"},[b("共享资源")])}),e(ae,{name:"myCollect",tab:"我的收藏"},{default:()=>[e(ja,null,null)]})]})])}});export{qa as default};