1 |
- System.register(["./index-legacy-00a4940a.js","./index-legacy-0c46a3af.js","./isCollaose-legacy-5984c346.js","./index-legacy-65951573.js","./searchArray-legacy-d90e6d0f.js","./catchData-legacy-d7a39bcf.js","./index-legacy-6c770b5c.js","./index-legacy-e074e412.js","./index-legacy-a984be8f.js","./index-legacy-47f32ccb.js","./Scrollbar-legacy-a367299e.js","./icon-collect-active-legacy-ae2eda3a.js","./index-legacy-14f557f0.js","./searchs-legacy-3b019a5a.js","./contants-legacy-bee733b6.js"],(function(e,t){"use strict";var a,o,l,i,n,s,r,d,c,p,_,u,g,h,m,w,f,v,y,b,k,x,S,I,C,G,q,j,T,F,L,M,R,U,z,A,O,E,B,V,P,N,D,$,W,H,K,J,Z,Q,X,Y,ee,te,ae,oe,le,ie,ne,se;return{setters:[e=>{a=e.C,o=e.a,l=e.i,i=e.b,n=e.c,s=e.d},e=>{r=e.P},e=>{d=e.a,c=e.i,p=e.A,_=e.m,u=e.f,g=e.b,h=e.c,m=e.d,w=e.e},e=>{f=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,q=e.k,j=e.N,T=e.g,F=e.y,L=e.b3,M=e.a1,R=e.a2,U=e.a3,z=e.a4,A=e.F,O=e.A,E=e.w,B=e.t,V=e.b,P=e.x,N=e.di,D=e.dj,$=e.P,W=e.Z,H=e.dk,K=e.h,J=e.J,Z=e.C,Q=e.dl,X=e.m,Y=e.p,ee=e.q},e=>{te=e.T},e=>{ae=e.g,oe=e.s},e=>{le=e.C,ie=e.p,ne=e.a},e=>{se=e.N},null,null,null,null],execute:function(){var re=document.createElement("style");re.textContent="._listWrap_fw7rw_1{padding:1.66666667vw 1.04166667vw;background-color:#fff;border-radius:1.04166667vw}._listWrap_fw7rw_1 .n-tabs-tab-pad{width:4.16666667vw!important}._listWrap_fw7rw_1 .n-tabs-nav{padding:0px 1.04166667vw 1.25vw}._listWrap_fw7rw_1 .n-tabs-tab{color:#8b8d98;font-size:1.14583333rem;padding-top:0;padding-bottom:.3125vw;line-height:1.14583333vw}._listWrap_fw7rw_1 .n-tabs-tab.n-tabs-tab--active{font-weight:600!important;color:#131415!important}._listWrap_fw7rw_1 .n-tabs-tab__label{z-index:10}._listWrap_fw7rw_1 .n-tabs-bar{height:.52083333vw;background:linear-gradient(90deg,#77BBFF 0%,rgba(163,231,255,.22) 100%);z-index:0;bottom:.10416667vw}._listWrap_fw7rw_1 .n-tab-pane{padding:0 .625vw!important}._listWrap_fw7rw_1 .n-pagination{margin-top:1.875vw!important}._list_fw7rw_1{margin-top:.625vw;display:flex;flex-flow:row wrap;justify-content:flex-start;gap:1.14583333vw}._searchGroup_fw7rw_45{position:relative;padding:0}._searchGroup_fw7rw_45 ._btnType_fw7rw_49{gap:0px 1.25vw!important}._searchGroup_fw7rw_45 ._btnType_fw7rw_49 .n-button{height:1.92708333vw;padding:0 1.25vw;font-size:.9375rem;color:rgba(0,0,0,.6)}._searchGroup_fw7rw_45 ._btnType_fw7rw_49 .n-button.n-button--primary-type{font-weight:700;color:#fff}._searchGroup_fw7rw_45 .n-form{position:relative}._searchGroup_fw7rw_45 .n-form-item .n-form-item-label{font-size:.88541667rem;font-weight:600;color:#131415;line-height:1.25vw}._searchGroup_fw7rw_45 .n-form-item .n-button{height:1.66666667vw;font-size:.88541667rem;border-radius:.41666667vw;color:rgba(0,0,0,.6)}._searchGroup_fw7rw_45 .n-form-item .n-button--primary-type{color:#131415}._searchGroup_fw7rw_45 .n-form-item-feedback-wrapper{min-height:.72916667vw}._searchGroup_fw7rw_45 ._inputSearch_fw7rw_83{position:absolute;top:.20833333vw;right:0px;width:18.75vw;height:2.1875vw;font-size:.83333333rem}._searchGroup_fw7rw_45 ._inputSearch_fw7rw_83 .n-input-wrapper{padding-left:.625vw;padding-right:.20833333vw;height:2.1875vw!important}._searchGroup_fw7rw_45 ._inputSearch_fw7rw_83 .n-button{height:1.77083333vw;font-size:.78125rem;font-weight:500;width:auto}._searchGroup_fw7rw_45 ._searchCatatory_fw7rw_102{display:flex;justify-content:space-between;padding-bottom:1.25vw;border-bottom:1px solid #F2F2F2;margin-bottom:1.04166667vw}._searchGroup_fw7rw_45 ._searchCatatory_fw7rw_102 ._addTrain_fw7rw_109{height:1.92708333vw;border-radius:.41666667vw;font-size:.9375rem;background-color:#e8f4ff;color:#0378ec}._searchGroup_fw7rw_45 ._searchCatatory_fw7rw_102 ._addTrain_fw7rw_109 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:0px;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_14qgn_1{margin-top:.625vw;display:flex;flex-flow:row wrap;justify-content:flex-start;gap:1.14583333vw}._searchGroup_14qgn_8{position:relative;padding:0}._searchGroup_14qgn_8 ._btnType_14qgn_12{gap:0px 1.25vw!important}._searchGroup_14qgn_8 ._btnType_14qgn_12 .n-button{height:1.92708333vw;padding:0 1.25vw;font-size:.9375rem;color:rgba(0,0,0,.6)}._searchGroup_14qgn_8 ._btnType_14qgn_12 .n-button.n-button--primary-type{font-weight:700;color:#fff}._searchGroup_14qgn_8 .n-form{position:relative}._searchGroup_14qgn_8 .n-form-item .n-form-item-label{font-size:.88541667rem;font-weight:600;color:#131415;line-height:1.25vw}._searchGroup_14qgn_8 .n-form-item .n-button{height:1.66666667vw;font-size:.88541667rem;border-radius:.41666667vw;color:rgba(0,0,0,.6)}._searchGroup_14qgn_8 .n-form-item .n-button--primary-type{color:#131415}._searchGroup_14qgn_8 .n-form-item-feedback-wrapper{min-height:.72916667vw}._searchGroup_14qgn_8 ._inputSearch_14qgn_46{position:absolute;top:.20833333vw;right:0px;width:18.75vw;height:2.1875vw;font-size:.83333333rem;--n-height: 2.1875vw !important}._searchGroup_14qgn_8 ._inputSearch_14qgn_46 img{width:.9375vw;height:.9375vw}._searchGroup_14qgn_8 ._inputSearch_14qgn_46 .n-input-wrapper{padding-left:.625vw;padding-right:.20833333vw;height:2.1875vw!important}._searchGroup_14qgn_8 ._inputSearch_14qgn_46 .n-button{height:1.77083333vw;font-size:.78125rem;font-weight:500;width:auto}._searchGroup_14qgn_8 ._searchCatatory_14qgn_70{display:flex;justify-content:space-between;padding-bottom:1.25vw;padding-top:.15625vw;border-bottom:1px solid #F2F2F2;margin-bottom:1.04166667vw}._searchGroup_14qgn_8 ._searchCatatory_14qgn_70 ._addTrain_14qgn_78{height:1.92708333vw;border-radius:.41666667vw;font-size:.9375rem;background-color:#e8f4ff;color:#0378ec}._searchGroup_14qgn_8 ._searchCatatory_14qgn_70 ._addTrain_14qgn_78._error_14qgn_85{color:#ec3a4e;background-color:#fdebed}._searchGroup_14qgn_8 ._searchCatatory_14qgn_70 ._addTrain_14qgn_78 img{margin-right:.41666667vw}._searchGroup_14qgn_8 ._searchCatatory_14qgn_70 ._addTrain_14qgn_78 ._iconUpload_14qgn_92{width:1.19791667vw;height:.98958333vw}._searchGroup_14qgn_8 ._searchCatatory_14qgn_70 ._addTrain_14qgn_78 ._iconEdit_14qgn_96{width:1.25vw;height:1.30208333vw}._searchGroup_14qgn_8 ._searchCatatory_14qgn_70 ._addTrain_14qgn_78 ._iconSelectAll_14qgn_100{width:1.04166667vw;height:1.04166667vw}._searchGroup_14qgn_8 ._searchCatatory_14qgn_70 ._addTrain_14qgn_78 ._iconDelete_14qgn_104{width:.9375vw;height:.9375vw}._searchGroup_14qgn_8 ._searchCatatory_14qgn_70 ._addTrain_14qgn_78 ._iconPen_14qgn_108{width:1.04166667vw;height:.98958333vw}._itemSection_14qgn_112{position:relative}._itemSection_14qgn_112 ._itemBg_14qgn_115{position:absolute;left:0;top:0;width:100%;height:100%;z-index:99;border-radius:.72916667vw}._itemSection_14qgn_112 ._itemBg_14qgn_115._itemBgChecked_14qgn_124{background-color:rgba(0,0,0,.5)}._itemSection_14qgn_112 ._itemBg_14qgn_115 ._resourceDefault_14qgn_127{position:absolute;top:.83333333vw;right:.83333333vw;width:1.5625vw;height:1.5625vw}._spaceSection_14qgn_134{width:76%}._spaceSection_14qgn_134>div{line-height:var(--n-blank-height)}._attendClassModal_14qgn_140{width:57.29166667vw}._attendClassModal_14qgn_140 .n-select-menu{--n-height: calc(var(--n-option-height) * 5.6) !important}._removeVisiable_14qgn_146{width:26.04166667vw}._removeVisiable_14qgn_146 ._studentRemove_14qgn_149{padding:1.04166667vw 2.08333333vw 0}._removeVisiable_14qgn_146 ._studentRemove_14qgn_149 p{font-size:.9375rem;color:#777;line-height:1.5625vw;text-align:center}._removeVisiable_14qgn_146 ._studentRemove_14qgn_149 p span{color:#ea4132}._removeVisiable_14qgn_146 ._btnGroupModal_14qgn_161{padding:1.66666667vw 0}._removeVisiable_14qgn_146 ._btnGroupModal_14qgn_161 .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_xl13h_1{margin-top:.625vw;display:flex;flex-flow:row wrap;justify-content:flex-start;gap:1.14583333vw;min-height:11.45833333vw}._searchGroup_xl13h_9{position:relative;padding:0}._searchGroup_xl13h_9 ._btnType_xl13h_13{gap:0px 1.25vw!important}._searchGroup_xl13h_9 ._btnType_xl13h_13 .n-button{height:1.92708333vw;padding:0 1.25vw;font-size:.9375rem;color:rgba(0,0,0,.6)}._searchGroup_xl13h_9 ._btnType_xl13h_13 .n-button.n-button--primary-type{font-weight:700;color:#fff}._searchGroup_xl13h_9 .n-form{position:relative}._searchGroup_xl13h_9 .n-form-item .n-form-item-label{font-size:.88541667rem;font-weight:600;color:#131415;line-height:1.25vw}._searchGroup_xl13h_9 .n-form-item .n-button{height:1.66666667vw;font-size:.88541667rem;border-radius:.41666667vw;color:rgba(0,0,0,.6)}._searchGroup_xl13h_9 .n-form-item .n-button--primary-type{color:#131415}._searchGroup_xl13h_9 .n-form-item-feedback-wrapper{min-height:.72916667vw}._searchGroup_xl13h_9 ._inputSearch_xl13h_47{position:absolute;top:.20833333vw;right:0px;width:18.75vw;height:2.1875vw;font-size:.83333333rem;--n-height: 2.1875vw !important}._searchGroup_xl13h_9 ._inputSearch_xl13h_47 img{width:.9375vw;height:.9375vw}._searchGroup_xl13h_9 ._inputSearch_xl13h_47 .n-input-wrapper{padding-left:.625vw;padding-right:.20833333vw;height:2.1875vw!important}._searchGroup_xl13h_9 ._inputSearch_xl13h_47 .n-button{height:1.77083333vw;font-size:.78125rem;font-weight:500;width:auto}._searchGroup_xl13h_9 ._searchCatatory_xl13h_71{display:flex;justify-content:space-between;padding-bottom:1.25vw;border-bottom:1px solid #F2F2F2;margin-bottom:1.04166667vw}._searchGroup_xl13h_9 ._searchCatatory_xl13h_71 ._addTrain_xl13h_78{height:1.92708333vw;border-radius:.41666667vw;font-size:.9375rem;background-color:#e8f4ff;color:#0378ec}._searchGroup_xl13h_9 ._searchCatatory_xl13h_71 ._addTrain_xl13h_78 img{width:.83333333vw;height:.83333333vw;margin-right:.41666667vw}._spaceSection_xl13h_90{width:76%}._spaceSection_xl13h_90>div{line-height:var(--n-blank-height)}\n",document.head.appendChild(re);const de={listWrap:"_listWrap_fw7rw_1",list:"_list_fw7rw_1",searchGroup:"_searchGroup_fw7rw_45",btnType:"_btnType_fw7rw_49",inputSearch:"_inputSearch_fw7rw_83",searchCatatory:"_searchCatatory_fw7rw_102",addTrain:"_addTrain_fw7rw_109"},ce="_list_1ryw9_1",pe="_searchGroup_1ryw9_9",_e="_btnType_1ryw9_13",ue="_inputSearch_1ryw9_48",ge="_searchCatatory_1ryw9_72",he="_addTrain_1ryw9_79",me="_teachingModal_1ryw9_91",we="_spaceSection_1ryw9_94",fe="_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 a=y(),o=k({type:"MUSIC",name:"",bookVersionId:null,subjectId:null}),l=()=>{t("search",o)},i=x(),n=x([]),s=x(0),r=x(0),p=x(0),_=x(!1),u=e=>{e?.selfElRef&&n.value.push(e.selfElRef.parentNode)},g=()=>{n.value=[...new Set(n.value)];let e=-1;n.value.forEach(((t,a)=>{console.log(t.offsetLeft),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 a.getMusicSheetCategory(),await a.getSubjects(),s.value=i.value.offsetHeight,r.value=i.value.offsetHeight/p.value,g(),console.log(n.value[1].offsetHeight,i.value.offsetHeight/3)})),()=>{let e,n;return I("div",{class:pe},[I("div",{class:[ge]},[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,l()}},{default:()=>[e.label]}))))?e:{default:()=>[e]}),I(G,{type:"primary",class:he,focusable:!1,strong:!0,onClick:()=>t("add")},{default:()=>[I("img",{src:d},null),q("添加自定义教材")]})]),I(j,{labelAlign:"left",labelPlacement:"left"},{default:()=>["MUSIC"===o.type&&I("div",{class:[be]},[I(T,{label:"教材:"},{default:()=>[I("div",{class:[fe,_.value?"":ke],ref:i},[I(C,{class:[we]},{default:()=>[a.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,l()}},{default:()=>[e.name]}))),I("div",{style:{height:"100%",display:"flex",alignItems:"center"},onClick:()=>{var e;e=!_.value,_.value=e,g()}},[I(F,{previewDisabled:!0,src:c,class:[ve,_.value?ye:""]},null)])]})])]})]),I(T,{label:"乐器:"},{default:()=>[I(C,{class:we},xe(n=a.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,l()}},{default:()=>[e.name]}))))?n:{default:()=>[n]})]}),I(f,{class:ue,round:!0,onSearch:e=>{o.name=e,l()}},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}),o=x(!1),l=localStorage.getItem("teacher-guideInfo");l&&JSON.parse(l).shareResourcesGuide?o.value=!1:o.value=!0;const i=()=>{const e=document.getElementById(`shareResources-${a.step}`);if(e){const t=e.getBoundingClientRect(),o=a.steps[a.step].eleRectPadding?.left||0,l=a.steps[a.step].eleRectPadding?.top||0,i=a.steps[a.step].eleRectPadding?.width||0,n=a.steps[a.step].eleRectPadding?.height||0;"shareResources-1"==`shareResources-${a.step}`?(a.box={left:t.x-o+"px",top:t.y-l+"px",width:2*(t.width+i)+i+"px",height:t.height+n+"px"},console.log(a.box.width,"---",t.width)):a.box={left:t.x-o+"px",top:t.y-l+"px",width:t.width+i+"px",height:t.height+n+"px"},console.log(`coai-${a.step}`,a.box)}else s()};S((()=>{i(),window.addEventListener("resize",n)}));const n=()=>{i()};R((()=>{window.removeEventListener("resize",n)}));const s=()=>{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)),o.value=!1};return()=>I(A,null,[o.value?U(I("div",{"onUpdate:show":e=>o.value=e,class:["n-modal-mask","n-modal-mask-guide"]},[I("div",{class:oe.content,onClick:()=>s()},[I("div",{class:oe.backBtn,onClick:e=>{e.stopPropagation(),r()}},[q("跳过")]),I("div",{class:oe.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:oe.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:oe.img,style:e.imgStyle,src:e.img},null),I("div",{class:oe.btns,style:e.btnsStyle},[a.step+1==a.steps.length?I(A,null,[I("div",{class:[oe.endBtn],onClick:()=>r()},[q("完成")]),I("div",{class:oe.nextBtn,onClick:()=>{a.step=0,i()}},[q("再看一遍")])]):I("div",{class:oe.btn,onClick:()=>s()},[q("下一步 ("),a.step+1,q("/"),a.steps.length,q(")")])])])))])])]),[[z,o.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),l=async()=>{try{e.loading=!0;const{data:a}=await _({...e.searchGroup,...e.pagination});e.loading=!1,e.pageTotal=Number(a.total);const o=a.rows||[],l=[];o.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})})),e.tableList=l||[],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((()=>{l()})),()=>I(A,null,[I(Se,{onSearch:t=>(async t=>{e.pagination.page=1,e.searchGroup=Object.assign(e.searchGroup,t),l()})(t),onAdd:()=>e.teachingStatus=!0},null),I(O,{show:e.loading,"onUpdate:show":t=>e.loading=t,style:{"min-height":"50vh"}},{default:()=>[I("div",{class:ce},[e.tableList.map(((t,o)=>I(A,null,[I(a,0==o?E({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(r,{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:l},null),I(o,{show:e.show,"onUpdate:show":t=>e.show=t,item:e.item},null),I(B,{show:e.teachingStatus,"onUpdate:show":t=>e.teachingStatus=t,preset:"card",showIcon:!1,class:["modalTitle background",me],title:"自定义教材",blockScroll:!1},{default:()=>[I(p,{onClose:()=>e.teachingStatus=!1},null)]}),t.value?I(Ie,null,null):null])}}),Ge="_list_14qgn_1",qe="_searchGroup_14qgn_8",je="_btnType_14qgn_12",Te="_inputSearch_14qgn_46",Fe="_searchCatatory_14qgn_70",Le="_addTrain_14qgn_78",Me="_error_14qgn_85",Re="_iconUpload_14qgn_92",Ue="_iconEdit_14qgn_96",ze="_iconSelectAll_14qgn_100",Ae="_iconDelete_14qgn_104",Oe="_iconPen_14qgn_108",Ee="_itemSection_14qgn_112",Be="_itemBg_14qgn_115",Ve="_itemBgChecked_14qgn_124",Pe="_resourceDefault_14qgn_127",Ne="_spaceSection_14qgn_134",De="_attendClassModal_14qgn_140",$e="_removeVisiable_14qgn_146",We="_studentRemove_14qgn_149",He="_btnGroupModal_14qgn_161",Ke=""+new URL("icon-upload-80842027.svg",t.meta.url).href,Je=""+new URL("icon-edit-b6bf632d.svg",t.meta.url).href,Ze=""+new URL("icon-selectall-3a19fad7.svg",t.meta.url).href,Qe=""+new URL("icon-selectall-default-48d9d555.svg",t.meta.url).href,Xe=""+new URL("icon-pen-ed9c4056.svg",t.meta.url).href,Ye=""+new URL("icon-delete-2a30d9a9.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([]),o=y(),l=k({type:"",name:"",bookVersionId:null,subjectId:null}),i=k({isEdit:!1,isSelectAll:!1}),n=()=>{t("search",l)};return S((async()=>{a.value=[{label:"全部",value:""},...v],await o.getSubjects()})),()=>{let e,s;return I("div",{class:qe},[I("div",{class:Fe},[I(C,{size:"small",class:je},et(e=a.value.map((e=>"MUSIC"!==e.value&&I(G,{type:l.type===e.value?"primary":"default",secondary:l.type!==e.value,round:!0,size:"small",focusable:!1,onClick:()=>{l.type=e.value,n()}},{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?Ze:Qe,class:ze},null),q("全选")]}),I(G,{type:"error",class:[Le,Me],focusable:!1,strong:!0,onClick:()=>t("delete")},{default:()=>[I("img",{src:Ye,class:Ae},null),q("删除")]}),I(G,{type:"primary",class:Le,focusable:!1,strong:!0,onClick:()=>t("update")},{default:()=>[I("img",{src:Xe,class:Oe},null),q("修改")]}),I(G,{type:"primary",class:Le,focusable:!1,strong:!0,onClick:()=>{i.isEdit=!1,t("edit",i.isEdit)}},{default:()=>[q("完成编辑")]})]):I(A,null,[I(G,E({type:"primary",class:Le,focusable:!1},{id:"myResources-0"},{strong:!0,onClick:()=>t("upload")}),{default:()=>[I("img",{src:Ke,class:Re},null),q("上传资源")]}),I(G,{type:"primary",class:Le,focusable:!1,strong:!0,onClick:()=>{i.isEdit=!0,t("edit",i.isEdit)}},{default:()=>[I("img",{src:Je,class:Ue},null),q("编辑资源")]})])]})]),I(j,{labelAlign:"left",labelPlacement:"left"},{default:()=>[I(T,{label:"乐器:"},{default:()=>[I(C,{class:Ne},et(s=o.getSubjectAllList.map((e=>I(G,{secondary:l.subjectId===e.id,quaternary:l.subjectId!==e.id,strong:!0,focusable:!1,type:l.subjectId===e.id?"primary":"default",onClick:()=>{l.subjectId=e.id,n()}},{default:()=>[e.name]}))))?s:{default:()=>[s]})]}),I(f,{class:Te,round:!0,onSearch:e=>{l.name=e,n()}},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"},ot=""+new URL("icon-upload-add-e30dd125.svg",t.meta.url).href,lt=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:o}){const l=`https://${e.bucketName}.ks3-cn-beijing.ksyuncs.com/`,i=V(),n=x(!1),s=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=[]};_(),P((()=>e.imageList),(()=>{_()})),P((()=>e.fileList),(()=>{_()})),a({handleClearFile:()=>{d.value?.clear()}});const u=x(),g=async(e,t)=>{const a=new FileReader;a.addEventListener("load",(()=>t(a.result))),a.readAsDataURL(e)},h=async e=>{const a=l+c.key,o=nt(a);let i="";"IMG"===o?i=a:"SONG"===o?i=$.SONG_DEFAULT_COVER:"VIDEO"===o&&(i=await m()),t("update:fileList",a),t("readFileInputEventAsArrayBuffer",r.value),t("finished",{coverImg:i,content:a}),e.file.url=a,n.value=!1,s.value=!1},m=async()=>{try{s.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"),o=a.videoWidth,l=a.videoHeight;t.width=o,t.height=l,t.getContext("2d").drawImage(a,0,0,o,l),console.log(t),t.toBlob((t=>{console.log(t),e(t)}))}))}))),o=`${e.path}${Date.now()+".png"}`,i={filename:o,bucketName:e.bucketName,postData:{filename:o,acl:"public-read",key:o,unknowValueField:[]}},{data:n}=await ie(i),d={policy:n.policy,signature:n.signature,key:o,acl:"public-read",KSSAccessKeyId:n.kssAccessKeyId,name:o},c=new FormData;for(const e in d)c.append(e,d[e]);return c.append("file",a),await ne.post(l,c),l+o}finally{s.value=!1}var t},w=async a=>{try{const o=`${e.path}${e.fileName||(new Date).getTime()+".png"}`,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;const r=new FormData;for(const e in c)r.append(e,c[e]);r.append("file",a),await ne.post(l,r).then((()=>{const e=l+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}),n.value=!1}))}catch{return!1}};return()=>I("div",{class:at.uploadFile},[I(O,{show:s.value,description:"上传中..."},{default:()=>[I(N,{ref:d,action:l,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 o=!0;const l=a.type.includes("image")?D.IMG:a.type.includes("audio")?D.SONG:D.VIDEO,d="IMG"===l?2:"SONG"===l?20:500;if(d&&(o=a.file.size/1024/1024<d,!o))return i.error(`文件大小不能超过${d}M`),!1;if(!o)return o;if(e.cropper&&"IMG"===l)return g(a.file,(t=>{const o=Object.assign({},e.options,{img:t,name:a.file.name});n.value=!0,setTimeout((()=>{u.value?.edit(o)}),100)})),!1;try{s.value=!0;const t=a.file.name,o=t.slice(t.lastIndexOf(".")),l=`${e.path}${e.fileName||Date.now()+o}`,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,r.value=a.file}catch{return s.value=!1,!1}return!0})(t),onFinish:e=>(e=>{h(e)})(e),onRemove:()=>(async()=>{t("update:fileList",""),t("remove"),s.value=!1})()},{default:()=>["default"===e.showType&&I("div",{class:at.uploadBtn},[I("img",{src:ot,class:at.iconUploadAdd},null),I("p",null,[q("上传")])]),"custom"===e.showType&&o.custom&&o.custom()]})]}),I(B,{show:n.value,"onUpdate:show":e=>n.value=e,preset:"dialog",showIcon:!1,class:["modalTitle background"],title:"上传图片",style:{width:"800px"}},{default:()=>[I(le,{ref:u,onClose:()=>n.value=!1,onCropperOk:w},null)]})])}}),it=""+new URL("icon-upload-delete-4a696b5c.svg",t.meta.url).href,nt=e=>e.indexOf(".mp3")>-1?D.SONG:e.indexOf(".mp4")>-1?D.VIDEO:D.IMG,st=b({name:"upload-modal",props:{list:{type:Array,default:()=>[]}},emits:["close","confirm"],setup(e,{emit:t}){const a=y(),o=x(),r=V(),d=x(),c=k({list:[],uploading:!1,uploadUrl:"",name:"",subjectIds:[]}),p=e=>{let t=l;switch(e){case"IMG":t=l;break;case"VIDEO":t=s;break;case"SONG":t=n;break;case"MUSIC":t=i}return t},_=async()=>{o.value?.validate((async e=>{if(e)Z(Q);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 g(e):await h(e),c.list=[],r.success("保存成功"),t("close",!0),t("confirm")}catch{}c.uploading=!1}}))},u=W((()=>e.list.length>0));S((async()=>{const t=e.list||[],o=[];t.forEach((e=>{o.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=o||[],await a.getSubjects()}));const m=(e,t)=>{e.subjectIds=t.map((e=>e.id))};return()=>I("div",{class:at.uploadModal},[I(se,{style:{"max-height":"55vh"}},{default:()=>[I(j,{ref:o,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},[q("公开资源:"),I(H,{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(K,{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(J,{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:()=>m(e,a.getSubjectList)},{default:()=>[q("全选")]})])})]})]))),!u.value&&I("div",{class:at.formItem},[I(lt,{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:nt(e.content),enableFlag:1,content:e.content}),c.uploadUrl="",c.name="",c.subjectIds=[],d.value.handleClearFile()}},null),I(T,{showFeedback:!1},{default:()=>[I(K,{value:c.name,"onUpdate:value":e=>c.name=e,placeholder:"请输入资源名称",maxlength:25,clearable:!0},null)]}),I(T,{showFeedback:!1},{default:()=>[I(J,{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:()=>m(c,a.getSubjectList)},{default:()=>[q("全选")]})])})]})])]})]})]}),I(C,{class:at.btnGroup,justify:"center"},{default:()=>[I(G,{round:!0,onClick:()=>t("close")},{default:()=>[q("取消")]}),I(G,{round:!0,type:"primary",loading:c.uploading,disabled:0===c.list.length,onClick:_},{default:()=>[q("确定")]})]})])}}),rt=""+new URL("resource-default-ad56ce84.svg",t.meta.url).href,dt=""+new URL("resource-checked-e62fa301.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}),o=x(!1),l=localStorage.getItem("teacher-guideInfo");l&&JSON.parse(l).myResourcesGuide?o.value=!1:o.value=!0;const i=()=>{const e=document.getElementById(`myResources-${a.step}`);if(e){const t=e.getBoundingClientRect(),o=a.steps[a.step].eleRectPadding?.left||0,l=a.steps[a.step].eleRectPadding?.top||0,i=a.steps[a.step].eleRectPadding?.width||0,n=a.steps[a.step].eleRectPadding?.height||0;a.box={left:t.x-o+"px",top:t.y-l+"px",width:t.width+i+"px",height:t.height+n+"px"},console.log(`coai-${a.step}`,a.box)}else s()};S((()=>{i(),window.addEventListener("resize",n)}));const n=()=>{i()};R((()=>{window.removeEventListener("resize",n)}));const s=()=>{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)),o.value=!1};return()=>I(A,null,[o.value?U(I("div",{"onUpdate:show":e=>o.value=e,class:["n-modal-mask","n-modal-mask-guide"]},[I("div",{class:oe.content,onClick:()=>s()},[I("div",{class:oe.backBtn,onClick:e=>{e.stopPropagation(),r()}},[q("跳过")]),I("div",{class:oe.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:oe.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:oe.img,style:e.imgStyle,src:e.img},null),I("div",{class:oe.btns,style:e.btnsStyle},[a.step+1==a.steps.length?I(A,null,[I("div",{class:[oe.endBtn],onClick:()=>r()},[q("完成")])]):I("div",{class:oe.btn,onClick:()=>s()},[q("下一步 ("),a.step+1,q("/"),a.steps.length,q(")")])])])))])])]),[[z,o.value,"show"]]):null])}}),pt=b({name:"share-resources",setup(){const e=V();X();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:{}}),l=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 a=e.rows||[],o=[];a.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((()=>{l.value=!0}),500)}catch{t.loading=!1}},n=async e=>{t.pagination.page=1,t.searchGroup=Object.assign(t.searchGroup,e),i()};return S((()=>{i()})),()=>I(A,null,[I(tt,{onSearch:e=>n(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(O,{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:Ee},[I(a,{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:[Be,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:Pe},null)])]))),!t.loading&&t.tableList.length<=0&&I(te,{style:{paddingTop:"30px"},description:"暂无资源"},null)])]}),I(r,{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(B,{show:t.uploadStatus,"onUpdate:show":e=>t.uploadStatus=e,preset:"card",showIcon:!1,class:["modalTitle background",De],title:t.editStatus?"修改资源":"上传资源",blockScroll:!1},{default:()=>[I(st,{onClose:()=>t.uploadStatus=!1,onConfirm:()=>{t.editIds=[],t.editList=[],n(t.searchGroup)},list:t.editList},null)]}),l.value?I(ct,null,null):null,I(B,{show:t.removeVisiable,"onUpdate:show":e=>t.removeVisiable=e,preset:"card",class:["modalTitle",$e],title:"提示"},{default:()=>[I("div",{class:We},[I("p",null,[t.removeContent]),I(C,{class:He,justify:"center"},{default:()=>[I(G,{round:!0,type:"primary",onClick:()=>{"remove"===t.type?(async()=>{try{await w({id:t.removeItem.id}),e.success("删除成功"),n(t.searchGroup)}catch{}})():(async()=>{try{await m(t.editIds),e.success("删除成功"),n(t.searchGroup),t.editIds=[]}catch{}})(),t.removeVisiable=!1}},{default:()=>[q("确定")]}),I(G,{round:!0,onClick:()=>t.removeVisiable=!1},{default:()=>[q("取消")]})]})])]})])}}),_t="_list_xl13h_1",ut="_searchGroup_xl13h_9",gt="_btnType_xl13h_13",ht="_inputSearch_xl13h_47",mt="_searchCatatory_xl13h_71",wt="_spaceSection_xl13h_90";function ft(e){return"function"==typeof e||"[object Object]"===Object.prototype.toString.call(e)&&!L(e)}const vt=b({name:"search-group",emits:["search"],setup(e,{emit:t}){const a=y(),o=x([]),l=k({type:"",name:"",bookVersionId:null,subjectId:null}),i=()=>{t("search",l)};return S((async()=>{o.value=[{label:"全部",value:""},...v],await a.getMusicSheetCategory(),await a.getSubjects()})),()=>{let e,t,n;return I("div",{class:ut},[I("div",{class:mt},[I(C,{size:"small",class:gt},ft(e=o.value.map((e=>I(G,{type:l.type===e.value?"primary":"default",secondary:l.type!==e.value,round:!0,size:"small",focusable:!1,onClick:()=>{l.type=e.value,i()}},{default:()=>[e.label]}))))?e:{default:()=>[e]})]),I(j,{labelAlign:"left",labelPlacement:"left"},{default:()=>["MUSIC"===l.type&&I(T,{label:"教材:"},{default:()=>[I(C,{class:wt},ft(t=a.getAllMusicCategories.map((e=>I(G,{secondary:l.bookVersionId===e.id,quaternary:l.bookVersionId!==e.id,strong:!0,focusable:!1,type:l.bookVersionId===e.id?"primary":"default",onClick:()=>{l.bookVersionId=e.id,i()}},{default:()=>[e.name]}))))?t:{default:()=>[t]})]}),I(T,{label:"乐器:"},{default:()=>[I(C,{class:wt},ft(n=a.getSubjectAllList.map((e=>I(G,{secondary:l.subjectId===e.id,quaternary:l.subjectId!==e.id,strong:!0,focusable:!1,type:l.subjectId===e.id?"primary":"default",onClick:()=>{l.subjectId=e.id,i()}},{default:()=>[e.name]}))))?n:{default:()=>[n]})]}),I(f,{class:ht,round:!0,onSearch:e=>{l.name=e,i()}},null)]})])}}}),yt=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}),o=x(!1),l=localStorage.getItem("teacher-guideInfo");l&&JSON.parse(l).myColloge?o.value=!1:o.value=!0;const i=()=>{const e=document.getElementById(`myColloge-${a.step}`);if(e){const t=e.getBoundingClientRect(),o=a.steps[a.step].eleRectPadding?.left||0,l=a.steps[a.step].eleRectPadding?.top||0,i=a.steps[a.step].eleRectPadding?.width||0,n=a.steps[a.step].eleRectPadding?.height||0;a.box={left:t.x-o+"px",top:t.y-l+"px",width:t.width+i+"px",height:t.height+n+"px"},console.log(`coai-${a.step}`,a.box)}else s()};S((()=>{i(),window.addEventListener("resize",n)}));const n=()=>{i()};R((()=>{window.removeEventListener("resize",n)}));const s=()=>{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)),o.value=!1};return()=>I(A,null,[o.value?U(I("div",{"onUpdate:show":e=>o.value=e,class:["n-modal-mask","n-modal-mask-guide"]},[I("div",{class:oe.content,onClick:()=>s()},[I("div",{class:oe.backBtn,onClick:e=>{e.stopPropagation(),r()}},[q("跳过")]),I("div",{class:oe.box,style:{...a.box},id:`modeType-${a.step}`},[a.steps.map(((e,t)=>I("div",{onClick:e=>e.stopPropagation(),class:oe.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:oe.img,style:e.imgStyle,src:e.img},null),I("div",{class:oe.btns,style:e.btnsStyle},[a.step+1==a.steps.length?I(A,null,[I("div",{class:[oe.endBtn],onClick:()=>r()},[q("完成")])]):I("div",{class:oe.btn,onClick:()=>s()},[q("下一步 ("),a.step+1,q("/"),a.steps.length,q(")")])])])))])])]),[[z,o.value,"show"]]):null])}}),bt=b({name:"share-resources",setup(){const e=V(),t=X(),l=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{l.loading=!0;const{data:e}=await _({...l.searchGroup,...l.pagination});l.loading=!1,l.pageTotal=Number(e.total);const t=e.rows||[],a=[];t.forEach((e=>{a.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})})),l.tableList=a||[],setTimeout((()=>{n.value=!0}),500)}catch{l.loading=!1}},n=x(!1),s=async e=>{l.pagination.page=1,l.searchGroup=Object.assign(l.searchGroup,e),i()};return S((()=>{i()})),()=>I(A,null,[I(vt,{onSearch:e=>s(e)},null),I(O,{show:l.loading,"onUpdate:show":e=>l.loading=e,style:{"min-height":"50vh"}},{default:()=>[I("div",{class:_t,id:"myColloge-0"},[l.tableList.map((o=>I(a,{item:o,offShelf:!o.enableFlag,onOffShelf:()=>(async a=>{try{t.warning({title:"提示",content:"该资源已下架,是否删除?",positiveText:"确定",negativeText:"取消",onPositiveClick:async()=>{await w({id:a.id}),e.success("删除成功"),s(l.searchGroup)}})}catch{}})(o),disabledMouseHover:!1,onClick:e=>{"IMG"!==e.type&&o.enableFlag&&(l.show=!0,l.item=e)},onCollect:e=>(async e=>{try{await u({materialId:e.id,favoriteFlag:e.isCollect?0:1,type:e.type}),e.isCollect=!e.isCollect,s(l.searchGroup)}catch{}})(e)},null))),!l.loading&&l.tableList.length<=0&&I(te,{description:"暂无收藏资源"},null)])]}),I(r,{page:l.pagination.page,"onUpdate:page":e=>l.pagination.page=e,pageSize:l.pagination.rows,"onUpdate:pageSize":e=>l.pagination.rows=e,pageTotal:l.pageTotal,"onUpdate:pageTotal":e=>l.pageTotal=e,onList:i},null),I(o,{show:l.show,"onUpdate:show":e=>l.show=e,item:l.item},null),n.value?I(yt,null,null):null])}});e("default",b({name:"student-studentList",setup:()=>()=>I("div",{class:de.listWrap},[I(Y,{defaultValue:"myResources",paneClass:de.paneTitle,justifyContent:"center",animated:!0,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"},[q("共享资源")])}),I(ee,{name:"myCollect",tab:"我的收藏"},{default:()=>[I(bt,null,null)]})]})])}))}}}));
|