1 |
- import{i as Pe,C as X,a as ve,b as Me,c as Ge,d as Te,e as Ne}from"./isCollaose-ef6d37e9-1708220053196.js";import{P as oe}from"./index-4b731141-1708220053196.js";import{T as ne}from"./index-a77359ad-1708220053196.js";import{r as ie}from"./searchArray-c15f315b-1708220053196.js";import{u as H}from"./catchData-6634d298-1708220053196.js";import{d as _,e as T,r as S,p as z,f as e,w as G,j as F,M as ce,N as q,g as Q,v as le,ae as ue,a3 as $,X as E,H as D,O as re,Y as de,Z as pe,k as C,F as N,A as ge,x as Ue,l as J,b as ee,U as Ee,bj as _e,h as We,C as ze,bk as O,bl as Le,J as Oe,bm as De,P as be,n as xe,q as je,t as se}from"./index-9bb5784d-1708220053196.js";import{m as fe,f as me,a as Ve,b as Qe,c as Se,d as Ke,e as ke}from"./api-ffd66da6-1708220053196.js";import{T as he}from"./index-0ad8ff6b-1708220053196.js";import{C as ye,N as Ye}from"./index-343185d0-1708220053196.js";import{A as Je,i as Xe}from"./index-106ff0a6-1708220053196.js";import{g as Z,s as I,a as Ae,b as K}from"./api-c4d392f8-1708220053196.js";import{g as Ce,a as Ze,o as He}from"./index-9835cc9d-1708220053196.js";import"./icon-collect-active-4272e308-1708220053196.js";import"./index-7dd384d5-1708220053196.js";import"./Slider-bc98d7ef-1708220053196.js";import"./urlUtils-080cac35-1708220053196.js";const qe="_listWrap_sirzm_1",$e="_list_sirzm_1",et="_searchGroup_sirzm_46",tt="_btnType_sirzm_50",st="_inputSearch_sirzm_84",at="_searchCatatory_sirzm_103",lt="_addTrain_sirzm_110",ae={listWrap:qe,list:$e,searchGroup:et,btnType:tt,inputSearch:st,searchCatatory:at,addTrain:lt},ot="_list_30kzo_1",nt="_itemWrap_30kzo_11",it="_itemWrapBox_30kzo_16",ct="_searchGroup_30kzo_28",ut="_btnType_30kzo_32",rt="_inputSearch_30kzo_67",dt="_searchCatatory_30kzo_91",pt="_addTrain_30kzo_98",gt="_teachingModal_30kzo_110",ft="_spaceSection_30kzo_113",mt="_collapseWrap_30kzo_123",ht="_collaoseBtn_30kzo_129",yt="_isStart_30kzo_134",At="_isHidden_30kzo_137",vt="_hideButton_30kzo_141",bt="_popSelect_30kzo_146",St="_spaceSection2_30kzo_156",Ct="_textBtn_30kzo_160",wt="_iconArrow_30kzo_172",It="_textBtnActive_30kzo_181",x={list:ot,itemWrap:nt,itemWrapBox:it,searchGroup:ct,btnType:ut,inputSearch:rt,searchCatatory:dt,addTrain:pt,teachingModal:gt,spaceSection:ft,collapseWrap:mt,collaoseBtn:ht,isStart:yt,isHidden:At,hideButton:vt,popSelect:bt,spaceSection2:St,textBtn:Ct,iconArrow:wt,textBtnActive:It};function we(n){return typeof n=="function"||Object.prototype.toString.call(n)==="[object Object]"&&!$(n)}const Bt=_({name:"search-group",emits:["search","add"],expose:["init"],setup(n,{emit:a}){const t=H(),d=T({type:"MUSIC",name:"",bookVersionId:null,subjectId:null}),u=()=>{a("search",d)},f=S(),i=S([]),b=S(0),c=S(0),o=S(!1),p=S(!1),s=g=>{g!=null&&g.selfElRef&&i.value.push(g.selfElRef.parentNode)},l=g=>{o.value=g,m()},m=()=>{try{i.value=[...new Set(i.value)];let g=-1;i.value.forEach((r,y)=>{y===0?(c.value=1,g=r.offsetLeft):r.offsetLeft===g&&y!=0&&c.value++,o.value?r.style.display="block":c.value>1?r.style.display="none":r.style.display="block"}),p.value=!0}catch(g){}},h=g=>{const r={};return g==null||g.forEach(y=>{y.id===d.subjectId&&(r.selected=!0,r.name=y.name)}),r};return z(async()=>{var g;await t.getMusicSheetCategory(),await t.getSubjects(),d.type==="MUSIC"&&(b.value=(g=f.value)==null?void 0:g.offsetHeight,m())}),()=>{let g,r;return e("div",{class:x.searchGroup},[e("div",{class:[x.searchCatatory]},[e(G,{size:"small",class:x.btnType},we(g=ie.map(y=>e(F,{type:d.type===y.value?"primary":"default",secondary:d.type!==y.value,round:!0,size:"small",focusable:!1,onClick:()=>{d.type=y.value,u(),ce(()=>{var P;d.type==="MUSIC"?(b.value=(P=f.value)==null?void 0:P.offsetHeight,m()):i.value=[]})}},{default:()=>[y.label]})))?g:{default:()=>[g]})]),e(q,{labelAlign:"left",labelPlacement:"left"},{default:()=>[d.type==="MUSIC"&&e("div",{class:[x.collapsSection]},[e(Q,{label:"教材:"},{default:()=>[e("div",{class:[x.collapseWrap,p.value?"":x.hideButton,o.value?"":x.isHidden],ref:f},[e(G,{class:[x.spaceSection2]},{default:()=>[t.getAllMusicCategories.map(y=>e(F,{ref:s,secondary:d.bookVersionId===y.id,quaternary:d.bookVersionId!==y.id,strong:!0,focusable:!1,type:d.bookVersionId===y.id?"primary":"default",onClick:()=>{d.bookVersionId=y.id,u()}},{default:()=>[y.name]})),c.value>1&&e("div",{style:{position:"absolute",display:"flex",alignItems:"center"},onClick:()=>{l(!o.value)}},[e(le,{previewDisabled:!0,src:Pe,class:[x.collaoseBtn,o.value?x.isStart:""]},null)])]})])]})]),e(Q,{label:"声部:"},{default:()=>[e(G,{class:x.spaceSection},we(r=t.getSubjectInstruments.map(y=>y.instruments&&y.instruments.length>1?e(ue,{options:y.instruments,trigger:"hover",value:d.subjectId,"onUpdate:value":[P=>d.subjectId=P,()=>{u()}],key:y.value,class:[x.popSelect]},{default:()=>[e("span",{class:[x.textBtn,h(y.instruments).selected&&x.textBtnActive]},[h(y.instruments).name||y.name,e("i",{class:x.iconArrow},null)])]}):e("span",{class:[x.textBtn,d.subjectId===y.value&&x.textBtnActive],onClick:()=>{d.subjectId=y.value,u()}},[y.name])))?r:{default:()=>[r]})]}),e(ne,{class:x.inputSearch,round:!0,onSearch:y=>{d.name=y,u()}},null)]})])}}}),Ut=_({name:"shareResources-guide",emits:["close"],setup(n,{emit:a}){const t=T({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}),d=S(!1),u=S({});(async()=>{var s;try{const l=await Ae({guideTag:"teacher-guideInfo"});l.data?u.value=JSON.parse((s=l.data)==null?void 0:s.guideValue)||null:u.value={},u.value&&u.value.shareResourcesGuide?d.value=!1:d.value=!0}catch(l){console.log(l)}})();const i=()=>{var l,m,h,g;const s=document.getElementById("shareResources-".concat(t.step));if(s){const r=s.getBoundingClientRect(),y=((l=t.steps[t.step].eleRectPadding)==null?void 0:l.left)||0,P=((m=t.steps[t.step].eleRectPadding)==null?void 0:m.top)||0,L=((h=t.steps[t.step].eleRectPadding)==null?void 0:h.width)||0,A=((g=t.steps[t.step].eleRectPadding)==null?void 0:g.height)||0;"shareResources-".concat(t.step)=="shareResources-1"?(t.box={left:r.x-y+"px",top:r.y-P+"px",width:(r.width+L)*2+L+"px",height:r.height+A+"px"},console.log(t.box.width,"---",r.width)):t.box={left:r.x-y+"px",top:r.y-P+"px",width:r.width+L+"px",height:r.height+A+"px"}}else o()},b=async s=>{try{if(s!=="shareResources")return;u.value?u.value.classGuide=!1:u.value={classGuide:!1};try{await K({guideTag:"teacher-guideInfo",guideValue:JSON.stringify(u.value)})}catch(l){console.log(l)}t.step=0,i(),d.value=!0}catch(l){}};z(()=>{i(),window.addEventListener("resize",c),D.on("natural-resources-guide",s=>b(s))});const c=()=>{i()};re(()=>{window.removeEventListener("resize",c),D.off("natural-resources-guide",b)});const o=()=>{if(t.step>=4){p();return}t.step=t.step+1,i()},p=async()=>{u.value?u.value.shareResourcesGuide=!0:u.value={shareResourcesGuide:!0};try{const s=await K({guideTag:"teacher-guideInfo",guideValue:JSON.stringify(u.value)})}catch(s){console.log(s)}d.value=!1};return()=>e(N,null,[d.value?de(e("div",{"onUpdate:show":s=>d.value=s,class:["n-modal-mask","n-modal-mask-guide"]},[e("div",{class:I.content,onClick:()=>o()},[e("div",{class:I.backBtn,onClick:s=>{s.stopPropagation(),p()}},[C("跳过")]),e("div",{class:I.box,style:{...t.box,...t.steps[t.step].boxStyle},id:"modeType-".concat(t.step)},[t.steps.map((s,l)=>{var m,h,g,r;return e("div",{onClick:y=>y.stopPropagation(),class:I.item,style:s.type=="bottom"?{display:l===t.step?"":"none",left:"".concat((m=s.eleRect)==null?void 0:m.left,"px"),top:"-".concat((h=s.imgStyle)==null?void 0:h.height)}:{display:l===t.step?"":"none",left:"".concat((g=s.eleRect)==null?void 0:g.left,"px"),top:"".concat((r=t.box)==null?void 0:r.height)}},[e("img",{class:I.img,style:s.imgStyle,src:s.img},null),e("div",{class:I.btns,style:s.btnsStyle},[t.step+1==t.steps.length?e(N,null,[e("div",{class:[I.endBtn],onClick:()=>p()},[C("完成")]),e("div",{class:I.nextBtn,onClick:()=>{t.step=0,i()}},[C("再看一遍")])]):e("div",{class:I.btn,onClick:()=>o()},[C("下一步 ("),t.step+1,C("/"),t.steps.length,C(")")])])])})])])]),[[pe,d.value,"show"]]):null])}}),Et=_({name:"share-resources",setup(){const n=T({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=S(!1),t=S(),d=async()=>{try{n.loading=!0;const{data:i}=await fe({...n.searchGroup,...n.pagination});n.loading=!1,n.pageTotal=Number(i.total);const b=i.rows||[],c=[];b.forEach(o=>{c.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=c||[],setTimeout(()=>{a.value=!0},500)}catch(i){n.loading=!1}},u=async i=>{n.pagination.page=1;const{subjectId:b,...c}=i;n.searchGroup=Object.assign(n.searchGroup,{...c,musicalInstrumentId:b}),d()},f=async i=>{try{await me({materialId:i.id,favoriteFlag:i.isCollect?0:1,type:i.type}),i.isCollect=!i.isCollect}catch(b){}};return z(()=>{d()}),()=>e(N,null,[e(Bt,{ref:t,onSearch:i=>u(i),onAdd:()=>n.teachingStatus=!0},null),e(ge,{show:n.loading,"onUpdate:show":i=>n.loading=i,style:{"min-height":"50vh"}},{default:()=>[e("div",{class:x.list},[n.tableList.map((i,b)=>e("div",{class:x.itemWrap},[e("div",{class:x.itemWrapBox},[b==0?e(X,Ue({id:"shareResources-1"},{item:i,disabledMouseHover:!1,onClick:c=>{c.type!=="IMG"&&(n.show=!0,n.item=c)},onCollect:c=>f(c)}),null):e(X,{item:i,disabledMouseHover:!1,onClick:c=>{c.type!=="IMG"&&(n.show=!0,n.item=c)},onCollect:c=>f(c)},null)])])),!n.loading&&n.tableList.length<=0&&e(he,{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:d},null),e(ye,{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",x.teachingModal],title:"自定义教材",blockScroll:!1},{default:()=>[e(Je,{onClose:()=>n.teachingStatus=!1},null)]}),a.value?e(Ut,null,null):null])}}),xt="_list_183b0_1",kt="_searchGroup_183b0_10",Ft="_btnType_183b0_14",Rt="_inputSearch_183b0_54",Pt="_searchCatatory_183b0_78",Mt="_btnGroup_183b0_85",Gt="_addTrain_183b0_88",Tt="_error_183b0_96",Nt="_iconUpload_183b0_103",_t="_iconEdit_183b0_107",Wt="_iconSelectAll_183b0_111",zt="_iconDelete_183b0_115",Lt="_iconPen_183b0_119",Ot="_itemWrap_183b0_123",Dt="_itemWrapBox_183b0_128",jt="_itemBg_183b0_140",Vt="_itemBgChecked_183b0_149",Qt="_resourceDefault_183b0_152",Kt="_spaceSection_183b0_159",Yt="_attendClassModal_183b0_165",Jt="_attendClassSaveModal_183b0_171",Xt="_removeVisiable_183b0_177",Zt="_studentRemove_183b0_183",Ht="_btnGroupModal_183b0_195",qt="_popSelect_183b0_202",$t="_spaceSection2_183b0_212",es="_textBtn_183b0_221",ts="_iconArrow_183b0_233",ss="_textBtnActive_183b0_242",v={list:xt,searchGroup:kt,btnType:Ft,inputSearch:Rt,searchCatatory:Pt,btnGroup:Mt,addTrain:Gt,error:Tt,iconUpload:Nt,iconEdit:_t,iconSelectAll:Wt,iconDelete:zt,iconPen:Lt,itemWrap:Ot,itemWrapBox:Dt,itemBg:jt,itemBgChecked:Vt,resourceDefault:Qt,spaceSection:Kt,attendClassModal:Yt,attendClassSaveModal:Jt,removeVisiable:Xt,studentRemove:Zt,btnGroupModal:Ht,popSelect:qt,spaceSection2:$t,textBtn:es,iconArrow:ts,textBtnActive:ss},as="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAC4AAAAmCAYAAAC76qlaAAAAAXNSR0IArs4c6QAAB9dJREFUWEe1mQ2MHGUZx//POzO3V669j5mt0g8badGmRKFfVA2ijWCICAUKJbFAoygJkdAPtcnOXmuW2Ns5E6IUaSiCoJRKpdSWIn7RmIZqlBZL/Ugr6LVaS096O3PXa3vs7sy8j5m9/Zhu73Z2r8cmd7m7eT5+7/M+zzPP+x5hnD6pFIsNuf5PAfKzTJhGjKlgijHQS4STLPhgvN347btr6dx4uKSLNTKhMzMtz0hC4g4AH6hpj5AlxqsgsjzL+OPF+B4z+PTv8YT/9dnfZsYqABMahSDQTlVVvpnd0H6sUd1AfkzgQZRdiV3MWDiiU0IfMZ0EIcfAFARfzOoFskQOKcoyb0P77xqFbxi8aV1mju8hcHRp2BkBbxKJJ1Uhd7/XFX8n/Gxyiic6rnMDSSxnxm0AV/wSeQLiXtfq2NIIfEPgranT+rmcux+MWWUnhD6Fxaqc1bG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QquoY1Y+fWqD3XFPgzwU2iPiWFnP32C33X8A3lwdU2JMmvn53EBAgZN8m8QLdeBPYr43s14wcFyf5IPhhEoOmznv/e0FslOnCH20GyCIOhLLp08PgTZbsmGGAGn7Ug8zNMxQq0odDOtQh14WOO5bJI/VehnOWfnMgQ11yHbzBO166zhk5rwPtrVSl5xkUhNphsc040AsPx822rUnsFOvEfqEQFbFiOw2F+d+2Vagqnhxct+9Sq9Gx/KZHxq3JtXfpcnpKanw0pifvtBoL2x1t28F0MvYjQ+07CR3l4nv6y9tWd2kbhv/Nr3cSxY28y09lBrTq/ovEpGqT0Swp3HZm/fUteuXKwSjdeFfRbAAojIQlMAgMQXgnvDPQlbM0V07G69nWp46Att9h+DzAwF0CBbIu5bv1Td6151bAtU26itnQT67LVAin1q3R2fl/PmVRv2257LwGo9MaMiEkGoQOIpoBS5pkWy7673/AG2QyadOuCtAAAAAAElFTkSuQmCC";function Ie(n){return typeof n=="function"||Object.prototype.toString.call(n)==="[object Object]"&&!$(n)}const us=_({name:"search-group",emits:["search","upload","edit","selectAll","delete","update"],setup(n,{emit:a,expose:t}){const d=S([]),u=H(),f=T({type:"MUSIC",name:"",bookVersionId:null,subjectId:null}),i=T({tempSubjectId:null,isEdit:!1,isSelectAll:!1}),b=()=>{a("search",f)};z(async()=>{d.value=[],ie.forEach(p=>{d.value.push(p)}),await u.getSubjects(),f.subjectId&&(i.tempSubjectId=f.subjectId)});const c=p=>{const s={};return p==null||p.forEach(l=>{l.id===f.subjectId&&(s.selected=!0,s.name=l.name)}),s};return t({resetStatus:()=>{i.isSelectAll=!1}}),()=>{let p,s;return e("div",{class:v.searchGroup},[e("div",{class:v.searchCatatory},[e(G,{size:"small",class:v.btnType},Ie(p=d.value.map(l=>e(F,{type:f.type===l.value?"primary":"default",secondary:f.type!==l.value,round:!0,size:"small",focusable:!1,onClick:()=>{f.type!==l.value&&(i.isEdit=!1,i.isSelectAll=!1,a("edit",i.isEdit)),f.type=l.value,b()}},{default:()=>[l.label]})))?p:{default:()=>[p]}),e(G,{size:"small",class:v.btnGroup},{default:()=>[i.isEdit?e(N,null,[e(F,{type:"primary",class:v.addTrain,focusable:!1,strong:!0,onClick:()=>{i.isSelectAll=!i.isSelectAll,a("selectAll",i.isSelectAll)}},{default:()=>[e("img",{src:i.isSelectAll?os:ns,class:v.iconSelectAll},null),C("全选")]}),e(F,{type:"error",class:[v.addTrain,v.error],focusable:!1,strong:!0,onClick:()=>a("delete")},{default:()=>[e("img",{src:cs,class:v.iconDelete},null),C("删除")]}),f.type!=="MUSIC"&&e(F,{type:"primary",class:v.addTrain,focusable:!1,strong:!0,onClick:()=>a("update")},{default:()=>[e("img",{src:is,class:v.iconPen},null),C("修改")]}),e(F,{type:"primary",class:v.addTrain,focusable:!1,strong:!0,onClick:()=>{i.isEdit=!1,i.isSelectAll=!1,a("edit",i.isEdit)}},{default:()=>[C("完成编辑")]}),e(F,{type:"error",class:[v.addTrain,v.error],focusable:!1,strong:!0,onClick:()=>{i.isEdit=!1,i.isSelectAll=!1,a("edit",i.isEdit)}},{default:()=>[C("取消编辑")]})]):e(N,null,[e(F,Ue({type:"primary",class:v.addTrain,focusable:!1},{id:"myResources-0"},{strong:!0,onClick:()=>a("upload")}),{default:()=>[e("img",{src:as,class:v.iconUpload},null),C("上传资源")]}),e(F,{type:"primary",class:v.addTrain,focusable:!1,strong:!0,onClick:()=>{i.isEdit=!0,a("edit",i.isEdit)}},{default:()=>[e("img",{src:ls,class:v.iconEdit},null),C("编辑资源")]})])]})]),e(q,{labelAlign:"left",labelPlacement:"left"},{default:()=>[e(Q,{label:"声部:"},{default:()=>[e(G,{class:v.spaceSection2},Ie(s=u.getSubjectInstruments.map(l=>l.instruments&&l.instruments.length>1?e(ue,{options:l.instruments,trigger:"hover",value:i.tempSubjectId,"onUpdate:value":[m=>i.tempSubjectId=m,()=>{i.tempSubjectId!==l.value&&(i.isEdit=!1,i.isSelectAll=!1,a("edit",i.isEdit)),f.subjectId=i.tempSubjectId,b()}],key:l.value,class:[v.popSelect]},{default:()=>[e("span",{class:[v.textBtn,c(l.instruments).selected&&v.textBtnActive]},[c(l.instruments).name||l.name,e("i",{class:v.iconArrow},null)])]}):e("span",{class:[v.textBtn,f.subjectId===l.value&&v.textBtnActive],onClick:()=>{f.subjectId=l.value,b()}},[l.name])))?s:{default:()=>[s]})]}),e(ne,{class:v.inputSearch,round:!0,onSearch:l=>{f.name=l,b()}},null)]})])}}}),rs="_uploadModal_3dbwl_1",ds="_formModal_3dbwl_4",ps="_formSpace_3dbwl_8",gs="_previewModal_3dbwl_11",fs="_image_3dbwl_23",ms="_titleType_3dbwl_32",hs="_iconUploadDelete_3dbwl_40",ys="_commonType_3dbwl_49",As="_formItem_3dbwl_72",vs="_btnGroup_3dbwl_97",bs="_uploadFile_3dbwl_104",Ss="_uploadBtn_3dbwl_111",Cs="_iconUploadAdd_3dbwl_128",W={uploadModal:rs,formModal:ds,formSpace:ps,previewModal:gs,image:fs,titleType:ms,iconUploadDelete:hs,commonType:ys,formItem:As,btnGroup:vs,uploadFile:bs,uploadBtn:Ss,iconUploadAdd:Cs};function ws(n){return typeof n=="function"||Object.prototype.toString.call(n)==="[object Object]"&&!$(n)}const Fe=n=>n?(n==null?void 0:n.indexOf(".mp3"))>-1?O.SONG:(n==null?void 0:n.indexOf(".mp4"))>-1?O.VIDEO:(n==null?void 0:n.indexOf(".ppt"))>-1?O.PPT:O.IMG:"",Is=_({name:"upload-modal",props:{list:{type:Array,default:()=>[]},editStatus:{type:Boolean,default:!0}},emits:["close","confirm"],setup(n,{emit:a}){const t=H(),d=S(),u=ee();S(),S([]);const f=T({list:[],uploading:!1,uploadUrl:"",name:"",subjectIds:[]}),i=s=>{let l=ve;switch(s){case"IMG":l=ve;break;case"VIDEO":l=Ne;break;case"SONG":l=Te;break;case"MUSIC":l=Ge;break;case"PPT":l=Me;break}return l},b=async()=>{var s;(s=d.value)==null||s.validate(async l=>{if(l){ce(Le);return}f.uploading=!0;try{const m=[];f.list.forEach(h=>{m.push({subjectIds:h.subjectIds.join(","),openFlag:h.openFlag,coverImg:h.coverImg,name:h.name,type:h.type,enableFlag:1,content:h.content,id:h.id||null})}),o.value?await Ve(m):await Qe(m),f.list=[],u.success("保存成功"),a("close",!0),a("confirm")}catch(m){}f.uploading=!1})},c=s=>{f.list.splice(s,1)},o=Ee(()=>n.list.length>0);z(async()=>{const s=n.list||[],l=[];s.forEach(m=>{l.push({subjectIds:m.subjectId?m.subjectId.split(",").map(h=>Number(h)):[],openFlag:m.openFlag,coverImg:m.coverImg,name:m.title,type:m.type,sourceFrom:m.sourceFrom,enableFlag:m.enableFlag,content:m.content,id:m.id})}),f.list=l||[],console.log(l,"uploadForms"),await t.getSubjects()});const p=(s,l)=>{s.subjectIds=l.map(m=>m.id)};return()=>{let s;return e("div",{class:W.uploadModal},[e(Ye,{style:{"max-height":"55vh"}},{default:()=>[e(q,{ref:d,labelPlacement:"left",labelWidth:120,model:f,class:W.formModal},{default:()=>[e(G,{class:W.formSpace},ws(s=f.list.map((l,m)=>e("div",{class:W.formItem,key:m},[e("div",{class:W.previewModal},[e(le,{class:[W.titleType],src:i(l.type),previewDisabled:!0,objectFit:"cover"},null),!o.value&&e("img",{class:[W.iconUploadDelete],src:Xe,onClick:()=>c(m)},null),e(le,{class:[W.cover,W.image],lazy:!0,previewDisabled:!0,src:l.coverImg,objectFit:"cover"},null),e("div",{class:W.commonType},[C("是否公开:"),e(_e,{size:"small",value:l.openFlag,"onUpdate:value":h=>l.openFlag=h,disabled:l.sourceFrom==="TEACHER"&&l.type==="MUSIC"},null)])]),e(Q,{showFeedback:!1,path:"list.".concat(m,".name"),rule:[{required:!0,message:"请输入资源名称",trigger:["input","blur"]}]},{default:()=>[e(We,{value:l.name,"onUpdate:value":h=>l.name=h,placeholder:"请输入资源名称",maxlength:25,clearable:!0},null)]}),e(Q,{path:"list[".concat(m,"].subjectIds"),showFeedback:!1,rule:[{required:!0,message:"请选择素材可用声部",trigger:"change",type:"array"}]},{default:()=>[e(ze,{value:l.subjectIds,"onUpdate:value":h=>l.subjectIds=h,placeholder:"请选择素材可用声部(可多选)",options:t.getSubjectList,labelField:"name",valueField:"id",multiple:!0,maxTagCount:2,clearable:!0},{action:()=>e(N,null,[e(F,{text:!0,style:" --n-width: 100% ",onClick:()=>p(l,t.getSubjectList)},{default:()=>[C("全选")]})])})]})])))?s:{default:()=>[s]})]})]}),e(G,{class:W.btnGroup,justify:"center"},{default:()=>[e(F,{round:!0,onClick:()=>a("close")},{default:()=>[n.editStatus?"取消":"上一步"]}),e(F,{round:!0,type:"primary",loading:f.uploading,disabled:f.list.length===0,onClick:b},{default:()=>[C("确定")]})]})])}}}),Bs="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACgAAAAoCAYAAACM/rhtAAAAAXNSR0IArs4c6QAAA8dJREFUWEfNmU1sE1cQx///3Ue8CCOBnUJjpVUlop7opahqj3DmAFS0VdNDb1UL7YUg4bXSsARkBwk4FYp66wFQP1TEoedwBFX0Ui6tglSVyCnUNogYsTa7O9Vbs46dpPVXIPuOfm/m/XZm3rx5Y6LPkZh8uMP3/X0C2UVBBkRGgIxWR6AIQVGIIsFbpmleq53acqefrdiLUNJZ3ObW659DcEBEdvYiS/I2iKvW0NBXVWfz/W5luwJ8yZHkA7cyIZSjECS7Vb7qOqJK4ZmtVursPw6rnXR1BDTt0rsALkCwfYUy8i4oPxOcM8CFwGBRrzECyQSQEYGMQbgXIq+slMU9AIf8wvBP/wf5n4Aiwg12ZUqA44AsrQstgPM01PdP81t+7WQBPb8h9/BNCbz3hTjc7gFqxSeeFlLTJGU1XasCjp6TjQv3K98C8l5TiPRA+caCNf04n9Rf3/PYlKtud+FOQfgJRNSSAv4wsi318fwRPlmudAWgtpyyK9+1wYHzhmHu69Zinci1RYPAvwbIaCukV0h9sNySKwBVtnxcIE4kSPBGwkoceOwk/+60cS/zm5zqyzW3dlUg77Ts5Xgz6ROtetoAwwMh/DGKOQ03aqX2/OnQ7WXzbte+5og171Zmly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tN2PlQejPEHQR585wKo+3zZPPkz2W2RGJZUAC+6N/GZPaSHkPvcjqpNcNSlH6tGRiNgqc2k3702FYoMHXdKmRhLbEQTmxMJ2RueNnOSQyN6aeUtANkLqxKFAu4zd1ZYcRQWymCYRmhGND6aRBHftXPxpnRTb3dXfWl6fZyA+oWFuGvixJ+GMm932lKM0H90sSV5/S1M366QlKtKTIahPJe3LmNOf/0wUHO6cejeCbm9PNbarnM2QfMVJBz+gk4FajyiB6OtAJYrfeif10f0dUY4kb9DfEf/jo/ywKomDwAAAAASUVORK5CYII=",Es=_({name:"myResources-guide",emits:["close"],setup(n,{emit:a}){const t=T({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}),d=S(!1),u=S({});(async()=>{var s;try{const l=await Ae({guideTag:"teacher-guideInfo"});l.data?u.value=JSON.parse((s=l.data)==null?void 0:s.guideValue)||null:u.value={},console.log(u.value,"guideInfo.value"),u.value&&u.value.myResourcesGuide?d.value=!1:d.value=!0}catch(l){console.log(l)}})();const i=()=>{var l,m,h,g;const s=document.getElementById("myResources-".concat(t.step));if(s){const r=s.getBoundingClientRect(),y=((l=t.steps[t.step].eleRectPadding)==null?void 0:l.left)||0,P=((m=t.steps[t.step].eleRectPadding)==null?void 0:m.top)||0,L=((h=t.steps[t.step].eleRectPadding)==null?void 0:h.width)||0,A=((g=t.steps[t.step].eleRectPadding)==null?void 0:g.height)||0;t.box={left:r.x-y+"px",top:r.y-P+"px",width:r.width+L+"px",height:r.height+A+"px"}}else o()},b=async s=>{try{if(s!=="myResources")return;u.value?u.value.classGuide=!1:u.value={classGuide:!1};try{await K({guideTag:"teacher-guideInfo",guideValue:JSON.stringify(u.value)})}catch(l){console.log(l)}t.step=0,i(),d.value=!0}catch(l){}};z(()=>{i(),window.addEventListener("resize",c),D.on("natural-resources-guide",s=>b(s))});const c=()=>{i()};re(()=>{window.removeEventListener("resize",c),D.off("natural-resources-guide",b)});const o=()=>{if(t.step>=4){p();return}t.step=t.step+1,i()},p=async()=>{u.value?u.value.myResourcesGuide=!0:u.value={myResourcesGuide:!0};try{const s=await K({guideTag:"teacher-guideInfo",guideValue:JSON.stringify(u.value)})}catch(s){console.log(s)}d.value=!1};return()=>e(N,null,[d.value?de(e("div",{"onUpdate:show":s=>d.value=s,class:["n-modal-mask","n-modal-mask-guide"]},[e("div",{class:I.content,onClick:()=>o()},[e("div",{class:I.backBtn,onClick:s=>{s.stopPropagation(),p()}},[C("跳过")]),e("div",{class:I.box,style:{...t.box,...t.steps[t.step].boxStyle},id:"modeType-".concat(t.step)},[t.steps.map((s,l)=>{var m,h,g,r;return e("div",{onClick:y=>y.stopPropagation(),class:I.item,style:s.type=="bottom"?{display:l===t.step?"":"none",left:"".concat((m=s.eleRect)==null?void 0:m.left,"px"),top:"-".concat((h=s.imgStyle)==null?void 0:h.height)}:{display:l===t.step?"":"none",left:"".concat((g=s.eleRect)==null?void 0:g.left,"px"),top:"".concat((r=t.box)==null?void 0:r.height)}},[e("img",{class:I.img,style:s.imgStyle,src:s.img},null),e("div",{class:I.btns,style:s.btnsStyle},[t.step+1==t.steps.length?e(N,null,[e("div",{class:[I.endBtn],onClick:()=>p()},[C("完成")])]):e("div",{class:I.btn,onClick:()=>o()},[C("下一步 ("),t.step+1,C("/"),t.steps.length,C(")")])])])})])])]),[[pe,d.value,"show"]]):null])}}),xs="_saveModal_ulplg_1",ks="_uploadBtn_ulplg_25",Fs="_iconUploadAdd_ulplg_47",Rs="_btnGroup_ulplg_57",Y={saveModal:xs,uploadBtn:ks,iconUploadAdd:Fs,btnGroup:Rs},Ps=_({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/"),d=ee(),u=S(!1),f=S(!1),i=S(),b=S(),c=T([]),o=S([]),p=S([]),s=async A=>{const B=A.file;let U=!0;const w=B.type.includes("image")?O.IMG:B.type.includes("audio")?O.SONG:B.type.includes("video")?O.VIDEO:B.type.includes("vnd.openxmlformats-officedocument.presentationml.presentation")||B.type.includes("vnd.ms-powerpoint")?O.PPT:"other";if(console.log(w,"type"),w==="other")return d.error("文件格式不支持"),!1;const k=w==="IMG"?2:w==="SONG"?20:500;if(k&&(U=B.file.size/1024/1024<k,!U)){const M=w==="IMG"?"图片":w==="SONG"?"音频":"视频";return d.error("".concat(M,"大小不能超过").concat(k,"M")),!1}if(!U)return U;try{f.value=!0;const M=B.file.name,j=M.slice(M.lastIndexOf(".")),V="".concat(n.path).concat(Date.now()+B.id+j),Re={filename:V,bucketName:n.bucketName,postData:{filename:V,acl:"public-read",key:V,unknowValueField:[]}},{data:te}=await Ce(Re);c.push({id:B.id,tempFiileBuffer:B.file,policy:te.policy,signature:te.signature,acl:"public-read",key:V,KSSAccessKeyId:te.kssAccessKeyId,name:V})}catch(M){return f.value=!1,!1}return!0},l=A=>{m(A)},m=async A=>{console.log(A,"onFinishAfter");const B=c.find(k=>k.id==A.file.id),U=Fe(A.file.url);let w="";U==="IMG"?w=A.file.url:U==="SONG"?w=be.SONG_DEFAULT_COVER:U==="PPT"?w=be.PPT_DEFAULT_COVER:U==="VIDEO"&&(w=await g(B.tempFiileBuffer)),p.value.push({coverImg:w,content:A.file.url,id:A.file.id,name:A.file.name?A.file.name.slice(0,A.file.name.lastIndexOf(".")):""}),u.value=!1,f.value=!1},h=A=>new Promise((B,U)=>{const w=document.createElement("video");w.currentTime=1,w.src=URL.createObjectURL(A),w.addEventListener("loadedmetadata",function(){console.log("loaded in"),w.currentTime=1,w.addEventListener("canplay",function(){console.log("Video can play");const k=document.createElement("canvas"),M=w.videoWidth,j=w.videoHeight;k.width=M,k.height=j,k.getContext("2d").drawImage(w,0,0,M,j),k.toBlob(V=>{B(V)})})}),w.addEventListener("error",function(k){console.error("Error loading video:",k),U(k)})}),g=async A=>{try{f.value=!0;const B=await h(A||i.value),U="".concat(n.path).concat(Date.now()+".png"),w={filename:U,bucketName:n.bucketName,postData:{filename:U,acl:"public-read",key:U,unknowValueField:[]}},{data:k}=await Ce(w),M={policy:k.policy,signature:k.signature,key:U,acl:"public-read",KSSAccessKeyId:k.kssAccessKeyId,name:U,file:B};return await Ze(t,M)}finally{f.value=!1}},r=async A=>{const B=p.value.findIndex(U=>U.id===A.file.id);return p.value.splice(B,1),f.value=!1,!0},y=Ee(()=>{let A=!1;return o.value.forEach(B=>{B.status!=="finished"&&(A=!0)}),A||o.value.length<=0||f.value}),P=({file:A,action:B,onFinish:U,onError:w,onProgress:k})=>{const M=c.find(j=>j.id==A.id);M.file=A,He({file:A,action:B,data:M,onProgress:k,onFinish:U,onError:w})},L=async()=>{const A=[];o.value.forEach(B=>{const U=p.value.find(w=>w.id===B.id);U&&A.push(U)}),a("confrim",A)};return()=>e("div",{class:Y.saveModal},[e(Oe,{ref:b,action:t,customRequest:P,fileList:o.value,"onUpdate:fileList":A=>o.value=A,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:A=>s(A),onFinish:A=>{l(A)},onRemove:A=>r(A)},{default:()=>[e(De,null,{default:()=>[e("div",{class:Y.uploadBtn},[e("div",{class:Y.iconUploadAdd},null),e("h3",null,[C("点击或者拖动文件到该区域来上传")]),e("p",null,[C("仅支持JPG、PNG、MP3、MP4、PPT格式文件,单次最多支持"),e("br",null,null),C("上传10个文件")])])]})]}),e(G,{class:Y.btnGroup,justify:"center"},{default:()=>[e(F,{round:!0,onClick:()=>a("close")},{default:()=>[C("取消")]}),e(F,{round:!0,type:"primary",disabled:y.value,onClick:L},{default:()=>[C("确定")]})]})])}}),Ms=_({name:"share-resources",setup(){const n=ee();xe();const a=T({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=S(!1),d=async()=>{try{a.loading=!0;const{data:o}=await fe({...a.searchGroup,...a.pagination});a.loading=!1,a.pageTotal=Number(o.total);const p=o.rows||[],s=[];p.forEach(l=>{s.push({id:l.id,coverImg:l.coverImg,type:l.type,title:l.name,isCollect:!!l.favoriteFlag,isSelected:l.sourceFrom==="PLATFORM",content:l.content,subjectId:l.subjectIds,sourceFrom:l.sourceFrom,enableFlag:l.enableFlag?1:0,openFlag:l.openFlag})}),a.tableList=s||[],setTimeout(()=>{t.value=!0},500)}catch(o){a.loading=!1}},u=async o=>{try{await me({materialId:o.id,favoriteFlag:o.isCollect?0:1,type:o.type}),o.isCollect=!o.isCollect}catch(p){}},f=async o=>{a.pagination.page=1;const{subjectId:p,...s}=o;a.searchGroup=Object.assign(a.searchGroup,{...s,musicalInstrumentId:p}),d()},i=async()=>{try{a.searchGroup.type==="MUSIC"?await Se(a.editIds):await Ke(a.editIds),n.success("删除成功"),a.pagination.page=1,d(),a.editIds=[]}catch(o){}},b=async()=>{try{a.searchGroup.type==="MUSIC"?await Se([a.removeItem.id]):await ke({ids:a.removeItem.id}),n.success("删除成功"),f(a.searchGroup)}catch(o){}},c=S();return z(()=>{d()}),()=>e(N,null,[e(us,{ref:c,onSearch:o=>f(o),onUpload:()=>{a.editList=[],a.saveStatus=!0},onUpdate:()=>{const o=[];if(a.tableList.forEach(p=>{a.editIds.indexOf(p.id)>-1&&o.push(p)}),a.editList=o||[],a.editList.length<=0){n.error("至少选择一条资源进行编辑");return}a.uploadStatus=!0},onEdit:o=>{a.editStatus=o,a.editStatus||(a.editIds=[])},onSelectAll:o=>{if(o){const p=[];a.tableList.forEach(s=>{p.push(s.id)}),a.editIds=p}else a.editIds=[]},onDelete:()=>{if(a.editIds.length<=0){n.error("至少选择一条资源进行删除");return}a.type="delete",a.removeContent="是否删除该资源?",a.removeVisiable=!0}},null),e(ge,{show:a.loading,"onUpdate:show":o=>a.loading=o,style:{"min-height":"50vh"}},{default:()=>[e("div",{class:v.list},[a.tableList.map(o=>e("div",{class:v.itemWrap},[e("div",{class:v.itemWrapBox},[e(X,{item:o,isDownload:!0,disabledMouseHover:!1,offShelf:!o.enableFlag,onOffShelf:()=>{a.type="remove",a.removeContent="该资源已下架,是否删除?",a.removeVisiable=!0,a.removeItem=o},onClick:p=>{p.type==="IMG"||!o.enableFlag||(a.show=!0,a.item=p)},onCollect:p=>u(p)},null),a.editStatus&&e("div",{class:[v.itemBg,a.editIds.includes(o.id)?v.itemBgChecked:""],onClick:()=>{const p=a.editIds.indexOf(o.id);p>-1?a.editIds.splice(p,1):a.editIds.push(o.id)}},[e("img",{src:a.editIds.includes(o.id)?Us:Bs,class:v.resourceDefault},null)])])])),!a.loading&&a.tableList.length<=0&&e(he,{style:{minHeight:"50vh"},description:"暂无资源"},null)])]}),e(oe,{page:a.pagination.page,"onUpdate:page":o=>a.pagination.page=o,pageSize:a.pagination.rows,"onUpdate:pageSize":o=>a.pagination.rows=o,pageTotal:a.pageTotal,"onUpdate:pageTotal":o=>a.pageTotal=o,onList:d},null),e(ye,{show:a.show,"onUpdate:show":o=>a.show=o,item:a.item},null),e(J,{show:a.uploadStatus,"onUpdate:show":o=>a.uploadStatus=o,preset:"card",showIcon:!1,class:["modalTitle background",v.attendClassModal],title:a.editStatus?"修改资源":"上传资源",blockScroll:!1},{default:()=>[e(Is,{editStatus:a.editStatus,onClose:()=>{a.uploadStatus=!1},onConfirm:()=>{var o;a.editIds=[],a.editList=[],a.saveStatus=!1,(o=c.value)==null||o.resetStatus(),f(a.searchGroup)},list:a.editList},null)]}),e(J,{show:a.saveStatus,"onUpdate:show":o=>a.saveStatus=o,preset:"card",showIcon:!1,class:["modalTitle background",v.attendClassSaveModal],title:"上传资源",blockScroll:!1},{default:()=>[e(Ps,{onClose:()=>a.saveStatus=!1,onConfrim:o=>{const p=o||[],s=[];p.forEach(l=>{s.push({subjectIds:null,openFlag:!1,coverImg:l.coverImg,title:l.name||"",type:Fe(l.content),enableFlag:1,content:l.content,id:null})}),a.editList=s,a.uploadStatus=!0,a.editStatus=!1}},null)]}),t.value?e(Es,null,null):null,e(J,{show:a.removeVisiable,"onUpdate:show":o=>a.removeVisiable=o,preset:"card",class:["modalTitle",v.removeVisiable],title:"提示"},{default:()=>[e("div",{class:v.studentRemove},[e("p",null,[a.removeContent]),e(G,{class:v.btnGroupModal,justify:"center"},{default:()=>[e(F,{round:!0,type:"primary",onClick:()=>{a.type==="remove"?b():i(),a.removeVisiable=!1}},{default:()=>[C("确定")]}),e(F,{round:!0,onClick:()=>a.removeVisiable=!1},{default:()=>[C("取消")]})]})])]})])}}),Gs="_list_44zd9_1",Ts="_itemWrap_44zd9_11",Ns="_itemWrapBox_44zd9_16",_s="_searchGroup_44zd9_28",Ws="_btnType_44zd9_32",zs="_inputSearch_44zd9_67",Ls="_searchCatatory_44zd9_91",Os="_addTrain_44zd9_98",Ds="_spaceSection_44zd9_110",js="_collapseWrap_44zd9_116",Vs="_collaoseBtn_44zd9_122",Qs="_isStart_44zd9_127",Ks="_collapsSection_44zd9_130",Ys="_isHidden_44zd9_133",Js="_hideButton_44zd9_137",Xs="_popSelect_44zd9_142",Zs="_spaceSection2_44zd9_152",Hs="_textBtn_44zd9_161",qs="_iconArrow_44zd9_173",$s="_textBtnActive_44zd9_182",R={list:Gs,itemWrap:Ts,itemWrapBox:Ns,searchGroup:_s,btnType:Ws,inputSearch:zs,searchCatatory:Ls,addTrain:Os,spaceSection:Ds,collapseWrap:js,collaoseBtn:Vs,isStart:Qs,collapsSection:Ks,isHidden:Ys,hideButton:Js,popSelect:Xs,spaceSection2:Zs,textBtn:Hs,iconArrow:qs,textBtnActive:$s};function Be(n){return typeof n=="function"||Object.prototype.toString.call(n)==="[object Object]"&&!$(n)}const ea=_({name:"search-group",emits:["search"],setup(n,{emit:a}){const t=H(),d=S([]),u=T({type:"MUSIC",name:"",bookVersionId:null,subjectId:null}),f=()=>{a("search",u)},i=S(),b=S([]),c=S(0),o=S(0),p=S(!1),s=S(!1),l=()=>{try{b.value=[...new Set(b.value)];let h=-1;b.value.forEach((g,r)=>{r===0?(o.value=1,h=g.offsetLeft):g.offsetLeft===h&&r!=0&&o.value++,p.value?g.style.display="block":o.value>1?g.style.display="none":g.style.display="block"}),s.value=!0}catch(h){}},m=h=>{const g={};return h==null||h.forEach(r=>{r.id===u.subjectId&&(g.selected=!0,g.name=r.name)}),g};return z(async()=>{d.value=[...ie],await t.getMusicSheetCategory(),await t.getSubjects()}),()=>{let h,g;return e("div",{class:R.searchGroup},[e("div",{class:R.searchCatatory},[e(G,{size:"small",class:R.btnType},Be(h=d.value.map(r=>e(F,{type:u.type===r.value?"primary":"default",secondary:u.type!==r.value,round:!0,size:"small",focusable:!1,onClick:()=>{u.type=r.value,f(),ce(()=>{var y;u.type==="MUSIC"?(c.value=(y=i.value)==null?void 0:y.offsetHeight,l()):b.value=[]})}},{default:()=>[r.label]})))?h:{default:()=>[h]})]),e(q,{labelAlign:"left",labelPlacement:"left"},{default:()=>[e(Q,{label:"声部:"},{default:()=>[e(G,{class:R.spaceSection2},Be(g=t.getSubjectInstruments.map(r=>r.instruments&&r.instruments.length>1?e(ue,{options:r.instruments,trigger:"hover",value:u.subjectId,"onUpdate:value":[y=>u.subjectId=y,()=>{f()}],key:r.value,class:[R.popSelect]},{default:()=>[e("span",{class:[R.textBtn,m(r.instruments).selected&&R.textBtnActive]},[m(r.instruments).name||r.name,e("i",{class:R.iconArrow},null)])]}):e("span",{class:[R.textBtn,u.subjectId===r.value&&R.textBtnActive],onClick:()=>{u.subjectId=r.value,f()}},[r.name])))?g:{default:()=>[g]})]}),e(ne,{class:R.inputSearch,round:!0,onSearch:r=>{u.name=r,f()}},null)]})])}}}),ta=_({name:"myColloge-guide",emits:["close"],setup(n,{emit:a}){const t=T({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}),d=S(!1),u=S({});(async()=>{var s;try{const l=await Ae({guideTag:"teacher-guideInfo"});l.data?u.value=JSON.parse((s=l.data)==null?void 0:s.guideValue)||null:u.value={},u.value&&u.value.myColloge?d.value=!1:d.value=!0}catch(l){console.log(l)}})();const i=()=>{var l,m,h,g;const s=document.getElementById("myColloge-".concat(t.step));if(s){const r=s.getBoundingClientRect(),y=((l=t.steps[t.step].eleRectPadding)==null?void 0:l.left)||0,P=((m=t.steps[t.step].eleRectPadding)==null?void 0:m.top)||0,L=((h=t.steps[t.step].eleRectPadding)==null?void 0:h.width)||0,A=((g=t.steps[t.step].eleRectPadding)==null?void 0:g.height)||0;t.box={left:r.x-y+"px",top:r.y-P+"px",width:r.width+L+"px",height:r.height+A+"px"}}else o()},b=async s=>{try{if(console.log(s),s!=="myCollect")return;console.log(s,"name"),u.value?u.value.myColloge=!1:u.value={myColloge:!1};try{await K({guideTag:"teacher-guideInfo",guideValue:JSON.stringify(u.value)})}catch(l){console.log(l)}t.step=0,i(),d.value=!0}catch(l){}};z(()=>{i(),window.addEventListener("resize",c),D.on("natural-resources-guide",s=>b(s))});const c=()=>{i()};re(()=>{window.removeEventListener("resize",c),D.off("natural-resources-guide",b)});const o=()=>{if(t.step>=4){p();return}t.step=t.step+1,i()},p=async()=>{u.value?u.value.myColloge=!0:u.value={myColloge:!0};try{const s=await K({guideTag:"teacher-guideInfo",guideValue:JSON.stringify(u.value)})}catch(s){console.log(s)}d.value=!1};return()=>e(N,null,[d.value?de(e("div",{"onUpdate:show":s=>d.value=s,class:["n-modal-mask","n-modal-mask-guide"]},[e("div",{class:I.content,onClick:()=>o()},[e("div",{class:I.backBtn,onClick:s=>{s.stopPropagation(),p()}},[C("跳过")]),e("div",{class:I.box,style:{...t.box},id:"modeType-".concat(t.step)},[t.steps.map((s,l)=>{var m,h,g,r;return e("div",{onClick:y=>y.stopPropagation(),class:I.item,style:s.type=="bottom"?{display:l===t.step?"":"none",left:"".concat((m=s.eleRect)==null?void 0:m.left,"px"),top:"-".concat((h=s.imgStyle)==null?void 0:h.height)}:{display:l===t.step?"":"none",left:"".concat((g=s.eleRect)==null?void 0:g.left,"px"),top:"".concat((r=t.box)==null?void 0:r.height)}},[e("img",{class:I.img,style:s.imgStyle,src:s.img},null),e("div",{class:I.btns,style:s.btnsStyle},[t.step+1==t.steps.length?e(N,null,[e("div",{class:[I.endBtn],onClick:()=>p()},[C("完成")])]):e("div",{class:I.btn,onClick:()=>o()},[C("下一步 ("),t.step+1,C("/"),t.steps.length,C(")")])])])})])])]),[[pe,d.value,"show"]]):null])}}),sa=_({name:"share-resources",setup(){const n=ee(),a=xe(),t=T({searchWord:"",loading:!1,pageTotal:0,pagination:{page:1,rows:20},searchGroup:{type:"MUSIC",name:"",bookVersionId:null,subjectId:null,sourceType:4},tableList:[],show:!1,item:{}}),d=async()=>{try{t.loading=!0;const{data:c}=await fe({...t.searchGroup,...t.pagination});t.loading=!1,t.pageTotal=Number(c.total);const o=c.rows||[],p=[];o.forEach(s=>{p.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=p||[],setTimeout(()=>{u.value=!0},500)}catch(c){t.loading=!1}},u=S(!1),f=async c=>{t.pagination.page=1;const{subjectId:o,...p}=c;t.searchGroup=Object.assign(t.searchGroup,{...p,musicalInstrumentId:o}),d()},i=async c=>{try{await me({materialId:c.id,favoriteFlag:c.isCollect?0:1,type:c.type}),c.isCollect=!c.isCollect}catch(o){}},b=async c=>{try{a.warning({title:"提示",content:"该资源已下架,是否删除?",positiveText:"确定",negativeText:"取消",onPositiveClick:async()=>{await ke({id:c.id}),n.success("删除成功"),f(t.searchGroup)}})}catch(o){}};return z(()=>{d()}),()=>e(N,null,[e(ea,{onSearch:c=>f(c)},null),e(ge,{show:t.loading,"onUpdate:show":c=>t.loading=c,style:{"min-height":"50vh"}},{default:()=>[e("div",{class:R.list,id:"myColloge-0"},[t.tableList.map(c=>e("div",{class:R.itemWrap},[e("div",{class:R.itemWrapBox},[e(X,{item:c,offShelf:!c.enableFlag,onOffShelf:()=>b(c),disabledMouseHover:!1,onClick:o=>{o.type==="IMG"||!c.enableFlag||(t.show=!0,t.item=o)},onCollect:o=>i(o)},null)])])),!t.loading&&t.tableList.length<=0&&e(he,{style:{minHeight:"50vh"},description:"暂无收藏资源"},null)])]}),e(oe,{page:t.pagination.page,"onUpdate:page":c=>t.pagination.page=c,pageSize:t.pagination.rows,"onUpdate:pageSize":c=>t.pagination.rows=c,pageTotal:t.pageTotal,"onUpdate:pageTotal":c=>t.pageTotal=c,onList:d},null),e(ye,{show:t.show,"onUpdate:show":c=>t.show=c,item:t.item},null),u.value?e(ta,null,null):null])}}),va=_({name:"student-studentList",setup(){const n=S("myResources");return z(()=>{D.on("teacher-guideInfo",a=>{a==="natural-resources"&&D.emit("natural-resources-guide",n.value)})}),()=>e("div",{class:ae.listWrap},[e(je,{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(Ms,null,null)]}),e(se,{name:"shareResources",tab:"共享资源"},{default:()=>[e(Et,null,null)],tab:()=>e("span",{id:"shareResources-0"},[C("共享资源")])}),e(se,{name:"myCollect",tab:"我的收藏"},{default:()=>[e(sa,null,null)]})]})])}});export{va as default};
|