index.7fdcf616.js 94 KB

1234567891011121314151617181920212223242526272829
  1. var ct=Object.defineProperty,dt=Object.defineProperties;var pt=Object.getOwnPropertyDescriptors;var Me=Object.getOwnPropertySymbols;var mt=Object.prototype.hasOwnProperty,ft=Object.prototype.propertyIsEnumerable;var Be=(u,k,d)=>k in u?ct(u,k,{enumerable:!0,configurable:!0,writable:!0,value:d}):u[k]=d,G=(u,k)=>{for(var d in k||(k={}))mt.call(k,d)&&Be(u,d,k[d]);if(Me)for(var d of Me(k))ft.call(k,d)&&Be(u,d,k[d]);return u},Q=(u,k)=>dt(u,pt(k));var B=(u,k,d)=>new Promise((l,e)=>{var a=y=>{try{x(d.next(y))}catch(F){e(F)}},h=y=>{try{x(d.throw(y))}catch(F){e(F)}},x=y=>y.done?l(y.value):Promise.resolve(y.value).then(a,h);x((d=d.apply(u,k)).next())});import{S as Xe}from"./index.9329952a.js";import{P as $e}from"./index.a4c46506.js";import{a as He,b as gt,c as ht,d as yt,e as St,f as vt,m as Ue,g as bt,h as De,i as Tt,j as It,k as je,l as kt,n as xt,o as Ft,p as Lt,q as Ct}from"./api.c492ecf8.js";import{U as te}from"./index.88220f71.js";import{cj as wt,cG as Ut,d as se,cI as At,cJ as Ze,F as ke,cP as Nt,bi as Re,dx as Pt,dy as _e,a as ee,u as ne,r as H,B as ce,dj as Ie,i as t,l as I,ce as M,aj as me,_ as ue,a9 as Z,p as O,k as m,cg as xe,bx as We,b as Qe,dk as et,q as Ae,ac as R,ad as N,m as pe,db as de,M as tt,ai as Ne,dz as Et,di as he,a8 as W,a7 as z,dA as Mt,ag as Fe,aa as oe,bn as at,dB as Bt,H as X,ae as Dt,ch as Oe,d9 as ie,da as be,bC as $,a0 as jt,a1 as Rt,e as _t,d7 as Ot,d8 as Ye}from"./index.52190234.js";import{D as ye,E as Yt,C as lt,F as Ce,c as ze}from"./constant.b4bfe346.js";import{g as re,a as qe}from"./objectUtil.ec24ceed.js";import{c as we}from"./api.2416a739.js";import{x as st}from"./api.48439db0.js";import{s as it}from"./api.9d0bd1a5.js";import{f as ut}from"./index.79b78ed5.js";import{a as zt}from"./uploadFile.0733644e.js";import{N as j}from"./FormItemGridItem.c165d723.js";import{N as Pe}from"./Cascader.e05af7a7.js";import{e as qt,g as Gt}from"./filters.0e1cdfd6.js";import{c as Kt,g as Vt}from"./musicUtil.56af1657.js";import{T as Se}from"./index.55c5b4c7.js";import{a as Jt}from"./searchArray.617a5610.js";import{g as Xt,s as $t}from"./use-async.2838ef96.js";import"./searchs.b637f0d6.js";import"./oss-file-upload.d423c3fc.js";import"./api.78fe9e0a.js";import"./vuedraggable.umd.2f6e1d7f.js";import"./DeleteFilled.c9bd2af2.js";import"./api.4d6d72d1.js";import"./knowledgeTypeData.3b15dd0b.js";import"./dateUtil.71a27ee9.js";import"./dayjs.min.9dca7ce6.js";const Ht=wt("input-group-label",`
  2. position: relative;
  3. user-select: none;
  4. -webkit-user-select: none;
  5. box-sizing: border-box;
  6. padding: 0 12px;
  7. display: inline-block;
  8. border-radius: var(--n-border-radius);
  9. background-color: var(--n-group-label-color);
  10. color: var(--n-group-label-text-color);
  11. font-size: var(--n-font-size);
  12. line-height: var(--n-height);
  13. height: var(--n-height);
  14. flex-shrink: 0;
  15. white-space: nowrap;
  16. transition:
  17. color .3s var(--n-bezier),
  18. background-color .3s var(--n-bezier),
  19. box-shadow .3s var(--n-bezier);
  20. `,[Ut("border",`
  21. position: absolute;
  22. left: 0;
  23. right: 0;
  24. top: 0;
  25. bottom: 0;
  26. border-radius: inherit;
  27. border: var(--n-group-label-border);
  28. transition: border-color .3s var(--n-bezier);
  29. `)]),Zt=Object.assign(Object.assign({},Ze.props),{size:{type:String,default:"medium"},bordered:{type:Boolean,default:void 0}}),Ge=se({name:"InputGroupLabel",props:Zt,setup(u){const{mergedBorderedRef:k,mergedClsPrefixRef:d,inlineThemeDisabled:l}=At(u),e=Ze("Input","-input-group-label",Ht,Pt,u,d),a=ke(()=>{const{size:x}=u,{common:{cubicBezierEaseInOut:y},self:{groupLabelColor:F,borderRadius:P,groupLabelTextColor:S,lineHeight:c,groupLabelBorder:b,[_e("fontSize",x)]:w,[_e("height",x)]:L}}=e.value;return{"--n-bezier":y,"--n-group-label-color":F,"--n-group-label-border":b,"--n-border-radius":P,"--n-group-label-text-color":S,"--n-font-size":w,"--n-line-height":c,"--n-height":L}}),h=l?Nt("input-group-label",ke(()=>u.size[0]),a,u):void 0;return{mergedClsPrefix:d,mergedBordered:k,cssVars:l?void 0:a,themeClass:h==null?void 0:h.themeClass,onRender:h==null?void 0:h.onRender}},render(){var u,k,d;const{mergedClsPrefix:l}=this;return(u=this.onRender)===null||u===void 0||u.call(this),Re("div",{class:[`${l}-input-group-label`,this.themeClass],style:this.cssVars},(d=(k=this.$slots).default)===null||d===void 0?void 0:d.call(k),this.mergedBordered?Re("div",{class:`${l}-input-group-label__border`}):null)}}),Wt="_audioSection_d7561_1",Qt="_btnRemove_d7561_9",ea="_formContainer_d7561_14",ta="_productModal_d7561_19",aa="_productIframe_d7561_27",la="_musicPreView_d7561_32",sa="_musicList_d7561_37",ia="_musicImg_d7561_53",ua="_tipImg_d7561_57",ae={audioSection:Wt,btnRemove:Qt,formContainer:ea,productModal:ta,productIframe:aa,musicPreView:la,musicList:sa,musicImg:ia,tipImg:ua},ra=se({name:"musicSheetOwnerDialog",props:{musicSheetExtend:{type:Object,default:()=>{}},sourceType:{type:String,required:!0},appData:{type:Array,required:!0,default:[]}},emits:["close","getList","choseMusicSheetOwnerData"],setup(u,{slots:k,attrs:d,emit:l}){const e=ee({loading:!1,pagination:{page:1,rows:10,pageTotal:0},searchForm:{applicationId:null,name:null,sourceType:null},dataList:[],appData:[]}),a=ne(),h=H(),x=()=>{e.pagination.page=1,F()},y=()=>{var c;(c=h.value)==null||c.submit()},F=()=>B(this,null,function*(){try{e.searchForm.applicationId||a.warning("\u83B7\u53D6\u5E94\u7528\u5217\u8868\u5931\u8D25"),e.loading=!0,e.searchForm.sourceType=u.sourceType;const{data:b}=yield He(G(G({},e.pagination),e.searchForm));e.pagination.pageTotal=Number(b.total),e.dataList=b.rows||[]}catch(c){}e.loading=!1});ce(()=>B(this,null,function*(){{if(e.appData=Ie(u.appData),e.appData.length==0){a.warning("\u83B7\u53D6\u5E94\u7528\u5217\u8868\u5931\u8D25");return}u.musicSheetExtend&&u.musicSheetExtend.applicationId?e.searchForm.applicationId=u.musicSheetExtend.applicationId:e.searchForm.applicationId=e.appData[0].value,e.searchForm.name=null}F()}));const P=()=>e.searchForm.sourceType==="ORG"?[{title:"\u673A\u6784\u540D\u79F0",key:"orgName"},{title:"\u64CD\u4F5C",key:"operation",fixed:"right",render(c){return t(Z,null,{default:()=>[t(O,{type:"primary",size:"small",text:!0,onClick:()=>{const b=Q(G({},c),{applicationId:e.searchForm.applicationId});l("choseMusicSheetOwnerData",b),l("close")}},{default:()=>[m("\u9009\u62E9")]})]})}}]:[{title:"\u4EBA\u5458\u540D\u79F0",key:"userName"},{title:"\u624B\u673A\u53F7",key:"phone"},{title:"\u64CD\u4F5C",key:"operation",fixed:"right",render(c){return t(Z,null,{default:()=>[t(O,{type:"primary",size:"small",text:!0,onClick:()=>{const b=Q(G({},c),{applicationId:e.searchForm.applicationId});l("choseMusicSheetOwnerData",b),l("close")}},{default:()=>[m("\u9009\u62E9")]})]})}}],S=()=>[{title:"\u673A\u6784\u540D\u79F0",key:"organizationRole"},{title:"\u64CD\u4F5C",key:"operation",fixed:"right",render(c){return t(Z,null,{default:()=>[t(O,{type:"primary",size:"small",text:!0,onClick:()=>{const b=Q(G({},c),{applicationId:e.searchForm.applicationId});l("choseMusicSheetOwnerData",b),l("close")}},{default:()=>[m("\u9009\u62E9")]})]})}}];return()=>t("div",{class:"system-menu-container"},[t(Xe,{ref:h,model:e.searchForm,onSubmit:x,onSetModel:c=>e.searchForm=c},{default:()=>[t(I,{label:"\u6240\u5C5E\u9879\u76EE",path:"applicationId",size:"small",style:"width:250px"},{default:()=>[t(M,{placeholder:"\u8BF7\u9009\u62E9\u9002\u7528\u6240\u5C5E\u9879\u76EE",value:e.searchForm.applicationId,"onUpdate:value":c=>e.searchForm.applicationId=c,options:e.appData},null)]}),e.searchForm.sourceType==="PERSON"&&t(me,null,[t(I,{label:"\u6240\u5C5E\u4EBA",path:"name",size:"small",style:"width:250px"},{default:()=>[t(ue,{placeholder:"\u8BF7\u8F93\u5165\u6240\u5C5E\u4EBA/\u624B\u673A\u53F7",value:e.searchForm.name,"onUpdate:value":c=>e.searchForm.name=c,clearable:!0},null)]})]),e.searchForm.sourceType==="ORG"&&t(me,null,[t(I,{label:"\u673A\u6784\u540D\u79F0",path:"name",size:"small",style:"width:250px"},{default:()=>[t(ue,{placeholder:"\u8BF7\u8F93\u5165\u673A\u6784\u540D\u79F0",value:e.searchForm.name,"onUpdate:value":c=>e.searchForm.name=c,clearable:!0},null)]})]),t(I,{size:"small"},{default:()=>[t(Z,null,{default:()=>[t(O,{type:"primary",onClick:y},{default:()=>[m("\u641C\u7D22")]})]})]})]}),t("div",{class:["section-container"]},[u.sourceType==="PERSON"&&t(xe,{loading:e.loading,columns:P(),data:e.dataList},null),u.sourceType==="ORG"&&t(xe,{loading:e.loading,columns:S(),data:e.dataList},null),t($e,{page:e.pagination.page,"onUpdate:page":c=>e.pagination.page=c,pageSize:e.pagination.rows,"onUpdate:pageSize":c=>e.pagination.rows=c,pageTotal:e.pagination.pageTotal,"onUpdate:pageTotal":c=>e.pagination.pageTotal=c,onList:F,sync:!0,pageSlot:5},null)])])}}),rt=se({name:"music-create-img",props:{xmlFileUrl:{type:String,default:""}},emits:["close","confirm"],setup(u,{emit:k}){const d=ne(),l=ee({productOpen:!1,productIfameSrc:""}),e=ee({musicImg:"",musicFirstImg:"",musicJianImg:""}),a=()=>{if(!u.xmlFileUrl){d.error("\u8BF7\u5148\u4E0A\u4F20XML");return}const F={dev:"https://dev.kt.colexiu.com",test:"https://test.lexiaoya.cn",online:"https://mec.colexiu.com"},P=location.origin.includes("//dev")?"dev":location.origin.includes("//test")?"test":location.origin.includes("//mec")?"online":"dev",S=F[P],c=/(localhost|192)/.test(location.host)?"https://dev.kt.colexiu.com":S,b=encodeURIComponent(u.xmlFileUrl);l.productIfameSrc=c+`/instrument/#/product-img?xmlUrl=${b}&isCreateImg=true&isCbs=true`},h=F=>{const P=F.data;if((P==null?void 0:P.api)==="webApi_renderSvg"){let S=[];try{S=JSON.parse(P.product)}catch(c){console.log("\u{1F680} ~ error:",c)}S=S.filter(c=>c.base64),S.length===3?(d.success("\u56FE\u7247\u751F\u6210\u6210\u529F"),x(S)):d.error("\u56FE\u7247\u751F\u6210\u5931\u8D25")}},x=F=>B(this,null,function*(){var P,S,c;for(let b=0;b<F.length;b++){const w=y(F[b].base64,`${Date.now()}p${b}.png`);F[b].url=yield zt(w)}e.musicImg=((P=F[0])==null?void 0:P.url)||"",e.musicFirstImg=((S=F[1])==null?void 0:S.url)||"",e.musicJianImg=((c=F[2])==null?void 0:c.url)||"",F=[],k("close"),k("confirm",e)}),y=(F,P)=>{var D;let S=F.split(",")||[],c=(D=S[0].match(/:(.*?);/))==null?void 0:D[1],b=atob(S[1]),w=b.length,L=new Uint8Array(w);for(;w--;)L[w]=b.charCodeAt(w);return new File([L],P,{type:c})};return ce(()=>{a(),window.addEventListener("message",h)}),We(()=>{window.removeEventListener("message",h)}),()=>t("iframe",{class:ae.productIframe,src:l.productIfameSrc},null)}}),oa="_musiceBeatTime_khkvo_1",na="_tit_khkvo_10",ca="_iframe_khkvo_18",Le={musiceBeatTime:oa,tit:na,iframe:ca},ot=se({name:"musiceBeatTime",props:{id:{type:String}},emits:["close"],setup(u,{emit:k}){const d=ne();ce(()=>{window.addEventListener("message",l)}),We(()=>{window.removeEventListener("message",l)});function l(b){const w=b.data;(w==null?void 0:w.api)==="webApi_beatTimes"&&(a.value=!1,e(w))}function e(b){return B(this,null,function*(){try{const{beatTime:w,singBeatTime:L,mingBeatTime:D,isBeatTime:o,isSingBeatTime:v,isMingBeatTime:g}=JSON.parse(b.data);yield gt({id:u.id,playTimeList:w,singTimeList:L,solmizationTimeList:D,playTimeSilence:o,singTimeSilence:v,solmizationTimeSilence:g}),d.success("\u8282\u62CD\u5668\u751F\u6210\u6210\u529F"),k("close")}catch(w){console.log("\u{1F680} ~ \u97F3\u9891\u5408\u6210\u5931\u8D25",w),d.error("\u8282\u62CD\u5668\u751F\u6210\u5931\u8D25"),k("close",!0)}})}const a=H(!0),x=Qe().getToken,y={dev:"https://dev.kt.colexiu.com",test:"https://test.lexiaoya.cn",online:"https://mec.colexiu.com"},F=location.origin.includes("//dev")?"dev":location.origin.includes("//test")?"test":location.origin.includes("//mec.colexiu")?"online":"dev",P=y[F];let c=(/(localhost|192)/.test(location.host)?"https://dev.kt.colexiu.com/":P)+`/instrument/?_t=${Date.now()}&id=${u.id}&Authorization=${x}&isCbs=true&isbeatTimes=true&musicRenderType=staff`;return()=>t("div",{class:Le.musiceBeatTime},[t("div",{class:Le.tit},[m("\u8282\u62CD\u5668\u97F3\u9891\u751F\u6210\u4E2D...")]),a.value&&t("iframe",{class:Le.iframe,width:"667px",height:"375px",frameborder:"0",src:c},null)])}}),nt=se({name:"music-platform",props:{type:{type:String,default:""},useProject:{type:Array,required:!0,default:[]},id:{type:String,required:!0,default:null}},emits:["close","getList"],setup(u,{emit:k}){const d=ne(),l=ee({gym:{applicationId:"",checked:!0,paymentType:"VIP",isConvertibleScore:!1,scoreType:"STAVE",status:!0,sortNo:null},gyt:{applicationId:"",checked:!0,availableType:"PLATFORM",isConvertibleScore:!1,scoreType:"STAVE",status:!0,sortNo:null},klxt:{applicationId:"",checked:!0,isConvertibleScore:!1,scoreType:"STAVE",status:!0,sortNo:null},klx:{applicationId:"",checked:!0,musicTagIds:[],paymentType:["VIP"],musicPrice:null,availableType:"PLATFORM",topFlag:!1,exquisiteFlag:!1,isConvertibleScore:!0,scoreType:"FIRST",status:!0,sortNo:null},kt:{applicationId:"",checked:!0,musicSheetCategoryId:null,paymentType:"VIP",isConvertibleScore:!0,scoreType:"FIRST",status:!0,sortNo:null}}),e=ke(()=>({GYM:P("GYM"),KLX_JG:P("KLX_JG"),KLX:P("KLX"),KT:P("KT"),GYT:P("GYT")})),a=H(),h=H(!1),x=H([]),y=H([]),F=H(!1),P=o=>(u.useProject||[]).findIndex(g=>g.appKey===o)!==-1,S=()=>{let o=!1;const v=l.gym;if(v.checked){if(!v.paymentType)return d.error("\u8BF7\u9009\u62E9\u6536\u8D39\u65B9\u5F0F"),!0;if(console.log(v.isConvertibleScore,"gym.isConvertibleScore"),v.isConvertibleScore==null)return d.error("\u8BF7\u9009\u62E9\u662F\u5426\u652F\u6301\u8F6C\u8C31"),!0;if(!v.scoreType)return d.error("\u8BF7\u9009\u62E9\u9ED8\u8BA4\u8C31\u9762"),!0;if(v.status==null)return d.error("\u8BF7\u9009\u62E9\u662F\u5426\u542F\u7528"),!0}const g=l.gyt;if(g.checked){if(!g.availableType)return d.error("\u8BF7\u9009\u62E9\u53EF\u7528\u9014\u5F84"),!0;if(g.isConvertibleScore==null)return d.error("\u8BF7\u9009\u62E9\u662F\u5426\u652F\u6301\u8F6C\u8C31"),!0;if(!g.scoreType)return d.error("\u8BF7\u9009\u62E9\u9ED8\u8BA4\u8C31\u9762"),!0;if(g.status==null)return d.error("\u8BF7\u9009\u62E9\u662F\u5426\u542F\u7528"),!0}const V=l.klxt;if(V.checked){if(V.isConvertibleScore==null)return d.error("\u8BF7\u9009\u62E9\u662F\u5426\u652F\u6301\u8F6C\u8C31"),!0;if(!V.scoreType)return d.error("\u8BF7\u9009\u62E9\u9ED8\u8BA4\u8C31\u9762"),!0;if(V.status==null)return d.error("\u8BF7\u9009\u62E9\u662F\u5426\u542F\u7528"),!0}const i=l.klx;if(i.checked){if(i.musicTagIds.length<=0)return d.error("\u8BF7\u9009\u62E9\u66F2\u76EE\u6807\u7B7E"),!0;if(!i.paymentType||i.paymentType.length<=0)return d.error("\u8BF7\u9009\u62E9\u6536\u8D39\u65B9\u5F0F"),!0;if(!i.paymentType.includes("CHARGE"))i.musicPrice=0;else if(i.musicPrice===null||i.musicPrice===void 0||i.musicPrice==="")return d.error("\u66F2\u76EE\u4EF7\u683C\u4E0D\u80FD\u4E3A\u7A7A"),!0;if(typeof i.topFlag!="boolean")return d.error("\u8BF7\u9009\u62E9\u662F\u5426\u7F6E\u9876"),!0;if(typeof i.exquisiteFlag!="boolean")return d.error("\u8BF7\u9009\u62E9\u662F\u5426\u7CBE\u54C1"),!0;if(i.isConvertibleScore==null)return d.error("\u8BF7\u9009\u62E9\u662F\u5426\u652F\u6301\u8F6C\u8C31"),!0;if(!i.scoreType)return d.error("\u8BF7\u9009\u62E9\u9ED8\u8BA4\u8C31\u9762"),!0;if(i.status==null)return d.error("\u8BF7\u9009\u62E9\u662F\u5426\u542F\u7528"),!0}const T=l.kt;if(T.checked){if(!T.musicSheetCategoryId)return d.error("\u8BF7\u9009\u62E9\u4E50\u8C31\u6559\u6750"),!0;if(!T.paymentType)return d.error("\u8BF7\u9009\u62E9\u6536\u8D39\u65B9\u5F0F"),!0;if(T.isConvertibleScore==null)return d.error("\u8BF7\u9009\u62E9\u662F\u5426\u652F\u6301\u8F6C\u8C31"),!0;if(!T.scoreType)return d.error("\u8BF7\u9009\u62E9\u9ED8\u8BA4\u8C31\u9762"),!0;if(T.status==null)return d.error("\u8BF7\u9009\u62E9\u662F\u5426\u542F\u7528"),!0}return o},c=()=>{const o=[],v=[];return l.gym.checked&&(o.push(G({},l.gym)),v.push(l.gym.applicationId)),l.gyt.checked&&(o.push(G({},l.gyt)),v.push(l.gyt.applicationId)),l.klxt.checked&&(o.push(G({},l.klxt)),v.push(l.klxt.applicationId)),l.klx.checked&&(o.push(Q(G({},l.klx),{musicTagIds:l.klx.musicTagIds.join(","),paymentType:l.klx.paymentType.join(",")})),v.push(l.klx.applicationId)),l.kt.checked&&(o.push(G({},l.kt)),v.push(l.kt.applicationId)),{musicSheetId:u.id,applicationExtends:o||{},useApplicationIds:v.join(",")||""}},b=()=>B(this,null,function*(){try{if(S())return;F.value=!0;const o=c();yield vt(o),d.success("\u4FDD\u5B58\u6210\u529F"),k("close"),k("getList")}catch(o){}F.value=!1}),w=()=>B(this,null,function*(){try{const v=(u.useProject||[]).find(V=>V.appKey==="KLX");if(!v)return;const{data:g}=yield ht({applicationId:v.id});g&&g.length>0&&g.forEach(V=>{x.value.push(Q(G({},V),{label:V.name,value:V.id}))})}catch(o){}}),L=()=>B(this,null,function*(){const v=(u.useProject||[]).find(V=>V.appKey==="KT");if(!v)return;const g=yield yt({applicationIds:v.id});g.data&&g.data.length>0&&(y.value=g.data[0].musicSheetCategories)}),D=()=>B(this,null,function*(){try{const{data:o}=yield St({musicSheetId:u.id});(o||[]).forEach(g=>{g.appKey==="GYM"?(l.gym.checked=!0,l.gym.paymentType=g.paymentType,l.gym.isConvertibleScore=g.isConvertibleScore,l.gym.scoreType=g.scoreType,l.gym.status=g.status,l.gym.sortNo=g.sortNo):g.appKey==="GYT"?(l.gyt.checked=!0,l.gyt.availableType=g.availableType,l.gyt.isConvertibleScore=g.isConvertibleScore,l.gyt.scoreType=g.scoreType,l.gyt.status=g.status,l.gyt.sortNo=g.sortNo):g.appKey==="KLX_JG"?(l.klxt.checked=!0,l.klxt.isConvertibleScore=g.isConvertibleScore,l.klxt.scoreType=g.scoreType,l.klxt.status=g.status,l.klxt.sortNo=g.sortNo):g.appKey==="KLX"?(l.klx.checked=!0,l.klx.musicTagIds=g.musicTagIds?g.musicTagIds.split(","):[],l.klx.paymentType=g.paymentType?g.paymentType.split(","):[],l.klx.musicPrice=g.musicPrice,l.klx.availableType=g.availableType,l.klx.topFlag=g.topFlag,l.klx.exquisiteFlag=g.exquisiteFlag,l.klx.isConvertibleScore=g.isConvertibleScore,l.klx.scoreType=g.scoreType,l.klx.status=g.status,l.klx.sortNo=g.sortNo):g.appKey==="KT"&&(l.kt.checked=!0,l.kt.musicSheetCategoryId=g.musicSheetCategoryId,l.kt.paymentType=g.paymentType,l.kt.isConvertibleScore=g.isConvertibleScore,l.kt.scoreType=g.scoreType,l.kt.status=g.status,l.kt.sortNo=g.sortNo)})}catch(o){}});return ce(()=>B(this,null,function*(){h.value=!0,u.type!=="add"&&(l.gym.checked=!1,l.gyt.checked=!1,l.klxt.checked=!1,l.klx.checked=!1,l.kt.checked=!1),(u.useProject||[]).forEach(v=>{v.appKey==="GYM"?l.gym.applicationId=v.id:v.appKey==="KLX_JG"?l.klxt.applicationId=v.id:v.appKey==="KLX"?l.klx.applicationId=v.id:v.appKey==="KT"?l.kt.applicationId=v.id:v.appKey==="GYT"&&(l.gyt.applicationId=v.id)}),yield w(),yield L(),yield D(),h.value=!1})),()=>t(et,{show:h.value},{default:()=>[t(Ae,{model:l,ref:a,"label-placement":"top","label-width":"85"},{default:()=>[e.value.GYM&&t(R,{cols:8,xGap:12,style:{marginBottom:"12px"}},{default:()=>[t(N,{span:1,style:{display:"flex",alignItems:"center"}},{default:()=>[t(pe,{checked:l.gym.checked,"onUpdate:checked":o=>l.gym.checked=o},{default:()=>[m("\u7BA1\u4E50\u8FF7")]})]}),t(N,{span:7,style:{background:"#f9f9f9",padding:"20px 16px 0",borderRadius:"8px"}},{default:()=>[t(R,{cols:6,xGap:12},{default:()=>[t(N,null,{default:()=>[t(I,{label:"\u6536\u8D39\u65B9\u5F0F",path:"paymentType",required:!0},{default:()=>[t(M,{value:l.gym.paymentType,"onUpdate:value":o=>l.gym.paymentType=o,clearable:!0,options:[{label:"\u514D\u8D39",value:"FREE"},{label:"\u6536\u8D39",value:"VIP"}]},null)]})]}),t(N,null,{default:()=>[t(I,{label:"\u662F\u5426\u652F\u6301\u8F6C\u8C31",path:"isConvertibleScore",required:!0},{default:()=>[t(M,{value:l.gym.isConvertibleScore,"onUpdate:value":o=>l.gym.isConvertibleScore=o,clearable:!0,options:[{label:"\u662F",value:!0},{label:"\u5426",value:!1}]},null)]})]}),t(N,null,{default:()=>[t(I,{label:"\u9ED8\u8BA4\u8C31\u9762",path:"scoreType",required:!0},{default:()=>[t(M,{value:l.gym.scoreType,"onUpdate:value":o=>l.gym.scoreType=o,options:re(ye)},null)]})]}),t(N,null,{default:()=>[t(I,{label:"\u662F\u5426\u542F\u7528",path:"status",required:!0},{default:()=>[t(M,{value:l.gym.status,"onUpdate:value":o=>l.gym.status=o,options:[{label:"\u662F",value:!0},{label:"\u5426",value:!1}]},null)]})]}),t(N,null,{default:()=>[t(I,{label:"\u6392\u5E8F",path:"sortNo"},{default:()=>[t(de,{precision:0,min:0,max:999999999,value:l.gym.sortNo,"onUpdate:value":o=>l.gym.sortNo=o,showButton:!1},null)]})]})]})]})]}),e.value.GYT&&t(R,{cols:8,xGap:12,style:{marginBottom:"12px"}},{default:()=>[t(N,{span:1,style:{display:"flex",alignItems:"center"}},{default:()=>[t(pe,{checked:l.gyt.checked,"onUpdate:checked":o=>l.gyt.checked=o},{default:()=>[m("\u7BA1\u4E50\u56E2")]})]}),t(N,{span:7,style:{background:"#f9f9f9",padding:"20px 16px 0",borderRadius:"8px"}},{default:()=>[t(R,{cols:6,xGap:12},{default:()=>[t(N,null,{default:()=>[t(I,{label:"\u53EF\u7528\u9014\u5F84",path:"availableType",required:!0},{default:()=>[t(M,{value:l.gyt.availableType,"onUpdate:value":o=>l.gyt.availableType=o,clearable:!0,options:[{label:"\u5B66\u6821",value:"ORG"},{label:"\u5E73\u53F0",value:"PLATFORM"}]},null)]})]}),t(N,null,{default:()=>[t(I,{label:"\u662F\u5426\u652F\u6301\u8F6C\u8C31",path:"isConvertibleScore",required:!0},{default:()=>[t(M,{value:l.gyt.isConvertibleScore,"onUpdate:value":o=>l.gyt.isConvertibleScore=o,clearable:!0,options:[{label:"\u662F",value:!0},{label:"\u5426",value:!1}]},null)]})]}),t(N,null,{default:()=>[t(I,{label:"\u9ED8\u8BA4\u8C31\u9762",path:"scoreType",required:!0},{default:()=>[t(M,{value:l.gyt.scoreType,"onUpdate:value":o=>l.gyt.scoreType=o,options:re(ye)},null)]})]}),t(N,null,{default:()=>[t(I,{label:"\u662F\u5426\u542F\u7528",path:"status",required:!0},{default:()=>[t(M,{value:l.gyt.status,"onUpdate:value":o=>l.gyt.status=o,options:[{label:"\u662F",value:!0},{label:"\u5426",value:!1}]},null)]})]}),t(N,null,{default:()=>[t(I,{label:"\u6392\u5E8F",path:"sortNo"},{default:()=>[t(de,{precision:0,min:0,max:999999999,value:l.gyt.sortNo,"onUpdate:value":o=>l.gyt.sortNo=o,showButton:!1},null)]})]})]})]})]}),e.value.KLX_JG&&t(R,{cols:8,xGap:12,style:{marginBottom:"12px"}},{default:()=>[t(N,{span:1,style:{display:"flex",alignItems:"center"}},{default:()=>[t(pe,{checked:l.klxt.checked,"onUpdate:checked":o=>l.klxt.checked=o},{default:()=>[m("\u9177\u4E50\u79C0\u673A\u6784")]})]}),t(N,{span:7,style:{background:"#f9f9f9",padding:"20px 16px 0",borderRadius:"8px"}},{default:()=>[t(R,{cols:6,xGap:12},{default:()=>[t(N,null,{default:()=>[t(I,{label:"\u662F\u5426\u652F\u6301\u8F6C\u8C31",path:"isConvertibleScore",required:!0},{default:()=>[t(M,{value:l.klxt.isConvertibleScore,"onUpdate:value":o=>l.klxt.isConvertibleScore=o,clearable:!0,options:[{label:"\u662F",value:!0},{label:"\u5426",value:!1}]},null)]})]}),t(N,null,{default:()=>[t(I,{label:"\u9ED8\u8BA4\u8C31\u9762",path:"scoreType",required:!0},{default:()=>[t(M,{value:l.klxt.scoreType,"onUpdate:value":o=>l.klxt.scoreType=o,options:re(ye)},null)]})]}),t(N,null,{default:()=>[t(I,{label:"\u662F\u5426\u542F\u7528",path:"status",required:!0},{default:()=>[t(M,{value:l.klxt.status,"onUpdate:value":o=>l.klxt.status=o,options:[{label:"\u662F",value:!0},{label:"\u5426",value:!1}]},null)]})]}),t(N,null,{default:()=>[t(I,{label:"\u6392\u5E8F",path:"sortNo"},{default:()=>[t(de,{precision:0,min:0,max:999999999,value:l.klxt.sortNo,"onUpdate:value":o=>l.klxt.sortNo=o,showButton:!1},null)]})]})]})]})]}),e.value.KLX&&t(R,{cols:8,xGap:12,style:{marginBottom:"12px"}},{default:()=>[t(N,{span:1,style:{display:"flex",alignItems:"center"}},{default:()=>[t(pe,{checked:l.klx.checked,"onUpdate:checked":o=>l.klx.checked=o},{default:()=>[m("\u9177\u4E50\u79C0\u5E73\u53F0")]})]}),t(N,{span:7,style:{background:"#f9f9f9",padding:"20px 16px 0",borderRadius:"8px"}},{default:()=>[t(R,{cols:6,xGap:12},{default:()=>[t(N,null,{default:()=>[t(I,{label:"\u66F2\u76EE\u6807\u7B7E",required:!0},{default:()=>[t(M,{value:l.klx.musicTagIds,"onUpdate:value":o=>l.klx.musicTagIds=o,multiple:!0,maxTagCount:1,clearable:!0,options:x.value},null)]})]}),t(N,null,{default:()=>[t(I,{label:"\u6536\u8D39\u65B9\u5F0F",path:"paymentType",required:!0},{default:()=>[t(M,{value:l.klx.paymentType,"onUpdate:value":[o=>l.klx.paymentType=o,o=>{l.klx.paymentType=o;const v="FREE";l.klx.paymentType[l.klx.paymentType.length-1]==v?l.klx.paymentType=[v]:l.klx.paymentType.length>1&&l.klx.paymentType.includes(v)&&l.klx.paymentType.splice(l.klx.paymentType.indexOf(v),1),l.klx.paymentType.includes("CHARGE")||(l.klx.musicPrice=0)}],multiple:!0,maxTagCount:1,clearable:!0,options:re(Yt)},null)]})]}),t(N,null,{default:()=>[t(I,{label:"\u66F2\u76EE\u4EF7\u683C",path:"musicPrice",required:!0},{default:()=>{var o;return[t(de,{disabled:!((o=l.klx.paymentType)!=null&&o.includes("CHARGE")),precision:2,min:0,max:9999,value:l.klx.musicPrice,"onUpdate:value":v=>l.klx.musicPrice=v,showButton:!1},null)]}})]}),t(N,null,{default:()=>[t(I,{label:"\u662F\u5426\u7F6E\u9876",path:"topFlag",required:!0},{default:()=>[t(M,{value:l.klx.topFlag,"onUpdate:value":o=>l.klx.topFlag=o,clearable:!0,options:[{label:"\u662F",value:!0},{label:"\u5426",value:!1}]},null)]})]}),t(N,null,{default:()=>[t(I,{label:"\u662F\u5426\u7CBE\u54C1",path:"exquisiteFlag",required:!0},{default:()=>[t(M,{value:l.klx.exquisiteFlag,"onUpdate:value":o=>l.klx.exquisiteFlag=o,clearable:!0,options:[{label:"\u662F",value:!0},{label:"\u5426",value:!1}]},null)]})]}),t(N,null,{default:()=>[t(I,{label:"\u662F\u5426\u652F\u6301\u8F6C\u8C31",path:"isConvertibleScore",required:!0},{default:()=>[t(M,{value:l.klx.isConvertibleScore,"onUpdate:value":o=>l.klx.isConvertibleScore=o,clearable:!0,options:[{label:"\u662F",value:!0},{label:"\u5426",value:!1}]},null)]})]}),t(N,null,{default:()=>[t(I,{label:"\u9ED8\u8BA4\u8C31\u9762",path:"scoreType",required:!0},{default:()=>[t(M,{value:l.klx.scoreType,"onUpdate:value":o=>l.klx.scoreType=o,options:re(ye)},null)]})]}),t(N,null,{default:()=>[t(I,{label:"\u662F\u5426\u542F\u7528",path:"status",required:!0},{default:()=>[t(M,{value:l.klx.status,"onUpdate:value":o=>l.klx.status=o,options:[{label:"\u662F",value:!0},{label:"\u5426",value:!1}]},null)]})]}),t(N,null,{default:()=>[t(I,{label:"\u6392\u5E8F",path:"sortNo"},{default:()=>[t(de,{precision:0,min:0,max:999999999,value:l.klx.sortNo,"onUpdate:value":o=>l.klx.sortNo=o,showButton:!1},null)]})]})]})]})]}),e.value.KT&&t(R,{cols:8,xGap:12,style:{marginBottom:"12px"}},{default:()=>[t(N,{span:1,style:{display:"flex",alignItems:"center"}},{default:()=>[t(pe,{checked:l.kt.checked,"onUpdate:checked":o=>l.kt.checked=o},{default:()=>[m("\u97F3\u4E50\u6570\u5B57\u8BFE\u5802")]})]}),t(N,{span:7,style:{background:"#f9f9f9",padding:"20px 16px 0",borderRadius:"8px"}},{default:()=>[t(R,{cols:6,xGap:12},{default:()=>[t(N,null,{default:()=>[t(I,{label:"\u4E50\u8C31\u6559\u6750",path:"musicSheetCategoryId",required:!0},{default:()=>[t(M,{value:l.kt.musicSheetCategoryId,"onUpdate:value":o=>l.kt.musicSheetCategoryId=o,clearable:!0,options:y.value,labelField:"name",valueField:"id"},null)]})]}),t(N,null,{default:()=>[t(I,{label:"\u6536\u8D39\u65B9\u5F0F",path:"paymentType",required:!0},{default:()=>[t(M,{value:l.kt.paymentType,"onUpdate:value":o=>l.kt.paymentType=o,clearable:!0,options:[{label:"\u514D\u8D39",value:"FREE"},{label:"\u4F1A\u5458",value:"VIP"}]},null)]})]}),t(N,null,{default:()=>[t(I,{label:"\u662F\u5426\u652F\u6301\u8F6C\u8C31",path:"isConvertibleScore",required:!0},{default:()=>[t(M,{value:l.kt.isConvertibleScore,"onUpdate:value":o=>l.kt.isConvertibleScore=o,clearable:!0,options:[{label:"\u662F",value:!0},{label:"\u5426",value:!1}]},null)]})]}),t(N,null,{default:()=>[t(I,{label:"\u9ED8\u8BA4\u8C31\u9762",path:"scoreType",required:!0},{default:()=>[t(M,{value:l.kt.scoreType,"onUpdate:value":o=>l.kt.scoreType=o,options:re(ye)},null)]})]}),t(N,null,{default:()=>[t(I,{label:"\u662F\u5426\u542F\u7528",path:"status",required:!0},{default:()=>[t(M,{value:l.kt.status,"onUpdate:value":o=>l.kt.status=o,options:[{label:"\u662F",value:!0},{label:"\u5426",value:!1}]},null)]})]}),t(N,null,{default:()=>[t(I,{label:"\u6392\u5E8F",path:"sortNo"},{default:()=>[t(de,{precision:0,min:0,max:999999999,value:l.kt.sortNo,"onUpdate:value":o=>l.kt.sortNo=o,showButton:!1},null)]})]})]})]})]}),t(Z,{justify:"end",style:"margin-top: 10px"},{default:()=>[t(O,{type:"default",onClick:()=>k("close",!0)},{default:()=>[m("\u53D6\u6D88")]}),t(O,{type:"primary",onClick:()=>b(),loading:F.value,disabled:F.value},{default:()=>[m("\u786E\u8BA4")]})]})]})]})}});function Ke(u){return typeof u=="function"||Object.prototype.toString.call(u)==="[object Object]"&&!at(u)}const da=(u,k)=>{var x;let d=0;const l=u.closest(k);let e=l;const a=l==null?void 0:l.closest("measure");let h=null;for(;!h&&d<((a==null?void 0:a.childNodes.length)||50);)d++,((x=e==null?void 0:e.nextElementSibling)==null?void 0:x.tagName)==="note"&&(h=e==null?void 0:e.nextElementSibling),e=e==null?void 0:e.nextElementSibling;return h},pa=(u,k)=>{var h,x;if(!u)return"";const d=new DOMParser().parseFromString(u,"text/xml"),l=((x=(h=d.getElementsByTagName("part-list"))==null?void 0:h[0])==null?void 0:x.getElementsByTagName("score-part"))||[],e=d.getElementsByTagName("part"),a=l[k];if(a){const y=a.getAttribute("id");Array.from(e).forEach(S=>{var c,b,w;if(S&&S.getAttribute("id")!==y&&((c=S.parentNode)==null||c.removeChild(S)),S&&S.getAttribute("id")===y){const L=S.getElementsByTagName("barline"),D=(b=L[L.length-1])==null?void 0:b.parentElement;if(((w=D==null?void 0:D.lastElementChild)==null?void 0:w.tagName)!=="barline"){const o=(D==null?void 0:D.children)||[];for(let v of o)if(v.tagName==="barline"){D==null||D.appendChild(v);break}}}}),Array.from(l).forEach(S=>{var c;S&&S.getAttribute("id")!==y&&((c=S.parentNode)==null||c.removeChild(S))});const F=d.getElementsByTagName("note"),P=S=>{var b;let c=F[S+1];for(let w=S;w<F.length;w++){const L=F[w];if(!((b=L.getElementsByTagName("grace"))!=null&&b.length)){c=L;break}}return c==null?void 0:c.getElementsByTagName("duration")[0]};Array.from(F).forEach((S,c)=>{var w;const b=S.getElementsByTagName("grace");b&&b.length&&P(c)&&(S==null||S.appendChild((w=P(c))==null?void 0:w.cloneNode(!0)))})}return new XMLSerializer().serializeToString(d)},ma={"rall.":1.333333333,"poco rit.":1.333333333,"rit.":1.333333333,"molto rit.":1.333333333,"molto rall":1.333333333,molto:1.333333333,lentando:1.333333333,allargando:1.333333333,morendo:1.333333333,"accel.":.8,calando:2,"poco accel.":.8,"gradually slowing":1.333333333,slowing:1.333333333,slow:1.333333333,slowly:1.333333333,faster:1.333333333};function Ve(u){var S,c,b,w;const k=pa(u,0),d=new DOMParser().parseFromString(k,"text/xml"),l=Array.from(d.querySelectorAll("measure")),e=Array.from(d.querySelectorAll("note")),a=Array.from(d.querySelectorAll("words")),h=Array.from(d.querySelectorAll("metronome")),x=[];for(const L of[...a,...h]){const D=da(L,"direction");if(D){const o=D==null?void 0:D.closest("measure"),v=Array.from(o.querySelectorAll("note")),g=Array.from(o.childNodes).filter(T=>T.nodeName==="note").findIndex(T=>T===D);let V=0,i=0;for(let T=0;T<v.length;T++){const K=+(((S=v[T].querySelector("duration"))==null?void 0:S.textContent)||"0");V+=K,T<g&&(i=V)}x.push({ele:L,index:e.indexOf(D),noteInMeasureIndex:g,textContent:L.textContent,measureIndex:l.indexOf(o),type:L.tagName,allDuration:V,leftDuration:i})}}x.push({ele:e[e.length-1],index:e.length,noteInMeasureIndex:0,textContent:"",type:"metronome",allDuration:1,leftDuration:1,measureIndex:l.length});const y=[];x.sort((L,D)=>L.index-D.index);const F=Object.keys(ma).map(L=>L.toLocaleLowerCase());let P=!1;for(const L of x){const D=(c=L.textContent)==null?void 0:c.toLocaleLowerCase().trim();L===x[x.length-1]&&((b=y[y.length-1])==null?void 0:b.length)===1&&(P=!0);const o=F.find(v=>{const g=v.split(" ");return D&&g.includes(D)});if(L.type==="metronome"||L.type==="words"&&(D.startsWith("a tempo")||o)||P){const v=y.findIndex(g=>g.length===1);v>-1&&L.index>((w=y[v])==null?void 0:w[0].start)&&(y[v][1]={start:L.index,measureIndex:L.measureIndex,noteInMeasureIndex:L.noteInMeasureIndex,allDuration:L.allDuration,leftDuration:L.leftDuration,type:D})}L.type==="words"&&o&&y.push([{start:L.index,measureIndex:L.measureIndex,noteInMeasureIndex:L.noteInMeasureIndex,allDuration:L.allDuration,leftDuration:L.leftDuration,type:D}])}return y}const fa=u=>{var e,a,h;const k={speed:0,title:"",composer:"",partNames:[]},d=new DOMParser().parseFromString(u,"text/xml");k.title=((e=d.getElementsByTagName("work-title")[0])==null?void 0:e.textContent)||"",k.composer=((a=d.getElementsByTagName("creator")[0])==null?void 0:a.textContent)||"";const l=d.getElementsByTagName("measure");for(const x of Array.from(d.getElementsByTagName("part-name")))(h=x.textContent)!=null&&h.trim()&&k.partNames.push(x.textContent);for(const x of Array.from(l)){const y=x.getElementsByTagName("per-minute");if(y.length&&y[y.length-1]){k.speed=parseFloat(y[y.length-1].textContent||"0");break}}return k},ga=se({name:"music-operation",props:{type:{type:String,default:"add"},data:{type:Object,default:()=>{}},tagList:{type:Array,default:()=>[]},subjectList:{type:Array,default:()=>[]}},emits:["close","getList"],setup(u,{slots:k,attrs:d,emit:l}){const e=ee({details:{},graduals:{},playMode:"MP3",xmlFileUrl:null,midiUrl:null,name:null,composer:null,playSpeed:null,musicCover:null,remark:null,musicSheetSoundList_YY:[],musicSheetSoundList_YZ:[],musicSheetSoundList_all_subject:null,status:!0,musicSheetType:"CONCERT",sourceType:"PLATFORM",appAuditFlag:0,midiFileUrl:null,subjectIds:[],musicalInstrumentIdList:[],musicCategoryId:null,musicSheetAccompanimentList:[],audioType:"HOMEMODE",isPlayBeat:!0,isUseSystemBeat:!0,isUseSingSystemBeat:!0,repeatedBeats:!1,repeatedBeatsToSing:!1,isPlaySingBeat:!0,evaluationStandard:"FREQUENCY",multiTracksSelection:[],musicSheetExtend:{},musicImg:"",musicFirstImg:"",musicJianImg:"",isEvxml:!1,isShowFingering:!0,solmizationFileUrl:null,isAllSubject:!1,fSongList:[],isScoreRender:!0,defaultScoreRender:!0,scoreAudioFileUrl:null}),a=ee({loading:!1,musicUpdateLoading:!1,previewMode:!1,tagList:[...u.tagList],xmlFirstSpeed:null,partListNames:[],musicSheetCategories:[],musicSheetAccompanimentUrl:null,instrumentData:[],instrumentList:[],instrumentIdNameMap:new Map,subjectList:[],showMusicSheetOwnerDialog:!1,multiTracks:null,multiInstruments:null,appData:[],ownerName:null,productOpen:!1,productItem:{},productIfameSrc:"",isAutoSave:!1,bSongFile:null,musicSheetSoundList:[],subjectDisabled:!1,instrumentDisabled:!1,initFSongMap:new Map,showUseProject:!1,showUseProjectId:null,useProjectData:[],isCreateImg:!1,isBeatTime:!1}),h=ee({list:[],gradualRefs:[]}),x=ee({beatTimeOpen:!1,musicId:""});tt(()=>e.multiTracksSelection,p=>{if(a.musicUpdateLoading){a.musicUpdateLoading=!1;return}v(p),L()});const y=H(!1),F=H(),P=ne(),S=Ne(),c=()=>B(this,null,function*(){F.value.validate(p=>B(this,null,function*(){if(!p){if(e.musicSheetType=="CONCERT"){let r=[];const{data:s}=yield we({page:1,rows:9999});s.rows.map(f=>{f.code&&f.code.split(",").forEach(A=>{r.push(A.replaceAll(" ","").toLocaleLowerCase())})});let n=[];if(e.multiTracksSelection.forEach(f=>{if(f&&!w(f)){let A=!1,_=f.replace(" ","").toLocaleLowerCase();for(let q=0;q<r.length;q++)if(_.startsWith(r[q])){A=!0;break}A||n.push(f)}}),n.length>0){S.warning({title:"\u63D0\u793A",content:`\u58F0\u8F68\u672A\u914D\u7F6E\uFF1A${n.join(",")}`,positiveText:"\u786E\u5B9A",onPositiveClick:()=>{}});return}}try{let r=new Set,s=[],n=e.musicSheetType,f=!1,A=!1;for(let U=0;U<e.fSongList.length;U++){let J=e.fSongList[U];(J.audioFileUrl||J.solmizationFileUrl||J.femaleSolmizationFileUrl)&&(s.push(J),r.add("SING"),A=!0)}if(n=="SINGLE"?e.isAllSubject?e.musicSheetSoundList_all_subject&&(r.add("PLAY"),s.push({audioFileUrl:e.musicSheetSoundList_all_subject,musicSheetId:u.data.id,audioPlayType:"PLAY"}),f=!0):e.musicSheetSoundList_YZ.length>0&&e.musicSheetSoundList_YZ.forEach(U=>{e.musicalInstrumentIdList.includes(U.musicalInstrumentId)&&U.audioFileUrl&&(f=!0,s.push(Q(G({},U),{musicSheetId:u.data.id})),r.has("PLAY")||r.add("PLAY"))}):n=="CONCERT"&&e.musicSheetSoundList_YY.forEach(U=>{U.audioFileUrl&&e.multiTracksSelection.includes(U.track)&&(s.push(Q(G({},U),{musicalInstrumentId:U.musicalInstrumentId||i(U.track),musicSheetId:u.data.id,audioPlayType:"PLAY"})),f=!0,r.has("PLAY")||r.add("PLAY"))}),(e.scoreAudioFileUrl||a.bSongFile)&&(A=!0),!A&&!f){P.warning("\u8BF7\u4E0A\u4F20\u97F3\u9891\u6587\u4EF6");return}if(!a.isAutoSave&&a.isCreateImg){a.isAutoSave=!0,a.productOpen=!0;return}console.log(e.scoreAudioFileUrl,"forms.scoreAudioFileUrl"),e.scoreAudioFileUrl?e.musicSheetAccompanimentList.push({musicSheetId:u.data.id,audioFileUrl:a.bSongFile,scoreAudioFileUrl:e.multiTracksSelection.length>1&&e.isScoreRender&&e.scoreAudioFileUrl?e.scoreAudioFileUrl:null,audioPlayType:"SING"}):e.musicSheetAccompanimentList.push({musicSheetId:u.data.id,audioFileUrl:a.bSongFile,audioPlayType:"SING"}),a.musicSheetAccompanimentUrl&&e.musicSheetAccompanimentList.push({musicSheetId:u.data.id,audioFileUrl:a.musicSheetAccompanimentUrl,audioPlayType:"PLAY"});let _,q;e.multiTracksSelection.length>1&&(_=e.isScoreRender,e.isScoreRender&&(q=e.defaultScoreRender));const E={musicCategoryId:e.musicCategoryId,musicCover:e.musicCover,name:e.name,appAuditFlag:e.appAuditFlag,subjectIds:e.isAllSubject?"":e.subjectIds.join(","),remark:e.remark,audioPlayTypes:Array.from(r).join(","),musicalInstrumentIds:e.isAllSubject?"":e.musicalInstrumentIdList.join(","),composer:e.composer,musicSheetType:e.musicSheetType,isUseSystemBeat:e.isUseSystemBeat,isShowFingering:e.isShowFingering,isPlayBeat:e.isPlayBeat,multiTracksSelection:e.multiTracksSelection.join(","),playSpeed:e.playSpeed,playMode:e.playMode,xmlFileUrl:e.xmlFileUrl,musicImg:e.musicImg,musicFirstImg:e.musicFirstImg,musicJianImg:e.musicJianImg,extConfigJson:JSON.stringify({repeatedBeats:e.repeatedBeats?1:0,gradualTimes:e.graduals,isEvxml:e.isEvxml?1:0,repeatedBeatsToSing:e.repeatedBeatsToSing?1:0}),sourceType:e.sourceType,audioType:e.audioType,status:e.status,evaluationStandard:e.evaluationStandard,musicSheetAccompanimentList:e.musicSheetAccompanimentList,musicSheetSoundList:s,musicTag:"-1",isUseSingSystemBeat:e.isUseSingSystemBeat,isPlaySingBeat:e.isPlaySingBeat,isAllSubject:e.isAllSubject,musicSheetExtend:e.sourceType=="PLATFORM"?null:e.musicSheetExtend,isScoreRender:_,defaultScoreRender:q};e.audioType=="MIDI"&&(E.musicSheetSoundList=[]),console.log(E,"obj"),y.value=!0;let C;u.type==="add"?C=yield De(E):u.type==="edit"&&(C=yield De(Q(G({},E),{id:u.data.id}))),a.isBeatTime?(x.beatTimeOpen=!0,x.musicId=C.data,a.showUseProjectId=C.data):(a.showUseProjectId=C.data,a.showUseProject=!0,setTimeout(()=>{y.value=!1,a.isAutoSave=!1},100))}catch(r){console.log(r),setTimeout(()=>{y.value=!1,a.isAutoSave=!1},100)}}}))});function b(p){p||(u.type==="add"?P.success("\u6DFB\u52A0\u6210\u529F"):u.type==="edit"&&P.success("\u4FEE\u6539\u6210\u529F")),l("getList"),l("close"),setTimeout(()=>{y.value=!1,a.isAutoSave=!1},100)}const w=p=>B(this,null,function*(){return!!(p&&(p=="P1"||p=="P2"||p=="P3"||p=="P4"))}),L=()=>B(this,null,function*(){e.fSongList.forEach(r=>{a.initFSongMap.set(r.track,r)});let p=[];e.multiTracksSelection.forEach(r=>{a.initFSongMap.has(r)?p.push(a.initFSongMap.get(r)):p.push({musicSheetId:u.data.id,audioFileUrl:null,audioPlayType:"SING",musicalInstrumentId:null,track:r,musicalInstrumentName:null,solmizationFileUrl:null,femaleSolmizationFileUrl:null})}),e.fSongList=p}),D=p=>{a.isCreateImg=!0;const r=new FileReader;r.onload=s=>{var _,q,E;try{h.list=Ve((_=s==null?void 0:s.target)==null?void 0:_.result).filter(U=>U.length===2);const C=fa((q=s==null?void 0:s.target)==null?void 0:q.result);e.composer||(e.composer=C.composer)}catch(C){}e.musicSheetSoundList_YY=e.musicSheetSoundList_YY.filter(C=>{var U,J;return!C.track||!o(C.track)||((J=(U=C.track)==null?void 0:U.toLocaleUpperCase)==null?void 0:J.call(U))!="COMMON"&&e.multiTracksSelection.includes(C.track)}),a.partListNames=T((E=s==null?void 0:s.target)==null?void 0:E.result);let n=new Map;for(let C=0;C<e.musicSheetSoundList_YY.length;C++){let U=e.musicSheetSoundList_YY[C].track;U&&n.set(U,e.musicSheetSoundList_YY[C])}let f=[],A=[];for(let C=0;C<a.partListNames.length;C++){let U=a.partListNames[C].value;n.has(U)?f.push(n.get(U)):f.push({audioFileUrl:null,track:U,musicalInstrumentId:null}),A.push(U),e.multiTracksSelection.includes(U)||e.multiTracksSelection.push(U)}for(let C=0;C<e.musicSheetSoundList_YY.length;C++){let U=e.musicSheetSoundList_YY[C].track;(!U||!A.includes(U))&&(e.musicSheetSoundList_YY[C].track=null,f.push(e.musicSheetSoundList_YY[C]))}e.musicSheetSoundList_YY=f,e.multiTracksSelection=e.multiTracksSelection.filter(C=>A.includes(C)),a.multiTracks="all",e.musicSheetSoundList_YY.length==0&&e.musicSheetSoundList_YY.push({audioFileUrl:"",track:""})},r.readAsText(p)},o=p=>{for(let r=0;r<a.partListNames.length;r++)if(a.partListNames[r].value==p)return!0;return!1},v=p=>B(this,null,function*(){if(!p||p.length<=1){e.musicSheetType="SINGLE",a.subjectDisabled=!1,a.instrumentDisabled=!1;return}e.musicSheetType="CONCERT",a.subjectDisabled=!0,a.instrumentDisabled=!0,yield V(p)}),g=(p,r="")=>{if(r=r.toLocaleLowerCase().replace(/ /g,"").replace(/\d*/gi,""),!r)return"";for(let s of p){const n=s.toLocaleLowerCase().replace(/ /g,"");if(n===r)return n}return""},V=p=>B(this,null,function*(){console.log("1111"),e.subjectIds=[];const r=new Map,s=[];a.instrumentData.forEach(n=>{n.disabled||n.code.split(/[,,]/).forEach(A=>{let _=A.replaceAll(" ","").toLowerCase();if(s.push(_),r.has(_))r.get(_).push(n.id+"");else{const q=[];q.push(n.id+""),r.set(_,q)}})});for(let n=0;n<p.length;n++){let f=p[n].replaceAll(" ","").toLowerCase();const A=g(s,f);r.has(A)&&r.get(A).forEach(_=>{const q=a.instrumentList.findIndex(E=>E.id.toString()===_);!e.musicalInstrumentIdList.includes(_)&&q!==-1&&e.musicalInstrumentIdList.push(_)})}e.musicalInstrumentIdList.length>0&&(yield K(e.musicalInstrumentIdList))}),i=p=>{const r=new Map,s=[];if(a.instrumentData.forEach(f=>{f.disabled||f.code.split(/[,,]/).forEach(_=>{let q=_.replaceAll(" ","").toLowerCase();if(s.push(q),r.has(q))r.get(q).push(f.id+"");else{const E=[];E.push(f.id+""),r.set(q,E)}})}),!p)return"";p=p.replaceAll(" ","").toLowerCase();const n=g(s,p);if(r.has(n)){const f=r.get(n);return console.log("result:",f),f[0]||""}return""},T=p=>{var f,A,_,q;if(!p)return[];const r=new DOMParser().parseFromString(p,"text/xml"),s=((A=(f=r.getElementsByTagName("part-list"))==null?void 0:f[0])==null?void 0:A.getElementsByTagName("score-part"))||[];let n=Array.from(s).map(E=>{var J,ge;let C=(J=E.getElementsByTagName("part-name"))==null?void 0:J[0],U="";if(C&&((ge=C.textContent)==null?void 0:ge.trim()))U=C.textContent||"";else{let Ee=E.getAttribute("id");Ee&&(U=Ee)}return{value:U.trim(),label:U.trim()}});return n=n.filter(E=>{var C,U;return((U=(C=E.value)==null?void 0:C.toLocaleUpperCase)==null?void 0:U.call(C))!="COMMON"}),a.xmlFirstSpeed=((q=(_=r.getElementsByTagName("per-minute"))==null?void 0:_[0])==null?void 0:q.textContent)||"",e.playSpeed||(a.xmlFirstSpeed?e.playSpeed=Number.parseFloat(a.xmlFirstSpeed):e.playSpeed=100),n},Y=p=>{const r=Ie(a.partListNames)||[],s=e.multiTracksSelection;return r.forEach(n=>{s.includes(n.value)?n.disabled=!0:n.disabled=!1}),r||[]},K=p=>B(this,null,function*(){if(!p||p.length==0){e.subjectIds=[];return}try{const{data:r}=yield st({page:1,rows:999,musicalInstrumentIdList:p}),s=r.rows||[],n=[];s.forEach(f=>{f.enableFlag&&n.push(f.id+"")}),e.subjectIds=n}catch(r){}}),le=p=>{S.warning({title:"\u63D0\u793A",content:"\u662F\u5426\u786E\u8BA4\u5220\u9664\u6B64\u539F\u97F3\uFF1F",positiveText:"\u786E\u5B9A",negativeText:"\u53D6\u6D88",onPositiveClick:()=>B(this,null,function*(){let s=e.musicSheetSoundList_YY[p].track;const n=e.multiTracksSelection.indexOf(s);n>-1?e.multiTracksSelection.splice(n,1):e.musicSheetSoundList_YY.splice(p,1),a.multiTracks=="all"&&a.partListNames.length!=e.multiTracksSelection.length&&(a.multiTracks=null)})})},ve=p=>{if(!p)return;let r=[];p==="all"?a.partListNames.forEach(s=>{r.push(s.value)}):p==="invert"&&a.partListNames.forEach(s=>{e.multiTracksSelection.includes(s.value)||r.push(s.value)}),e.multiTracksSelection=r},fe=()=>{var s;if(e.sourceType=="PLATFORM"){a.ownerName="";return}if(!e.sourceType||!((s=e.musicSheetExtend)!=null&&s.userId))return;const p=e.musicSheetExtend.applicationId,r=a.appData.filter(n=>n.id==p);r.length>0&&(a.ownerName=r[0].appName),e.sourceType=="ORG"?a.ownerName=a.ownerName?a.ownerName+"-"+e.musicSheetExtend.organizationRole:e.musicSheetExtend.organizationRole:e.sourceType=="PERSON"&&(a.ownerName=a.ownerName?a.ownerName+"-"+qe(e.musicSheetExtend.clientType,new Map(Object.entries(ze))):qe(e.musicSheetExtend.clientType,new Map(Object.entries(ze))),e.musicSheetExtend.userName&&(a.ownerName=a.ownerName?a.ownerName+"-"+e.musicSheetExtend.userName:e.musicSheetExtend.userName),e.musicSheetExtend.phone&&(a.ownerName+="("+e.musicSheetExtend.phone+")"))};return ce(()=>B(this,null,function*(){a.loading=!0,u.type==="preview"&&(a.previewMode=!0);{if(a.instrumentList&&a.instrumentList.length>0)return;try{const{data:p}=yield we({page:1,rows:999}),r=p.rows||[];r.forEach(s=>{s.label=s.name,s.value=s.id+"",a.instrumentIdNameMap.set(s.id+"",s.name),e.musicSheetSoundList_YZ.push({musicSheetId:u.data.id,musicalInstrumentId:s.id+"",musicalInstrumentName:s.name,audioFileUrl:null,audioPlayType:"PLAY"})}),a.instrumentData=r,a.instrumentList=Ie(r)}catch(p){}}a.subjectList=Ie(u.subjectList),a.subjectList.forEach(p=>{p.disabled=!p.enableFlag});{const p=Object.keys(lt),{data:r}=yield it({page:1,rows:999,parentId:0,hiddenFlag:!0}),s=r.rows||[],n=s.filter(A=>p.includes(A.appKey));n.forEach(A=>{A.label=A.appName,A.value=A.id}),a.useProjectData=n;const f=s.filter(A=>p.includes(A.appKey)&&A.appKey!=="KLX_JG");f.forEach(A=>{A.label=A.appName,A.value=A.id}),a.appData=f}try{const{data:p}=yield Ue({enable:!0});a.musicSheetCategories=ut(p,"musicSheetCategoriesList")}catch(p){}if(u.type==="edit"||u.type==="preview"){const p=u.data;try{const{data:r}=yield bt({id:p.id});if(e.details=r,e.playMode=r.playMode,e.xmlFileUrl=r.xmlFileUrl,e.midiUrl=r.midiUrl,e.name=r.name,e.composer=r.composer,e.playSpeed=r.playSpeed?Number.parseFloat(r.playSpeed):100,e.defaultScoreRender=r.defaultScoreRender,e.isScoreRender=r.isScoreRender,e.musicCover=r.musicCover,e.remark=r.remark,e.status=r.status,e.sourceType=r.sourceType,e.appAuditFlag=r.appAuditFlag?1:0,e.midiFileUrl=r.midiFileUrl,e.isShowFingering=r.isShowFingering,e.isAllSubject=r.isAllSubject,e.isUseSingSystemBeat=r.isUseSingSystemBeat,e.isPlaySingBeat=r.isPlaySingBeat,e.subjectIds=[],r.subjectIds){const n=r.subjectIds.split(",")||[];console.log(n,"subjectIds",e.subjectIds),n.forEach(f=>{e.subjectIds.includes(f)||e.subjectIds.push(f)}),a.subjectList=a.subjectList.filter(f=>!f.disabled||n.includes(f.value))}e.musicCategoryId=r.musicCategoryId,e.audioType=r.audioType,e.isPlayBeat=r.isPlayBeat,e.isUseSystemBeat=r.isUseSystemBeat;try{const n=r.extConfigJson?JSON.parse(r.extConfigJson):{};e.graduals=n.gradualTimes||{},e.repeatedBeats=!!n.repeatedBeats,e.isEvxml=!!n.isEvxml,e.repeatedBeatsToSing=!!n.repeatedBeatsToSing}catch(n){}e.evaluationStandard=r.evaluationStandard,e.musicSheetExtend=r.musicSheetExtend,a.musicSheetSoundList=r.musicSheetSoundList?r.musicSheetSoundList:[],(r.musicSheetAccompanimentList?r.musicSheetAccompanimentList:[]).forEach(n=>{let f=n.audioPlayType;f&&f=="SING"?(a.bSongFile=n.audioFileUrl,e.scoreAudioFileUrl=n.scoreAudioFileUrl):a.musicSheetAccompanimentUrl=n.audioFileUrl});for(let n=0;n<a.musicSheetSoundList.length;n++)if(a.musicSheetSoundList[n].audioPlayType=="SING"&&a.musicSheetSoundList[n].track!=null)a.initFSongMap.set(a.musicSheetSoundList[n].track,G({},a.musicSheetSoundList[n]));else if(e.isAllSubject)e.musicSheetSoundList_all_subject=a.musicSheetSoundList[n].audioFileUrl;else for(let f=0;f<e.musicSheetSoundList_YZ.length;f++){let A=a.musicSheetSoundList[n].musicalInstrumentId;A&&A==e.musicSheetSoundList_YZ[f].musicalInstrumentId&&(e.musicSheetSoundList_YZ[f].audioFileUrl=a.musicSheetSoundList[n].audioFileUrl)}e.musicalInstrumentIdList=r.musicalInstrumentIds?r.musicalInstrumentIds.split(","):[],a.instrumentList=a.instrumentList.filter(n=>n.enableFlag||e.musicalInstrumentIdList.includes(n.id+"")),fe(),Et.get(r.xmlFileUrl).then(n=>{if(n!=null&&n.data){a.musicUpdateLoading=!0,h.list=Ve(n==null?void 0:n.data).filter(E=>E.length===2),a.partListNames=T(n==null?void 0:n.data);let f=[];r.multiTracksSelection&&(r.multiTracksSelection=r.multiTracksSelection.toLocaleUpperCase()),!r.multiTracksSelection||r.multiTracksSelection.trim()==""||r.multiTracksSelection.trim()=="NULL"?f.push(""):r.multiTracksSelection.split(",").forEach(E=>{f.push(E.trim())}),f=a.partListNames.map(E=>E.label).filter(E=>f.includes(E.toLocaleUpperCase())),e.multiTracksSelection=f,e.musicSheetType=e.multiTracksSelection.length>1?"CONCERT":"SINGLE";const _=r.musicSheetSoundList?r.musicSheetSoundList:[],q=[];a.partListNames.forEach(E=>{let C=null,U=null;e.musicSheetType=="CONCERT"&&_.forEach(J=>{if(J.audioPlayType=="PLAY"){let ge="";J.track&&(ge=J.track.trim()),ge==E.value&&(C=J.audioFileUrl,U=J.musicalInstrumentId)}}),e.musicSheetSoundList_YY.push({audioFileUrl:C,musicalInstrumentId:U,track:E.value,audioPlayType:"PLAY"}),q.push(E.value)}),q.length==e.multiTracksSelection.length&&(a.multiTracks="all"),e.musicSheetType=="CONCERT"&&a.musicSheetSoundList.forEach(E=>{E.audioPlayType=="PLAY"&&E.track&&!q.includes(E.track.trim())&&E.audioPlayType=="PLAY"&&e.musicSheetSoundList_YY.push({audioFileUrl:E.audioFileUrl,musicalInstrumentId:E.musicalInstrumentId,track:E.track?E.track.trim():"",audioPlayType:"PLAY"})}),L()}})}catch(r){}}else a.subjectList=a.subjectList.filter(p=>p.enableFlag==!0),a.instrumentList=a.instrumentList.filter(p=>p.enableFlag==!0);a.loading=!1})),()=>{let p,r;return t("div",{style:"background: #fff; padding-top: 12px"},[t(et,{show:a.loading},{default:()=>[t(Ae,{class:ae.formContainer,model:e,ref:F,"label-placement":"left","label-width":"150",disabled:a.previewMode},{default:()=>[t(he,{showIcon:!1,style:{marginBottom:"12px"}},{default:()=>[m("\u57FA\u672C\u4FE1\u606F")]}),t(R,{cols:2},{default:()=>[t(j,{label:"\u66F2\u76EE\u540D\u79F0",path:"name",rule:[{required:!0,message:"\u8BF7\u8F93\u5165\u66F2\u76EE\u540D\u79F0",trigger:["input","blur"]}]},{default:()=>[t(ue,{value:e.name,"onUpdate:value":s=>e.name=s,placeholder:"\u8BF7\u8F93\u5165\u66F2\u76EE\u540D\u79F0",maxlength:50,showCount:!0},null)]}),t(j,{label:"\u97F3\u4E50\u4EBA",path:"composer",rule:[{required:!1,message:"\u8BF7\u8F93\u5165\u97F3\u4E50\u4EBA",trigger:["input","blur"]}]},{default:()=>[t(ue,{value:e.composer,"onUpdate:value":s=>e.composer=s,placeholder:"\u8BF7\u8F93\u5165\u97F3\u4E50\u4EBA\u540D\u79F0",showCount:!0,maxlength:14},null)]})]}),t(R,{cols:2},{default:()=>[t(j,{label:"\u66F2\u76EE\u5C01\u9762",path:"musicCover",rule:[{required:!1,message:"\u8BF7\u4E0A\u4F20\u66F2\u76EE\u5C01\u9762",trigger:["input","blur"]}]},{default:()=>[t(te,{desc:"\u5C01\u9762\u56FE",disabled:a.previewMode,accept:".jpg,.jpeg,.png",tips:"\u8BF7\u4E0A\u4F20\u5927\u5C0F1M\u4EE5\u5185\u7684JPG\u3001PNG\u56FE\u7247",size:1,fileList:e.musicCover,"onUpdate:fileList":s=>e.musicCover=s,cropper:!0,bucketName:"cbs",options:{autoCrop:!0,enlarge:2,autoCropWidth:200,fixedBox:!0,autoCropHeight:200,previewsCircle:!1,title:"\u66F2\u76EE\u5C01\u9762"}},null)]}),t(j,{label:"\u66F2\u76EE\u5206\u7C7B",path:"musicCategoryId",rule:[{required:!0,message:"\u8BF7\u9009\u62E9\u66F2\u76EE\u5206\u7C7B",trigger:["change"]}]},{default:()=>[t(Pe,{valueField:"id",labelField:"name","children-field":"musicSheetCategoriesList",placeholder:"\u8BF7\u9009\u62E9\u5206\u7C7B",value:e.musicCategoryId,"onUpdate:value":s=>e.musicCategoryId=s,options:a.musicSheetCategories,clearable:!0},null)]})]}),t(R,{cols:2},{default:()=>[t(j,{label:"\u4F5C\u8005\u5C5E\u6027",path:"sourceType",rule:[{required:!0,message:"\u8BF7\u9009\u62E9\u4F5C\u8005\u5C5E\u6027",trigger:"change"}]},{default:()=>[t(M,{value:e.sourceType,"onUpdate:value":s=>e.sourceType=s,options:re(Ce),placeholder:"\u8BF7\u9009\u62E9\u4F5C\u8005\u5C5E\u6027",onUpdateValue:()=>{e.musicSheetExtend={},a.ownerName=null}},null)]}),e.sourceType==="PERSON"&&t(j,{label:"\u6240\u5C5E\u4EBA",path:"musicSheetExtend.userId",rule:[{required:!0,message:"\u8BF7\u9009\u62E9\u66F2\u76EE\u6240\u5C5E\u4EBA",trigger:["input","change"]}]},{default:()=>[t(O,{disabled:a.previewMode||!e.sourceType,type:"primary",size:"small",text:!0,onClick:()=>{a.showMusicSheetOwnerDialog=!0}},{default:()=>[a.ownerName?a.ownerName:"\u8BF7\u9009\u62E9\u6240\u5C5E\u4EBA"]})]}),e.sourceType==="ORG"&&t(j,{label:"\u6240\u5C5E\u4EBA",path:"musicSheetExtend.organizationRoleId",rule:[{required:!0,message:"\u8BF7\u9009\u62E9\u66F2\u76EE\u6240\u5C5E\u673A\u6784",trigger:["input","change"]}]},{default:()=>[t(O,{disabled:a.previewMode||!e.sourceType,type:"primary",size:"small",text:!0,onClick:()=>{a.showMusicSheetOwnerDialog=!0}},{default:()=>[a.ownerName?a.ownerName:"\u8BF7\u9009\u62E9\u6240\u5C5E\u673A\u6784"]})]})]}),t(R,{cols:2},{default:()=>[t(j,{label:"\u5BA1\u6838\u7248\u672C",path:"appAuditFlag",rule:[{required:!0,message:"\u8BF7\u9009\u62E9\u5BA1\u6838\u7248\u672C",trigger:"change",type:"number"}]},{default:()=>[t(M,{options:[{label:"\u662F",value:1},{label:"\u5426",value:0}],value:e.appAuditFlag,"onUpdate:value":s=>e.appAuditFlag=s},null)]})]}),t(he,{showIcon:!1,style:{marginBottom:"12px"}},{default:()=>[m("\u66F2\u76EE\u8BBE\u7F6E")]}),t(R,{cols:2},{default:()=>[t(j,{label:"\u64AD\u653E\u6A21\u5F0F",path:"playMode",rule:[{required:!0,message:"\u8BF7\u9009\u62E9\u64AD\u653E\u6A21\u5F0F"}]},{default:()=>[t(W,{value:e.playMode,"onUpdate:value":s=>e.playMode=s,onUpdateValue:s=>{s==="MP3"?e.playMode="MP3":e.playMode="MIDI"}},{default:()=>[t(z,{value:"MP3"},{default:()=>[m("MP3")]}),e.playMode=="MIDI"&&u.type==="preview"&&t(z,{value:"MIDI"},{default:()=>[m("MID")]})]})]}),e.playMode==="MP3"&&t(j,{label:"\u4F34\u594F\u7C7B\u578B",path:"audioType",rule:[{required:!0,message:"\u8BF7\u9009\u62E9\u4F34\u594F\u7C7B\u578B"}]},{default:()=>[t(W,{value:e.audioType,"onUpdate:value":s=>e.audioType=s},{default:()=>[t(z,{value:"HOMEMODE"},{default:()=>[m("\u81EA\u5236\u4F34\u594F")]}),t(z,{value:"COMMON"},{default:()=>[m("\u666E\u901A\u4F34\u594F")]})]})]})]}),t(R,{cols:2},{default:()=>[t(j,{label:"\u4E0A\u4F20XML",path:"xmlFileUrl",rule:[{required:!0,message:"\u8BF7\u9009\u62E9\u4E0A\u4F20XML",trigger:["change","input"]}]},{default:()=>[t(te,{desc:"XML\u6587\u4EF6",disabled:a.previewMode,size:30,key:"xmlFileUrl",fileList:e.xmlFileUrl,"onUpdate:fileList":s=>e.xmlFileUrl=s,tips:"\u4EC5\u652F\u6301\u4E0A\u4F20.xml/.mxml\u683C\u5F0F\u6587\u4EF6",listType:"image",accept:".xml,.mxml,.evxml",bucketName:"cloud-coach",text:"\u70B9\u51FB\u4E0A\u4F20XML\u6587\u4EF6",onReadFileInputEventAsArrayBuffer:D,onRemove:()=>{}},null)]}),t(j,{label:"\u8BC4\u5206\u6807\u51C6",path:"evaluationStandard",rule:[{required:!0}]},{default:()=>[t(W,{value:e.evaluationStandard,"onUpdate:value":s=>e.evaluationStandard=s},{default:()=>[t(z,{value:"FREQUENCY"},{default:()=>[m("\u6807\u51C6\u8BC4\u6D4B")]}),t(z,{value:"AMPLITUDE"},{default:()=>[m("\u6253\u51FB\u4E50(\u632F\u5E45)")]}),t(z,{value:"DECIBELS"},{default:()=>[m("\u8282\u594F(\u5206\u8D1D)")]})]})]})]}),t(R,{cols:2},{default:()=>[t(j,{label:"\u662F\u5426\u5168\u58F0\u90E8",path:"isAllSubject",rule:[{required:!0,message:"\u662F\u5426\u5168\u58F0\u90E8"}]},{default:()=>[t(W,{value:e.isAllSubject,"onUpdate:value":s=>e.isAllSubject=s},{default:()=>[t(z,{value:!1},{default:()=>[m("\u5426")]}),t(z,{value:!0},{default:()=>[m("\u662F")]})]})]}),t(j,{label:"\u901F\u5EA6",path:"playSpeed",rule:[{required:!1,message:"\u8BF7\u8F93\u5165\u901F\u5EA6"}]},{default:()=>[t(de,{placeholder:"\u8BF7\u8F93\u5165\u901F\u5EA6",value:e.playSpeed,"onUpdate:value":s=>e.playSpeed=s,min:0,style:"width:100%"},null)]})]}),!e.isAllSubject&&t(R,{cols:2},{default:()=>[t(j,{label:"\u53EF\u7528\u4E50\u5668",path:"musicalInstrumentIdList",rule:[{required:!0,message:"\u8BF7\u9009\u62E9\u53EF\u7528\u4E50\u5668",trigger:"change",type:"array"}]},{default:()=>[t(M,{placeholder:"\u8BF7\u9009\u62E9\u53EF\u7528\u4E50\u5668",options:a.instrumentList,value:e.musicalInstrumentIdList,"onUpdate:value":s=>e.musicalInstrumentIdList=s,clearable:!0,multiple:!0,filterable:!0,maxTagCount:10,onUpdateValue:s=>B(this,null,function*(){yield K(s)})},null)]}),t(j,{label:"\u53EF\u7528\u58F0\u90E8",path:"subjectIds",rule:[{required:!0,message:"\u8BF7\u9009\u62E9\u53EF\u7528\u58F0\u90E8",trigger:"change",type:"array"}]},{default:()=>[t(M,{value:e.subjectIds,"onUpdate:value":s=>e.subjectIds=s,options:a.subjectList,multiple:!0,filterable:!0,clearable:!0,placeholder:"\u8BF7\u9009\u62E9\u53EF\u7528\u58F0\u90E8",maxTagCount:10,onUpdateValue:s=>B(this,null,function*(){})},null)]})]}),t(R,{cols:1},{default:()=>[t(j,{label:"\u5207\u6362\u58F0\u8F68",path:"multiTracksSelection",rule:[{required:!0,message:"\u8BF7\u9009\u62E9\u5207\u6362\u58F0\u8F68",trigger:"change",type:"array"}]},{default:()=>[t(R,{style:"padding-top: 4px;"},{default:()=>[t(N,{span:24},{default:()=>[t(W,{value:a.multiTracks,"onUpdate:value":s=>a.multiTracks=s,onUpdateValue:s=>{ve(s)}},{default:()=>[t(z,{value:"all"},{default:()=>[m("\u5168\u9009")]}),t(z,{value:"allUncheck"},{default:()=>[m("\u91CD\u7F6E")]}),t(z,{value:"invert"},{default:()=>[m("\u53CD\u9009")]})]})]}),a.partListNames&&a.partListNames.length>0&&t(N,{span:24,style:"margin-top:5px"},{default:()=>[t(j,{label:"",path:"multiTracksSelection",rule:[{required:!1}]},{default:()=>[t(Mt,{value:e.multiTracksSelection,"onUpdate:value":s=>e.multiTracksSelection=s,onUpdateValue:s=>{a.partListNames.length!=s.length?a.multiTracks=null:a.multiTracks="all"}},{default:()=>[t(R,{yGap:2,cols:4},Ke(p=a.partListNames.map(s=>t(N,null,{default:()=>[t(pe,{value:s.value,label:s.label},null)]})))?p:{default:()=>[p]})]})]})]})]})]})]}),e.multiTracksSelection.length>1&&t(R,{cols:2},{default:()=>[t(j,{label:"\u603B\u8C31\u6E32\u67D3",path:"isScoreRender",rule:[{required:!0,message:"\u8BF7\u9009\u62E9\u603B\u8C31\u6E32\u67D3"}]},{default:()=>[t(W,{value:e.isScoreRender,"onUpdate:value":s=>e.isScoreRender=s},{default:()=>[t(z,{value:!0},{default:()=>[m("\u652F\u6301")]}),t(z,{value:!1},{default:()=>[m("\u4E0D\u652F\u6301")]})]})]}),e.isScoreRender&&t(j,{label:"\u9ED8\u8BA4\u663E\u793A",path:"defaultScoreRender",rule:[{required:!1}]},{default:()=>[t(W,{value:e.defaultScoreRender,"onUpdate:value":s=>e.defaultScoreRender=s},{default:()=>[t(z,{value:!0},{default:()=>[m("\u603B\u8C31")]}),t(z,{value:!1},{default:()=>[m("\u5206\u8F68")]})]})]})]}),t(he,{showIcon:!1,style:{marginBottom:"12px"}},{default:()=>[m("\u6F14\u5531\u6587\u4EF6")]}),t(R,{cols:2},{default:()=>[t(j,{label:"\u662F\u5426\u64AD\u653E\u8282\u62CD\u5668",path:"isPlaySingBeat",rule:[{required:!0,message:"\u8BF7\u9009\u62E9\u662F\u5426\u64AD\u653E\u8282\u62CD\u5668"}]},{default:()=>[t(W,{value:e.isPlaySingBeat,"onUpdate:value":s=>e.isPlaySingBeat=s},{default:()=>[t(z,{value:!0},{default:()=>[m("\u662F")]}),t(z,{value:!1},{default:()=>[m("\u5426")]})]})]}),e.isPlaySingBeat&&t(j,{label:"\u64AD\u653E\u65B9\u5F0F",path:"isUseSingSystemBeat",rule:[{required:!0,message:"\u8BF7\u9009\u62E9\u64AD\u653E\u65B9\u5F0F"}]},{default:()=>[t(W,{value:e.isUseSingSystemBeat,"onUpdate:value":s=>e.isUseSingSystemBeat=s},{default:()=>[t(z,{value:!0},{default:()=>[m("\u7CFB\u7EDF\u8282\u62CD\u5668")]}),t(z,{value:!1},{default:()=>[m("MP3\u8282\u62CD\u5668")]})]})]})]}),t(R,{cols:2},{default:()=>[t(j,{label:"\u91CD\u590D\u8282\u62CD\u65F6\u957F",path:"repeatedBeatsToSing",rule:[{required:!1,message:"\u8BF7\u9009\u62E9\u662F\u5426\u91CD\u590D\u8282\u62CD\u65F6\u957F"}]},{default:()=>[t(W,{value:e.repeatedBeatsToSing,"onUpdate:value":s=>e.repeatedBeatsToSing=s},{default:()=>[t(z,{value:!0},{default:()=>[m("\u662F")]}),t(z,{value:!1},{default:()=>[m("\u5426")]})]})]})]}),t(R,{cols:2},{default:()=>[t(j,{label:"\u4E0A\u4F20\u4F34\u5531",path:"bSongFile",rule:[{required:!1}]},{default:()=>[t(te,{desc:"\u4E0A\u4F20\u4F34\u5531",disabled:a.previewMode,size:30,fileList:a.bSongFile,"onUpdate:fileList":[s=>a.bSongFile=s,()=>{a.isBeatTime=!0}],tips:"\u4EC5\u652F\u6301\u4E0A\u4F20.mp3\u683C\u5F0F\u6587\u4EF6",listType:"image",accept:".mp3",bucketName:"cloud-coach",text:"\u70B9\u51FB\u4E0A\u4F20\u4F34\u5531\u6587\u4EF6"},null)]})]}),e.fSongList.length>0&&e.fSongList.map(s=>t(R,{class:ae.audioSection},{default:()=>[t(j,{span:12,label:s.track+"\u8303\u5531",path:s.audioFileUrl,rule:[{required:!1}]},{default:()=>[t(te,{desc:"\u4E0A\u4F20\u8303\u5531",disabled:a.previewMode,size:100,fileList:s.audioFileUrl,"onUpdate:fileList":[n=>s.audioFileUrl=n,()=>{a.isBeatTime=!0}],tips:"\u4EC5\u652F\u6301\u4E0A\u4F20.mp3\u683C\u5F0F\u6587\u4EF6",listType:"image",accept:".mp3",bucketName:"cloud-coach",text:"\u70B9\u51FB\u4E0A\u4F20\u8303\u5531\u6587\u4EF6"},null)]})]})),e.multiTracksSelection.length>1&&e.isScoreRender&&t(R,{cols:2,class:ae.audioSection},{default:()=>[t(j,{label:"\u603B\u8C31\u8303\u5531",path:"scoreRenderFile",rule:[{required:!1}]},{default:()=>[t(te,{desc:"\u4E0A\u4F20\u603B\u8C31\u8303\u5531",disabled:a.previewMode,size:30,fileList:e.scoreAudioFileUrl,"onUpdate:fileList":[s=>e.scoreAudioFileUrl=s,()=>{a.isBeatTime=!0}],tips:"\u4EC5\u652F\u6301\u4E0A\u4F20.mp3\u683C\u5F0F\u6587\u4EF6",listType:"image",accept:".mp3",bucketName:"cloud-coach",text:"\u70B9\u51FB\u4E0A\u4F20\u603B\u8C31\u8303\u5531"},null)]})]}),e.fSongList.length>0&&e.fSongList.map(s=>t(R,{cols:2},{default:()=>[t(j,{label:s.track+"\u5531\u540D(\u7537)",path:s.solmizationFileUrl,rule:[{required:!1}]},{default:()=>[t(te,{desc:"\u4E0A\u4F20\u8303\u5531",disabled:a.previewMode,size:100,fileList:s.solmizationFileUrl,"onUpdate:fileList":[n=>s.solmizationFileUrl=n,()=>{a.isBeatTime=!0}],tips:"\u4EC5\u652F\u6301\u4E0A\u4F20.mp3\u683C\u5F0F\u6587\u4EF6",listType:"image",accept:".mp3",bucketName:"cloud-coach",text:"\u70B9\u51FB\u4E0A\u4F20\u5531\u540D\u6587\u4EF6"},null)]}),t(j,{label:s.track+"\u5531\u540D(\u5973)",path:s.femaleSolmizationFileUrl,rule:[{required:!1}]},{default:()=>[t(te,{desc:"\u4E0A\u4F20\u8303\u5531",disabled:a.previewMode,size:100,fileList:s.femaleSolmizationFileUrl,"onUpdate:fileList":[n=>s.femaleSolmizationFileUrl=n,()=>{a.isBeatTime=!0}],tips:"\u4EC5\u652F\u6301\u4E0A\u4F20.mp3\u683C\u5F0F\u6587\u4EF6",listType:"image",accept:".mp3",bucketName:"cloud-coach",text:"\u70B9\u51FB\u4E0A\u4F20\u5531\u540D\u6587\u4EF6"},null)]})]})),t(he,{showIcon:!1,style:{marginBottom:"12px"}},{default:()=>[m("\u6F14\u594F\u6587\u4EF6")]}),t(R,{cols:2},{default:()=>[t(j,{label:"\u662F\u5426\u64AD\u653E\u8282\u62CD\u5668",path:"isPlayBeat",rule:[{required:!0,message:"\u8BF7\u9009\u62E9\u662F\u5426\u64AD\u653E\u8282\u62CD\u5668"}]},{default:()=>[t(W,{value:e.isPlayBeat,"onUpdate:value":s=>e.isPlayBeat=s},{default:()=>[t(z,{value:!0},{default:()=>[m("\u662F")]}),t(z,{value:!1},{default:()=>[m("\u5426")]})]})]}),e.isPlayBeat&&t(j,{label:"\u64AD\u653E\u65B9\u5F0F",path:"isUseSystemBeat",rule:[{required:!0,message:"\u8BF7\u9009\u62E9\u64AD\u653E\u65B9\u5F0F"}]},{default:()=>[t(W,{value:e.isUseSystemBeat,"onUpdate:value":s=>e.isUseSystemBeat=s},{default:()=>[t(z,{value:!0},{default:()=>[m("\u7CFB\u7EDF\u8282\u62CD\u5668")]}),t(z,{value:!1},{default:()=>[m("MP3\u8282\u62CD\u5668")]})]})]})]}),t(R,{cols:2},{default:()=>[t(j,{label:"\u91CD\u590D\u8282\u62CD\u65F6\u957F",path:"repeatedBeats",rule:[{required:!1,message:"\u8BF7\u9009\u62E9\u662F\u5426\u91CD\u590D\u8282\u62CD\u65F6\u957F"}]},{default:()=>[t(W,{value:e.repeatedBeats,"onUpdate:value":s=>e.repeatedBeats=s},{default:()=>[t(z,{value:!0},{default:()=>[m("\u662F")]}),t(z,{value:!1},{default:()=>[m("\u5426")]})]})]}),t(j,{label:"\u662F\u5426\u663E\u793A\u6307\u6CD5",path:"isShowFingering",rule:[{required:!0,message:"\u8BF7\u9009\u62E9\u662F\u5426\u663E\u793A\u6307\u6CD5"}]},{default:()=>[t(W,{value:e.isShowFingering,"onUpdate:value":s=>e.isShowFingering=s},{default:()=>[t(z,{value:!0},{default:()=>[m("\u662F")]}),t(z,{value:!1},{default:()=>[m("\u5426")]})]})]})]}),t(R,{cols:2},{default:()=>[e.playMode==="MP3"&&t(j,{label:"\u4E0A\u4F20\u4F34\u594F",path:"musicSheetAccompanimentList",rule:[{required:!1,message:"\u8BF7\u9009\u62E9\u4E0A\u4F20.mp3"}]},{default:()=>[t(te,{disabled:a.previewMode,size:30,fileList:a.musicSheetAccompanimentUrl,"onUpdate:fileList":[s=>a.musicSheetAccompanimentUrl=s,()=>{a.isBeatTime=!0}],tips:"\u4EC5\u652F\u6301\u4E0A\u4F20.mp3\u683C\u5F0F\u6587\u4EF6",listType:"image",accept:".mp3",bucketName:"cloud-coach",text:"\u70B9\u51FB\u4E0A\u4F20\u4F34\u594F\u6587\u4EF6",max:1,desc:"\u4E0A\u4F20\u4F34\u594F\u6587\u4EF6"},null)]}),e.isAllSubject&&e.musicSheetType=="SINGLE"&&t(j,{label:"\u4E0A\u4F20\u539F\u97F3",path:"musicSheetSoundList_all_subject",rule:[{required:!1,message:"\u8BF7\u9009\u62E9\u4E0A\u4F20\u539F\u97F3",trigger:["change","input"]}]},{default:()=>[t(te,{desc:"\u4E0A\u4F20\u539F\u97F3",disabled:a.previewMode,size:30,max:1,fileList:e.musicSheetSoundList_all_subject,"onUpdate:fileList":[s=>e.musicSheetSoundList_all_subject=s,()=>{a.isBeatTime=!0}],tips:"\u4EC5\u652F\u6301\u4E0A\u4F20.mp3\u683C\u5F0F\u6587\u4EF6",listType:"image",accept:".mp3",bucketName:"cloud-coach",text:"\u70B9\u51FB\u4E0A\u4F20\u539F\u97F3",onRemove:()=>{}},null)]})]}),!!h.list.length&&t(me,null,[t(he,{showIcon:!1,type:"info"},{default:()=>[m("\u8BC6\u522B\u5230\u51711\u5904\u6E10\u53D8\u901F\u5EA6\uFF0C\u8BF7\u8F93\u5165Dorico\u5BF9\u5E94\u5C0F\u8282\u65F6\u95F4\u4FE1\u606F")]}),t(I,{label:"rit.",required:!0,style:{marginTop:"10px"}},{default:()=>[t(Z,{vertical:!0},Ke(r=h.list.map((s,n)=>t(Fe,null,{default:()=>[t(I,{path:`graduals.${s[0].measureIndex}`,rule:[{required:!0,message:"\u8BF7\u8F93\u5165\u5408\u594F\u66F2\u76EE\u65F6\u95F4"},{pattern:/^((\d{2}):?){2,3}$/,message:"\u8BF7\u8F93\u5165\u6B63\u786E\u7684\u66F2\u76EE\u65F6\u95F4",trigger:"blur"}]},{default:()=>[t(Fe,null,{default:()=>[t(Ge,null,{default:()=>[s[0].measureIndex+1,m("\u5C0F\u8282\u5F00\u59CB")]}),t(ue,{placeholder:"00:00:00",value:e.graduals[s[0].measureIndex],"onUpdate:value":f=>e.graduals[s[0].measureIndex]=f},null)]})]}),t("div",{style:{lineHeight:"30px",padding:"0 4px"}},[m("~")]),t(I,{path:`graduals.${s[1].measureIndex}`,rule:[{required:!0,message:"\u8BF7\u8F93\u5165\u5408\u594F\u66F2\u76EE\u65F6\u95F4"},{pattern:/^((\d{2}):?){2,3}$/,message:"\u8BF7\u8F93\u5165\u6B63\u786E\u7684\u66F2\u76EE\u65F6\u95F4",trigger:"blur"}]},{default:()=>[t(Fe,null,{default:()=>[t(ue,{placeholder:"00:00:00",value:e.graduals[s[1].measureIndex],"onUpdate:value":f=>e.graduals[s[1].measureIndex]=f},null),t(Ge,null,{default:()=>[s[1].measureIndex,m("\u5C0F\u8282\u7ED3\u675F")]})]})]})]})))?r:{default:()=>[r]})]})]),e.musicSheetType=="SINGLE"&&e.playMode==="MP3"&&!e.isAllSubject&&e.musicSheetSoundList_YZ.map((s,n)=>t(me,null,[e.musicalInstrumentIdList.includes(s.musicalInstrumentId)&&t(R,{class:ae.audioSection},{default:()=>[t(j,{span:12,label:s.musicalInstrumentName,path:`musicSheetSoundList_YZ[${n}].audioFileUrl`,rule:[{required:!1,message:"\u8BF7\u4E0A\u4F20\u4E50\u5668\u6F14\u594F\u6587\u4EF6"}]},{default:()=>[t(te,{desc:"\u4E50\u5668\u6F14\u594F\u6587\u4EF6",disabled:a.previewMode,size:100,fileList:s.audioFileUrl,"onUpdate:fileList":[f=>s.audioFileUrl=f,()=>{a.isBeatTime=!0}],tips:"\u4EC5\u652F\u6301\u4E0A\u4F20.mp3\u683C\u5F0F\u6587\u4EF6",listType:"image",accept:".mp3",text:"\u70B9\u51FB\u4E0A\u4F20MP3\u6587\u4EF6",bucketName:"cloud-coach"},null)]})]})])),e.musicSheetType=="CONCERT"&&e.playMode==="MP3"&&e.musicSheetSoundList_YY.length>0&&t(me,null,[e.musicSheetSoundList_YY.map((s,n)=>{var f,A;return t(me,null,[(!o(s.track)||((A=(f=s.track)==null?void 0:f.toLocaleUpperCase)==null?void 0:A.call(f))!="COMMON"&&e.multiTracksSelection.includes(s.track))&&t(R,{class:ae.audioSection},{default:()=>[t(j,{span:12,label:"\u539F\u97F3",path:`musicSheetSoundList_YY[${n}].audioFileUrl`,rule:[{required:!1,message:`\u8BF7\u4E0A\u4F20${s.track?s.track+"\u7684":"\u7B2C"+(n+1)+"\u4E2A"}\u539F\u97F3`}]},{default:()=>[t(te,{desc:"\u539F\u97F3\u6587\u4EF6",disabled:a.previewMode,size:100,fileList:s.audioFileUrl,"onUpdate:fileList":[_=>s.audioFileUrl=_,()=>{a.isBeatTime=!0}],tips:"\u4EC5\u652F\u6301\u4E0A\u4F20.mp3\u683C\u5F0F\u6587\u4EF6",listType:"image",accept:".mp3",bucketName:"cloud-coach"},null)]}),a.partListNames.length>0&&t(j,{span:12,label:"\u6240\u5C5E\u8F68\u9053",path:`musicSheetSoundList_YY[${n}].track`,rule:[{required:!1,message:"\u8BF7\u9009\u62E9\u6240\u5C5E\u8F68\u9053"}]},{default:()=>[t(M,{placeholder:"\u8BF7\u9009\u62E9\u6240\u5C5E\u8F68\u9053",value:s.track,options:Y(s.track),onUpdateValue:_=>{const q=s.track;if(q){e.musicSheetSoundList_YY.forEach(C=>{C.track==_&&(C.track=q)});const E=e.multiTracksSelection.indexOf(s.track);e.multiTracksSelection.splice(E,1)}else e.musicSheetSoundList_YY=e.musicSheetSoundList_YY.filter(E=>E.track!=_);_!=null&&!e.multiTracksSelection.includes(_)&&e.multiTracksSelection.push(_),s.track=_,a.partListNames.length==e.multiTracksSelection.length&&(a.multiTracks="all")}},null)]}),t(N,{class:ae.btnRemove},{default:()=>[t(O,{type:"primary",text:!0,onClick:()=>le(n)},{default:()=>[m("\u5220\u9664")]})]})]})])})])]})]}),u.type!=="preview"&&t(Z,{justify:"end",style:"padding-top:12px"},{default:()=>[t(O,{type:"default",onClick:()=>l("close")},{default:()=>[m("\u53D6\u6D88")]}),t(O,{type:"primary",onClick:()=>c(),loading:y.value,disabled:y.value},{default:()=>[m("\u786E\u8BA4")]})]}),t(oe,{show:a.showMusicSheetOwnerDialog,"onUpdate:show":s=>a.showMusicSheetOwnerDialog=s,preset:"dialog",showIcon:!1,maskClosable:!1,title:"\u6240\u5C5E\u4EBA",style:{width:"800px"}},{default:()=>[t(ra,{musicSheetExtend:e.musicSheetExtend,sourceType:e.sourceType,appData:a.appData,onClose:()=>{a.showMusicSheetOwnerDialog=!1},onChoseMusicSheetOwnerData:s=>{e.musicSheetExtend=G({},s),fe()}},null)]}),t(oe,{class:ae.productModal,title:"\u81EA\u52A8\u751F\u6210\u66F2\u8C31\u56FE\u7247",show:a.productOpen,"onUpdate:show":s=>a.productOpen=s,preset:"dialog",closeOnEsc:!1,maskClosable:!1,onClose:()=>{a.isAutoSave=!1},showIcon:!1},{default:()=>[t(rt,{xmlFileUrl:e.xmlFileUrl||"",onClose:()=>a.productOpen=!1,onConfirm:s=>B(this,null,function*(){try{e.musicImg=s.musicImg,e.musicFirstImg=s.musicFirstImg,e.musicJianImg=s.musicJianImg,yield c()}catch(n){console.log(n,"e")}})},null)]}),x.beatTimeOpen&&t(ot,{id:x.musicId,onClose:s=>{x.beatTimeOpen=!1,!s&&(a.showUseProject=!0)}},null),t(oe,{blockScroll:!0,show:a.showUseProject,"onUpdate:show":s=>a.showUseProject=s,preset:"dialog",showIcon:!1,title:"\u9002\u7528\u9879\u76EE",style:{width:"1200px"},onClose:()=>{l("getList"),l("close"),setTimeout(()=>{y.value=!1,a.isAutoSave=!1},100)}},{default:()=>[t(nt,{type:u.type,id:a.showUseProjectId,useProject:a.useProjectData,onClose:b},null)]})])}}}),ha="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACwAAAAsCAMAAAApWqozAAAAflBMVEUAAAD////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////vroaSAAAAKXRSTlMA9IO3Uad0Cve/VuDZ1a6TGGZgLiwlDep67B2fOzIHxYt+FuTcukRqWYVSXmoAAAG3SURBVDjLvZXbloIwDEVbwFIUhBFFxft15vz/D05bCi3E4cFZyzzFsA0nJE3Z52wlJknKeZpMxGqcLIIMnmVB8SdaBRwD40H1mp2uzXMZ5pvFYpOH0vxcT1+xgXk2ieI2EEcTEwoIGs91PCz70TLU0Xk8gDXLI5LiIg1NNcyWpIoZQJVMNXsdoHViwLP+h1dltVYaSN6TRk8HtuTAuuqJIHrZFrj9aCfyhRQcCNkr+KvxQoAXXuJyDC691JnqBRuDmepOZueMKCawVt3MoABkr0eLx43fdwcPjiUg7Dt65S1PaEw6mIWt0gTIHXtwY+rBOZAYJwU2HXvMFJNdvnLegzdAahwVXniNt+8pUuV9d2UAnMI74N54ez0XPkxlPICddRUsfBm0wHlbCasVHPkF0k8nFPJsBaH2Px1tSi2VOlEfD3PYHK4ptN0CnW1XbNhuN0g7rg/ERVp2tmdsOEhuRGfgWuTSHCd+1tLIiNrhNwrS0gSe0f7YoXb4h8dKpZR7x/iKA3JgK0ULwtoDS1fBVByH7NWtArJkSF7NBqPry+nldn29vRjHV+77y3z8mvj/BUSvto/ZL9G9S97INuj8AAAAAElFTkSuQmCC",ya="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABYAAAAMCAMAAABRJ730AAAAM1BMVEUAAAD///////////////////////////////////////////////////////////////+3leKCAAAAEHRSTlMAV/jw7Ofd0MGkTj4vIhgPSYQHfQAAAE1JREFUGNOFzkcSgCAQBdE/5Az3P60KhgGr9C171dh50Rjh0VFb0FeGm6vDUC2vtuJUzFNNwS3rq+oMJslRZcIkiv4csQhHDnghpQg/Ni2rB1mZg3PWAAAAAElFTkSuQmCC",Sa=se({name:"musicPreView",props:{item:{type:Object,default:()=>{}},scoreType:{type:String,default:"staff"}},setup(u,{emit:k}){const l=Qe().getToken,e=H(""),a=H([]),h=H(void 0);Tt(u.item.id).then(b=>{if(b.code===200){const{isAllSubject:w,musicSheetType:L,audioPlayTypes:D,musicalInstruments:o}=b.data;!w&&L==="SINGLE"&&D.includes("PLAY")&&(a.value=(o||[]).map(v=>({value:v.id,label:v.name}))),a.value.length?(h.value=a.value[0].value,c(h.value)):c()}});const x=ke(()=>{var b;return(b=a.value.find(w=>w.value===h.value))==null?void 0:b.label}),y={dev:"https://dev.kt.colexiu.com",test:"https://test.lexiaoya.cn",online:"https://mec.colexiu.com"},F=location.origin.includes("//dev")?"dev":location.origin.includes("//test")?"test":location.origin.includes("//mec.colexiu")?"online":"dev",P=y[F],S=/(localhost|192)/.test(location.host)?"https://test.kt.colexiu.com/":P;function c(b){let w=S+`/instrument/?_t=${Date.now()}&id=${u.item.id}&modelType=practise&modeType=json&Authorization=${l}&isCbs=true&isMove=1`;w+="&musicRenderType="+u.scoreType,b&&(w+=`&instrumentId=${b}`),e.value=w}return()=>t("div",{class:ae.musicPreView},[a.value.length>1&&t(Bt,{value:h.value,"onUpdate:value":[b=>h.value=b,c],options:a.value,scrollable:!0,size:"large",trigger:"click",class:"musicalInstrumentsListPop"},{default:()=>[t("div",{class:ae.musicList},[t("img",{class:ae.musicImg,src:ha},null),t("div",null,[x.value]),t("img",{class:ae.tipImg,src:ya},null)])]}),e.value&&t("iframe",{width:"100%",height:"100%",frameborder:"0",src:e.value},null)])}}),va="_productModal_geqxn_1",ba="_productIframe_geqxn_9",Ta="_musicPreviewModal_geqxn_14",Je={productModal:va,productIframe:ba,musicPreviewModal:Ta};function Te(u){return typeof u=="function"||Object.prototype.toString.call(u)==="[object Object]"&&!at(u)}const Ia=se({name:"music-list",props:["searchId","musicCategoryId"],setup(u,{emit:k}){const d=Ne(),l=ne(),e=ee({loading:!1,pagination:{page:1,rows:10,pageTotal:0},searchForm:{keyword:null,isScoreRender:null,subjectId:null,sourceType:null,composer:null,userId:null,applicationId:null,useAppId:[],status:null,appAuditFlag:null,categoriesId:null,musicCategoryId:null,musicalInstrumentId:null,dataCorrect:null,generateFirst:null,audioPlayTypes:null,generateMetronomeAudio:null},dataList:[],subjectList:[],instrumentList:[],tagList:[],visiableMusic:!1,musicOperation:"add",musicData:{},musicSheetCategories:[],musicPreview:!1,musicPreviewScoreType:"staff",musicScore:null,showUseProject:!1,useProjectData:[],showUseProjectId:null,detailReadonly:!1,userIdDisable:!0,userIdData:[],productOpen:!1,beatTimeOpen:!1,productItem:{}}),a=()=>[{type:"selection"},{title:"\u66F2\u76EE\u540D\u79F0",minWidth:"200px",key:"id",render(i){return t(be,{labelPlacement:"left",column:1},{default:()=>[t(ie,{label:"\u540D\u79F0"},{default:()=>[t(Se,{content:i.name},null)]}),t(ie,{label:"\u7F16\u53F7"},{default:()=>[t("div",{onDblclick:()=>{Kt(l,i.id)}},[t(Se,{content:i.id},null)])]})]})}},{title:"\u5C01\u9762\u56FE",key:"titleImg",render(i){return t(Dt,{width:60,height:60,src:i.musicCover},null)}},{title:"\u66F2\u76EE\u4FE1\u606F",minWidth:"200px",key:"composer",render(i){return t(be,{labelPlacement:"left",column:1},{default:()=>[t(ie,{label:"\u97F3\u4E50\u4EBA"},{default:()=>[i.composer]}),t(ie,{label:"\u603B\u8C31\u6E32\u67D3"},{default:()=>[i.isScoreRender?"\u652F\u6301":"\u4E0D\u652F\u6301"]}),t(ie,{label:"\u5206\u7C7B"},{default:()=>[t(Se,{content:i.musicCategoryName},null)]}),t(ie,{label:"\u53EF\u7528\u58F0\u90E8"},{default:()=>[t(Se,{content:i.subjectNames},null)]})]})}},{title:"\u4F5C\u8005\u5C5E\u6027",key:"sourceType",minWidth:"120px",render(i){let T,Y;return t(be,{labelPlacement:"left",column:1},{default:()=>[t(ie,{label:"\u5C5E\u6027"},Te(T=Gt(i.sourceType,new Map(Object.entries(Ce))))?T:{default:()=>[T]}),t(ie,{label:"\u6240\u5C5E\u4EBA"},Te(Y=Vt(i.musicSheetExtend,i.sourceType))?Y:{default:()=>[Y]})]})}},{title:"\u9002\u7528\u9879\u76EE",key:"projectName",render(i){return t(Z,null,{default:()=>[X(t(O,{type:"primary",size:"small",text:!0,onClick:()=>{e.showUseProject=!0,e.showUseProjectId=i.id}},{default:()=>[t(Se,{content:i.musicSheetExtend&&i.musicSheetExtend.useApplicationNames?i.musicSheetExtend.useApplicationNames:""},null),t(jt,{size:15,style:"padding-left: 9px"},{default:()=>[t("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32"},[t("path",{d:"M2 26h28v2H2z",fill:"currentColor"},null),t("path",{d:"M25.4 9c.8-.8.8-2 0-2.8l-3.6-3.6c-.8-.8-2-.8-2.8 0l-15 15V24h6.4l15-15zm-5-5L24 7.6l-3 3L17.4 7l3-3zM6 22v-3.6l10-10l3.6 3.6l-10 10H6z",fill:"currentColor"},null)])]})]}),[[$("auth"),"musicSheetApplicationExtend/save1752901206883221506"]])]})}},{title:"\u66F4\u65B0\u4FE1\u606F",minWidth:"250px",key:"updateBy",render(i){return t(be,{labelPlacement:"left",column:1},{default:()=>[t(ie,{label:"\u66F4\u65B0\u4EBA"},{default:()=>[i.updateByName]}),t(ie,{label:"\u66F4\u65B0\u65F6\u95F4"},{default:()=>[i.updateTime]})]})}},{title:"\u573A\u666F",key:"audioPlayTypes",render(i){let T;return t(Z,null,Te(T=i.audioPlayTypeArray.map(Y=>{let K;return t(Oe,{type:Y==="SING"?"warning":"success"},Te(K=qt(Y))?K:{default:()=>[K]})}))?T:{default:()=>[T]})}},{title:"\u5BA1\u6838\u7248\u672C",minWidth:"100px",key:"appAuditFlag",render(i){return t("div",null,[i.appAuditFlag?"\u662F":"\u5426"])}},{title:"\u72B6\u6001",minWidth:"50px",key:"status",render(i){return t(Oe,{type:i.status?"primary":"default"},{default:()=>[i.status?"\u542F\u7528":"\u505C\u7528"]})}},{title:"\u64CD\u4F5C",key:"operation",fixed:"right",width:"300px",render(i){return t(Z,null,{default:()=>[t(Rt,{trigger:"hover",options:[{label:"\u4E94\u7EBF\u8C31",key:"staff"},{label:"\u9996\u8C03",key:"firstTone"},{label:"\u56FA\u5B9A\u8C03",key:"fixedTone"}],onSelect:T=>{e.musicPreview=!0,e.musicScore=i,e.musicPreviewScoreType=T}},{default:()=>[t(O,{type:"primary",size:"small",text:!0,onClick:T=>T.stopPropagation()},{default:()=>[m("\u9884\u89C8")]})]}),X(t(O,{type:"primary",size:"small",text:!0,onClick:()=>{e.visiableMusic=!0,e.musicOperation="preview",e.musicData=i,e.detailReadonly=!0}},{default:()=>[m("\u67E5\u770B")]}),[[$("auth"),"musicSheet/detail1751241103201271810"]]),X(t(O,{type:"primary",size:"small",text:!0,disabled:i.playMode==="MIDI",onClick:()=>{e.visiableMusic=!0,e.musicOperation="edit",e.musicData=i,e.detailReadonly=!0}},{default:()=>[m("\u4FEE\u6539")]}),[[$("auth"),"musicSheet/save1751241178962984962"]]),X(t(O,{type:"primary",size:"small",text:!0,onClick:()=>x(i)},{default:()=>[i.status?"\u505C\u7528":"\u542F\u7528"]}),[[$("auth"),"musicSheet/statusList1751241653309407234"]]),X(t(O,{type:"primary",size:"small",text:!0,onClick:()=>{e.productOpen=!0,e.productItem=i}},{default:()=>[m("\u751F\u6210\u56FE\u7247")]}),[[$("auth"),"musicSheet/img1751240591299051522"]]),X(t(O,{type:"primary",size:"small",text:!0,onClick:()=>{e.productItem=i,e.beatTimeOpen=!0}},{default:()=>[m("\u751F\u6210\u8282\u62CD\u5668\u97F3\u9891")]}),[[$("auth"),"musicSheet/addMix1819259767120539649"]]),X(t(O,{type:"primary",size:"small",text:!0,disabled:!!i.status,onClick:()=>P(i)},{default:()=>[m("\u5220\u9664")]}),[[$("auth"),"musicSheet/remove1753457445635645442"]])]})}}],h=H([]),x=i=>{const T=i.status?"\u505C\u7528":"\u542F\u7528";d.warning({title:"\u63D0\u793A",content:`\u662F\u5426${T}\uFF1F`,positiveText:"\u786E\u5B9A",negativeText:"\u53D6\u6D88",onPositiveClick:()=>B(this,null,function*(){try{yield je({ids:new Array(i.id),status:!i.status}),S(),l.success(`${T}\u6210\u529F`)}catch(Y){}})})},y=i=>{const T=h.value.length;T==0&&l.warning("\u672A\u9009\u62E9\u6570\u636E");const Y=i?"\u542F\u7528":"\u505C\u7528";d.warning({title:"\u63D0\u793A",content:`\u662F\u5426${Y}`+T+"\u6761\u6570\u636E\uFF1F",positiveText:"\u786E\u5B9A",negativeText:"\u53D6\u6D88",onPositiveClick:()=>B(this,null,function*(){try{yield je({ids:h.value,status:i}),S(),l.success(`${Y}\u6210\u529F`)}catch(K){}})})},F=i=>B(this,null,function*(){if(!!e.searchForm.applicationId&&(e.userIdData=[],e.searchForm.userId=null,i&&i!=="PLATFORM")){const{data:T}=yield He({page:1,rows:9999,sourceType:i,applicationId:e.searchForm.applicationId});(T.rows||[]).forEach(K=>{e.userIdData.push(Q(G({},K),{label:i==="PERSON"?K.userName:K.organizationRole,value:i==="PERSON"?K.userId:K.organizationRoleId}))})}}),P=i=>{d.warning({title:"\u63D0\u793A",content:`\u5220\u9664"${i.name}"\uFF0C\u662F\u5426\u7EE7\u7EED\uFF1F`,positiveText:"\u786E\u5B9A",negativeText:"\u53D6\u6D88",onPositiveClick:()=>B(this,null,function*(){try{yield xt({id:i.id}),S(),l.success("\u5220\u9664\u6210\u529F")}catch(T){}})})},S=()=>B(this,null,function*(){try{e.loading=!0;const i=e.searchForm.sourceType,T=e.searchForm.userId,Y=e.searchForm.audioPlayTypes;let K=Q(G({},e.searchForm),{useAppId:e.searchForm.useAppId?e.searchForm.useAppId.join(","):e.searchForm.useAppId,audioPlayTypes:[]});Y&&(Y==="PLAY_SING"?K.audioPlayTypes=["PLAY","SING"]:K.audioPlayTypes=[Y]),i&&i=="ORG"&&(K.organizationRoleId=T,K.userId=null);const le=G(G({},e.pagination),K);le.generateFirst&&(le.musicCategoryId="100061");const{data:ve}=yield kt(le);e.pagination.pageTotal=Number(ve.total);const fe=ve.rows||[];fe.forEach(p=>{p.audioPlayTypeArray=p.audioPlayTypes?p.audioPlayTypes.split(","):[]}),e.dataList=fe}catch(i){}e.loading=!1}),c=()=>B(this,null,function*(){try{const{data:i}=yield Ue({});e.musicSheetCategories=i||[],b(e.musicSheetCategories)}catch(i){}}),b=i=>{for(let T=0;T<i.length;T++)i[T].musicSheetCategoriesList.length<1?i[T].musicSheetCategoriesList=null:b(i[T].musicSheetCategoriesList)},w=()=>B(this,null,function*(){try{const{data:i}=yield st({page:1,rows:999}),T=i.rows||[];T.forEach(Y=>{Y.label=Y.name,Y.value=Y.id+""}),e.subjectList=T}catch(i){}}),L=()=>B(this,null,function*(){try{const{data:i}=yield we({page:1,rows:999}),T=i.rows||[];T.forEach(Y=>{Y.label=Y.name,Y.value=Y.id+""}),e.instrumentList=T}catch(i){}}),D=()=>B(this,null,function*(){try{const i=Object.keys(lt),{data:T}=yield it({page:1,rows:999,hiddenFlag:!0}),Y=T.rows||[];e.useProjectData=[],Y.filter(le=>i.includes(le.appKey)).forEach(le=>{e.useProjectData.push(Q(G({},le),{label:le.appName,value:le.id}))})}catch(i){}}),o=H(),v=()=>{e.pagination.page=1,S()};tt(()=>u.searchId,i=>{console.log(i,"searchId")});const g=()=>{var i;h.value=[],(i=o.value)==null||i.submit()},V=()=>{var i;(i=o.value)==null||i.reset()};return ce(()=>B(this,null,function*(){e.loading=!0,u.searchId&&(e.searchForm.categoriesId=u.searchId||null),u.musicCategoryId&&(e.searchForm.musicCategoryId=u.musicCategoryId||null),w(),L(),D(),c(),S()})),()=>t("div",{class:"system-menu-container"},[t(Xe,{ref:o,model:e.searchForm,onSubmit:v,saveKey:"music-list",onSetModel:i=>e.searchForm=i},{default:()=>[t(I,{label:"\u5173\u952E\u8BCD",path:"keyword"},{default:()=>[t(ue,{placeholder:"\u66F2\u76EE\u7F16\u53F7/\u540D\u79F0",value:e.searchForm.keyword,"onUpdate:value":i=>e.searchForm.keyword=i,clearable:!0},null)]}),t(I,{label:"\u603B\u8C31\u6E32\u67D3",path:"isScoreRender"},{default:()=>[t(M,{placeholder:"\u8BF7\u9009\u62E9\u603B\u8C31\u6E32\u67D3",value:e.searchForm.isScoreRender,"onUpdate:value":i=>e.searchForm.isScoreRender=i,options:[{label:"\u652F\u6301",value:!0},{label:"\u4E0D\u652F\u6301",value:!1}],clearable:!0},null)]}),t(I,{label:"\u66F2\u76EE\u5206\u7C7B",path:"musicCategoryId"},{default:()=>[t(Pe,{valueField:"id",labelField:"name","children-field":"musicSheetCategoriesList",placeholder:"\u8BF7\u9009\u62E9\u66F2\u76EE\u5206\u7C7B",value:e.searchForm.musicCategoryId,"onUpdate:value":i=>e.searchForm.musicCategoryId=i,options:e.musicSheetCategories,clearable:!0},null)]}),t(I,{label:"\u53EF\u7528\u58F0\u90E8",path:"musicSubject"},{default:()=>[t(M,{placeholder:"\u8BF7\u9009\u62E9\u53EF\u7528\u58F0\u90E8",value:e.searchForm.subjectId,"onUpdate:value":i=>e.searchForm.subjectId=i,options:e.subjectList,filterable:!0,clearable:!0},null)]}),t(I,{label:"\u53EF\u7528\u4E50\u5668",path:"musicalInstrumentId"},{default:()=>[t(M,{placeholder:"\u8BF7\u9009\u62E9\u53EF\u7528\u4E50\u5668",value:e.searchForm.musicalInstrumentId,"onUpdate:value":i=>e.searchForm.musicalInstrumentId=i,options:e.instrumentList,filterable:!0,clearable:!0},null)]}),t(I,{label:"\u97F3\u4E50\u4EBA",path:"composer"},{default:()=>[t(ue,{placeholder:"\u8BF7\u9009\u62E9\u97F3\u4E50\u4EBA",value:e.searchForm.composer,"onUpdate:value":i=>e.searchForm.composer=i,clearable:!0},null)]}),t(I,{label:"\u4F5C\u8005\u5C5E\u6027",path:"sourceType"},{default:()=>[t(M,{placeholder:"\u8BF7\u9009\u62E9\u4F5C\u8005\u5C5E\u6027",value:e.searchForm.sourceType,"onUpdate:value":i=>e.searchForm.sourceType=i,options:re(Ce),onUpdateValue:i=>B(this,null,function*(){e.userIdData=[],e.searchForm.userId=null,i&&i!=="PLATFORM"?(yield F(i),e.userIdDisable=!e.searchForm.applicationId):e.userIdDisable=!0}),clearable:!0},null)]}),t(I,{label:"\u6240\u5C5E\u9879\u76EE",path:"applicationId"},{default:()=>[t(M,{placeholder:"\u8BF7\u9009\u62E9\u6240\u5C5E\u9879\u76EE",value:e.searchForm.applicationId,"onUpdate:value":i=>e.searchForm.applicationId=i,options:e.useProjectData,clearable:!0,onUpdateValue:i=>B(this,null,function*(){e.searchForm.applicationId=i,i?(yield F(e.searchForm.sourceType),e.userIdDisable=!(e.searchForm.sourceType&&e.searchForm.sourceType!=="PLATFORM")):(e.searchForm.userId=null,e.userIdDisable=!0,e.userIdData=[])})},null)]}),t(I,{label:"\u6240\u5C5E\u4EBA",path:"userId"},{label:()=>t("div",null,[m("\u6240\u5C5E\u4EBA")]),default:()=>t(M,{filterable:!0,placeholder:"\u8BF7\u9009\u62E9\u6240\u5C5E\u4EBA",disabled:e.userIdDisable||!e.searchForm.applicationId&&!e.searchForm.sourceType,value:e.searchForm.userId,"onUpdate:value":i=>e.searchForm.userId=i,options:e.userIdData,clearable:!0},null)}),t(I,{label:"\u9002\u7528\u9879\u76EE",path:"useAppId"},{default:()=>[t(M,{placeholder:"\u8BF7\u9009\u62E9\u9002\u7528\u9879\u76EE",value:e.searchForm.useAppId,"onUpdate:value":i=>e.searchForm.useAppId=i,options:e.useProjectData,multiple:!0,maxTagCount:1},null)]}),t(I,{label:"\u72B6\u6001",path:"status"},{default:()=>[t(M,{value:e.searchForm.status,"onUpdate:value":i=>e.searchForm.status=i,placeholder:"\u8BF7\u9009\u62E9\u72B6\u6001",clearable:!0,options:[{label:"\u542F\u7528",value:!0},{label:"\u505C\u7528",value:!1}]},null)]}),t(I,{label:"\u5BA1\u6838\u7248\u672C",path:"appAuditFlag"},{default:()=>[t(M,{value:e.searchForm.appAuditFlag,"onUpdate:value":i=>e.searchForm.appAuditFlag=i,placeholder:"\u8BF7\u9009\u62E9\u5BA1\u6838\u7248\u672C",clearable:!0,options:[{label:"\u662F",value:1},{label:"\u5426",value:0}]},null)]}),t(I,{label:"\u6570\u636E\u4FEE\u590D",path:"dataCorrect"},{default:()=>[t(M,{value:e.searchForm.dataCorrect,"onUpdate:value":i=>e.searchForm.dataCorrect=i,placeholder:"\u8BF7\u9009\u62E9\u6570\u636E\u4FEE\u590D",clearable:!0,options:[{label:"\u662F",value:!0},{label:"\u5426",value:!1}]},null)]}),t(I,{label:"\u8282\u62CD\u5668\u97F3\u9891",path:"generateMetronomeAudio"},{default:()=>[t(M,{value:e.searchForm.generateMetronomeAudio,"onUpdate:value":i=>e.searchForm.generateMetronomeAudio=i,placeholder:"\u8BF7\u9009\u62E9\u662F\u5426\u751F\u6210\u8282\u62CD\u5668\u97F3\u9891",clearable:!0,options:[{label:"\u5DF2\u751F\u6210",value:!0},{label:"\u672A\u751F\u6210",value:!1}]},null)]}),t(I,{label:"\u5999\u6781\u5BA2\u8282\u62CD\u5668",path:"generateFirst"},{default:()=>[t(M,{value:e.searchForm.generateFirst,"onUpdate:value":i=>e.searchForm.generateFirst=i,placeholder:"\u8BF7\u9009\u62E9\u5999\u6781\u5BA2\u8282\u62CD\u5668",clearable:!0,options:[{label:"\u662F",value:!0},{label:"\u5426",value:!1}]},null)]}),t(I,{label:"\u573A\u666F",path:"audioPlayTypes"},{default:()=>[t(M,{value:e.searchForm.audioPlayTypes,"onUpdate:value":i=>e.searchForm.audioPlayTypes=i,placeholder:"\u8BF7\u9009\u62E9\u573A\u666F",options:Jt,clearable:!0},null)]}),t(I,null,{default:()=>[t(Z,null,{default:()=>[t(O,{type:"primary",onClick:g},{default:()=>[m("\u641C\u7D22")]}),t(O,{type:"default",onClick:V},{default:()=>[m("\u91CD\u7F6E")]})]})]})]}),t("div",{class:["section-container"]},[t(Z,{style:{paddingBottom:"12px"}},{default:()=>[X(t(O,{type:"primary",onClick:()=>{e.visiableMusic=!0,e.musicOperation="add",e.musicData={},e.detailReadonly=!0}},{default:()=>[m("\u65B0\u589E\u66F2\u76EE")]}),[[$("auth"),"musicSheet/save1751241178962984962"]]),X(t(O,{disabled:h.value.length==0,onClick:()=>{y(!1)}},{default:()=>[m("\u6279\u91CF\u505C\u7528")]}),[[$("auth"),"musicSheet/statusList1751241653309407234"]]),X(t(O,{disabled:h.value.length==0,onClick:()=>{y(!0)}},{default:()=>[m("\u6279\u91CF\u542F\u7528")]}),[[$("auth"),"musicSheet/statusList1751241653309407234"]])]}),t(xe,{loading:e.loading,columns:a(),data:e.dataList,rowKey:i=>i.id,checkedRowKeys:h.value,"onUpdate:checkedRowKeys":i=>h.value=i,scrollX:"1200"},null),t($e,{page:e.pagination.page,"onUpdate:page":i=>e.pagination.page=i,pageSize:e.pagination.rows,"onUpdate:pageSize":i=>e.pagination.rows=i,pageTotal:e.pagination.pageTotal,"onUpdate:pageTotal":i=>e.pagination.pageTotal=i,onList:S,sync:!0,saveKey:"music-list"},null)]),t(oe,{show:e.visiableMusic,"onUpdate:show":i=>e.visiableMusic=i,preset:"dialog",showIcon:!1,maskClosable:!1,title:()=>e.musicOperation==="add"?"\u6DFB\u52A0\u66F2\u76EE":e.musicOperation==="preview"?"\u66F2\u76EE\u8BE6\u60C5":"\u4FEE\u6539\u66F2\u76EE",style:{width:"980px"}},{default:()=>[t(ga,{type:e.musicOperation,data:e.musicData,subjectList:e.subjectList,onClose:()=>e.visiableMusic=!1,onGetList:S},null)]}),t(oe,{blockScroll:!0,show:e.musicPreview,"onUpdate:show":i=>e.musicPreview=i,preset:"card",showIcon:!1,title:"\u66F2\u76EE\u9884\u89C8",class:Je.musicPreviewModal,"mask-closable":!1},{default:()=>[t(Sa,{item:e.musicScore,scoreType:e.musicPreviewScoreType},null)]}),t(oe,{blockScroll:!0,show:e.showUseProject,"onUpdate:show":i=>e.showUseProject=i,preset:"dialog",showIcon:!1,title:"\u9002\u7528\u9879\u76EE",style:{width:"1200px"}},{default:()=>[t(nt,{id:e.showUseProjectId,useProject:e.useProjectData,onClose:()=>e.showUseProject=!1,onGetList:S},null)]}),t(oe,{class:Je.productModal,title:"\u81EA\u52A8\u751F\u6210\u66F2\u8C31\u56FE\u7247",show:e.productOpen,"onUpdate:show":i=>e.productOpen=i,preset:"dialog",closeOnEsc:!1,maskClosable:!1,showIcon:!1},{default:()=>[t(rt,{xmlFileUrl:e.productItem.xmlFileUrl,onClose:()=>e.productOpen=!1,onConfirm:i=>B(this,null,function*(){try{yield It(Q(G({},i),{id:e.productItem.id}))}catch(T){}})},null)]}),e.beatTimeOpen&&t(ot,{id:e.productItem.id,onClose:()=>{e.beatTimeOpen=!1}},null)])}}),ka="_instrumentSave_1gfcu_1",xa="_updateFile_1gfcu_5",Fa={instrumentSave:ka,updateFile:xa},La=se({emits:["close","getList"],props:["activeRow","saveMode","list"],name:"save-categroy-dialog",setup(u,{emit:k}){const d=ne(),l=H(),e=H([{name:"\u9876\u7EA7\u5206\u7C7B",id:0},...ut(u.list,"musicSheetCategoriesList")]),a=ee({loading:!1,dataList:[],btnLoading:!1,options:{enlarge:2,autoCropWidth:350,autoCropHeight:140},messageTip:"\u8BF7\u4E0A\u4F20\u5C3A\u5BF8\u4E3A700*280\u5927\u5C0F5M\u4EE5\u5185\u7684JPG\u3001PNG\u56FE\u7247"}),h=ee({id:"",name:"",coverImg:"",enable:!0,parentId:"0"}),x=()=>B(this,null,function*(){var y;(y=l.value)==null||y.validate(F=>B(this,null,function*(){if(!F){a.btnLoading=!0;try{if(u.saveMode==="add"){const{data:P}=yield Ft(G({},h));k("getList"),d.success("\u6DFB\u52A0\u6210\u529F")}else{const{data:P}=yield Lt(G({},h));k("getList"),d.success("\u4FEE\u6539\u6210\u529F")}}catch(P){}a.btnLoading=!1}}))});return ce(()=>{if(u.saveMode==="add")u.activeRow&&u.activeRow.id&&(h.parentId=(u==null?void 0:u.activeRow.id)+"");else{for(let y in u==null?void 0:u.activeRow)h[y]=u==null?void 0:u.activeRow[y];(u==null?void 0:u.activeRow.currentLevel)>1&&(a.options.autoCropWidth=210,a.options.autoCropHeight=268,a.messageTip="\u8BF7\u4E0A\u4F20\u5C3A\u5BF8\u4E3A210*268\u5927\u5C0F5M\u4EE5\u5185\u7684JPG\u3001PNG\u56FE\u7247")}}),()=>t("div",null,[t(Ae,{ref:l,model:h},{default:()=>[u.saveMode==="add"&&u.activeRow&&t(I,{label:"\u7236\u7EA7\u5206\u7C7B",path:"parentId"},{default:()=>[t(Pe,{placeholder:"\u8BF7\u9009\u62E9\u7236\u7EA7\u5206\u7C7B",value:h.parentId,"onUpdate:value":y=>h.parentId=y,options:e.value,checkStrategy:"all",expandTrigger:"hover",childrenField:"musicSheetCategoriesList",valueField:"id",labelField:"name",disabled:!0},null)]}),t(I,{label:"\u5206\u7C7B\u540D\u79F0",rule:[{required:!0,message:"\u8BF7\u8F93\u5165\u5206\u7C7B\u540D\u79F0",trigger:["blur","input"]}],path:"name"},{default:()=>[t(ue,{value:h.name,"onUpdate:value":y=>h.name=y,placeholder:"\u8BF7\u8F93\u5165\u5206\u7C7B\u540D\u79F0",maxlength:25,showCount:!0,clearable:!0},null)]}),t(I,{label:"\u5C01\u9762\u56FE",path:"coverImg",rule:[{required:!0,message:"\u8BF7\u4E0A\u4F20\u5C01\u9762\u56FE",trigger:["input","blur"]}]},{default:()=>[t(te,{fileList:h.coverImg,"onUpdate:fileList":y=>h.coverImg=y,accept:".jpg,.jpeg,.png",cropper:!0,size:5,class:Fa.updateFile,bucketName:"news-info",options:a.options,tips:a.messageTip},null)]})]}),t(Z,{justify:"end"},{default:()=>[t(O,{type:"default",onClick:()=>k("close")},{default:()=>[m("\u53D6\u6D88")]}),t(O,{type:"primary",onClick:()=>x(),loading:a.btnLoading,disabled:a.btnLoading},{default:()=>[m("\u786E\u8BA4")]})]})])}}),Ca=se({emits:["setTabName","jump"],name:"music-category",setup(u,{slots:k,attrs:d,emit:l}){const e=ee({loading:!1,pagination:{page:1,rows:10},dataList:[],showSaveDialog:!1,saveMode:"add",saveRowData:null}),a=Ne(),h=ne(),x=()=>B(this,null,function*(){try{e.loading=!0;const c={page:e.pagination.page,rows:e.pagination.rows},{data:b}=yield Ue(c);e.dataList=b||[]}catch(c){}e.loading=!1});ce(()=>{x()});const y=c=>{l("jump",c)},F=()=>[{title:"\u5206\u7C7B\u540D\u79F0",key:"id",render(c){return c.name+"("+c.id+")"}},{title:"\u66F2\u76EE\u6570\u91CF",key:"musicSheetNum",render(c){return t("div",null,[t(O,{type:"primary",size:"small",text:!0,onClick:()=>{y({tabName:"MusicList",musicCategoryId:c.id})}},{default:()=>[c.musicSheetNum]})])}},{title:"\u6700\u540E\u66F4\u65B0\u65F6\u95F4",key:"updateTime"},{title:"\u66F4\u65B0\u4EBA",key:"operatorName"},{title:"\u64CD\u4F5C",key:"operation",fixed:"right",render(c){return t(Z,null,{default:()=>[X(t(O,{type:"error",size:"small",text:!0,onClick:()=>S(c)},{default:()=>[m("\u5220\u9664")]}),[[$("auth"),"musicSheetCategories/remove1751239397398806530"]]),X(t(O,{type:"primary",size:"small",text:!0,onClick:()=>{e.saveRowData=c,e.saveMode="edit",e.showSaveDialog=!0}},{default:()=>[m("\u4FEE\u6539")]}),[[$("auth"),"musicSheetCategories/update1751239533856292866"]]),c.currentLevel<4&&X(t(O,{type:"primary",size:"small",text:!0,onClick:()=>{e.saveRowData=c,e.showSaveDialog=!0,e.saveMode="add"}},{default:()=>[m("\u6DFB\u52A0\u5B50\u5206\u7C7B")]}),[[$("auth"),"musicSheetCategories/save1751239479284203521"]])]})}}],P=()=>{e.pagination.page=1,x()},S=c=>B(this,null,function*(){a.warning({title:"\u63D0\u793A",content:"\u662F\u5426\u786E\u8BA4\u5220\u9664'"+c.name+"'?",positiveText:"\u786E\u5B9A",negativeText:"\u53D6\u6D88",onPositiveClick:()=>B(this,null,function*(){(yield Ct(c.id)).data&&(P(),h.success("\u5220\u9664\u6210\u529F"))})})});return()=>t("div",{class:"system-menu-container"},[t("div",{class:["section-container"]},[t(Z,{style:{paddingBottom:"12px"}},{default:()=>[X(t(O,{type:"primary",onClick:()=>{e.saveMode="add",e.showSaveDialog=!0,e.saveRowData=null}},{default:()=>[m("\u65B0\u589E\u5206\u7C7B")]}),[[$("auth"),"musicSheetCategories/save1751239479284203521"]])]}),t(xe,{loading:e.loading,columns:F(),data:e.dataList,rowKey:c=>c.id,childrenKey:"musicSheetCategoriesList"},null)]),t(oe,{show:e.showSaveDialog,"onUpdate:show":c=>e.showSaveDialog=c,preset:"dialog",showIcon:!1,title:e.saveRowData?"\u4FEE\u6539\u5206\u7C7B":"\u65B0\u589E\u5206\u7C7B",style:{width:"600px"}},{default:()=>[t(La,{onGetList:()=>{e.showSaveDialog=!1,x()},onClose:()=>{e.showSaveDialog=!1},list:e.dataList,saveMode:e.saveMode,activeRow:e.saveRowData},null)]})])}}),ll=se({name:"music-sheet",setup(){const u=ee({tabName:"MusicList",searchId:null,musicCategoryId:null}),k=_t();Xt(e=>{e.form.tabName&&(u.tabName=e.form.tabName)});const d=e=>{console.log("setTabName",e),u.tabName=e.tabName,u.searchId=e.id},l=e=>{$t(e,"tabName",k)};return()=>t("div",{class:"system-menu-container"},[t("div",{class:["section-container"],style:"padding-top: 0"},[t(Ot,{type:"line",size:"large",value:u.tabName,"onUpdate:value":[e=>u.tabName=e,e=>l(e)]},{default:()=>[X(t(Ye,{name:"MusicList",tab:"\u66F2\u76EE\u5217\u8868"},{default:()=>[t(Ia,{searchId:u.searchId,musicCategoryId:u.musicCategoryId},null)]}),[[$("auth"),"musicSheet/page1751238894313013249"]]),X(t(Ye,{name:"CategroryList",tab:"\u66F2\u76EE\u5206\u7C7B"},{default:()=>[t(Ca,{onSetTabName:d,onJump:e=>{u.tabName=e.tabName,u.musicCategoryId=e.musicCategoryId}},null)]}),[[$("auth"),"musicSheetCategories/queryTree1751238805699952641"]])]})])])}});export{ll as default};