1 |
- System.register(["./isCollaose-legacy-920accc0.js","./index-legacy-e6d0ac04.js","./index-legacy-c55cf8cf.js","./index-legacy-1f6c05d6.js","./searchArray-legacy-d90e6d0f.js","./catchData-legacy-d8528089.js","./index-legacy-3c468319.js","./index-legacy-f452d79c.js","./index-legacy-a984be8f.js","./index-legacy-2567eec2.js","./Scrollbar-legacy-b2356b7d.js","./icon-collect-active-legacy-78ad0261.js","./index-legacy-a9efed6d.js","./searchs-legacy-3b019a5a.js","./contants-legacy-bee733b6.js"],(function(e,t){"use strict";var a,l,o,i,s,n,r,d,c,p,_,u,m,g,h,f,w,v,y,b,k,x,S,I,C,G,j,z,T,F,L,M,R,U,E,A,B,O,P,V,N,D,$,W,H,K,J,q,Q,X,Y,Z,ee,te,ae,le,oe,ie,se,ne;return{setters:[e=>{a=e.i,l=e.C,o=e.a,i=e.b,s=e.c,n=e.d,r=e.e},e=>{d=e.P},e=>{c=e.i,p=e.A,_=e.m,u=e.f,m=e.a,g=e.b,h=e.c,f=e.d},e=>{w=e.T},e=>{v=e.r},e=>{y=e.u},e=>{b=e.d,k=e.e,x=e.r,S=e.n,I=e.f,C=e.v,G=e.j,j=e.k,z=e.N,T=e.g,F=e.y,L=e.b3,M=e.L,R=e.a2,U=e.a3,E=e.a4,A=e.F,B=e.A,O=e.w,P=e.t,V=e.b,N=e.x,D=e.di,$=e.dj,W=e.P,H=e._,K=e.dk,J=e.h,q=e.J,Q=e.C,X=e.dl,Y=e.m,Z=e.p,ee=e.q},e=>{te=e.T},e=>{ae=e.g,le=e.s},e=>{oe=e.C,ie=e.p,se=e.a},e=>{ne=e.N},null,null,null,null],execute:function(){var re=document.createElement("style");re.textContent="._listWrap_sirzm_1{padding:1.66666667vw 1.04166667vw;background-color:#fff;border-radius:1.04166667vw;min-height:100%}._listWrap_sirzm_1 .n-tabs-tab-pad{width:4.16666667vw!important}._listWrap_sirzm_1 .n-tabs-nav{padding:0px 1.04166667vw 1.25vw}._listWrap_sirzm_1 .n-tabs-tab{color:#8b8d98;font-size:max(1.14583333rem,14Px);padding-top:0;padding-bottom:.3125vw;line-height:1.14583333vw}._listWrap_sirzm_1 .n-tabs-tab.n-tabs-tab--active{font-weight:600!important;color:#131415!important}._listWrap_sirzm_1 .n-tabs-tab__label{z-index:10}._listWrap_sirzm_1 .n-tabs-bar{height:.52083333vw;background:linear-gradient(90deg,#77BBFF 0%,rgba(163,231,255,.22) 100%);z-index:0;bottom:.10416667vw}._listWrap_sirzm_1 .n-tab-pane{padding:0 .625vw!important}._listWrap_sirzm_1 .n-pagination{margin-top:1.875vw!important}._list_sirzm_1{margin-top:.625vw;display:flex;flex-flow:row wrap;justify-content:flex-start;gap:1.14583333vw}._searchGroup_sirzm_46{position:relative;padding:0}._searchGroup_sirzm_46 ._btnType_sirzm_50{gap:0px 1.25vw!important}._searchGroup_sirzm_46 ._btnType_sirzm_50 .n-button{height:1.92708333vw;padding:0 1.25vw;font-size:.9375rem;color:rgba(0,0,0,.6)}._searchGroup_sirzm_46 ._btnType_sirzm_50 .n-button.n-button--primary-type{font-weight:700;color:#fff}._searchGroup_sirzm_46 .n-form{position:relative}._searchGroup_sirzm_46 .n-form-item .n-form-item-label{font-size:.88541667rem;font-weight:600;color:#131415;line-height:1.25vw}._searchGroup_sirzm_46 .n-form-item .n-button{height:1.66666667vw;font-size:.88541667rem;border-radius:.41666667vw;color:rgba(0,0,0,.6)}._searchGroup_sirzm_46 .n-form-item .n-button--primary-type{color:#131415}._searchGroup_sirzm_46 .n-form-item-feedback-wrapper{min-height:.72916667vw}._searchGroup_sirzm_46 ._inputSearch_sirzm_84{position:absolute;top:.20833333vw;right:0;width:18.75vw;height:2.1875vw;font-size:.83333333rem}._searchGroup_sirzm_46 ._inputSearch_sirzm_84 .n-input-wrapper{padding-left:.625vw;padding-right:.20833333vw;height:2.1875vw!important}._searchGroup_sirzm_46 ._inputSearch_sirzm_84 .n-button{height:1.77083333vw;font-size:.78125rem;font-weight:500;width:auto}._searchGroup_sirzm_46 ._searchCatatory_sirzm_103{display:flex;justify-content:space-between;padding-bottom:1.25vw;border-bottom:1px solid #F2F2F2;margin-bottom:1.04166667vw}._searchGroup_sirzm_46 ._searchCatatory_sirzm_103 ._addTrain_sirzm_110{height:1.92708333vw;border-radius:.41666667vw;font-size:.9375rem;background-color:#e8f4ff;color:#0378ec}._searchGroup_sirzm_46 ._searchCatatory_sirzm_103 ._addTrain_sirzm_110 img{width:.83333333vw;height:.83333333vw;margin-right:.41666667vw}._list_1ryw9_1{margin-top:.625vw;display:flex;flex-flow:row wrap;justify-content:flex-start;gap:1.14583333vw;min-height:11.45833333vw}._searchGroup_1ryw9_9{position:relative;padding:0}._searchGroup_1ryw9_9 ._btnType_1ryw9_13{gap:0px 1.25vw!important}._searchGroup_1ryw9_9 ._btnType_1ryw9_13 .n-button{height:1.92708333vw;padding:0 1.25vw;font-size:.9375rem;color:rgba(0,0,0,.6)}._searchGroup_1ryw9_9 ._btnType_1ryw9_13 .n-button.n-button--primary-type{font-weight:700;color:#fff}._searchGroup_1ryw9_9 .n-form{position:relative}._searchGroup_1ryw9_9 .n-form-item .n-form-item-label{font-size:.88541667rem;font-weight:600;color:#131415;line-height:1.25vw}._searchGroup_1ryw9_9 .n-form-item .n-button{height:1.66666667vw;font-size:.88541667rem;border-radius:.41666667vw;color:rgba(0,0,0,.6)}._searchGroup_1ryw9_9 .n-form-item .n-button--primary-type{color:#131415;background-color:#d2ecff!important}._searchGroup_1ryw9_9 .n-form-item-feedback-wrapper{min-height:.72916667vw}._searchGroup_1ryw9_9 ._inputSearch_1ryw9_48{position:absolute;top:.20833333vw;right:0;width:18.75vw;height:2.1875vw;font-size:.83333333rem;--n-height: 2.1875vw !important}._searchGroup_1ryw9_9 ._inputSearch_1ryw9_48 img{width:.9375vw;height:.9375vw}._searchGroup_1ryw9_9 ._inputSearch_1ryw9_48 .n-input-wrapper{padding-left:.625vw;padding-right:.20833333vw;height:2.1875vw!important}._searchGroup_1ryw9_9 ._inputSearch_1ryw9_48 .n-button{height:1.77083333vw;font-size:.78125rem;font-weight:500;width:auto}._searchGroup_1ryw9_9 ._searchCatatory_1ryw9_72{display:flex;justify-content:space-between;padding-bottom:1.25vw;border-bottom:1px solid #F2F2F2;margin-bottom:1.04166667vw}._searchGroup_1ryw9_9 ._searchCatatory_1ryw9_72 ._addTrain_1ryw9_79{height:1.92708333vw;border-radius:.41666667vw;font-size:.9375rem;background-color:#e8f4ff;color:#0378ec}._searchGroup_1ryw9_9 ._searchCatatory_1ryw9_72 ._addTrain_1ryw9_79 img{width:.83333333vw;height:.83333333vw;margin-right:.41666667vw}._teachingModal_1ryw9_91{width:57.29166667vw}._spaceSection_1ryw9_94{width:75%;transition:1s all ease-in}._spaceSection_1ryw9_94>div{line-height:var(--n-blank-height)}._collapseWrap_1ryw9_101{width:98%;display:flex;flex-direction:row;align-items:flex-end}._collaoseBtn_1ryw9_107{width:1.66666667vw;height:1.66666667vw;cursor:pointer}._collaoseBtn_1ryw9_107._isStart_1ryw9_112{transform:rotate(-180deg)}._collapsSection_1ryw9_115{padding-top:.52083333vw}._isHidden_1ryw9_118{overflow:hidden;transition:1s all ease-in}._list_l11tk_1{margin-top:.625vw;display:flex;flex-flow:row wrap;justify-content:flex-start;gap:1.14583333vw}._searchGroup_l11tk_8{position:relative;padding:0}._searchGroup_l11tk_8 ._btnType_l11tk_12{gap:0px 1.25vw!important}._searchGroup_l11tk_8 ._btnType_l11tk_12 .n-button{height:1.92708333vw;padding:0 1.25vw;font-size:.9375rem;color:rgba(0,0,0,.6)}._searchGroup_l11tk_8 ._btnType_l11tk_12 .n-button.n-button--primary-type{font-weight:700;color:#fff}._searchGroup_l11tk_8 .n-form{position:relative}._searchGroup_l11tk_8 .n-form-item .n-form-item-label{font-size:.88541667rem;font-weight:600;color:#131415;line-height:1.25vw}._searchGroup_l11tk_8 .n-form-item .n-button{height:1.66666667vw;font-size:.88541667rem;border-radius:.41666667vw;color:rgba(0,0,0,.6)}._searchGroup_l11tk_8 .n-form-item .n-button--primary-type{color:#131415;background-color:#d2ecff!important}._searchGroup_l11tk_8 .n-form-item-feedback-wrapper{min-height:.72916667vw}._searchGroup_l11tk_8 ._inputSearch_l11tk_47{position:absolute;top:.20833333vw;right:0;width:18.75vw;height:2.1875vw;font-size:.83333333rem;--n-height: 2.1875vw !important}._searchGroup_l11tk_8 ._inputSearch_l11tk_47 img{width:.9375vw;height:.9375vw}._searchGroup_l11tk_8 ._inputSearch_l11tk_47 .n-input-wrapper{padding-left:.625vw;padding-right:.20833333vw;height:2.1875vw!important}._searchGroup_l11tk_8 ._inputSearch_l11tk_47 .n-button{height:1.77083333vw;font-size:.78125rem;font-weight:500;width:auto}._searchGroup_l11tk_8 ._searchCatatory_l11tk_71{display:flex;justify-content:space-between;padding-bottom:1.25vw;padding-top:.15625vw;border-bottom:1px solid #F2F2F2;margin-bottom:1.04166667vw}._searchGroup_l11tk_8 ._searchCatatory_l11tk_71 ._addTrain_l11tk_79{height:1.92708333vw;border-radius:.41666667vw;font-size:.9375rem;background-color:#e8f4ff;color:#0378ec}._searchGroup_l11tk_8 ._searchCatatory_l11tk_71 ._addTrain_l11tk_79._error_l11tk_86{color:#ec3a4e;background-color:#fdebed}._searchGroup_l11tk_8 ._searchCatatory_l11tk_71 ._addTrain_l11tk_79 img{margin-right:.41666667vw}._searchGroup_l11tk_8 ._searchCatatory_l11tk_71 ._addTrain_l11tk_79 ._iconUpload_l11tk_93{width:1.19791667vw;height:.98958333vw}._searchGroup_l11tk_8 ._searchCatatory_l11tk_71 ._addTrain_l11tk_79 ._iconEdit_l11tk_97{width:1.25vw;height:1.30208333vw}._searchGroup_l11tk_8 ._searchCatatory_l11tk_71 ._addTrain_l11tk_79 ._iconSelectAll_l11tk_101{width:1.04166667vw;height:1.04166667vw}._searchGroup_l11tk_8 ._searchCatatory_l11tk_71 ._addTrain_l11tk_79 ._iconDelete_l11tk_105{width:.9375vw;height:.9375vw}._searchGroup_l11tk_8 ._searchCatatory_l11tk_71 ._addTrain_l11tk_79 ._iconPen_l11tk_109{width:1.04166667vw;height:.98958333vw}._itemSection_l11tk_113{position:relative}._itemSection_l11tk_113 ._itemBg_l11tk_116{position:absolute;left:0;top:0;width:100%;height:100%;z-index:99;border-radius:.72916667vw}._itemSection_l11tk_113 ._itemBg_l11tk_116._itemBgChecked_l11tk_125{background-color:rgba(0,0,0,.5)}._itemSection_l11tk_113 ._itemBg_l11tk_116 ._resourceDefault_l11tk_128{position:absolute;top:.83333333vw;right:.83333333vw;width:1.5625vw;height:1.5625vw}._spaceSection_l11tk_135{width:76%}._spaceSection_l11tk_135>div{line-height:var(--n-blank-height)}._attendClassModal_l11tk_141{width:57.29166667vw}._attendClassModal_l11tk_141 .n-select-menu{--n-height: calc(var(--n-option-height) * 5.6) !important}._removeVisiable_l11tk_147{width:26.04166667vw}._removeVisiable_l11tk_147 ._studentRemove_l11tk_150{padding:1.04166667vw 2.08333333vw 0}._removeVisiable_l11tk_147 ._studentRemove_l11tk_150 p{font-size:.9375rem;color:#777;line-height:1.5625vw;text-align:center}._removeVisiable_l11tk_147 ._studentRemove_l11tk_150 p span{color:#ea4132}._removeVisiable_l11tk_147 ._btnGroupModal_l11tk_162{padding:1.66666667vw 0}._removeVisiable_l11tk_147 ._btnGroupModal_l11tk_162 .n-button{height:2.44791667vw;min-width:8.125vw}._uploadModal_xk0km_1{padding-top:2.08333333vw}._formModal_xk0km_4{min-height:45vh;padding:0 2.08333333vw}._formModal_xk0km_4 ._formSpace_xk0km_8{gap:2.08333333vw 1.25vw!important}._formModal_xk0km_4 ._previewModal_xk0km_11{position:relative;width:16.66666667vw;height:9.375vw;margin-bottom:.625vw;border:1px solid #DCE2F1;border-radius:.52083333vw;overflow:hidden}._formModal_xk0km_4 ._previewModal_xk0km_11:hover{border-color:#198cfe}._formModal_xk0km_4 ._previewModal_xk0km_11 ._image_xk0km_23{width:16.66666667vw;height:9.375vw}._formModal_xk0km_4 ._previewModal_xk0km_11 ._image_xk0km_23 img{width:inherit;height:fit-content;min-height:100%}._formModal_xk0km_4 ._previewModal_xk0km_11 ._titleType_xk0km_32{position:absolute;top:.3125vw;left:.3125vw;width:2.8125vw;height:1.35416667vw;z-index:99}._formModal_xk0km_4 ._previewModal_xk0km_11 ._iconUploadDelete_xk0km_40{position:absolute;top:.36458333vw;right:.36458333vw;width:1.40625vw;height:1.40625vw;z-index:99;cursor:pointer}._formModal_xk0km_4 ._previewModal_xk0km_11 ._commonType_xk0km_49{display:flex;align-items:center;position:absolute;bottom:0;left:0;font-size:.625rem;font-weight:600;color:#fff;height:2.23958333vw;background:linear-gradient(180deg,rgba(0,0,0,0) 0%,rgba(0,0,0,.7) 100%);width:100%;border-radius:0 0 .52083333vw .52083333vw;justify-content:flex-end;padding-right:.625vw;z-index:99}._formModal_xk0km_4 ._previewModal_xk0km_11 ._commonType_xk0km_49 .n-switch__rail{background-color:#ccc}._formModal_xk0km_4 ._previewModal_xk0km_11 ._commonType_xk0km_49 .n-switch.n-switch--active .n-switch__rail{background-color:var(--n-rail-color-active)}._formModal_xk0km_4 ._formItem_xk0km_72{width:16.66666667vw}._formModal_xk0km_4 ._formItem_xk0km_72 .n-input{margin-bottom:.625vw}._formModal_xk0km_4 ._formItem_xk0km_72 .n-input,._formModal_xk0km_4 ._formItem_xk0km_72 .n-base-selection{border-radius:.41666667vw}._formModal_xk0km_4 ._formItem_xk0km_72 .n-input .n-input__input-el,._formModal_xk0km_4 ._formItem_xk0km_72 .n-base-selection .n-input__input-el,._formModal_xk0km_4 ._formItem_xk0km_72 .n-input .n-input__input-el::placeholder,._formModal_xk0km_4 ._formItem_xk0km_72 .n-base-selection .n-input__input-el::placeholder{font-size:.9375rem}._formModal_xk0km_4 ._formItem_xk0km_72 .n-form-item-feedback-wrapper{min-height:.625vw}._formModal_xk0km_4 ._formItem_xk0km_72 .n-upload-trigger+.n-upload-file-list{margin-top:.625vw}._btnGroup_xk0km_94{padding:1.66666667vw 0}._btnGroup_xk0km_94 .n-button{height:2.44791667vw;min-width:8.125vw}._uploadFile_xk0km_101{margin-bottom:.625vw}._uploadFile_xk0km_101 ._uploadBtn_xk0km_104{display:flex;align-items:center;justify-content:center;flex-direction:column;width:16.66666667vw;height:9.375vw;padding-top:1.04166667vw;background:#F9FAFD;border-radius:.52083333vw;border:1px solid #DCE2F1;font-size:.9375rem;color:#9eadd9}._uploadFile_xk0km_101 ._uploadBtn_xk0km_104:hover{border-color:#198cfe}._uploadFile_xk0km_101 ._uploadBtn_xk0km_104 ._iconUploadAdd_xk0km_121{width:2.60416667vw;height:2.60416667vw;margin-bottom:1.04166667vw}._list_2oig9_1{margin-top:.625vw;display:flex;flex-flow:row wrap;justify-content:flex-start;gap:1.14583333vw;min-height:11.45833333vw}._searchGroup_2oig9_9{position:relative;padding:0}._searchGroup_2oig9_9 ._btnType_2oig9_13{gap:0px 1.25vw!important}._searchGroup_2oig9_9 ._btnType_2oig9_13 .n-button{height:1.92708333vw;padding:0 1.25vw;font-size:.9375rem;color:rgba(0,0,0,.6)}._searchGroup_2oig9_9 ._btnType_2oig9_13 .n-button.n-button--primary-type{font-weight:700;color:#fff}._searchGroup_2oig9_9 .n-form{position:relative}._searchGroup_2oig9_9 .n-form-item .n-form-item-label{font-size:.88541667rem;font-weight:600;color:#131415;line-height:1.25vw}._searchGroup_2oig9_9 .n-form-item .n-button{height:1.66666667vw;font-size:.88541667rem;border-radius:.41666667vw;color:rgba(0,0,0,.6)}._searchGroup_2oig9_9 .n-form-item .n-button--primary-type{color:#131415;background-color:#d2ecff!important}._searchGroup_2oig9_9 .n-form-item-feedback-wrapper{min-height:.72916667vw}._searchGroup_2oig9_9 ._inputSearch_2oig9_48{position:absolute;top:.20833333vw;right:0;width:18.75vw;height:2.1875vw;font-size:.83333333rem;--n-height: 2.1875vw !important}._searchGroup_2oig9_9 ._inputSearch_2oig9_48 img{width:.9375vw;height:.9375vw}._searchGroup_2oig9_9 ._inputSearch_2oig9_48 .n-input-wrapper{padding-left:.625vw;padding-right:.20833333vw;height:2.1875vw!important}._searchGroup_2oig9_9 ._inputSearch_2oig9_48 .n-button{height:1.77083333vw;font-size:.78125rem;font-weight:500;width:auto}._searchGroup_2oig9_9 ._searchCatatory_2oig9_72{display:flex;justify-content:space-between;padding-bottom:1.25vw;border-bottom:1px solid #F2F2F2;margin-bottom:1.04166667vw}._searchGroup_2oig9_9 ._searchCatatory_2oig9_72 ._addTrain_2oig9_79{height:1.92708333vw;border-radius:.41666667vw;font-size:.9375rem;background-color:#e8f4ff;color:#0378ec}._searchGroup_2oig9_9 ._searchCatatory_2oig9_72 ._addTrain_2oig9_79 img{width:.83333333vw;height:.83333333vw;margin-right:.41666667vw}._spaceSection_2oig9_91{width:76%}._spaceSection_2oig9_91>div{line-height:var(--n-blank-height)}._collapseWrap_2oig9_97{width:98%;display:flex;flex-direction:row;align-items:flex-end}._collaoseBtn_2oig9_103{width:1.66666667vw;height:1.66666667vw;cursor:pointer}._collaoseBtn_2oig9_103._isStart_2oig9_108{transform:rotate(-180deg)}._collapsSection_2oig9_111{padding-top:.52083333vw}._isHidden_2oig9_114{overflow:hidden;transition:1s all ease-in}\n",document.head.appendChild(re);const de={listWrap:"_listWrap_sirzm_1",list:"_list_sirzm_1",searchGroup:"_searchGroup_sirzm_46",btnType:"_btnType_sirzm_50",inputSearch:"_inputSearch_sirzm_84",searchCatatory:"_searchCatatory_sirzm_103",addTrain:"_addTrain_sirzm_110"},ce="_list_1ryw9_1",pe="_searchGroup_1ryw9_9",_e="_btnType_1ryw9_13",ue="_inputSearch_1ryw9_48",me="_searchCatatory_1ryw9_72",ge="_addTrain_1ryw9_79",he="_teachingModal_1ryw9_91",fe="_spaceSection_1ryw9_94",we="_collapseWrap_1ryw9_101",ve="_collaoseBtn_1ryw9_107",ye="_isStart_1ryw9_112",be="_collapsSection_1ryw9_115",ke="_isHidden_1ryw9_118";function xe(e){return"function"==typeof e||"[object Object]"===Object.prototype.toString.call(e)&&!L(e)}const Se=b({name:"search-group",emits:["search","add"],setup(e,{emit:t}){const l=y(),o=k({type:"MUSIC",name:"",bookVersionId:null,subjectId:null}),i=()=>{t("search",o)},s=x(),n=x([]),r=x(0),d=x(0),p=x(0),_=x(!1),u=e=>{e?.selfElRef&&n.value.push(e.selfElRef.parentNode)},m=()=>{n.value=[...new Set(n.value)];let e=-1;n.value.forEach(((t,a)=>{0===a?(p.value=1,e=t.offsetLeft):t.offsetLeft===e&&0!=a&&p.value++,_.value?t.style.display="block":p.value>1?t.style.display="none":t.style.display="block"}))};return S((async()=>{await l.getMusicSheetCategory(),await l.getSubjects(),r.value=s.value.offsetHeight,d.value=s.value.offsetHeight/p.value,m()})),()=>{let e,n;return I("div",{class:pe},[I("div",{class:[me]},[I(C,{size:"small",class:_e},xe(e=v.map((e=>I(G,{type:o.type===e.value?"primary":"default",secondary:o.type!==e.value,round:!0,size:"small",focusable:!1,onClick:()=>{o.type=e.value,i()}},{default:()=>[e.label]}))))?e:{default:()=>[e]}),I(G,{type:"primary",class:ge,focusable:!1,strong:!0,onClick:()=>t("add")},{default:()=>[I("img",{src:c},null),j("添加自定义教材")]})]),I(z,{labelAlign:"left",labelPlacement:"left"},{default:()=>["MUSIC"===o.type&&I("div",{class:[be]},[I(T,{label:"教材:"},{default:()=>[I("div",{class:[we,_.value?"":ke],ref:s},[I(C,{class:[fe]},{default:()=>[l.getAllMusicCategories.map((e=>I(G,{ref:u,secondary:o.bookVersionId===e.id,quaternary:o.bookVersionId!==e.id,strong:!0,focusable:!1,type:o.bookVersionId===e.id?"primary":"default",onClick:()=>{o.bookVersionId=e.id,i()}},{default:()=>[e.name]}))),p.value>1&&I("div",{style:{height:"var(--n-blank-height)",position:"absolute",display:"flex",alignItems:"center"},onClick:()=>{var e;e=!_.value,_.value=e,m()}},[I(F,{previewDisabled:!0,src:a,class:[ve,_.value?ye:""]},null)])]})])]})]),I(T,{label:"乐器:"},{default:()=>[I(C,{class:fe},xe(n=l.getSubjectAllList.map((e=>I(G,{secondary:o.subjectId===e.id,quaternary:o.subjectId!==e.id,strong:!0,focusable:!1,type:o.subjectId===e.id?"primary":"default",onClick:()=>{o.subjectId=e.id,i()}},{default:()=>[e.name]}))))?n:{default:()=>[n]})]}),I(w,{class:ue,round:!0,onSearch:e=>{o.name=e,i()}},null)]})])}}}),Ie=b({name:"shareResources-guide",emits:["close"],setup(e,{emit:t}){const a=k({box:{height:"0px"},show:!1,steps:[{ele:"",eleRect:{},img:ae("shareResources1.png"),handStyle:{top:"0.91rem"},imgStyle:{top:M(-4),left:M(-263),width:M(553),height:M(229)},btnsStyle:{bottom:M(30),left:M(-102)},eleRectPadding:{left:14,top:14,width:28,height:28},boxStyle:{borderRadius:"30px"}},{ele:"",img:ae("shareResources2.png"),imgStyle:{left:M(134),width:M(515),height:M(227)},btnsStyle:{bottom:M(75),left:M(253)},eleRectPadding:{left:7,top:7,width:14,height:14},boxStyle:{borderRadius:"15px"},type:"bottom"}],step:0}),l=x(!1),o=localStorage.getItem("teacher-guideInfo");o&&JSON.parse(o).shareResourcesGuide?l.value=!1:l.value=!0;const i=()=>{const e=document.getElementById(`shareResources-${a.step}`);if(e){const t=e.getBoundingClientRect(),l=a.steps[a.step].eleRectPadding?.left||0,o=a.steps[a.step].eleRectPadding?.top||0,i=a.steps[a.step].eleRectPadding?.width||0,s=a.steps[a.step].eleRectPadding?.height||0;"shareResources-1"==`shareResources-${a.step}`?(a.box={left:t.x-l+"px",top:t.y-o+"px",width:2*(t.width+i)+i+"px",height:t.height+s+"px"},console.log(a.box.width,"---",t.width)):a.box={left:t.x-l+"px",top:t.y-o+"px",width:t.width+i+"px",height:t.height+s+"px"},console.log(`coai-${a.step}`,a.box)}else n()};S((()=>{i(),window.addEventListener("resize",s)}));const s=()=>{i()};R((()=>{window.removeEventListener("resize",s)}));const n=()=>{a.step>=4?r():(a.step=a.step+1,i())},r=()=>{let e=JSON.parse(localStorage.getItem("teacher-guideInfo")||"{}")||null;e?e.shareResourcesGuide=!0:e={shareResourcesGuide:!0},localStorage.setItem("teacher-guideInfo",JSON.stringify(e)),l.value=!1};return()=>I(A,null,[l.value?U(I("div",{"onUpdate:show":e=>l.value=e,class:["n-modal-mask","n-modal-mask-guide"]},[I("div",{class:le.content,onClick:()=>n()},[I("div",{class:le.backBtn,onClick:e=>{e.stopPropagation(),r()}},[j("跳过")]),I("div",{class:le.box,style:{...a.box,...a.steps[a.step].boxStyle},id:`modeType-${a.step}`},[a.steps.map(((e,t)=>I("div",{onClick:e=>e.stopPropagation(),class:le.item,style:"bottom"==e.type?{display:t===a.step?"":"none",left:`${e.eleRect?.left}px`,top:`-${e.imgStyle?.height}`}:{display:t===a.step?"":"none",left:`${e.eleRect?.left}px`,top:`${a.box?.height}`}},[I("img",{class:le.img,style:e.imgStyle,src:e.img},null),I("div",{class:le.btns,style:e.btnsStyle},[a.step+1==a.steps.length?I(A,null,[I("div",{class:[le.endBtn],onClick:()=>r()},[j("完成")]),I("div",{class:le.nextBtn,onClick:()=>{a.step=0,i()}},[j("再看一遍")])]):I("div",{class:le.btn,onClick:()=>n()},[j("下一步 ("),a.step+1,j("/"),a.steps.length,j(")")])])])))])])]),[[E,l.value,"show"]]):null])}}),Ce=b({name:"share-resources",setup(){const e=k({searchWord:"",loading:!1,pageTotal:0,pagination:{page:1,rows:20},searchGroup:{type:"MUSIC",name:"",bookVersionId:null,subjectId:null,sourceType:2},tableList:[],teachingStatus:!1,show:!1,item:{}}),t=x(!1),a=async()=>{try{e.loading=!0;const{data:a}=await _({...e.searchGroup,...e.pagination});e.loading=!1,e.pageTotal=Number(a.total);const l=a.rows||[],o=[];l.forEach((e=>{o.push({id:e.id,coverImg:e.coverImg,type:e.type,title:e.name,isCollect:!!e.favoriteFlag,isSelected:"PLATFORM"===e.sourceFrom,content:e.content})})),e.tableList=o||[],setTimeout((()=>{t.value=!0}),500)}catch{e.loading=!1}},i=async e=>{try{await u({materialId:e.id,favoriteFlag:e.isCollect?0:1,type:e.type}),e.isCollect=!e.isCollect}catch{}};return S((()=>{a()})),()=>I(A,null,[I(Se,{onSearch:t=>(async t=>{e.pagination.page=1,e.searchGroup=Object.assign(e.searchGroup,t),a()})(t),onAdd:()=>e.teachingStatus=!0},null),I(B,{show:e.loading,"onUpdate:show":t=>e.loading=t,style:{"min-height":"50vh"}},{default:()=>[I("div",{class:ce},[e.tableList.map(((t,a)=>I(A,null,[I(l,0==a?O({id:"shareResources-1"},{item:t,disabledMouseHover:!1,onClick:t=>{"IMG"!==t.type&&(e.show=!0,e.item=t)},onCollect:e=>i(e)}):{item:t,disabledMouseHover:!1,onClick:t=>{"IMG"!==t.type&&(e.show=!0,e.item=t)},onCollect:e=>i(e)},null)]))),!e.loading&&e.tableList.length<=0&&I(te,{description:"暂无共享资源"},null)])]}),I(d,{page:e.pagination.page,"onUpdate:page":t=>e.pagination.page=t,pageSize:e.pagination.rows,"onUpdate:pageSize":t=>e.pagination.rows=t,pageTotal:e.pageTotal,"onUpdate:pageTotal":t=>e.pageTotal=t,onList:a},null),I(o,{show:e.show,"onUpdate:show":t=>e.show=t,item:e.item},null),I(P,{show:e.teachingStatus,"onUpdate:show":t=>e.teachingStatus=t,preset:"card",showIcon:!1,class:["modalTitle background",he],title:"自定义教材",blockScroll:!1},{default:()=>[I(p,{onClose:()=>e.teachingStatus=!1},null)]}),t.value?I(Ie,null,null):null])}}),Ge="_list_l11tk_1",je="_searchGroup_l11tk_8",ze="_btnType_l11tk_12",Te="_inputSearch_l11tk_47",Fe="_searchCatatory_l11tk_71",Le="_addTrain_l11tk_79",Me="_error_l11tk_86",Re="_iconUpload_l11tk_93",Ue="_iconEdit_l11tk_97",Ee="_iconSelectAll_l11tk_101",Ae="_iconDelete_l11tk_105",Be="_iconPen_l11tk_109",Oe="_itemSection_l11tk_113",Pe="_itemBg_l11tk_116",Ve="_itemBgChecked_l11tk_125",Ne="_resourceDefault_l11tk_128",De="_spaceSection_l11tk_135",$e="_attendClassModal_l11tk_141",We="_removeVisiable_l11tk_147",He="_studentRemove_l11tk_150",Ke="_btnGroupModal_l11tk_162",Je=""+new URL("icon-upload-f2c85ccb.svg",t.meta.url).href,qe=""+new URL("icon-edit-d03e6631.svg",t.meta.url).href,Qe=""+new URL("icon-selectall-3ee6dc36.svg",t.meta.url).href,Xe=""+new URL("icon-selectall-default-60353fd8.svg",t.meta.url).href,Ye=""+new URL("icon-pen-51cdbe9d.svg",t.meta.url).href,Ze=""+new URL("icon-delete-9580edeb.svg",t.meta.url).href;function et(e){return"function"==typeof e||"[object Object]"===Object.prototype.toString.call(e)&&!L(e)}const tt=b({name:"search-group",emits:["search","upload","edit","selectAll","delete","update"],setup(e,{emit:t}){const a=x([]),l=y(),o=k({type:"",name:"",bookVersionId:null,subjectId:null}),i=k({isEdit:!1,isSelectAll:!1}),s=()=>{t("search",o)};return S((async()=>{a.value=[{label:"全部",value:""},...v],await l.getSubjects()})),()=>{let e,n;return I("div",{class:je},[I("div",{class:Fe},[I(C,{size:"small",class:ze},et(e=a.value.map((e=>"MUSIC"!==e.value&&I(G,{type:o.type===e.value?"primary":"default",secondary:o.type!==e.value,round:!0,size:"small",focusable:!1,onClick:()=>{o.type=e.value,s()}},{default:()=>[e.label]}))))?e:{default:()=>[e]}),I(C,null,{default:()=>[i.isEdit?I(A,null,[I(G,{type:"primary",class:Le,focusable:!1,strong:!0,onClick:()=>{i.isSelectAll=!i.isSelectAll,t("selectAll",i.isSelectAll)}},{default:()=>[I("img",{src:i.isSelectAll?Qe:Xe,class:Ee},null),j("全选")]}),I(G,{type:"error",class:[Le,Me],focusable:!1,strong:!0,onClick:()=>t("delete")},{default:()=>[I("img",{src:Ze,class:Ae},null),j("删除")]}),I(G,{type:"primary",class:Le,focusable:!1,strong:!0,onClick:()=>t("update")},{default:()=>[I("img",{src:Ye,class:Be},null),j("修改")]}),I(G,{type:"primary",class:Le,focusable:!1,strong:!0,onClick:()=>{i.isEdit=!1,t("edit",i.isEdit)}},{default:()=>[j("完成编辑")]})]):I(A,null,[I(G,O({type:"primary",class:Le,focusable:!1},{id:"myResources-0"},{strong:!0,onClick:()=>t("upload")}),{default:()=>[I("img",{src:Je,class:Re},null),j("上传资源")]}),I(G,{type:"primary",class:Le,focusable:!1,strong:!0,onClick:()=>{i.isEdit=!0,t("edit",i.isEdit)}},{default:()=>[I("img",{src:qe,class:Ue},null),j("编辑资源")]})])]})]),I(z,{labelAlign:"left",labelPlacement:"left"},{default:()=>[I(T,{label:"乐器:"},{default:()=>[I(C,{class:De},et(n=l.getSubjectAllList.map((e=>I(G,{secondary:o.subjectId===e.id,quaternary:o.subjectId!==e.id,strong:!0,focusable:!1,type:o.subjectId===e.id?"primary":"default",onClick:()=>{o.subjectId=e.id,s()}},{default:()=>[e.name]}))))?n:{default:()=>[n]})]}),I(w,{class:Te,round:!0,onSearch:e=>{o.name=e,s()}},null)]})])}}}),at={uploadModal:"_uploadModal_xk0km_1",formModal:"_formModal_xk0km_4",formSpace:"_formSpace_xk0km_8",previewModal:"_previewModal_xk0km_11",image:"_image_xk0km_23",titleType:"_titleType_xk0km_32",iconUploadDelete:"_iconUploadDelete_xk0km_40",commonType:"_commonType_xk0km_49",formItem:"_formItem_xk0km_72",btnGroup:"_btnGroup_xk0km_94",uploadFile:"_uploadFile_xk0km_101",uploadBtn:"_uploadBtn_xk0km_104",iconUploadAdd:"_iconUploadAdd_xk0km_121"},lt=""+new URL("icon-upload-add-2a8f7a9d.svg",t.meta.url).href,ot=b({name:"upload-file",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"},path:{type:String,default:""},fileName:{type:String,default:""},cropper:{type:Boolean,default:!1},options:{type:Object,default:()=>({viewMode:0,autoCrop:!0,enlarge:1,autoCropWidth:200,autoCropHeight:200,fixedBox:!1,previewsCircle:!0,title:"上传图片"})}},emits:["update:fileList","close","readFileInputEventAsArrayBuffer","remove","finished"],setup(e,{emit:t,expose:a,slots:l}){const o=`https://${e.bucketName}.ks3-cn-beijing.ksyuncs.com/`,i=V(),s=x(!1),n=x(!1),r=x(),d=x(),c=k({policy:"",signature:"",key:"",KSSAccessKeyId:"",acl:"public-read",name:""}),p=x([]),_=()=>{if(e.fileList){const t=e.fileList.split("/");p.value=[{id:(new Date).getTime().toString(),name:t[t.length-1],status:"finished",url:e.fileList}]}else p.value=[]};_(),N((()=>e.imageList),(()=>{_()})),N((()=>e.fileList),(()=>{_()})),a({handleClearFile:()=>{d.value?.clear()}});const u=x(),m=async(e,t)=>{const a=new FileReader;a.addEventListener("load",(()=>t(a.result))),a.readAsDataURL(e)},g=async e=>{const a=o+c.key,l=st(a);let i="";"IMG"===l?i=a:"SONG"===l?i=W.SONG_DEFAULT_COVER:"VIDEO"===l&&(i=await h()),t("update:fileList",a),t("readFileInputEventAsArrayBuffer",r.value),t("finished",{coverImg:i,content:a}),e.file.url=a,s.value=!1,n.value=!1},h=async()=>{try{n.value=!0;const a=await(t=r.value,new Promise((e=>{const a=document.createElement("video");a.currentTime=1,a.src=URL.createObjectURL(t),a.addEventListener("loadeddata",(function(){const t=document.createElement("canvas"),l=a.videoWidth,o=a.videoHeight;t.width=l,t.height=o,t.getContext("2d").drawImage(a,0,0,l,o),console.log(t),t.toBlob((t=>{console.log(t),e(t)}))}))}))),l=`${e.path}${Date.now()+".png"}`,i={filename:l,bucketName:e.bucketName,postData:{filename:l,acl:"public-read",key:l,unknowValueField:[]}},{data:s}=await ie(i),d={policy:s.policy,signature:s.signature,key:l,acl:"public-read",KSSAccessKeyId:s.kssAccessKeyId,name:l},c=new FormData;for(const e in d)c.append(e,d[e]);return c.append("file",a),await se.post(o,c),o+l}finally{n.value=!1}var t},f=async a=>{try{const l=`${e.path}${e.fileName||(new Date).getTime()+".png"}`,i={filename:l,bucketName:e.bucketName,postData:{filename:l,acl:"public-read",key:l,unknowValueField:[]}},{data:n}=await ie(i);c.policy=n.policy,c.signature=n.signature,c.key=l,c.KSSAccessKeyId=n.kssAccessKeyId,c.name=l;const r=new FormData;for(const e in c)r.append(e,c[e]);r.append("file",a),await se.post(o,r).then((()=>{const e=o+c.key,a=e.split("/");p.value=[{id:(new Date).getTime().toString(),name:a[a.length-1],status:"finished",url:e}],t("update:fileList",e),t("finished",{coverImg:e,content:e}),s.value=!1}))}catch{return!1}};return()=>I("div",{class:at.uploadFile},[I(B,{show:n.value,description:"上传中..."},{default:()=>[I(D,{ref:d,action:o,data:c,fileList:p.value,"onUpdate:fileList":e=>p.value=e,accept:e.accept,multiple:e.multiple,max:e.max,disabled:e.disabled,showFileList:e.showFileList,showPreviewButton:!0,onBeforeUpload:t=>(async t=>{const a=t.file;let l=!0;const o=a.type.includes("image")?$.IMG:a.type.includes("audio")?$.SONG:$.VIDEO,d="IMG"===o?2:"SONG"===o?20:500;if(d&&(l=a.file.size/1024/1024<d,!l))return i.error(`文件大小不能超过${d}M`),!1;if(!l)return l;if(e.cropper&&"IMG"===o)return m(a.file,(t=>{const l=Object.assign({},e.options,{img:t,name:a.file.name});s.value=!0,setTimeout((()=>{u.value?.edit(l)}),100)})),!1;try{n.value=!0;const t=a.file.name,l=t.slice(t.lastIndexOf(".")),o=`${e.path}${e.fileName||Date.now()+l}`,i={filename:o,bucketName:e.bucketName,postData:{filename:o,acl:"public-read",key:o,unknowValueField:[]}},{data:s}=await ie(i);c.policy=s.policy,c.signature=s.signature,c.key=o,c.KSSAccessKeyId=s.kssAccessKeyId,c.name=o,r.value=a.file}catch{return n.value=!1,!1}return!0})(t),onFinish:e=>(e=>{g(e)})(e),onRemove:()=>(async()=>{t("update:fileList",""),t("remove"),n.value=!1})()},{default:()=>["default"===e.showType&&I("div",{class:at.uploadBtn},[I("img",{src:lt,class:at.iconUploadAdd},null),I("p",null,[j("上传")])]),"custom"===e.showType&&l.custom&&l.custom()]})]}),I(P,{show:s.value,"onUpdate:show":e=>s.value=e,preset:"dialog",showIcon:!1,class:["modalTitle background"],title:"上传图片",style:{width:"800px"}},{default:()=>[I(oe,{ref:u,onClose:()=>s.value=!1,onCropperOk:f},null)]})])}}),it=""+new URL("icon-upload-delete-cc3d5959.svg",t.meta.url).href,st=e=>e.indexOf(".mp3")>-1?$.SONG:e.indexOf(".mp4")>-1?$.VIDEO:$.IMG,nt=b({name:"upload-modal",props:{list:{type:Array,default:()=>[]}},emits:["close","confirm"],setup(e,{emit:t}){const a=y(),l=x(),o=V(),d=x(),c=k({list:[],uploading:!1,uploadUrl:"",name:"",subjectIds:[]}),p=e=>{let t=i;switch(e){case"IMG":t=i;break;case"VIDEO":t=r;break;case"SONG":t=n;break;case"MUSIC":t=s}return t},_=async()=>{l.value?.validate((async e=>{if(e)Q(X);else{c.uploading=!0;try{const e=[];c.list.forEach((t=>{e.push({subjectIds:t.subjectIds.join(","),openFlag:t.openFlag,coverImg:t.coverImg,name:t.name,type:t.type,enableFlag:1,content:t.content,id:t.id||null})})),u.value?await m(e):await g(e),c.list=[],o.success("保存成功"),t("close",!0),t("confirm")}catch{}c.uploading=!1}}))},u=H((()=>e.list.length>0));S((async()=>{const t=e.list||[],l=[];t.forEach((e=>{l.push({subjectIds:e.subjectId?e.subjectId.split(",").map((e=>Number(e))):[],openFlag:e.openFlag,coverImg:e.coverImg,name:e.title,type:e.type,enableFlag:e.enableFlag,content:e.content,id:e.id})})),c.list=l||[],await a.getSubjects()}));const h=(e,t)=>{e.subjectIds=t.map((e=>e.id))};return()=>I("div",{class:at.uploadModal},[I(ne,{style:{"max-height":"55vh"}},{default:()=>[I(z,{ref:l,labelPlacement:"left",labelWidth:120,model:c,class:at.formModal},{default:()=>[I(C,{class:at.formSpace},{default:()=>[c.list.map(((e,t)=>I("div",{class:at.formItem,key:t},[I("div",{class:at.previewModal},[I(F,{class:[at.titleType],src:p(e.type),previewDisabled:!0,objectFit:"cover"},null),!u.value&&I("img",{class:[at.iconUploadDelete],src:it,onClick:()=>(e=>{c.list.splice(e,1)})(t)},null),I(F,{class:[at.cover,at.image],lazy:!0,previewDisabled:!0,src:e.coverImg,objectFit:"cover"},null),I("div",{class:at.commonType},[j("公开资源:"),I(K,{size:"small",value:e.openFlag,"onUpdate:value":t=>e.openFlag=t},null)])]),I(T,{showFeedback:!1,path:`list.${t}.name`,rule:[{required:!0,message:"请输入资源名称",trigger:["input","blur"]}]},{default:()=>[I(J,{value:e.name,"onUpdate:value":t=>e.name=t,placeholder:"请输入资源名称",maxlength:25,clearable:!0},null)]}),I(T,{path:`list[${t}].subjectIds`,showFeedback:!1,rule:[{required:!0,message:"请选择素材可用乐器",trigger:"change",type:"array"}]},{default:()=>[I(q,{value:e.subjectIds,"onUpdate:value":t=>e.subjectIds=t,placeholder:"请选择素材可用乐器(可多选)",options:a.getSubjectList,labelField:"name",valueField:"id",multiple:!0,maxTagCount:2,clearable:!0},{action:()=>I(A,null,[I(G,{text:!0,style:" --n-width: 100% ",onClick:()=>h(e,a.getSubjectList)},{default:()=>[j("全选")]})])})]})]))),!u.value&&I("div",{class:at.formItem},[I(ot,{fileList:c.uploadUrl,"onUpdate:fileList":e=>c.uploadUrl=e,accept:".jpg,jpeg,.png,audio/mp3,video/mp4",showFileList:!1,ref:d,options:{autoCropWidth:320,autoCropHeight:180,fixedBox:!0},onFinished:e=>{c.list.push({subjectIds:c.subjectIds||[],openFlag:!0,coverImg:e.coverImg,name:c.name||"",type:st(e.content),enableFlag:1,content:e.content}),c.uploadUrl="",c.name="",c.subjectIds=[],d.value.handleClearFile()}},null),I(T,{showFeedback:!1},{default:()=>[I(J,{value:c.name,"onUpdate:value":e=>c.name=e,placeholder:"请输入资源名称",maxlength:25,clearable:!0},null)]}),I(T,{showFeedback:!1},{default:()=>[I(q,{value:c.subjectIds,"onUpdate:value":e=>c.subjectIds=e,placeholder:"请选择素材可用乐器(可多选)",options:a.getSubjectList,labelField:"name",valueField:"id",multiple:!0,maxTagCount:2,clearable:!0},{action:()=>I(A,null,[I(G,{text:!0,style:" --n-width: 100% ",onClick:()=>h(c,a.getSubjectList)},{default:()=>[j("全选")]})])})]})])]})]})]}),I(C,{class:at.btnGroup,justify:"center"},{default:()=>[I(G,{round:!0,onClick:()=>t("close")},{default:()=>[j("取消")]}),I(G,{round:!0,type:"primary",loading:c.uploading,disabled:0===c.list.length,onClick:_},{default:()=>[j("确定")]})]})])}}),rt=""+new URL("resource-default-3665de4e.svg",t.meta.url).href,dt=""+new URL("resource-checked-d5b0de21.svg",t.meta.url).href,ct=b({name:"myResources-guide",emits:["close"],setup(e,{emit:t}){const a=k({box:{height:"0px"},show:!1,steps:[{ele:"",eleRect:{},img:ae("myResourecs1.png"),handStyle:{top:"0.91rem"},imgStyle:{top:M(-4),left:M(-240),width:M(556),height:M(257)},btnsStyle:{bottom:M(30),left:M(-80)},eleRectPadding:{left:14,top:14,width:28,height:28},boxStyle:{borderRadius:"30px"}}],step:0}),l=x(!1),o=localStorage.getItem("teacher-guideInfo");o&&JSON.parse(o).myResourcesGuide?l.value=!1:l.value=!0;const i=()=>{const e=document.getElementById(`myResources-${a.step}`);if(e){const t=e.getBoundingClientRect(),l=a.steps[a.step].eleRectPadding?.left||0,o=a.steps[a.step].eleRectPadding?.top||0,i=a.steps[a.step].eleRectPadding?.width||0,s=a.steps[a.step].eleRectPadding?.height||0;a.box={left:t.x-l+"px",top:t.y-o+"px",width:t.width+i+"px",height:t.height+s+"px"},console.log(`coai-${a.step}`,a.box)}else n()};S((()=>{i(),window.addEventListener("resize",s)}));const s=()=>{i()};R((()=>{window.removeEventListener("resize",s)}));const n=()=>{a.step>=4?r():(a.step=a.step+1,i())},r=()=>{let e=JSON.parse(localStorage.getItem("teacher-guideInfo")||"{}")||null;e?e.myResourcesGuide=!0:e={myResourcesGuide:!0},localStorage.setItem("teacher-guideInfo",JSON.stringify(e)),l.value=!1};return()=>I(A,null,[l.value?U(I("div",{"onUpdate:show":e=>l.value=e,class:["n-modal-mask","n-modal-mask-guide"]},[I("div",{class:le.content,onClick:()=>n()},[I("div",{class:le.backBtn,onClick:e=>{e.stopPropagation(),r()}},[j("跳过")]),I("div",{class:le.box,style:{...a.box,...a.steps[a.step].boxStyle},id:`modeType-${a.step}`},[a.steps.map(((e,t)=>I("div",{onClick:e=>e.stopPropagation(),class:le.item,style:"bottom"==e.type?{display:t===a.step?"":"none",left:`${e.eleRect?.left}px`,top:`-${e.imgStyle?.height}`}:{display:t===a.step?"":"none",left:`${e.eleRect?.left}px`,top:`${a.box?.height}`}},[I("img",{class:le.img,style:e.imgStyle,src:e.img},null),I("div",{class:le.btns,style:e.btnsStyle},[a.step+1==a.steps.length?I(A,null,[I("div",{class:[le.endBtn],onClick:()=>r()},[j("完成")])]):I("div",{class:le.btn,onClick:()=>n()},[j("下一步 ("),a.step+1,j("/"),a.steps.length,j(")")])])])))])])]),[[E,l.value,"show"]]):null])}}),pt=b({name:"share-resources",setup(){const e=V();Y();const t=k({searchWord:"",loading:!1,pageTotal:0,pagination:{page:1,rows:20},searchGroup:{type:"",name:"",bookVersionId:null,subjectId:null,sourceType:3},tableList:[],uploadStatus:!1,show:!1,item:{},editStatus:!1,editList:[],editIds:[],removeVisiable:!1,removeContent:"是否删除该资源?",type:"remove",removeItem:{}}),a=x(!1),i=async()=>{try{t.loading=!0;const{data:e}=await _({...t.searchGroup,...t.pagination});t.loading=!1,t.pageTotal=Number(e.total);const l=e.rows||[],o=[];l.forEach((e=>{o.push({id:e.id,coverImg:e.coverImg,type:e.type,title:e.name,isCollect:!!e.favoriteFlag,isSelected:"PLATFORM"===e.sourceFrom,content:e.content,subjectId:e.subjectIds,enableFlag:e.enableFlag?1:0,openFlag:e.openFlag})})),t.tableList=o||[],setTimeout((()=>{a.value=!0}),500)}catch{t.loading=!1}},s=async e=>{t.pagination.page=1,t.searchGroup=Object.assign(t.searchGroup,e),i()};return S((()=>{i()})),()=>I(A,null,[I(tt,{onSearch:e=>s(e),onUpload:()=>{t.editList=[],t.uploadStatus=!0},onUpdate:()=>{const a=[];t.tableList.forEach((e=>{t.editIds.indexOf(e.id)>-1&&a.push(e)})),t.editList=a||[],t.editList.length<=0?e.error("至少选择一条资源进行编辑"):t.uploadStatus=!0},onEdit:e=>{t.editStatus=e,t.editStatus||(t.editIds=[])},onSelectAll:e=>{if(e){const e=[];t.tableList.forEach((t=>{e.push(t.id)})),t.editIds=e}else t.editIds=[]},onDelete:()=>{t.editIds.length<=0?e.error("至少选择一条资源进行删除"):(t.type="delete",t.removeContent="是否删除该资源?",t.removeVisiable=!0)}},null),I(B,{show:t.loading,"onUpdate:show":e=>t.loading=e,style:{"min-height":"50vh"}},{default:()=>[I("div",{class:Ge},[t.tableList.map((e=>I("div",{class:Oe},[I(l,{item:e,disabledMouseHover:!1,offShelf:!e.enableFlag,onOffShelf:()=>{t.type="remove",t.removeContent="该资源已下架,是否删除?",t.removeVisiable=!0},onClick:a=>{"IMG"!==a.type&&e.enableFlag&&(t.show=!0,t.item=a)},onCollect:e=>(async e=>{try{await u({materialId:e.id,favoriteFlag:e.isCollect?0:1,type:e.type}),e.isCollect=!e.isCollect}catch{}})(e)},null),t.editStatus&&I("div",{class:[Pe,t.editIds.includes(e.id)?Ve:""],onClick:()=>{const a=t.editIds.indexOf(e.id);a>-1?t.editIds.splice(a,1):t.editIds.push(e.id)}},[I("img",{src:t.editIds.includes(e.id)?dt:rt,class:Ne},null)])]))),!t.loading&&t.tableList.length<=0&&I(te,{style:{paddingTop:"30px"},description:"暂无资源"},null)])]}),I(d,{page:t.pagination.page,"onUpdate:page":e=>t.pagination.page=e,pageSize:t.pagination.rows,"onUpdate:pageSize":e=>t.pagination.rows=e,pageTotal:t.pageTotal,"onUpdate:pageTotal":e=>t.pageTotal=e,onList:i},null),I(o,{show:t.show,"onUpdate:show":e=>t.show=e,item:t.item},null),I(P,{show:t.uploadStatus,"onUpdate:show":e=>t.uploadStatus=e,preset:"card",showIcon:!1,class:["modalTitle background",$e],title:t.editStatus?"修改资源":"上传资源",blockScroll:!1},{default:()=>[I(nt,{onClose:()=>t.uploadStatus=!1,onConfirm:()=>{t.editIds=[],t.editList=[],s(t.searchGroup)},list:t.editList},null)]}),a.value?I(ct,null,null):null,I(P,{show:t.removeVisiable,"onUpdate:show":e=>t.removeVisiable=e,preset:"card",class:["modalTitle",We],title:"提示"},{default:()=>[I("div",{class:He},[I("p",null,[t.removeContent]),I(C,{class:Ke,justify:"center"},{default:()=>[I(G,{round:!0,type:"primary",onClick:()=>{"remove"===t.type?(async()=>{try{await f({id:t.removeItem.id}),e.success("删除成功"),s(t.searchGroup)}catch{}})():(async()=>{try{await h(t.editIds),e.success("删除成功"),s(t.searchGroup),t.editIds=[]}catch{}})(),t.removeVisiable=!1}},{default:()=>[j("确定")]}),I(G,{round:!0,onClick:()=>t.removeVisiable=!1},{default:()=>[j("取消")]})]})])]})])}}),_t="_list_2oig9_1",ut="_searchGroup_2oig9_9",mt="_btnType_2oig9_13",gt="_inputSearch_2oig9_48",ht="_searchCatatory_2oig9_72",ft="_spaceSection_2oig9_91",wt="_collapseWrap_2oig9_97",vt="_collaoseBtn_2oig9_103",yt="_isStart_2oig9_108",bt="_collapsSection_2oig9_111",kt="_isHidden_2oig9_114";function xt(e){return"function"==typeof e||"[object Object]"===Object.prototype.toString.call(e)&&!L(e)}const St=b({name:"search-group",emits:["search"],setup(e,{emit:t}){const l=y(),o=x([]),i=k({type:"",name:"",bookVersionId:null,subjectId:null}),s=()=>{t("search",i)},n=x(),r=x([]),d=x(0),c=x(0),p=x(0),_=x(!1),u=e=>{e?.selfElRef&&r.value.push(e.selfElRef.parentNode)},m=()=>{r.value=[...new Set(r.value)];let e=-1;r.value.forEach(((t,a)=>{0===a?(p.value=1,e=t.offsetLeft):t.offsetLeft===e&&0!=a&&p.value++,_.value?t.style.display="block":p.value>1?t.style.display="none":t.style.display="block"}))};return S((async()=>{o.value=[{label:"全部",value:""},...v],await l.getMusicSheetCategory(),await l.getSubjects()})),()=>{let e,t;return I("div",{class:ut},[I("div",{class:ht},[I(C,{size:"small",class:mt},xt(e=o.value.map((e=>I(G,{type:i.type===e.value?"primary":"default",secondary:i.type!==e.value,round:!0,size:"small",focusable:!1,onClick:()=>{i.type=e.value,s(),Q((()=>{"MUSIC"===i.type&&(d.value=n.value.offsetHeight,c.value=n.value.offsetHeight/p.value,m())}))}},{default:()=>[e.label]}))))?e:{default:()=>[e]})]),I(z,{labelAlign:"left",labelPlacement:"left"},{default:()=>["MUSIC"===i.type&&I("div",{class:[bt]},[I(T,{label:"教材:"},{default:()=>[I("div",{class:[wt,_.value?"":kt],ref:n},[I(C,{class:[ft]},{default:()=>[l.getAllMusicCategories.map((e=>I(G,{ref:u,secondary:i.bookVersionId===e.id,quaternary:i.bookVersionId!==e.id,strong:!0,focusable:!1,type:i.bookVersionId===e.id?"primary":"default",onClick:()=>{i.bookVersionId=e.id,s()}},{default:()=>[e.name]}))),p.value>1&&I("div",{style:{height:"var(--n-blank-height)",position:"absolute",display:"flex",alignItems:"center"},onClick:()=>{var e;e=!_.value,_.value=e,m()}},[I(F,{previewDisabled:!0,src:a,class:[vt,_.value?yt:""]},null)])]})])]})]),I(T,{label:"乐器:"},{default:()=>[I(C,{class:ft},xt(t=l.getSubjectAllList.map((e=>I(G,{secondary:i.subjectId===e.id,quaternary:i.subjectId!==e.id,strong:!0,focusable:!1,type:i.subjectId===e.id?"primary":"default",onClick:()=>{i.subjectId=e.id,s()}},{default:()=>[e.name]}))))?t:{default:()=>[t]})]}),I(w,{class:gt,round:!0,onSearch:e=>{i.name=e,s()}},null)]})])}}}),It=b({name:"myColloge-guide",emits:["close"],setup(e,{emit:t}){const a=k({box:{height:"0px"},show:!1,steps:[{ele:"",img:ae("myColloge1.png"),imgStyle:{top:M(-4),left:M(630),width:M(458),height:M(291)},btnsStyle:{bottom:M(96),left:M(790)},eleRectPadding:{left:7,top:7,width:14,height:14},type:"bottom"}],step:0}),l=x(!1),o=localStorage.getItem("teacher-guideInfo");o&&JSON.parse(o).myColloge?l.value=!1:l.value=!0;const i=()=>{const e=document.getElementById(`myColloge-${a.step}`);if(e){const t=e.getBoundingClientRect(),l=a.steps[a.step].eleRectPadding?.left||0,o=a.steps[a.step].eleRectPadding?.top||0,i=a.steps[a.step].eleRectPadding?.width||0,s=a.steps[a.step].eleRectPadding?.height||0;a.box={left:t.x-l+"px",top:t.y-o+"px",width:t.width+i+"px",height:t.height+s+"px"},console.log(`coai-${a.step}`,a.box)}else n()};S((()=>{i(),window.addEventListener("resize",s)}));const s=()=>{i()};R((()=>{window.removeEventListener("resize",s)}));const n=()=>{a.step>=4?r():(a.step=a.step+1,i())},r=()=>{let e=JSON.parse(localStorage.getItem("teacher-guideInfo")||"{}")||null;e?e.myColloge=!0:e={myColloge:!0},localStorage.setItem("teacher-guideInfo",JSON.stringify(e)),l.value=!1};return()=>I(A,null,[l.value?U(I("div",{"onUpdate:show":e=>l.value=e,class:["n-modal-mask","n-modal-mask-guide"]},[I("div",{class:le.content,onClick:()=>n()},[I("div",{class:le.backBtn,onClick:e=>{e.stopPropagation(),r()}},[j("跳过")]),I("div",{class:le.box,style:{...a.box},id:`modeType-${a.step}`},[a.steps.map(((e,t)=>I("div",{onClick:e=>e.stopPropagation(),class:le.item,style:"bottom"==e.type?{display:t===a.step?"":"none",left:`${e.eleRect?.left}px`,top:`-${e.imgStyle?.height}`}:{display:t===a.step?"":"none",left:`${e.eleRect?.left}px`,top:`${a.box?.height}`}},[I("img",{class:le.img,style:e.imgStyle,src:e.img},null),I("div",{class:le.btns,style:e.btnsStyle},[a.step+1==a.steps.length?I(A,null,[I("div",{class:[le.endBtn],onClick:()=>r()},[j("完成")])]):I("div",{class:le.btn,onClick:()=>n()},[j("下一步 ("),a.step+1,j("/"),a.steps.length,j(")")])])])))])])]),[[E,l.value,"show"]]):null])}}),Ct=b({name:"share-resources",setup(){const e=V(),t=Y(),a=k({searchWord:"",loading:!1,pageTotal:0,pagination:{page:1,rows:20},searchGroup:{type:"",name:"",bookVersionId:null,subjectId:null,sourceType:4},tableList:[],show:!1,item:{}}),i=async()=>{try{a.loading=!0;const{data:e}=await _({...a.searchGroup,...a.pagination});a.loading=!1,a.pageTotal=Number(e.total);const t=e.rows||[],l=[];t.forEach((e=>{l.push({id:e.id,coverImg:e.coverImg,type:e.type,title:e.name,isCollect:!!e.favoriteFlag,isSelected:"PLATFORM"===e.sourceFrom,content:e.content,subjectId:e.subjectIds,enableFlag:e.enableFlag?1:0,openFlag:e.openFlag})})),a.tableList=l||[],setTimeout((()=>{s.value=!0}),500)}catch{a.loading=!1}},s=x(!1),n=async e=>{a.pagination.page=1,a.searchGroup=Object.assign(a.searchGroup,e),i()};return S((()=>{i()})),()=>I(A,null,[I(St,{onSearch:e=>n(e)},null),I(B,{show:a.loading,"onUpdate:show":e=>a.loading=e,style:{"min-height":"50vh"}},{default:()=>[I("div",{class:_t,id:"myColloge-0"},[a.tableList.map((o=>I(l,{item:o,offShelf:!o.enableFlag,onOffShelf:()=>(async l=>{try{t.warning({title:"提示",content:"该资源已下架,是否删除?",positiveText:"确定",negativeText:"取消",onPositiveClick:async()=>{await f({id:l.id}),e.success("删除成功"),n(a.searchGroup)}})}catch{}})(o),disabledMouseHover:!1,onClick:e=>{"IMG"!==e.type&&o.enableFlag&&(a.show=!0,a.item=e)},onCollect:e=>(async e=>{try{await u({materialId:e.id,favoriteFlag:e.isCollect?0:1,type:e.type}),e.isCollect=!e.isCollect,n(a.searchGroup)}catch{}})(e)},null))),!a.loading&&a.tableList.length<=0&&I(te,{description:"暂无收藏资源"},null)])]}),I(d,{page:a.pagination.page,"onUpdate:page":e=>a.pagination.page=e,pageSize:a.pagination.rows,"onUpdate:pageSize":e=>a.pagination.rows=e,pageTotal:a.pageTotal,"onUpdate:pageTotal":e=>a.pageTotal=e,onList:i},null),I(o,{show:a.show,"onUpdate:show":e=>a.show=e,item:a.item},null),s.value?I(It,null,null):null])}});e("default",b({name:"student-studentList",setup:()=>()=>I("div",{class:de.listWrap},[I(Z,{defaultValue:"myResources",paneClass:de.paneTitle,justifyContent:"center",paneWrapperClass:de.paneWrapperContainer},{default:()=>[I(ee,{name:"myResources",tab:"我的资源"},{default:()=>[I(pt,null,null)]}),I(ee,{name:"shareResources",tab:"共享资源"},{default:()=>[I(Ce,null,null)],tab:()=>I("span",{id:"shareResources-0"},[j("共享资源")])}),I(ee,{name:"myCollect",tab:"我的收藏"},{default:()=>[I(Ct,null,null)]})]})])}))}}}));
|