1 |
- import{j as Fe,C as X,n as Ae,o as Me,p as Ge,r as ke}from"./isCollaose-22cdac63-1694098095353.js";import{P as oe}from"./index-f3edabcd-1694098095353.js";import{T as ne}from"./index-8e662bc5-1694098095353.js";import{r as ie}from"./searchArray-d34018c7-1694098095353.js";import{u as q}from"./catchData-94fc1d75-1694098095353.js";import{d as N,e as x,r as v,n as j,f as e,w as k,j as B,E as ce,N as H,g as Q,t as le,aU as $,R as I,M as D,O as ue,S as re,U as de,k as b,F as P,A as pe,x as Ue,v as J,b as ee,L as Ie,df as xe,h as Pe,W as Ne,dg as _,dh as Te,C as je,di as We,P as Le,dj as De,m as Ee,p as Oe,q as ae}from"./index-c6117d5a-1694098095353.js";import{A as ze,m as ge,f as fe,i as _e,a as Qe,b as Ve,c as ve,d as Ke,e as Be}from"./index-1ebe8776-1694098095353.js";import{T as he}from"./index-67525603-1694098095353.js";import{C as me,N as Ye}from"./contants-bcad6247-1694098095353.js";import{g as Z,s as U,a as ye,b as V}from"./api-7124eb7a-1694098095353.js";import{p as be}from"./index-e0b82089-1694098095353.js";import"./index-2a4e5e1e-1694098095353.js";import"./Slider-9142c741-1694098095353.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",ht="_hideButton_vwz07_138",F={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:ht};function Se(n){return typeof n=="function"||Object.prototype.toString.call(n)==="[object Object]"&&!$(n)}const mt=N({name:"search-group",emits:["search","add"],expose:["init"],setup(n,{emit:s}){const t=q(),u=x({type:"MUSIC",name:"",bookVersionId:null,subjectId:null}),i=()=>{s("search",u)},p=v(),r=v([]),y=v(0),l=v(0),o=v(!1),A=v(!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((h,f)=>{f===0?(l.value=1,d=h.offsetLeft):h.offsetLeft===d&&f!=0&&l.value++,o.value?h.style.display="block":l.value>1?h.style.display="none":h.style.display="block"}),A.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,h;return e("div",{class:F.searchGroup},[e("div",{class:[F.searchCatatory]},[e(k,{size:"small",class:F.btnType},Se(d=ie.map(f=>e(B,{type:u.type===f.value?"primary":"default",secondary:u.type!==f.value,round:!0,size:"small",focusable:!1,onClick:()=>{u.type=f.value,i(),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:[F.collapsSection]},[e(Q,{label:"教材:"},{default:()=>[e("div",{class:[F.collapseWrap,A.value?"":F.hideButton,o.value?"":F.isHidden],ref:p},[e(k,{class:[F.spaceSection]},{default:()=>[t.getAllMusicCategories.map(f=>e(B,{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,i()}},{default:()=>[f.name]})),l.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:Fe,class:[F.collaoseBtn,o.value?F.isStart:""]},null)])]})])]})]),e(Q,{label:"乐器:"},{default:()=>[e(k,{class:F.spaceSection},Se(h=t.getSubjectAllList.map(f=>e(B,{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,i()}},{default:()=>[f.name]})))?h:{default:()=>[h]})]}),e(ne,{class:F.inputSearch,round:!0,onSearch:f=>{u.name=f,i()}},null)]})])}}}),yt=N({name:"shareResources-guide",emits:["close"],setup(n,{emit:s}){const t=x({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=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,g,d,h;const a=document.getElementById("shareResources-".concat(t.step));if(a){const f=a.getBoundingClientRect(),G=((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,m=((d=t.steps[t.step].eleRectPadding)==null?void 0:d.width)||0,S=((h=t.steps[t.step].eleRectPadding)==null?void 0:h.height)||0;"shareResources-".concat(t.step)=="shareResources-1"?(t.box={left:f.x-G+"px",top:f.y-W+"px",width:(f.width+m)*2+m+"px",height:f.height+S+"px"},console.log(t.box.width,"---",f.width)):t.box={left:f.x-G+"px",top:f.y-W+"px",width:f.width+m+"px",height:f.height+S+"px"},console.log("coai-".concat(t.step),t.box)}else o()},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),D.on("natural-resources-guide",a=>y(a))});const l=()=>{r()};ue(()=>{window.removeEventListener("resize",l),D.off("natural-resources-guide",y)});const o=()=>{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(P,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(),A()}},[b("跳过")]),e("div",{class:U.box,style:{...t.box,...t.steps[t.step].boxStyle},id:"modeType-".concat(t.step)},[t.steps.map((a,c)=>{var g,d,h,f;return e("div",{onClick:G=>G.stopPropagation(),class:U.item,style:a.type=="bottom"?{display:c===t.step?"":"none",left:"".concat((g=a.eleRect)==null?void 0:g.left,"px"),top:"-".concat((d=a.imgStyle)==null?void 0:d.height)}:{display:c===t.step?"":"none",left:"".concat((h=a.eleRect)==null?void 0:h.left,"px"),top:"".concat((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(P,null,[e("div",{class:[U.endBtn],onClick:()=>A()},[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])}}),At=N({name:"share-resources",setup(){const n=x({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{n.loading=!0;const{data:r}=await ge({...n.searchGroup,...n.pagination});n.loading=!1,n.pageTotal=Number(r.total);const y=r.rows||[],l=[];y.forEach(o=>{l.push({id:o.id,coverImg:o.coverImg,type:o.type,title:o.name,isCollect:!!o.favoriteFlag,isSelected:o.sourceFrom==="PLATFORM",content:o.content})}),n.tableList=l||[],setTimeout(()=>{s.value=!0},500)}catch(r){n.loading=!1}},i=async r=>{n.pagination.page=1,n.searchGroup=Object.assign(n.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(P,null,[e(mt,{ref:t,onSearch:r=>i(r),onAdd:()=>n.teachingStatus=!0},null),e(pe,{show:n.loading,"onUpdate:show":r=>n.loading=r,style:{"min-height":"50vh"}},{default:()=>[e("div",{class:F.list},[n.tableList.map((r,y)=>e("div",{class:F.itemWrap},[e("div",{class:F.itemWrapBox},[y==0?e(X,Ue({id:"shareResources-1"},{item:r,disabledMouseHover:!1,onClick:l=>{l.type!=="IMG"&&(n.show=!0,n.item=l)},onCollect:l=>p(l)}),null):e(X,{item:r,disabledMouseHover:!1,onClick:l=>{l.type!=="IMG"&&(n.show=!0,n.item=l)},onCollect:l=>p(l)},null)])])),!n.loading&&n.tableList.length<=0&&e(he,{style:{minHeight:"50vh"},description:"暂无共享资源"},null)])]}),e(oe,{page:n.pagination.page,"onUpdate:page":r=>n.pagination.page=r,pageSize:n.pagination.rows,"onUpdate:pageSize":r=>n.pagination.rows=r,pageTotal:n.pageTotal,"onUpdate:pageTotal":r=>n.pageTotal=r,onList:u},null),e(me,{show:n.show,"onUpdate:show":r=>n.show=r,item:n.item},null),e(J,{show:n.teachingStatus,"onUpdate:show":r=>n.teachingStatus=r,preset:"card",showIcon:!1,class:["modalTitle background",F.teachingModal],title:"自定义教材",blockScroll:!1},{default:()=>[e(ze,{onClose:()=>n.teachingStatus=!1},null)]}),s.value?e(yt,null,null):null])}}),vt="_list_1nw8j_1",bt="_searchGroup_1nw8j_10",St="_btnType_1nw8j_14",Ct="_inputSearch_1nw8j_50",wt="_searchCatatory_1nw8j_74",Ut="_btnGroup_1nw8j_81",It="_addTrain_1nw8j_84",Et="_error_1nw8j_92",Bt="_iconUpload_1nw8j_99",Rt="_iconEdit_1nw8j_103",Ft="_iconSelectAll_1nw8j_107",Mt="_iconDelete_1nw8j_111",Gt="_iconPen_1nw8j_115",kt="_itemWrap_1nw8j_119",xt="_itemWrapBox_1nw8j_124",Pt="_itemBg_1nw8j_136",Nt="_itemBgChecked_1nw8j_145",Tt="_resourceDefault_1nw8j_148",jt="_spaceSection_1nw8j_155",Wt="_attendClassModal_1nw8j_161",Lt="_attendClassSaveModal_1nw8j_167",Dt="_removeVisiable_1nw8j_173",Ot="_studentRemove_1nw8j_179",zt="_btnGroupModal_1nw8j_191",w={list:vt,searchGroup:bt,btnType:St,inputSearch:Ct,searchCatatory:wt,btnGroup:Ut,addTrain:It,error:Et,iconUpload:Bt,iconEdit:Rt,iconSelectAll:Ft,iconDelete:Mt,iconPen:Gt,itemWrap:kt,itemWrapBox:xt,itemBg:Pt,itemBgChecked:Nt,resourceDefault:Tt,spaceSection:jt,attendClassModal:Wt,attendClassSaveModal:Lt,removeVisiable:Dt,studentRemove:Ot,btnGroupModal:zt},_t="data:image/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xN29SssUhRMgpaswEQplSSsuxHLed93EdBTmY0dGipd/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 Ce(n){return typeof n=="function"||Object.prototype.toString.call(n)==="[object Object]"&&!$(n)}const Xt=N({name:"search-group",emits:["search","upload","edit","selectAll","delete","update"],setup(n,{emit:s}){const t=v([]),u=q(),i=x({type:"MUSIC",name:"",bookVersionId:null,subjectId:null}),p=x({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(k,{size:"small",class:w.btnType},Ce(y=t.value.map(o=>e(B,{type:i.type===o.value?"primary":"default",secondary:i.type!==o.value,round:!0,size:"small",focusable:!1,onClick:()=>{i.type!==o.value&&(p.isEdit=!1,p.isSelectAll=!1,s("edit",p.isEdit)),i.type=o.value,r()}},{default:()=>[o.label]})))?y:{default:()=>[y]}),e(k,{size:"small",class:w.btnGroup},{default:()=>[p.isEdit?e(P,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?Vt:Kt,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:Jt,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:Yt,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(P,null,[e(B,Ue({type:"primary",class:w.addTrain,focusable:!1},{id:"myResources-0"},{strong:!0,onClick:()=>s("upload")}),{default:()=>[e("img",{src:_t,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:Qt,class:w.iconEdit},null),b("编辑资源")]})])]})]),e(H,{labelAlign:"left",labelPlacement:"left"},{default:()=>[e(Q,{label:"乐器:"},{default:()=>[e(k,{class:w.spaceSection},Ce(l=u.getSubjectAllList.map(o=>e(B,{secondary:i.subjectId===o.id,quaternary:i.subjectId!==o.id,strong:!0,focusable:!1,type:i.subjectId===o.id?"primary":"default",onClick:()=>{i.subjectId!==o.id&&(p.isEdit=!1,p.isSelectAll=!1,s("edit",p.isEdit)),i.subjectId=o.id,r()}},{default:()=>[o.name]})))?l:{default:()=>[l]})]}),e(ne,{class:w.inputSearch,round:!0,onSearch:o=>{i.name=o,r()}},null)]})])}}}),Zt="_uploadModal_y0hl7_1",qt="_formModal_y0hl7_4",Ht="_formSpace_y0hl7_8",$t="_previewModal_y0hl7_11",ea="_image_y0hl7_23",ta="_titleType_y0hl7_32",aa="_iconUploadDelete_y0hl7_40",sa="_commonType_y0hl7_49",la="_formItem_y0hl7_72",oa="_btnGroup_y0hl7_96",na="_uploadFile_y0hl7_103",ia="_uploadBtn_y0hl7_110",ca="_iconUploadAdd_y0hl7_127",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(n){return typeof n=="function"||Object.prototype.toString.call(n)==="[object Object]"&&!$(n)}const Re=n=>n.indexOf(".mp3")>-1?_.SONG:n.indexOf(".mp4")>-1?_.VIDEO:_.IMG,ra=N({name:"upload-modal",props:{list:{type:Array,default:()=>[]},editStatus:{type:Boolean,default:!0}},emits:["close","confirm"],setup(n,{emit:s}){const t=q(),u=v(),i=ee();v(),v([]);const p=x({list:[],uploading:!1,uploadUrl:"",name:"",subjectIds:[]}),r=a=>{let c=Ae;switch(a){case"IMG":c=Ae;break;case"VIDEO":c=ke;break;case"SONG":c=Ge;break;case"MUSIC":c=Me;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=[],i.success("保存成功"),s("close",!0),s("confirm")}catch(g){}p.uploading=!1})},l=a=>{p.list.splice(a,1)},o=Ie(()=>n.list.length>0);j(async()=>{const a=n.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 A=(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(k,{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:()=>l(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(xe,{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(g,".name"),rule:[{required:!0,message:"请输入资源名称",trigger:["input","blur"]}]},{default:()=>[e(Pe,{value:c.name,"onUpdate:value":d=>c.name=d,placeholder:"请输入资源名称",maxlength:25,clearable:!0},null)]}),e(Q,{path:"list[".concat(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(P,null,[e(B,{text:!0,style:" --n-width: 100% ",onClick:()=>A(c,t.getSubjectList)},{default:()=>[b("全选")]})])})]})])))?a:{default:()=>[a]})]})]}),e(k,{class:T.btnGroup,justify:"center"},{default:()=>[e(B,{round:!0,onClick:()=>s("close")},{default:()=>[n.editStatus?"取消":"上一步"]}),e(B,{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/+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mo9AXgD2ihFDa1C1HpH3SKnAcfXp6eSMZYAzB3x1Lf0iPjqjHZKUQOojDr+QXD7dS0LTUtN2PlQejPEHQR585wKo+3zZPPkz2W2RGJZUAC+6N/GZPaSHkPvcjqpNcNSlH6tGRiNgqc2k3702FYoMHXdKmRhLbEQTmxMJ2RueNnOSQyN6aeUtANkLqxKFAu4zd1ZYcRQWymCYRmhGND6aRBHftXPxpnRTb3dXfWl6fZyA+oWFuGvixJ+GMm932lKM0H90sSV5/S1M366QlKtKTIahPJe3LmNOf/0wUHO6cejeCbm9PNbarnM2QfMVJBz+gk4FajyiB6OtAJYrfeif10f0dUY4kb9DfEf/jo/ywKomDwAAAAASUVORK5CYII=",ga=N({name:"myResources-guide",emits:["close"],setup(n,{emit:s}){const t=x({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=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,g,d,h;const a=document.getElementById("myResources-".concat(t.step));if(a){const f=a.getBoundingClientRect(),G=((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,m=((d=t.steps[t.step].eleRectPadding)==null?void 0:d.width)||0,S=((h=t.steps[t.step].eleRectPadding)==null?void 0:h.height)||0;t.box={left:f.x-G+"px",top:f.y-W+"px",width:f.width+m+"px",height:f.height+S+"px"},console.log("coai-".concat(t.step),t.box)}else o()},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),D.on("natural-resources-guide",a=>y(a))});const l=()=>{r()};ue(()=>{window.removeEventListener("resize",l),D.off("natural-resources-guide",y)});const o=()=>{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(P,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(),A()}},[b("跳过")]),e("div",{class:U.box,style:{...t.box,...t.steps[t.step].boxStyle},id:"modeType-".concat(t.step)},[t.steps.map((a,c)=>{var g,d,h,f;return e("div",{onClick:G=>G.stopPropagation(),class:U.item,style:a.type=="bottom"?{display:c===t.step?"":"none",left:"".concat((g=a.eleRect)==null?void 0:g.left,"px"),top:"-".concat((d=a.imgStyle)==null?void 0:d.height)}:{display:c===t.step?"":"none",left:"".concat((h=a.eleRect)==null?void 0:h.left,"px"),top:"".concat((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(P,null,[e("div",{class:[U.endBtn],onClick:()=>A()},[b("完成")])]):e("div",{class:U.btn,onClick:()=>o()},[b("下一步 ("),t.step+1,b("/"),t.steps.length,b(")")])])])})])])]),[[de,u.value,"show"]]):null])}}),fa="_saveModal_9enii_1",ha="_uploadBtn_9enii_25",ma="_iconUploadAdd_9enii_47",ya="_btnGroup_9enii_57",Y={saveModal:fa,uploadBtn:ha,iconUploadAdd:ma,btnGroup:ya},Aa=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(n,{emit:s}){const t="https://".concat(n.bucketName,".ks3-cn-beijing.ksyuncs.com/"),u=ee(),i=v(!1),p=v(!1),r=v(),y=v(),l=x([]),o=v([]),A=v([]),a=async m=>{const S=m.file;let C=!0;const E=S.type.includes("image")?_.IMG:S.type.includes("audio")?_.SONG:S.type.includes("video")?_.VIDEO:"other";if(console.log(E,"type"),E==="other")return u.error("文件格式不支持"),!1;const R=E==="IMG"?2:E==="SONG"?20:500;if(R&&(C=S.file.size/1024/1024<R,!C)){const M=E==="IMG"?"图片":E==="SONG"?"音频":"视频";return u.error("".concat(M,"大小不能超过").concat(R,"M")),!1}if(!C)return C;try{p.value=!0;const M=S.file.name,O=M.slice(M.lastIndexOf(".")),z="".concat(n.path).concat(Date.now()+S.id+O),K={filename:z,bucketName:n.bucketName,postData:{filename:z,acl:"public-read",key:z,unknowValueField:[]}},{data:te}=await be(K);l.push({id:S.id,tempFiileBuffer:S.file,policy:te.policy,signature:te.signature,acl:"public-read",key:z,KSSAccessKeyId:te.kssAccessKeyId,name:z})}catch(M){return p.value=!1,!1}return!0},c=m=>{g(m)},g=async m=>{const S=l.find(M=>M.id==m.file.id),C=t+S.key,E=Re(C);let R="";E==="IMG"?R=C:E==="SONG"?R=Le.SONG_DEFAULT_COVER:E==="VIDEO"&&(R=await h(S.tempFiileBuffer)),A.value.push({coverImg:R,content:C,id:m.file.id,name:m.file.name?m.file.name.slice(0,m.file.name.lastIndexOf(".")):""}),m.file.url=C,i.value=!1,p.value=!1},d=m=>new Promise(S=>{const C=document.createElement("video");C.currentTime=1,C.src=URL.createObjectURL(m),C.addEventListener("loadeddata",function(){const E=document.createElement("canvas"),R=C.videoWidth,M=C.videoHeight;E.width=R,E.height=M,E.getContext("2d").drawImage(C,0,0,R,M),E.toBlob(O=>{S(O)})})}),h=async m=>{try{p.value=!0;const S=await d(m||r.value),C="".concat(n.path).concat(Date.now()+".png"),E={filename:C,bucketName:n.bucketName,postData:{filename:C,acl:"public-read",key:C,unknowValueField:[]}},{data:R}=await be(E),M={policy:R.policy,signature:R.signature,key:C,acl:"public-read",KSSAccessKeyId:R.kssAccessKeyId,name:C},O=new FormData;for(const K in M)O.append(K,M[K]);return O.append("file",S),await De.post(t,O),t+C}finally{p.value=!1}},f=async m=>{const S=A.value.findIndex(C=>C.id===m.file.id);return A.value.splice(S,1),p.value=!1,!0},G=Ie(()=>{let m=!1;return o.value.forEach(S=>{S.status!=="finished"&&(m=!0)}),m||o.value.length<=0}),W=async()=>{const m=[];o.value.forEach(S=>{const C=A.value.find(E=>E.id===S.id);C&&m.push(C)}),s("confrim",m)};return()=>e("div",{class:Y.saveModal},[e(je,{ref:y,action:t,data:m=>{const S=l.find(M=>M.id==m.file.id),{id:C,tempFiileBuffer:E,...R}=S;return{...R}},fileList:o.value,"onUpdate:fileList":m=>o.value=m,accept:".jpg,jpeg,.png,audio/mp3,video/mp4",multiple:!0,max:10,showFileList:!0,showPreviewButton:!0,onBeforeUpload:m=>a(m),onFinish:m=>{c(m)},onRemove:m=>f(m)},{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(k,{class:Y.btnGroup,justify:"center"},{default:()=>[e(B,{round:!0,onClick:()=>s("close")},{default:()=>[b("取消")]}),e(B,{round:!0,type:"primary",disabled:G.value,onClick:W},{default:()=>[b("确定")]})]})])}}),va=N({name:"share-resources",setup(){const n=ee();Ee();const s=x({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 o=l.rows||[],A=[];o.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(o){}},p=async l=>{s.pagination.page=1,s.searchGroup=Object.assign(s.searchGroup,l),u()},r=async()=>{try{s.searchGroup.type==="MUSIC"?await ve(s.editIds):await Ke(s.editIds),n.success("删除成功"),p(s.searchGroup),s.editIds=[]}catch(l){}},y=async()=>{try{s.searchGroup.type==="MUSIC"?await ve([s.removeItem.id]):await Be({ids:s.removeItem.id}),n.success("删除成功"),p(s.searchGroup)}catch(l){}};return j(()=>{u()}),()=>e(P,null,[e(Xt,{onSearch:l=>p(l),onUpload:()=>{s.editList=[],s.saveStatus=!0},onUpdate:()=>{const l=[];if(s.tableList.forEach(o=>{s.editIds.indexOf(o.id)>-1&&l.push(o)}),s.editList=l||[],s.editList.length<=0){n.error("至少选择一条资源进行编辑");return}s.uploadStatus=!0},onEdit:l=>{s.editStatus=l,s.editStatus||(s.editIds=[])},onSelectAll:l=>{if(l){const o=[];s.tableList.forEach(A=>{o.push(A.id)}),s.editIds=o}else s.editIds=[]},onDelete:()=>{if(s.editIds.length<=0){n.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:o=>{o.type==="IMG"||!l.enableFlag||(s.show=!0,s.item=o)},onCollect:o=>i(o)},null),s.editStatus&&e("div",{class:[w.itemBg,s.editIds.includes(l.id)?w.itemBgChecked:""],onClick:()=>{const o=s.editIds.indexOf(l.id);o>-1?s.editIds.splice(o,1):s.editIds.push(l.id)}},[e("img",{src:s.editIds.includes(l.id)?pa:da,class:w.resourceDefault},null)])])])),!s.loading&&s.tableList.length<=0&&e(he,{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(me,{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(ra,{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(Aa,{onClose:()=>s.saveStatus=!1,onConfrim:l=>{const o=l||[],A=[];o.forEach(a=>{A.push({subjectIds:null,openFlag:!1,coverImg:a.coverImg,title:a.name||"",type:Re(a.content),enableFlag:1,content:a.content,id:null})}),s.editList=A,s.uploadStatus=!0,s.editStatus=!1}},null)]}),t.value?e(ga,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(k,{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("取消")]})]})])]})])}}),ba="_list_1mce6_1",Sa="_itemWrap_1mce6_11",Ca="_itemWrapBox_1mce6_16",wa="_searchGroup_1mce6_28",Ua="_btnType_1mce6_32",Ia="_inputSearch_1mce6_67",Ea="_searchCatatory_1mce6_91",Ba="_addTrain_1mce6_98",Ra="_spaceSection_1mce6_110",Fa="_collapseWrap_1mce6_116",Ma="_collaoseBtn_1mce6_122",Ga="_isStart_1mce6_127",ka="_collapsSection_1mce6_130",xa="_isHidden_1mce6_133",Pa="_hideButton_1mce6_137",L={list:ba,itemWrap:Sa,itemWrapBox:Ca,searchGroup:wa,btnType:Ua,inputSearch:Ia,searchCatatory:Ea,addTrain:Ba,spaceSection:Ra,collapseWrap:Fa,collaoseBtn:Ma,isStart:Ga,collapsSection:ka,isHidden:xa,hideButton:Pa};function we(n){return typeof n=="function"||Object.prototype.toString.call(n)==="[object Object]"&&!$(n)}const Na=N({name:"search-group",emits:["search"],setup(n,{emit:s}){const t=q(),u=v([]),i=x({type:"",name:"",bookVersionId:null,subjectId:null}),p=()=>{s("search",i)},r=v(),y=v([]),l=v(0),o=v(0),A=v(!1),a=v(!1),c=()=>{try{y.value=[...new Set(y.value)];let g=-1;y.value.forEach((d,h)=>{h===0?(o.value=1,g=d.offsetLeft):d.offsetLeft===g&&h!=0&&o.value++,A.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(k,{size:"small",class:L.btnType},we(g=u.value.map(h=>e(B,{type:i.type===h.value?"primary":"default",secondary:i.type!==h.value,round:!0,size:"small",focusable:!1,onClick:()=>{i.type=h.value,p(),ce(()=>{i.type==="MUSIC"?(l.value=r.value.offsetHeight,c()):y.value=[]})}},{default:()=>[h.label]})))?g:{default:()=>[g]})]),e(H,{labelAlign:"left",labelPlacement:"left"},{default:()=>[e(Q,{label:"乐器:"},{default:()=>[e(k,{class:L.spaceSection},we(d=t.getSubjectAllList.map(h=>e(B,{secondary:i.subjectId===h.id,quaternary:i.subjectId!==h.id,strong:!0,focusable:!1,type:i.subjectId===h.id?"primary":"default",onClick:()=>{i.subjectId=h.id,p()}},{default:()=>[h.name]})))?d:{default:()=>[d]})]}),e(ne,{class:L.inputSearch,round:!0,onSearch:h=>{i.name=h,p()}},null)]})])}}}),Ta=N({name:"myColloge-guide",emits:["close"],setup(n,{emit:s}){const t=x({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=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,g,d,h;const a=document.getElementById("myColloge-".concat(t.step));if(a){const f=a.getBoundingClientRect(),G=((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,m=((d=t.steps[t.step].eleRectPadding)==null?void 0:d.width)||0,S=((h=t.steps[t.step].eleRectPadding)==null?void 0:h.height)||0;t.box={left:f.x-G+"px",top:f.y-W+"px",width:f.width+m+"px",height:f.height+S+"px"},console.log("coai-".concat(t.step),t.box)}else o()},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),D.on("natural-resources-guide",a=>y(a))});const l=()=>{r()};ue(()=>{window.removeEventListener("resize",l),D.off("natural-resources-guide",y)});const o=()=>{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(P,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(),A()}},[b("跳过")]),e("div",{class:U.box,style:{...t.box},id:"modeType-".concat(t.step)},[t.steps.map((a,c)=>{var g,d,h,f;return e("div",{onClick:G=>G.stopPropagation(),class:U.item,style:a.type=="bottom"?{display:c===t.step?"":"none",left:"".concat((g=a.eleRect)==null?void 0:g.left,"px"),top:"-".concat((d=a.imgStyle)==null?void 0:d.height)}:{display:c===t.step?"":"none",left:"".concat((h=a.eleRect)==null?void 0:h.left,"px"),top:"".concat((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(P,null,[e("div",{class:[U.endBtn],onClick:()=>A()},[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 n=ee(),s=Ee(),t=x({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 o=l.rows||[],A=[];o.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(o){}},y=async l=>{try{s.warning({title:"提示",content:"该资源已下架,是否删除?",positiveText:"确定",negativeText:"取消",onPositiveClick:async()=>{await Be({id:l.id}),n.success("删除成功"),p(t.searchGroup)}})}catch(o){}};return j(()=>{u()}),()=>e(P,null,[e(Na,{onSearch:l=>p(l)},null),e(pe,{show:t.loading,"onUpdate:show":l=>t.loading=l,style:{"min-height":"50vh"}},{default:()=>[e("div",{class:L.list,id:"myColloge-0"},[t.tableList.map(l=>e("div",{class:L.itemWrap},[e("div",{class:L.itemWrapBox},[e(X,{item:l,offShelf:!l.enableFlag,onOffShelf:()=>y(l),disabledMouseHover:!1,onClick:o=>{o.type==="IMG"||!l.enableFlag||(t.show=!0,t.item=o)},onCollect:o=>r(o)},null)])])),!t.loading&&t.tableList.length<=0&&e(he,{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(me,{show:t.show,"onUpdate:show":l=>t.show=l,item:t.item},null),i.value?e(Ta,null,null):null])}}),qa=N({name:"student-studentList",setup(){const n=v("myResources");return j(()=>{D.on("teacher-guideInfo",s=>{s==="natural-resources"&&D.emit("natural-resources-guide",n.value)})}),()=>e("div",{class:se.listWrap},[e(Oe,{defaultValue:"myResources",paneClass:se.paneTitle,justifyContent:"center",paneWrapperClass:se.paneWrapperContainer,"onUpdate:value":[s=>{n.value=s},s=>n.value=s],value:n.value},{default:()=>[e(ae,{name:"myResources",tab:"我的资源"},{default:()=>[e(va,null,null)]}),e(ae,{name:"shareResources",tab:"共享资源"},{default:()=>[e(At,null,null)],tab:()=>e("span",{id:"shareResources-0"},[b("共享资源")])}),e(ae,{name:"myCollect",tab:"我的收藏"},{default:()=>[e(ja,null,null)]})]})])}});export{qa as default};
|