1 |
- import{i as Pe,C as X,a as Ae,b as Me,c as Ge,d as xe,e as Te}from"./isCollaose-073dfd18-1706107518515.js";import{P as oe}from"./index-59887fdc-1706107518515.js";import{T as ne}from"./index-50bf2e43-1706107518515.js";import{r as ie}from"./searchArray-45783419-1706107518515.js";import{u as q}from"./catchData-17d591d4-1706107518515.js";import{d as T,e as G,r as A,p as W,f as e,w as M,j as k,M as ce,N as H,g as z,v as le,aV as $,X as E,H as _,O as ue,c1 as re,bT as de,k as b,F as x,A as pe,x as Ie,l as J,b as ee,U as Ee,df as Ne,h as We,C as Le,dg as j,dh as De,J as Oe,di as je,P as ve,n as ke,q as _e,t as se}from"./index-18b8b0d9-1706107518515.js";import{m as ge,f as fe,a as Ve,b as Qe,c as be,d as ze,e as Be}from"./api-9e73fc39-1706107518515.js";import{T as me}from"./index-1aaceba7-1706107518515.js";import{C as he,N as Ke}from"./api-2baae04f-1706107518515.js";import{A as Ye,i as Je}from"./index-8c5105a6-1706107518515.js";import{g as Z,s as w,a as ye,b as K}from"./api-afc60053-1706107518515.js";import{g as Se,a as Xe,o as Ze}from"./index-128aa8d2-1706107518515.js";import"./icon-collect-active-4272e308-1706107518515.js";import"./index-2dfc0ec2-1706107518515.js";import"./Slider-c3c0528e-1706107518515.js";const qe="_listWrap_sirzm_1",He="_list_sirzm_1",$e="_searchGroup_sirzm_46",et="_btnType_sirzm_50",tt="_inputSearch_sirzm_84",st="_searchCatatory_sirzm_103",at="_addTrain_sirzm_110",ae={listWrap:qe,list:He,searchGroup:$e,btnType:et,inputSearch:tt,searchCatatory:st,addTrain:at},lt="_list_19k4k_1",ot="_itemWrap_19k4k_11",nt="_itemWrapBox_19k4k_16",it="_searchGroup_19k4k_28",ct="_btnType_19k4k_32",ut="_inputSearch_19k4k_67",rt="_searchCatatory_19k4k_91",dt="_addTrain_19k4k_98",pt="_teachingModal_19k4k_110",gt="_spaceSection_19k4k_113",ft="_collapseWrap_19k4k_120",mt="_collaoseBtn_19k4k_126",ht="_isStart_19k4k_131",yt="_isHidden_19k4k_134",At="_hideButton_19k4k_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 Ce(n){return typeof n=="function"||Object.prototype.toString.call(n)==="[object Object]"&&!$(n)}const vt=T({name:"search-group",emits:["search","add"],expose:["init"],setup(n,{emit:a}){const t=q(),r=G({type:"MUSIC",name:"",bookVersionId:null,subjectId:null}),c=()=>{a("search",r)},f=A(),i=A([]),v=A(0),u=A(0),l=A(!1),m=A(!1),s=d=>{d!=null&&d.selfElRef&&i.value.push(d.selfElRef.parentNode)},o=d=>{l.value=d,g()},g=()=>{try{i.value=[...new Set(i.value)];let d=-1;i.value.forEach((h,p)=>{p===0?(u.value=1,d=h.offsetLeft):h.offsetLeft===d&&p!=0&&u.value++,l.value?h.style.display="block":u.value>1?h.style.display="none":h.style.display="block"}),m.value=!0}catch(d){}};return W(async()=>{var d;console.log("加载"),await t.getMusicSheetCategory(),await t.getSubjects(),r.type==="MUSIC"&&(v.value=(d=f.value)==null?void 0:d.offsetHeight,g())}),()=>{let d,h;return e("div",{class:F.searchGroup},[e("div",{class:[F.searchCatatory]},[e(M,{size:"small",class:F.btnType},Ce(d=ie.map(p=>e(k,{type:r.type===p.value?"primary":"default",secondary:r.type!==p.value,round:!0,size:"small",focusable:!1,onClick:()=>{r.type=p.value,c(),ce(()=>{var R;r.type==="MUSIC"?(v.value=(R=f.value)==null?void 0:R.offsetHeight,g()):i.value=[]})}},{default:()=>[p.label]})))?d:{default:()=>[d]})]),e(H,{labelAlign:"left",labelPlacement:"left"},{default:()=>[r.type==="MUSIC"&&e("div",{class:[F.collapsSection]},[e(z,{label:"教材:"},{default:()=>[e("div",{class:[F.collapseWrap,m.value?"":F.hideButton,l.value?"":F.isHidden],ref:f},[e(M,{class:[F.spaceSection]},{default:()=>[t.getAllMusicCategories.map(p=>e(k,{ref:s,secondary:r.bookVersionId===p.id,quaternary:r.bookVersionId!==p.id,strong:!0,focusable:!1,type:r.bookVersionId===p.id?"primary":"default",onClick:()=>{r.bookVersionId=p.id,c()}},{default:()=>[p.name]})),u.value>1&&e("div",{style:{height:"var(--n-blank-height)",position:"absolute",display:"flex",alignItems:"center"},onClick:()=>{o(!l.value)}},[e(le,{previewDisabled:!0,src:Pe,class:[F.collaoseBtn,l.value?F.isStart:""]},null)])]})])]})]),e(z,{label:"乐器:"},{default:()=>[e(M,{class:F.spaceSection},Ce(h=t.getSubjectAllList.map(p=>e(k,{secondary:r.subjectId===p.id,quaternary:r.subjectId!==p.id,strong:!0,focusable:!1,type:r.subjectId===p.id?"primary":"default",onClick:()=>{r.subjectId=p.id,c()}},{default:()=>[p.name]})))?h:{default:()=>[h]})]}),e(ne,{class:F.inputSearch,round:!0,onSearch:p=>{r.name=p,c()}},null)]})])}}}),bt=T({name:"shareResources-guide",emits:["close"],setup(n,{emit:a}){const t=G({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}),r=A(!1),c=A({});(async()=>{var s;try{const o=await ye({guideTag:"teacher-guideInfo"});o.data?c.value=JSON.parse((s=o.data)==null?void 0:s.guideValue)||null:c.value={},c.value&&c.value.shareResourcesGuide?r.value=!1:r.value=!0}catch(o){console.log(o)}})();const i=()=>{var o,g,d,h;const s=document.getElementById("shareResources-".concat(t.step));if(s){const p=s.getBoundingClientRect(),R=((o=t.steps[t.step].eleRectPadding)==null?void 0:o.left)||0,D=((g=t.steps[t.step].eleRectPadding)==null?void 0:g.top)||0,L=((d=t.steps[t.step].eleRectPadding)==null?void 0:d.width)||0,y=((h=t.steps[t.step].eleRectPadding)==null?void 0:h.height)||0;"shareResources-".concat(t.step)=="shareResources-1"?(t.box={left:p.x-R+"px",top:p.y-D+"px",width:(p.width+L)*2+L+"px",height:p.height+y+"px"},console.log(t.box.width,"---",p.width)):t.box={left:p.x-R+"px",top:p.y-D+"px",width:p.width+L+"px",height:p.height+y+"px"}}else l()},v=async s=>{try{if(s!=="shareResources")return;c.value?c.value.classGuide=!1:c.value={classGuide:!1};try{await K({guideTag:"teacher-guideInfo",guideValue:JSON.stringify(c.value)})}catch(o){console.log(o)}t.step=0,i(),r.value=!0}catch(o){}};W(()=>{i(),window.addEventListener("resize",u),_.on("natural-resources-guide",s=>v(s))});const u=()=>{i()};ue(()=>{window.removeEventListener("resize",u),_.off("natural-resources-guide",v)});const l=()=>{if(t.step>=4){m();return}t.step=t.step+1,i()},m=async()=>{c.value?c.value.shareResourcesGuide=!0:c.value={shareResourcesGuide:!0};try{const s=await K({guideTag:"teacher-guideInfo",guideValue:JSON.stringify(c.value)})}catch(s){console.log(s)}r.value=!1};return()=>e(x,null,[r.value?re(e("div",{"onUpdate:show":s=>r.value=s,class:["n-modal-mask","n-modal-mask-guide"]},[e("div",{class:w.content,onClick:()=>l()},[e("div",{class:w.backBtn,onClick:s=>{s.stopPropagation(),m()}},[b("跳过")]),e("div",{class:w.box,style:{...t.box,...t.steps[t.step].boxStyle},id:"modeType-".concat(t.step)},[t.steps.map((s,o)=>{var g,d,h,p;return e("div",{onClick:R=>R.stopPropagation(),class:w.item,style:s.type=="bottom"?{display:o===t.step?"":"none",left:"".concat((g=s.eleRect)==null?void 0:g.left,"px"),top:"-".concat((d=s.imgStyle)==null?void 0:d.height)}:{display:o===t.step?"":"none",left:"".concat((h=s.eleRect)==null?void 0:h.left,"px"),top:"".concat((p=t.box)==null?void 0:p.height)}},[e("img",{class:w.img,style:s.imgStyle,src:s.img},null),e("div",{class:w.btns,style:s.btnsStyle},[t.step+1==t.steps.length?e(x,null,[e("div",{class:[w.endBtn],onClick:()=>m()},[b("完成")]),e("div",{class:w.nextBtn,onClick:()=>{t.step=0,i()}},[b("再看一遍")])]):e("div",{class:w.btn,onClick:()=>l()},[b("下一步 ("),t.step+1,b("/"),t.steps.length,b(")")])])])})])])]),[[de,r.value,"show"]]):null])}}),St=T({name:"share-resources",setup(){const n=G({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:{}}),a=A(!1),t=A(),r=async()=>{try{n.loading=!0;const{data:i}=await ge({...n.searchGroup,...n.pagination});n.loading=!1,n.pageTotal=Number(i.total);const v=i.rows||[],u=[];v.forEach(l=>{u.push({id:l.id,coverImg:l.coverImg,type:l.type,title:l.name,isCollect:!!l.favoriteFlag,isSelected:l.sourceFrom==="PLATFORM",content:l.content})}),n.tableList=u||[],setTimeout(()=>{a.value=!0},500)}catch(i){n.loading=!1}},c=async i=>{n.pagination.page=1,n.searchGroup=Object.assign(n.searchGroup,i),r()},f=async i=>{try{await fe({materialId:i.id,favoriteFlag:i.isCollect?0:1,type:i.type}),i.isCollect=!i.isCollect}catch(v){}};return W(()=>{r()}),()=>e(x,null,[e(vt,{ref:t,onSearch:i=>c(i),onAdd:()=>n.teachingStatus=!0},null),e(pe,{show:n.loading,"onUpdate:show":i=>n.loading=i,style:{"min-height":"50vh"}},{default:()=>[e("div",{class:F.list},[n.tableList.map((i,v)=>e("div",{class:F.itemWrap},[e("div",{class:F.itemWrapBox},[v==0?e(X,Ie({id:"shareResources-1"},{item:i,disabledMouseHover:!1,onClick:u=>{u.type!=="IMG"&&(n.show=!0,n.item=u)},onCollect:u=>f(u)}),null):e(X,{item:i,disabledMouseHover:!1,onClick:u=>{u.type!=="IMG"&&(n.show=!0,n.item=u)},onCollect:u=>f(u)},null)])])),!n.loading&&n.tableList.length<=0&&e(me,{style:{minHeight:"50vh"},description:"暂无共享资源"},null)])]}),e(oe,{page:n.pagination.page,"onUpdate:page":i=>n.pagination.page=i,pageSize:n.pagination.rows,"onUpdate:pageSize":i=>n.pagination.rows=i,pageTotal:n.pageTotal,"onUpdate:pageTotal":i=>n.pageTotal=i,onList:r},null),e(he,{show:n.show,"onUpdate:show":i=>n.show=i,item:n.item},null),e(J,{show:n.teachingStatus,"onUpdate:show":i=>n.teachingStatus=i,preset:"card",showIcon:!1,class:["modalTitle background",F.teachingModal],title:"自定义教材",blockScroll:!1},{default:()=>[e(Ye,{onClose:()=>n.teachingStatus=!1},null)]}),a.value?e(bt,null,null):null])}}),Ct="_list_1es3a_1",wt="_searchGroup_1es3a_10",Ut="_btnType_1es3a_14",It="_inputSearch_1es3a_54",Et="_searchCatatory_1es3a_78",kt="_btnGroup_1es3a_85",Bt="_addTrain_1es3a_88",Rt="_error_1es3a_96",Ft="_iconUpload_1es3a_103",Pt="_iconEdit_1es3a_107",Mt="_iconSelectAll_1es3a_111",Gt="_iconDelete_1es3a_115",xt="_iconPen_1es3a_119",Tt="_itemWrap_1es3a_123",Nt="_itemWrapBox_1es3a_128",Wt="_itemBg_1es3a_140",Lt="_itemBgChecked_1es3a_149",Dt="_resourceDefault_1es3a_152",Ot="_spaceSection_1es3a_159",jt="_attendClassModal_1es3a_165",_t="_attendClassSaveModal_1es3a_171",Vt="_removeVisiable_1es3a_177",Qt="_studentRemove_1es3a_183",zt="_btnGroupModal_1es3a_195",S={list:Ct,searchGroup:wt,btnType:Ut,inputSearch:It,searchCatatory:Et,btnGroup:kt,addTrain:Bt,error:Rt,iconUpload:Ft,iconEdit:Pt,iconSelectAll:Mt,iconDelete:Gt,iconPen:xt,itemWrap:Tt,itemWrapBox:Nt,itemBg:Wt,itemBgChecked:Lt,resourceDefault:Dt,spaceSection:Ot,attendClassModal:jt,attendClassSa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FTkSuQmCC";function we(n){return typeof n=="function"||Object.prototype.toString.call(n)==="[object Object]"&&!$(n)}const Ht=T({name:"search-group",emits:["search","upload","edit","selectAll","delete","update"],setup(n,{emit:a,expose:t}){const r=A([]),c=q(),f=G({type:"MUSIC",name:"",bookVersionId:null,subjectId:null}),i=G({isEdit:!1,isSelectAll:!1}),v=()=>{a("search",f)};return W(async()=>{r.value=[],ie.forEach(l=>{r.value.push(l)}),await c.getSubjects()}),t({resetStatus:()=>{i.isSelectAll=!1}}),()=>{let l,m;return e("div",{class:S.searchGroup},[e("div",{class:S.searchCatatory},[e(M,{size:"small",class:S.btnType},we(l=r.value.map(s=>e(k,{type:f.type===s.value?"primary":"default",secondary:f.type!==s.value,round:!0,size:"small",focusable:!1,onClick:()=>{f.type!==s.value&&(i.isEdit=!1,i.isSelectAll=!1,a("edit",i.isEdit)),f.type=s.value,v()}},{default:()=>[s.label]})))?l:{default:()=>[l]}),e(M,{size:"small",class:S.btnGroup},{default:()=>[i.isEdit?e(x,null,[e(k,{type:"primary",class:S.addTrain,focusable:!1,strong:!0,onClick:()=>{i.isSelectAll=!i.isSelectAll,a("selectAll",i.isSelectAll)}},{default:()=>[e("img",{src:i.isSelectAll?Jt:Xt,class:S.iconSelectAll},null),b("全选")]}),e(k,{type:"error",class:[S.addTrain,S.error],focusable:!1,strong:!0,onClick:()=>a("delete")},{default:()=>[e("img",{src:qt,class:S.iconDelete},null),b("删除")]}),f.type!=="MUSIC"&&e(k,{type:"primary",class:S.addTrain,focusable:!1,strong:!0,onClick:()=>a("update")},{default:()=>[e("img",{src:Zt,class:S.iconPen},null),b("修改")]}),e(k,{type:"primary",class:S.addTrain,focusable:!1,strong:!0,onClick:()=>{i.isEdit=!1,i.isSelectAll=!1,a("edit",i.isEdit)}},{default:()=>[b("完成编辑")]})]):e(x,null,[e(k,Ie({type:"primary",class:S.addTrain,focusable:!1},{id:"myResources-0"},{strong:!0,onClick:()=>a("upload")}),{default:()=>[e("img",{src:Kt,class:S.iconUpload},null),b("上传资源")]}),e(k,{type:"primary",class:S.addTrain,focusable:!1,strong:!0,onClick:()=>{i.isEdit=!0,a("edit",i.isEdit)}},{default:()=>[e("img",{src:Yt,class:S.iconEdit},null),b("编辑资源")]})])]})]),e(H,{labelAlign:"left",labelPlacement:"left"},{default:()=>[e(z,{label:"乐器:"},{default:()=>[e(M,{class:S.spaceSection},we(m=c.getSubjectAllList.map(s=>e(k,{secondary:f.subjectId===s.id,quaternary:f.subjectId!==s.id,strong:!0,focusable:!1,type:f.subjectId===s.id?"primary":"default",onClick:()=>{f.subjectId!==s.id&&(i.isEdit=!1,i.isSelectAll=!1,a("edit",i.isEdit)),f.subjectId=s.id,v()}},{default:()=>[s.name]})))?m:{default:()=>[m]})]}),e(ne,{class:S.inputSearch,round:!0,onSearch:s=>{f.name=s,v()}},null)]})])}}}),$t="_uploadModal_3dbwl_1",es="_formModal_3dbwl_4",ts="_formSpace_3dbwl_8",ss="_previewModal_3dbwl_11",as="_image_3dbwl_23",ls="_titleType_3dbwl_32",os="_iconUploadDelete_3dbwl_40",ns="_commonType_3dbwl_49",is="_formItem_3dbwl_72",cs="_btnGroup_3dbwl_97",us="_uploadFile_3dbwl_104",rs="_uploadBtn_3dbwl_111",ds="_iconUploadAdd_3dbwl_128",N={uploadModal:$t,formModal:es,formSpace:ts,previewModal:ss,image:as,titleType:ls,iconUploadDelete:os,commonType:ns,formItem:is,btnGroup:cs,uploadFile:us,uploadBtn:rs,iconUploadAdd:ds};function ps(n){return typeof n=="function"||Object.prototype.toString.call(n)==="[object Object]"&&!$(n)}const Re=n=>n?(n==null?void 0:n.indexOf(".mp3"))>-1?j.SONG:(n==null?void 0:n.indexOf(".mp4"))>-1?j.VIDEO:(n==null?void 0:n.indexOf(".ppt"))>-1?j.PPT:j.IMG:"",gs=T({name:"upload-modal",props:{list:{type:Array,default:()=>[]},editStatus:{type:Boolean,default:!0}},emits:["close","confirm"],setup(n,{emit:a}){const t=q(),r=A(),c=ee();A(),A([]);const f=G({list:[],uploading:!1,uploadUrl:"",name:"",subjectIds:[]}),i=s=>{let o=Ae;switch(s){case"IMG":o=Ae;break;case"VIDEO":o=Te;break;case"SONG":o=xe;break;case"MUSIC":o=Ge;break;case"PPT":o=Me;break}return o},v=async()=>{var s;(s=r.value)==null||s.validate(async o=>{if(o){ce(De);return}f.uploading=!0;try{const g=[];f.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})}),l.value?await Ve(g):await Qe(g),f.list=[],c.success("保存成功"),a("close",!0),a("confirm")}catch(g){}f.uploading=!1})},u=s=>{f.list.splice(s,1)},l=Ee(()=>n.list.length>0);W(async()=>{const s=n.list||[],o=[];s.forEach(g=>{o.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})}),f.list=o||[],console.log(o,"uploadForms"),await t.getSubjects()});const m=(s,o)=>{s.subjectIds=o.map(g=>g.id)};return()=>{let s;return e("div",{class:N.uploadModal},[e(Ke,{style:{"max-height":"55vh"}},{default:()=>[e(H,{ref:r,labelPlacement:"left",labelWidth:120,model:f,class:N.formModal},{default:()=>[e(M,{class:N.formSpace},ps(s=f.list.map((o,g)=>e("div",{class:N.formItem,key:g},[e("div",{class:N.previewModal},[e(le,{class:[N.titleType],src:i(o.type),previewDisabled:!0,objectFit:"cover"},null),!l.value&&e("img",{class:[N.iconUploadDelete],src:Je,onClick:()=>u(g)},null),e(le,{class:[N.cover,N.image],lazy:!0,previewDisabled:!0,src:o.coverImg,objectFit:"cover"},null),e("div",{class:N.commonType},[b("是否公开:"),e(Ne,{size:"small",value:o.openFlag,"onUpdate:value":d=>o.openFlag=d,disabled:o.sourceFrom==="TEACHER"&&o.type==="MUSIC"},null)])]),e(z,{showFeedback:!1,path:"list.".concat(g,".name"),rule:[{required:!0,message:"请输入资源名称",trigger:["input","blur"]}]},{default:()=>[e(We,{value:o.name,"onUpdate:value":d=>o.name=d,placeholder:"请输入资源名称",maxlength:25,clearable:!0},null)]}),e(z,{path:"list[".concat(g,"].subjectIds"),showFeedback:!1,rule:[{required:!0,message:"请选择素材可用乐器",trigger:"change",type:"array"}]},{default:()=>[e(Le,{value:o.subjectIds,"onUpdate:value":d=>o.subjectIds=d,placeholder:"请选择素材可用乐器(可多选)",options:t.getSubjectList,labelField:"name",valueField:"id",multiple:!0,maxTagCount:2,clearable:!0},{action:()=>e(x,null,[e(k,{text:!0,style:" --n-width: 100% ",onClick:()=>m(o,t.getSubjectList)},{default:()=>[b("全选")]})])})]})])))?s:{default:()=>[s]})]})]}),e(M,{class:N.btnGroup,justify:"center"},{default:()=>[e(k,{round:!0,onClick:()=>a("close")},{default:()=>[n.editStatus?"取消":"上一步"]}),e(k,{round:!0,type:"primary",loading:f.uploading,disabled:f.list.length===0,onClick:v},{default:()=>[b("确定")]})]})])}}}),fs="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACgAAAAoCAYAAACM/rhtAAAAAXNSR0IArs4c6QAAA8dJREFUWEfNmU1sE1cQx///3Ue8CCOBnUJjpVUlop7opahqj3DmAFS0VdNDb1UL7YUg4bXSsARkBwk4FYp66wFQP1TEoedwBFX0Ui6tglSVyCnUNogYsTa7O9Vbs46dpPVXIPuOfm/m/XZm3rx5Y6LPkZh8uMP3/X0C2UVBBkRGgIxWR6AIQVGIIsFbpmleq53acqefrdiLUNJZ3ObW659DcEBEdvYiS/I2iKvW0NBXVWfz/W5luwJ8yZHkA7cyIZSjECS7Vb7qOqJK4ZmtVursPw6rnXR1BDTt0rsALkCwfYUy8i4oPxOcM8CFwGBRrzECyQSQEYGMQbgXIq+slMU9AIf8wvBP/wf5n4Aiwg12ZUqA44AsrQstgPM01PdP81t+7WQBPb8h9/BNCbz3hTjc7gFqxSeeFlLTJGU1XasCjp6TjQ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wjihqXAd+0OLCgLFl3k7Myur6fwa6T4XxY1KcJbxI9NNNZb8WzdVYUXx5X3OqwX0L93gA+WGdH3UKBTwDFWUxm+PZsVImerD4s8oNWaEYHUZuMwNctDvBopgL5fUxSyDgT+Mo9AXgD2ihFDa1C1HpH3SKnAcfXp6eSMZYAzB3x1Lf0iPjqjHZKUQOojDr+QXD7dS0LTUtN2PlQejPEHQR585wKo+3zZPPkz2W2RGJZUAC+6N/GZPaSHkPvcjqpNcNSlH6tGRiNgqc2k3702FYoMHXdKmRhLbEQTmxMJ2RueNnOSQyN6aeUtANkLqxKFAu4zd1ZYcRQWymCYRmhGND6aRBHftXPxpnRTb3dXfWl6fZyA+oWFuGvixJ+GMm932lKM0H90sSV5/S1M366QlKtKTIahPJe3LmNOf/0wUHO6cejeCbm9PNbarnM2QfMVJBz+gk4FajyiB6OtAJYrfeif10f0dUY4kb9DfEf/jo/ywKomDwAAAAASUVORK5CYII=",hs=T({name:"myResources-guide",emits:["close"],setup(n,{emit:a}){const t=G({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}),r=A(!1),c=A({});(async()=>{var s;try{const o=await ye({guideTag:"teacher-guideInfo"});o.data?c.value=JSON.parse((s=o.data)==null?void 0:s.guideValue)||null:c.value={},console.log(c.value,"guideInfo.value"),c.value&&c.value.myResourcesGuide?r.value=!1:r.value=!0}catch(o){console.log(o)}})();const i=()=>{var o,g,d,h;const s=document.getElementById("myResources-".concat(t.step));if(s){const p=s.getBoundingClientRect(),R=((o=t.steps[t.step].eleRectPadding)==null?void 0:o.left)||0,D=((g=t.steps[t.step].eleRectPadding)==null?void 0:g.top)||0,L=((d=t.steps[t.step].eleRectPadding)==null?void 0:d.width)||0,y=((h=t.steps[t.step].eleRectPadding)==null?void 0:h.height)||0;t.box={left:p.x-R+"px",top:p.y-D+"px",width:p.width+L+"px",height:p.height+y+"px"}}else l()},v=async s=>{try{if(s!=="myResources")return;c.value?c.value.classGuide=!1:c.value={classGuide:!1};try{await K({guideTag:"teacher-guideInfo",guideValue:JSON.stringify(c.value)})}catch(o){console.log(o)}t.step=0,i(),r.value=!0}catch(o){}};W(()=>{i(),window.addEventListener("resize",u),_.on("natural-resources-guide",s=>v(s))});const u=()=>{i()};ue(()=>{window.removeEventListener("resize",u),_.off("natural-resources-guide",v)});const l=()=>{if(t.step>=4){m();return}t.step=t.step+1,i()},m=async()=>{c.value?c.value.myResourcesGuide=!0:c.value={myResourcesGuide:!0};try{const s=await K({guideTag:"teacher-guideInfo",guideValue:JSON.stringify(c.value)})}catch(s){console.log(s)}r.value=!1};return()=>e(x,null,[r.value?re(e("div",{"onUpdate:show":s=>r.value=s,class:["n-modal-mask","n-modal-mask-guide"]},[e("div",{class:w.content,onClick:()=>l()},[e("div",{class:w.backBtn,onClick:s=>{s.stopPropagation(),m()}},[b("跳过")]),e("div",{class:w.box,style:{...t.box,...t.steps[t.step].boxStyle},id:"modeType-".concat(t.step)},[t.steps.map((s,o)=>{var g,d,h,p;return e("div",{onClick:R=>R.stopPropagation(),class:w.item,style:s.type=="bottom"?{display:o===t.step?"":"none",left:"".concat((g=s.eleRect)==null?void 0:g.left,"px"),top:"-".concat((d=s.imgStyle)==null?void 0:d.height)}:{display:o===t.step?"":"none",left:"".concat((h=s.eleRect)==null?void 0:h.left,"px"),top:"".concat((p=t.box)==null?void 0:p.height)}},[e("img",{class:w.img,style:s.imgStyle,src:s.img},null),e("div",{class:w.btns,style:s.btnsStyle},[t.step+1==t.steps.length?e(x,null,[e("div",{class:[w.endBtn],onClick:()=>m()},[b("完成")])]):e("div",{class:w.btn,onClick:()=>l()},[b("下一步 ("),t.step+1,b("/"),t.steps.length,b(")")])])])})])])]),[[de,r.value,"show"]]):null])}}),ys="_saveModal_ulplg_1",As="_uploadBtn_ulplg_25",vs="_iconUploadAdd_ulplg_47",bs="_btnGroup_ulplg_57",Y={saveModal:ys,uploadBtn:As,iconUploadAdd:vs,btnGroup:bs},Ss=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(n,{emit:a}){const t="https://".concat(n.bucketName,".ks3-cn-beijing.ksyuncs.com/"),r=ee(),c=A(!1),f=A(!1),i=A(),v=A(),u=G([]),l=A([]),m=A([]),s=async y=>{const U=y.file;let I=!0;const C=U.type.includes("image")?j.IMG:U.type.includes("audio")?j.SONG:U.type.includes("video")?j.VIDEO:U.type.includes("vnd.openxmlformats-officedocument.presentationml.presentation")||U.type.includes("vnd.ms-powerpoint")?j.PPT:"other";if(console.log(C,"type"),C==="other")return r.error("文件格式不支持"),!1;const B=C==="IMG"?2:C==="SONG"?20:500;if(B&&(I=U.file.size/1024/1024<B,!I)){const P=C==="IMG"?"图片":C==="SONG"?"音频":"视频";return r.error("".concat(P,"大小不能超过").concat(B,"M")),!1}if(!I)return I;try{f.value=!0;const P=U.file.name,V=P.slice(P.lastIndexOf(".")),Q="".concat(n.path).concat(Date.now()+U.id+V),Fe={filename:Q,bucketName:n.bucketName,postData:{filename:Q,acl:"public-read",key:Q,unknowValueField:[]}},{data:te}=await Se(Fe);u.push({id:U.id,tempFiileBuffer:U.file,policy:te.policy,signature:te.signature,acl:"public-read",key:Q,KSSAccessKeyId:te.kssAccessKeyId,name:Q})}catch(P){return f.value=!1,!1}return!0},o=y=>{g(y)},g=async y=>{console.log(y,"onFinishAfter");const U=u.find(B=>B.id==y.file.id),I=Re(y.file.url);let C="";I==="IMG"?C=y.file.url:I==="SONG"?C=ve.SONG_DEFAULT_COVER:I==="PPT"?C=ve.PPT_DEFAULT_COVER:I==="VIDEO"&&(C=await h(U.tempFiileBuffer)),m.value.push({coverImg:C,content:y.file.url,id:y.file.id,name:y.file.name?y.file.name.slice(0,y.file.name.lastIndexOf(".")):""}),c.value=!1,f.value=!1},d=y=>new Promise((U,I)=>{const C=document.createElement("video");C.currentTime=1,C.src=URL.createObjectURL(y),C.addEventListener("loadedmetadata",function(){console.log("loaded in"),C.currentTime=1,C.addEventListener("canplay",function(){console.log("Video can play");const B=document.createElement("canvas"),P=C.videoWidth,V=C.videoHeight;B.width=P,B.height=V,B.getContext("2d").drawImage(C,0,0,P,V),B.toBlob(Q=>{U(Q)})})}),C.addEventListener("error",function(B){console.error("Error loading video:",B),I(B)})}),h=async y=>{try{f.value=!0;const U=await d(y||i.value),I="".concat(n.path).concat(Date.now()+".png"),C={filename:I,bucketName:n.bucketName,postData:{filename:I,acl:"public-read",key:I,unknowValueField:[]}},{data:B}=await Se(C),P={policy:B.policy,signature:B.signature,key:I,acl:"public-read",KSSAccessKeyId:B.kssAccessKeyId,name:I,file:U};return await Xe(t,P)}finally{f.value=!1}},p=async y=>{const U=m.value.findIndex(I=>I.id===y.file.id);return m.value.splice(U,1),f.value=!1,!0},R=Ee(()=>{let y=!1;return l.value.forEach(U=>{U.status!=="finished"&&(y=!0)}),y||l.value.length<=0||f.value}),D=({file:y,action:U,onFinish:I,onError:C,onProgress:B})=>{const P=u.find(V=>V.id==y.id);P.file=y,Ze({file:y,action:U,data:P,onProgress:B,onFinish:I,onError:C})},L=async()=>{const y=[];l.value.forEach(U=>{const I=m.value.find(C=>C.id===U.id);I&&y.push(I)}),a("confrim",y)};return()=>e("div",{class:Y.saveModal},[e(Oe,{ref:v,action:t,customRequest:D,fileList:l.value,"onUpdate:fileList":y=>l.value=y,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:y=>s(y),onFinish:y=>{o(y)},onRemove:y=>p(y)},{default:()=>[e(je,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(M,{class:Y.btnGroup,justify:"center"},{default:()=>[e(k,{round:!0,onClick:()=>a("close")},{default:()=>[b("取消")]}),e(k,{round:!0,type:"primary",disabled:R.value,onClick:L},{default:()=>[b("确定")]})]})])}}),Cs=T({name:"share-resources",setup(){const n=ee();ke();const a=G({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),r=async()=>{try{a.loading=!0;const{data:l}=await ge({...a.searchGroup,...a.pagination});a.loading=!1,a.pageTotal=Number(l.total);const m=l.rows||[],s=[];m.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,subjectId:o.subjectIds,sourceFrom:o.sourceFrom,enableFlag:o.enableFlag?1:0,openFlag:o.openFlag})}),a.tableList=s||[],setTimeout(()=>{t.value=!0},500)}catch(l){a.loading=!1}},c=async l=>{try{await fe({materialId:l.id,favoriteFlag:l.isCollect?0:1,type:l.type}),l.isCollect=!l.isCollect}catch(m){}},f=async l=>{a.pagination.page=1,a.searchGroup=Object.assign(a.searchGroup,l),r()},i=async()=>{try{a.searchGroup.type==="MUSIC"?await be(a.editIds):await ze(a.editIds),n.success("删除成功"),f(a.searchGroup),a.editIds=[]}catch(l){}},v=async()=>{try{a.searchGroup.type==="MUSIC"?await be([a.removeItem.id]):await Be({ids:a.removeItem.id}),n.success("删除成功"),f(a.searchGroup)}catch(l){}},u=A();return W(()=>{r()}),()=>e(x,null,[e(Ht,{ref:u,onSearch:l=>f(l),onUpload:()=>{a.editList=[],a.saveStatus=!0},onUpdate:()=>{const l=[];if(a.tableList.forEach(m=>{a.editIds.indexOf(m.id)>-1&&l.push(m)}),a.editList=l||[],a.editList.length<=0){n.error("至少选择一条资源进行编辑");return}a.uploadStatus=!0},onEdit:l=>{a.editStatus=l,a.editStatus||(a.editIds=[])},onSelectAll:l=>{if(l){const m=[];a.tableList.forEach(s=>{m.push(s.id)}),a.editIds=m}else a.editIds=[]},onDelete:()=>{if(a.editIds.length<=0){n.error("至少选择一条资源进行删除");return}a.type="delete",a.removeContent="是否删除该资源?",a.removeVisiable=!0}},null),e(pe,{show:a.loading,"onUpdate:show":l=>a.loading=l,style:{"min-height":"50vh"}},{default:()=>[e("div",{class:S.list},[a.tableList.map(l=>e("div",{class:S.itemWrap},[e("div",{class:S.itemWrapBox},[e(X,{item:l,isDownload:!0,disabledMouseHover:!1,offShelf:!l.enableFlag,onOffShelf:()=>{a.type="remove",a.removeContent="该资源已下架,是否删除?",a.removeVisiable=!0,a.removeItem=l},onClick:m=>{m.type==="IMG"||!l.enableFlag||(a.show=!0,a.item=m)},onCollect:m=>c(m)},null),a.editStatus&&e("div",{class:[S.itemBg,a.editIds.includes(l.id)?S.itemBgChecked:""],onClick:()=>{const m=a.editIds.indexOf(l.id);m>-1?a.editIds.splice(m,1):a.editIds.push(l.id)}},[e("img",{src:a.editIds.includes(l.id)?ms:fs,class:S.resourceDefault},null)])])])),!a.loading&&a.tableList.length<=0&&e(me,{style:{minHeight:"50vh"},description:"暂无资源"},null)])]}),e(oe,{page:a.pagination.page,"onUpdate:page":l=>a.pagination.page=l,pageSize:a.pagination.rows,"onUpdate:pageSize":l=>a.pagination.rows=l,pageTotal:a.pageTotal,"onUpdate:pageTotal":l=>a.pageTotal=l,onList:r},null),e(he,{show:a.show,"onUpdate:show":l=>a.show=l,item:a.item},null),e(J,{show:a.uploadStatus,"onUpdate:show":l=>a.uploadStatus=l,preset:"card",showIcon:!1,class:["modalTitle background",S.attendClassModal],title:a.editStatus?"修改资源":"上传资源",blockScroll:!1},{default:()=>[e(gs,{editStatus:a.editStatus,onClose:()=>{a.uploadStatus=!1},onConfirm:()=>{var l;a.editIds=[],a.editList=[],a.saveStatus=!1,(l=u.value)==null||l.resetStatus(),f(a.searchGroup)},list:a.editList},null)]}),e(J,{show:a.saveStatus,"onUpdate:show":l=>a.saveStatus=l,preset:"card",showIcon:!1,class:["modalTitle background",S.attendClassSaveModal],title:"上传资源",blockScroll:!1},{default:()=>[e(Ss,{onClose:()=>a.saveStatus=!1,onConfrim:l=>{const m=l||[],s=[];m.forEach(o=>{s.push({subjectIds:null,openFlag:!1,coverImg:o.coverImg,title:o.name||"",type:Re(o.content),enableFlag:1,content:o.content,id:null})}),a.editList=s,a.uploadStatus=!0,a.editStatus=!1}},null)]}),t.value?e(hs,null,null):null,e(J,{show:a.removeVisiable,"onUpdate:show":l=>a.removeVisiable=l,preset:"card",class:["modalTitle",S.removeVisiable],title:"提示"},{default:()=>[e("div",{class:S.studentRemove},[e("p",null,[a.removeContent]),e(M,{class:S.btnGroupModal,justify:"center"},{default:()=>[e(k,{round:!0,type:"primary",onClick:()=>{a.type==="remove"?v():i(),a.removeVisiable=!1}},{default:()=>[b("确定")]}),e(k,{round:!0,onClick:()=>a.removeVisiable=!1},{default:()=>[b("取消")]})]})])]})])}}),ws="_list_1cwos_1",Us="_itemWrap_1cwos_11",Is="_itemWrapBox_1cwos_16",Es="_searchGroup_1cwos_28",ks="_btnType_1cwos_32",Bs="_inputSearch_1cwos_67",Rs="_searchCatatory_1cwos_91",Fs="_addTrain_1cwos_98",Ps="_spaceSection_1cwos_110",Ms="_collapseWrap_1cwos_116",Gs="_collaoseBtn_1cwos_122",xs="_isStart_1cwos_127",Ts="_collapsSection_1cwos_130",Ns="_isHidden_1cwos_133",Ws="_hideButton_1cwos_137",O={list:ws,itemWrap:Us,itemWrapBox:Is,searchGroup:Es,btnType:ks,inputSearch:Bs,searchCatatory:Rs,addTrain:Fs,spaceSection:Ps,collapseWrap:Ms,collaoseBtn:Gs,isStart:xs,collapsSection:Ts,isHidden:Ns,hideButton:Ws};function Ue(n){return typeof n=="function"||Object.prototype.toString.call(n)==="[object Object]"&&!$(n)}const Ls=T({name:"search-group",emits:["search"],setup(n,{emit:a}){const t=q(),r=A([]),c=G({type:"MUSIC",name:"",bookVersionId:null,subjectId:null}),f=()=>{a("search",c)},i=A(),v=A([]),u=A(0),l=A(0),m=A(!1),s=A(!1),o=()=>{try{v.value=[...new Set(v.value)];let g=-1;v.value.forEach((d,h)=>{h===0?(l.value=1,g=d.offsetLeft):d.offsetLeft===g&&h!=0&&l.value++,m.value?d.style.display="block":l.value>1?d.style.display="none":d.style.display="block"}),s.value=!0}catch(g){}};return W(async()=>{r.value=[...ie],await t.getMusicSheetCategory(),await t.getSubjects()}),()=>{let g,d;return e("div",{class:O.searchGroup},[e("div",{class:O.searchCatatory},[e(M,{size:"small",class:O.btnType},Ue(g=r.value.map(h=>e(k,{type:c.type===h.value?"primary":"default",secondary:c.type!==h.value,round:!0,size:"small",focusable:!1,onClick:()=>{c.type=h.value,f(),ce(()=>{var p;c.type==="MUSIC"?(u.value=(p=i.value)==null?void 0:p.offsetHeight,o()):v.value=[]})}},{default:()=>[h.label]})))?g:{default:()=>[g]})]),e(H,{labelAlign:"left",labelPlacement:"left"},{default:()=>[e(z,{label:"乐器:"},{default:()=>[e(M,{class:O.spaceSection},Ue(d=t.getSubjectAllList.map(h=>e(k,{secondary:c.subjectId===h.id,quaternary:c.subjectId!==h.id,strong:!0,focusable:!1,type:c.subjectId===h.id?"primary":"default",onClick:()=>{c.subjectId=h.id,f()}},{default:()=>[h.name]})))?d:{default:()=>[d]})]}),e(ne,{class:O.inputSearch,round:!0,onSearch:h=>{c.name=h,f()}},null)]})])}}}),Ds=T({name:"myColloge-guide",emits:["close"],setup(n,{emit:a}){const t=G({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}),r=A(!1),c=A({});(async()=>{var s;try{const o=await ye({guideTag:"teacher-guideInfo"});o.data?c.value=JSON.parse((s=o.data)==null?void 0:s.guideValue)||null:c.value={},c.value&&c.value.myColloge?r.value=!1:r.value=!0}catch(o){console.log(o)}})();const i=()=>{var o,g,d,h;const s=document.getElementById("myColloge-".concat(t.step));if(s){const p=s.getBoundingClientRect(),R=((o=t.steps[t.step].eleRectPadding)==null?void 0:o.left)||0,D=((g=t.steps[t.step].eleRectPadding)==null?void 0:g.top)||0,L=((d=t.steps[t.step].eleRectPadding)==null?void 0:d.width)||0,y=((h=t.steps[t.step].eleRectPadding)==null?void 0:h.height)||0;t.box={left:p.x-R+"px",top:p.y-D+"px",width:p.width+L+"px",height:p.height+y+"px"}}else l()},v=async s=>{try{if(console.log(s),s!=="myCollect")return;console.log(s,"name"),c.value?c.value.myColloge=!1:c.value={myColloge:!1};try{await K({guideTag:"teacher-guideInfo",guideValue:JSON.stringify(c.value)})}catch(o){console.log(o)}t.step=0,i(),r.value=!0}catch(o){}};W(()=>{i(),window.addEventListener("resize",u),_.on("natural-resources-guide",s=>v(s))});const u=()=>{i()};ue(()=>{window.removeEventListener("resize",u),_.off("natural-resources-guide",v)});const l=()=>{if(t.step>=4){m();return}t.step=t.step+1,i()},m=async()=>{c.value?c.value.myColloge=!0:c.value={myColloge:!0};try{const s=await K({guideTag:"teacher-guideInfo",guideValue:JSON.stringify(c.value)})}catch(s){console.log(s)}r.value=!1};return()=>e(x,null,[r.value?re(e("div",{"onUpdate:show":s=>r.value=s,class:["n-modal-mask","n-modal-mask-guide"]},[e("div",{class:w.content,onClick:()=>l()},[e("div",{class:w.backBtn,onClick:s=>{s.stopPropagation(),m()}},[b("跳过")]),e("div",{class:w.box,style:{...t.box},id:"modeType-".concat(t.step)},[t.steps.map((s,o)=>{var g,d,h,p;return e("div",{onClick:R=>R.stopPropagation(),class:w.item,style:s.type=="bottom"?{display:o===t.step?"":"none",left:"".concat((g=s.eleRect)==null?void 0:g.left,"px"),top:"-".concat((d=s.imgStyle)==null?void 0:d.height)}:{display:o===t.step?"":"none",left:"".concat((h=s.eleRect)==null?void 0:h.left,"px"),top:"".concat((p=t.box)==null?void 0:p.height)}},[e("img",{class:w.img,style:s.imgStyle,src:s.img},null),e("div",{class:w.btns,style:s.btnsStyle},[t.step+1==t.steps.length?e(x,null,[e("div",{class:[w.endBtn],onClick:()=>m()},[b("完成")])]):e("div",{class:w.btn,onClick:()=>l()},[b("下一步 ("),t.step+1,b("/"),t.steps.length,b(")")])])])})])])]),[[de,r.value,"show"]]):null])}}),Os=T({name:"share-resources",setup(){const n=ee(),a=ke(),t=G({searchWord:"",loading:!1,pageTotal:0,pagination:{page:1,rows:20},searchGroup:{type:"MUSIC",name:"",bookVersionId:null,subjectId:null,sourceType:4},tableList:[],show:!1,item:{}}),r=async()=>{try{t.loading=!0;const{data:u}=await ge({...t.searchGroup,...t.pagination});t.loading=!1,t.pageTotal=Number(u.total);const l=u.rows||[],m=[];l.forEach(s=>{m.push({id:s.id,coverImg:s.coverImg,type:s.type,title:s.name,isCollect:!!s.favoriteFlag,isSelected:s.sourceFrom==="PLATFORM",content:s.content,subjectId:s.subjectIds,enableFlag:s.enableFlag?1:0,openFlag:s.openFlag})}),t.tableList=m||[],setTimeout(()=>{c.value=!0},500)}catch(u){t.loading=!1}},c=A(!1),f=async u=>{t.pagination.page=1,t.searchGroup=Object.assign(t.searchGroup,u),r()},i=async u=>{try{await fe({materialId:u.id,favoriteFlag:u.isCollect?0:1,type:u.type}),u.isCollect=!u.isCollect}catch(l){}},v=async u=>{try{a.warning({title:"提示",content:"该资源已下架,是否删除?",positiveText:"确定",negativeText:"取消",onPositiveClick:async()=>{await Be({id:u.id}),n.success("删除成功"),f(t.searchGroup)}})}catch(l){}};return W(()=>{r()}),()=>e(x,null,[e(Ls,{onSearch:u=>f(u)},null),e(pe,{show:t.loading,"onUpdate:show":u=>t.loading=u,style:{"min-height":"50vh"}},{default:()=>[e("div",{class:O.list,id:"myColloge-0"},[t.tableList.map(u=>e("div",{class:O.itemWrap},[e("div",{class:O.itemWrapBox},[e(X,{item:u,offShelf:!u.enableFlag,onOffShelf:()=>v(u),disabledMouseHover:!1,onClick:l=>{l.type==="IMG"||!u.enableFlag||(t.show=!0,t.item=l)},onCollect:l=>i(l)},null)])])),!t.loading&&t.tableList.length<=0&&e(me,{style:{minHeight:"50vh"},description:"暂无收藏资源"},null)])]}),e(oe,{page:t.pagination.page,"onUpdate:page":u=>t.pagination.page=u,pageSize:t.pagination.rows,"onUpdate:pageSize":u=>t.pagination.rows=u,pageTotal:t.pageTotal,"onUpdate:pageTotal":u=>t.pageTotal=u,onList:r},null),e(he,{show:t.show,"onUpdate:show":u=>t.show=u,item:t.item},null),c.value?e(Ds,null,null):null])}}),sa=T({name:"student-studentList",setup(){const n=A("myResources");return W(()=>{_.on("teacher-guideInfo",a=>{a==="natural-resources"&&_.emit("natural-resources-guide",n.value)})}),()=>e("div",{class:ae.listWrap},[e(_e,{defaultValue:"myResources",paneClass:ae.paneTitle,justifyContent:"center",paneWrapperClass:ae.paneWrapperContainer,"onUpdate:value":[a=>{n.value=a},a=>n.value=a],value:n.value},{default:()=>[e(se,{name:"myResources",tab:"我的资源"},{default:()=>[e(Cs,null,null)]}),e(se,{name:"shareResources",tab:"共享资源"},{default:()=>[e(St,null,null)],tab:()=>e("span",{id:"shareResources-0"},[b("共享资源")])}),e(se,{name:"myCollect",tab:"我的收藏"},{default:()=>[e(Os,null,null)]})]})])}});export{sa as default};
|