index.7a500504.js 59 KB

1234567891011121314151617181920212223242526272829
  1. var Xe=Object.defineProperty,He=Object.defineProperties;var We=Object.getOwnPropertyDescriptors;var we=Object.getOwnPropertySymbols;var Ye=Object.prototype.hasOwnProperty,Qe=Object.prototype.propertyIsEnumerable;var Le=(i,y,d)=>y in i?Xe(i,y,{enumerable:!0,configurable:!0,writable:!0,value:d}):i[y]=d,D=(i,y)=>{for(var d in y||(y={}))Ye.call(y,d)&&Le(i,d,y[d]);if(we)for(var d of we(y))Qe.call(y,d)&&Le(i,d,y[d]);return i},$=(i,y)=>He(i,We(y));var x=(i,y,d)=>new Promise((p,e)=>{var l=b=>{try{I(d.next(b))}catch(n){e(n)}},S=b=>{try{I(d.throw(b))}catch(n){e(n)}},I=b=>b.done?p(b.value):Promise.resolve(b.value).then(l,S);I((d=d.apply(i,y)).next())});import{S as Ae}from"./index.a45fcbc1.js";import{P as je}from"./index.5d4cf042.js";import{m as Oe,a as ge,b as Pe,c as Ce,d as Ze,M as et,e as tt,f as xe,g as at,h as st,i as lt,j as it,k as ut,l as rt}from"./musicUtil.bc788d33.js";import{g as ot,o as nt,U as le}from"./index.d49b260f.js";import{cj as ct,cG as dt,d as W,cI as pt,cJ as Be,F as ae,cP as mt,bi as Fe,dx as ht,dy as ke,a as K,u as ee,r as H,B as te,dj as me,i as t,l as U,ce as z,aj as ue,_ as X,a9 as q,p as k,k as g,cg as ne,bx as ft,ai as ye,dz as gt,dk as Re,q as Se,di as ce,ac as B,a8 as Q,a7 as O,db as yt,ad as re,dA as _e,m as ze,ag as de,aa as Z,bn as be,U as St,M as bt,H as R,ae as vt,ch as It,d9 as J,da as oe,bC as _,a0 as wt,e as Lt,d7 as Ct,d8 as Te}from"./index.19a1245a.js";import{B as ve,D as he,c as xt,E as Ne}from"./constant.ded25e36.js";import{g as fe,a as Ft}from"./objectUtil.ec24ceed.js";import{c as kt}from"./api.d4c0c613.js";import{y as qe}from"./api.fb79cc90.js";import{s as Ke}from"./api.7c1eb1f9.js";import{f as Ge}from"./index.428eed63.js";import{N}from"./FormItemGridItem.2f1a4748.js";import{N as Ie}from"./Cascader.a9820484.js";import{g as Ue}from"./filters.de6e9e5f.js";import{T as ie}from"./index.c5e1a3ae.js";import{g as Tt,s as Nt}from"./use-async.882f6608.js";import"./searchs.b637f0d6.js";import"./api.c178af47.js";import"./vuedraggable.umd.94f9b3c3.js";import"./DeleteFilled.e004cc30.js";import"./api.4932de8b.js";import"./searchArray.c8aafeb3.js";import"./knowledgeTypeData.3b15dd0b.js";import"./dateUtil.54572396.js";import"./dayjs.min.c841388e.js";const Ut=ct("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. `,[dt("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. `)]),Mt=Object.assign(Object.assign({},Be.props),{size:{type:String,default:"medium"},bordered:{type:Boolean,default:void 0}}),Me=W({name:"InputGroupLabel",props:Mt,setup(i){const{mergedBorderedRef:y,mergedClsPrefixRef:d,inlineThemeDisabled:p}=pt(i),e=Be("Input","-input-group-label",Ut,ht,i,d),l=ae(()=>{const{size:I}=i,{common:{cubicBezierEaseInOut:b},self:{groupLabelColor:n,borderRadius:f,groupLabelTextColor:r,lineHeight:u,groupLabelBorder:h,[ke("fontSize",I)]:T,[ke("height",I)]:v}}=e.value;return{"--n-bezier":b,"--n-group-label-color":n,"--n-group-label-border":h,"--n-border-radius":f,"--n-group-label-text-color":r,"--n-font-size":T,"--n-line-height":u,"--n-height":v}}),S=p?mt("input-group-label",ae(()=>i.size[0]),l,i):void 0;return{mergedClsPrefix:d,mergedBordered:y,cssVars:p?void 0:l,themeClass:S==null?void 0:S.themeClass,onRender:S==null?void 0:S.onRender}},render(){var i,y,d;const{mergedClsPrefix:p}=this;return(i=this.onRender)===null||i===void 0||i.call(this),Fe("div",{class:[`${p}-input-group-label`,this.themeClass],style:this.cssVars},(d=(y=this.$slots).default)===null||d===void 0?void 0:d.call(y),this.mergedBordered?Fe("div",{class:`${p}-input-group-label__border`}):null)}}),Et="_audioSection_o5wty_1",Dt="_btnRemove_o5wty_9",At="_formContainer_o5wty_14",jt="_productModal_o5wty_19",Ot="_productIframe_o5wty_27",se={audioSection:Et,btnRemove:Dt,formContainer:At,productModal:jt,productIframe:Ot},Pt=W({name:"musicSheetOwnerDialog",props:{musicSheetExtend:{type:Object,default:()=>{}},sourceType:{type:String,required:!0},appData:{type:Array,required:!0,default:[]}},emits:["close","getList","choseMusicSheetOwnerData"],setup(i,{slots:y,attrs:d,emit:p}){const e=K({loading:!1,pagination:{page:1,rows:10,pageTotal:0},searchForm:{applicationId:null,name:null,sourceType:null},dataList:[],appData:[]}),l=ee(),S=H(),I=()=>{e.pagination.page=1,n()},b=()=>{var u;(u=S.value)==null||u.submit()},n=()=>x(this,null,function*(){try{e.searchForm.applicationId||l.warning("\u83B7\u53D6\u5E94\u7528\u5217\u8868\u5931\u8D25"),e.loading=!0,e.searchForm.sourceType=i.sourceType;const{data:h}=yield Oe(D(D({},e.pagination),e.searchForm));e.pagination.pageTotal=Number(h.total),e.dataList=h.rows||[]}catch(u){}e.loading=!1});te(()=>x(this,null,function*(){{if(e.appData=me(i.appData),e.appData.length==0){l.warning("\u83B7\u53D6\u5E94\u7528\u5217\u8868\u5931\u8D25");return}i.musicSheetExtend&&i.musicSheetExtend.applicationId?e.searchForm.applicationId=i.musicSheetExtend.applicationId:e.searchForm.applicationId=e.appData[0].value,e.searchForm.name=null}n()}));const f=()=>e.searchForm.sourceType==="ORG"?[{title:"\u673A\u6784\u540D\u79F0",key:"orgName"},{title:"\u64CD\u4F5C",key:"operation",fixed:"right",render(u){return t(q,null,{default:()=>[t(k,{type:"primary",size:"small",text:!0,onClick:()=>{const h=$(D({},u),{applicationId:e.searchForm.applicationId});p("choseMusicSheetOwnerData",h),p("close")}},{default:()=>[g("\u9009\u62E9")]})]})}}]:[{title:"\u4EBA\u5458\u540D\u79F0",key:"userName"},{title:"\u624B\u673A\u53F7",key:"phone"},{title:"\u64CD\u4F5C",key:"operation",fixed:"right",render(u){return t(q,null,{default:()=>[t(k,{type:"primary",size:"small",text:!0,onClick:()=>{const h=$(D({},u),{applicationId:e.searchForm.applicationId});p("choseMusicSheetOwnerData",h),p("close")}},{default:()=>[g("\u9009\u62E9")]})]})}}],r=()=>[{title:"\u673A\u6784\u540D\u79F0",key:"organizationRole"},{title:"\u64CD\u4F5C",key:"operation",fixed:"right",render(u){return t(q,null,{default:()=>[t(k,{type:"primary",size:"small",text:!0,onClick:()=>{const h=$(D({},u),{applicationId:e.searchForm.applicationId});p("choseMusicSheetOwnerData",h),p("close")}},{default:()=>[g("\u9009\u62E9")]})]})}}];return()=>t("div",{class:"system-menu-container"},[t(Ae,{ref:S,model:e.searchForm,onSubmit:I,onSetModel:u=>e.searchForm=u},{default:()=>[t(U,{label:"\u5E94\u7528",path:"applicationId",size:"small",style:"width:250px"},{default:()=>[t(z,{placeholder:"\u8BF7\u9009\u62E9\u9002\u7528\u9879\u76EE",value:e.searchForm.applicationId,"onUpdate:value":u=>e.searchForm.applicationId=u,options:e.appData},null)]}),e.searchForm.sourceType==="PERSON"&&t(ue,null,[t(U,{label:"\u6240\u5C5E\u4EBA",path:"name",size:"small",style:"width:250px"},{default:()=>[t(X,{placeholder:"\u8BF7\u8F93\u5165\u6240\u5C5E\u4EBA/\u624B\u673A\u53F7",value:e.searchForm.name,"onUpdate:value":u=>e.searchForm.name=u,clearable:!0},null)]})]),e.searchForm.sourceType==="ORG"&&t(ue,null,[t(U,{label:"\u673A\u6784\u540D\u79F0",path:"name",size:"small",style:"width:250px"},{default:()=>[t(X,{placeholder:"\u8BF7\u8F93\u5165\u673A\u6784\u540D\u79F0",value:e.searchForm.name,"onUpdate:value":u=>e.searchForm.name=u,clearable:!0},null)]})]),t(U,{size:"small"},{default:()=>[t(q,null,{default:()=>[t(k,{type:"primary",onClick:b},{default:()=>[g("\u641C\u7D22")]})]})]})]}),t("div",{class:["section-container"]},[i.sourceType==="PERSON"&&t(ne,{loading:e.loading,columns:f(),data:e.dataList},null),i.sourceType==="ORG"&&t(ne,{loading:e.loading,columns:r(),data:e.dataList},null),t(je,{page:e.pagination.page,"onUpdate:page":u=>e.pagination.page=u,pageSize:e.pagination.rows,"onUpdate:pageSize":u=>e.pagination.rows=u,pageTotal:e.pagination.pageTotal,"onUpdate:pageTotal":u=>e.pagination.pageTotal=u,onList:n,sync:!0,pageSlot:5},null)])])}}),$e="gyt",Ve="public-read",Bt=`https://${$e}.ks3-cn-beijing.ksyuncs.com/`,Rt=i=>x(void 0,null,function*(){const y={filename:i,bucketName:$e,postData:{filename:i,acl:Ve,key:i,unknowValueField:[]}},{data:d}=yield ot(y);return console.log(d),d}),_t=(i,y,d,p)=>x(void 0,null,function*(){const e={policy:i.policy,signature:i.signature,key:y,KSSAccessKeyId:i.kssAccessKeyId,acl:Ve,name:y,file:d};return yield nt(Bt,e)}),zt=(i,y)=>x(void 0,null,function*(){var l;const d=Date.now()+((l=i.name)==null?void 0:l.slice(i.name.lastIndexOf("."))),p=yield Rt(d);return yield _t(p,d,i)}),Je=W({name:"music-create-img",props:{xmlFileUrl:{type:String,default:""}},emits:["close","confirm"],setup(i,{emit:y}){const d=ee(),p=K({productOpen:!1,productIfameSrc:""}),e=K({musicImg:"",musicFirstImg:"",musicJianImg:""}),l=()=>{if(!i.xmlFileUrl){d.error("\u8BF7\u5148\u4E0A\u4F20XML");return}const n={dev:"https://dev.kt.colexiu.com",test:"https://test.lexiaoya.cn",online:"https://kt.colexiu.com"},f=location.origin.includes("//dev")?"dev":location.origin.includes("//test")?"test":location.origin.includes("//online")?"online":"dev",r=n[f],u=/(localhost|192)/.test(location.host)?"https://dev.kt.colexiu.com":r,h=encodeURIComponent(i.xmlFileUrl);p.productIfameSrc=u+`/instrument/#/product-img?xmlUrl=${h}&isCreateImg=true&isCbs=true`},S=n=>{const f=n.data;if((f==null?void 0:f.api)==="webApi_renderSvg"){let r=[];try{r=JSON.parse(f.product)}catch(u){console.log("\u{1F680} ~ error:",u)}r=r.filter(u=>u.base64),r.length===3?(d.success("\u751F\u6210\u6210\u529F"),I(r)):d.error("\u751F\u6210\u5931\u8D25")}},I=n=>x(this,null,function*(){var f,r,u;for(let h=0;h<n.length;h++){const T=b(n[h].base64,`${Date.now()}p${h}.png`);n[h].url=yield zt(T)}e.musicImg=((f=n[0])==null?void 0:f.url)||"",e.musicFirstImg=((r=n[1])==null?void 0:r.url)||"",e.musicJianImg=((u=n[2])==null?void 0:u.url)||"",n=[],y("close"),y("confirm",e)}),b=(n,f)=>{var C;let r=n.split(",")||[],u=(C=r[0].match(/:(.*?);/))==null?void 0:C[1],h=atob(r[1]),T=h.length,v=new Uint8Array(T);for(;T--;)v[T]=h.charCodeAt(T);return new File([v],f,{type:u})};return te(()=>{l(),window.addEventListener("message",S)}),ft(()=>{window.removeEventListener("message",S)}),()=>t("iframe",{class:se.productIframe,src:p.productIfameSrc},null)}});function Ee(i){return typeof i=="function"||Object.prototype.toString.call(i)==="[object Object]"&&!be(i)}const qt=(i,y)=>{var I;let d=0;const p=i.closest(y);let e=p;const l=p==null?void 0:p.closest("measure");let S=null;for(;!S&&d<((l==null?void 0:l.childNodes.length)||50);)d++,((I=e==null?void 0:e.nextElementSibling)==null?void 0:I.tagName)==="note"&&(S=e==null?void 0:e.nextElementSibling),e=e==null?void 0:e.nextElementSibling;return S},Kt=(i,y)=>{var S,I;if(!i)return"";const d=new DOMParser().parseFromString(i,"text/xml"),p=((I=(S=d.getElementsByTagName("part-list"))==null?void 0:S[0])==null?void 0:I.getElementsByTagName("score-part"))||[],e=d.getElementsByTagName("part"),l=p[y];if(l){const b=l.getAttribute("id");Array.from(e).forEach(r=>{var u,h,T;if(r&&r.getAttribute("id")!==b&&((u=r.parentNode)==null||u.removeChild(r)),r&&r.getAttribute("id")===b){const v=r.getElementsByTagName("barline"),C=(h=v[v.length-1])==null?void 0:h.parentElement;if(((T=C==null?void 0:C.lastElementChild)==null?void 0:T.tagName)!=="barline"){const G=(C==null?void 0:C.children)||[];for(let P of G)if(P.tagName==="barline"){C==null||C.appendChild(P);break}}}}),Array.from(p).forEach(r=>{var u;r&&r.getAttribute("id")!==b&&((u=r.parentNode)==null||u.removeChild(r))});const n=d.getElementsByTagName("note"),f=r=>{var h;let u=n[r+1];for(let T=r;T<n.length;T++){const v=n[T];if(!((h=v.getElementsByTagName("grace"))!=null&&h.length)){u=v;break}}return u==null?void 0:u.getElementsByTagName("duration")[0]};Array.from(n).forEach((r,u)=>{var T;const h=r.getElementsByTagName("grace");h&&h.length&&r.appendChild((T=f(u))==null?void 0:T.cloneNode(!0))})}return new XMLSerializer().serializeToString(d)},Gt={"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 De(i){var r,u,h,T;const y=Kt(i,0),d=new DOMParser().parseFromString(y,"text/xml"),p=Array.from(d.querySelectorAll("measure")),e=Array.from(d.querySelectorAll("note")),l=Array.from(d.querySelectorAll("words")),S=Array.from(d.querySelectorAll("metronome")),I=[];for(const v of[...l,...S]){const C=qt(v,"direction");if(C){const G=C==null?void 0:C.closest("measure"),P=Array.from(G.querySelectorAll("note")),V=Array.from(G.childNodes).filter(c=>c.nodeName==="note").findIndex(c=>c===C);let s=0,F=0;for(let c=0;c<P.length;c++){const a=+(((r=P[c].querySelector("duration"))==null?void 0:r.textContent)||"0");s+=a,c<V&&(F=s)}I.push({ele:v,index:e.indexOf(C),noteInMeasureIndex:V,textContent:v.textContent,measureIndex:p.indexOf(G),type:v.tagName,allDuration:s,leftDuration:F})}}I.push({ele:e[e.length-1],index:e.length,noteInMeasureIndex:0,textContent:"",type:"metronome",allDuration:1,leftDuration:1,measureIndex:p.length});const b=[];I.sort((v,C)=>v.index-C.index);const n=Object.keys(Gt).map(v=>v.toLocaleLowerCase());let f=!1;for(const v of I){const C=(u=v.textContent)==null?void 0:u.toLocaleLowerCase().trim();v===I[I.length-1]&&((h=b[b.length-1])==null?void 0:h.length)===1&&(f=!0);const G=n.find(P=>{const V=P.split(" ");return C&&V.includes(C)});if(v.type==="metronome"||v.type==="words"&&(C.startsWith("a tempo")||G)||f){const P=b.findIndex(V=>V.length===1);P>-1&&v.index>((T=b[P])==null?void 0:T[0].start)&&(b[P][1]={start:v.index,measureIndex:v.measureIndex,noteInMeasureIndex:v.noteInMeasureIndex,allDuration:v.allDuration,leftDuration:v.leftDuration,type:C})}v.type==="words"&&G&&b.push([{start:v.index,measureIndex:v.measureIndex,noteInMeasureIndex:v.noteInMeasureIndex,allDuration:v.allDuration,leftDuration:v.leftDuration,type:C}])}return b}const $t=W({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(i,{slots:y,attrs:d,emit:p}){const e=K({graduals:{},playMode:"MP3",xmlFileUrl:null,midiUrl:null,name:null,composer:null,playSpeed:null,musicCover:null,remark:null,musicSheetSoundList:[],status:!1,musicSheetType:"SINGLE",sourceType:null,appAuditFlag:0,midiFileUrl:null,subjectIds:[],musicalInstrumentIdList:[],musicCategoryId:null,musicSheetAccompanimentList:[],audioType:"HOMEMODE",isPlayBeat:!0,isUseSystemBeat:!0,repeatedBeats:!1,evaluationStandard:"FREQUENCY",multiTracksSelection:[],musicSheetExtend:{},musicImg:"",musicFirstImg:"",musicJianImg:""}),l=K({loading:!1,previewMode:!1,tagList:[...i.tagList],xmlFirstSpeed:null,partListNames:[],musicSheetCategories:[],musicSheetAccompanimentUrls:"",musicSheetAccompanimentUrlList:[],instrumentData:[],instrumentList:[],subjectList:[],showMusicSheetOwnerDialog:!1,multiTracks:null,appData:[],ownerName:null,productOpen:!1,productItem:{},productIfameSrc:"",isAutoSave:!1}),S=K({list:[],gradualRefs:[]}),I=H(!1),b=H(),n=ee(),f=ye(),r=()=>x(this,null,function*(){b.value.validate(c=>x(this,null,function*(){if(!c){if(!l.isAutoSave){l.isAutoSave=!0,l.productOpen=!0;return}try{const o=$(D({},e),{musicTag:"-1",multiTracksSelection:e.multiTracksSelection.join(","),musicSheetSoundList:e.musicSheetSoundList.filter(a=>!!a.audioFileUrl&&e.multiTracksSelection.includes(a.track)),musicalInstrumentIds:e.musicalInstrumentIdList.join(","),extConfigJson:JSON.stringify({repeatedBeats:e.repeatedBeats?1:0,gradualTimes:e.graduals}),subjectIds:e.subjectIds.join(",")});e.audioType=="MIDI"&&(o.musicSheetSoundList=[]),I.value=!0,i.type==="add"?(yield Ce(o),n.success("\u6DFB\u52A0\u6210\u529F")):i.type==="edit"&&(yield Ce($(D({},o),{id:i.data.id})),n.success("\u4FEE\u6539\u6210\u529F")),p("getList"),p("close")}catch(o){console.log(o)}setTimeout(()=>{I.value=!1},100)}}))}),u=c=>{const o=new FileReader;o.onload=a=>{var m,L,M;try{S.list=De((m=a==null?void 0:a.target)==null?void 0:m.result).filter(w=>w.length===2)}catch(w){}l.partListNames=v((L=a==null?void 0:a.target)==null?void 0:L.result),T((M=a==null?void 0:a.target)==null?void 0:M.result);for(let w=0;w<l.partListNames.length;w++)e.musicSheetSoundList[w]||e.musicSheetSoundList.push({audioFileUrl:null,track:null}),e.musicSheetSoundList[w].track=l.partListNames[w].value;for(let w=e.musicSheetSoundList.length;w<l.partListNames.length;w++){const E=l.partListNames[w].value,A=$(D({},e.musicSheetSoundList[0]),{track:E});A.speed||(A.speed=l.xmlFirstSpeed),P(A)}e.musicSheetSoundList.length==0&&e.musicSheetSoundList.push({audioFileUrl:"",track:""})},o.readAsText(c)},h=c=>{for(let o=0;o<l.partListNames.length;o++)if(l.partListNames[o].value==c)return!0;return!1},T=c=>{var M,w;if(!c)return;const o=new DOMParser().parseFromString(c,"text/xml"),a=[],m=o.getElementsByTagName("virtual-instrument");for(let E=0;E<m.length;E++){const j=((w=(M=m[E].getElementsByTagName("virtual-name"))==null?void 0:M[0])==null?void 0:w.textContent)||"";j&&!a.includes(j)&&a.push(j)}const L=new Map;l.instrumentData.forEach(E=>{E.code.split(/,|,/).forEach(j=>{if(L.has(j))L.get(j).push(E.id+"");else{const Y=[];Y.push(E.id+""),L.set(j,Y)}})}),e.musicalInstrumentIdList=[],a.forEach(E=>{L.has(E)&&L.get(E).forEach(A=>{e.musicalInstrumentIdList.push(A)})}),e.musicalInstrumentIdList.length>0&&G(e.musicalInstrumentIdList)},v=c=>{var L,M,w,E;if(!c)return[];const o=new DOMParser().parseFromString(c,"text/xml"),a=((M=(L=o.getElementsByTagName("part-list"))==null?void 0:L[0])==null?void 0:M.getElementsByTagName("score-part"))||[];let m=Array.from(a).map(A=>{var Y;const j=((Y=A.getElementsByTagName("part-name"))==null?void 0:Y[0].textContent)||"";return{value:j,label:j}});return m=m.filter(A=>{var j,Y;return((Y=(j=A.value)==null?void 0:j.toLocaleUpperCase)==null?void 0:Y.call(j))!="COMMON"}),m.length>0&&(e.musicSheetSoundList=e.musicSheetSoundList.slice(0,m.length)),l.xmlFirstSpeed=((E=(w=o.getElementsByTagName("per-minute"))==null?void 0:w[0])==null?void 0:E.textContent)||"",e.playSpeed||(l.xmlFirstSpeed?e.playSpeed=Number.parseInt(l.xmlFirstSpeed):e.playSpeed=100),m},C=c=>{const o=me(l.partListNames)||[],a=e.multiTracksSelection;return o.forEach(m=>{a.includes(m.value)?m.disabled=!0:m.disabled=!1}),o||[]},G=c=>x(this,null,function*(){try{const{data:o}=yield qe({page:1,rows:999,musicalInstrumentIdList:c});(o.rows||[]).forEach(m=>{e.subjectIds.push(m.id+"")})}catch(o){}}),P=c=>{e.musicSheetSoundList.push(D({audioFileUrl:null,track:null},c))},V=c=>{f.warning({title:"\u63D0\u793A",content:"\u662F\u5426\u786E\u8BA4\u5220\u9664\u6B64\u539F\u97F3\uFF1F",positiveText:"\u786E\u5B9A",negativeText:"\u53D6\u6D88",onPositiveClick:()=>x(this,null,function*(){const a=e.musicSheetSoundList[c].track;if(a){const m=e.multiTracksSelection.indexOf(a);m>-1&&e.multiTracksSelection.splice(m,1)}else e.musicSheetSoundList.splice(c,1)})})},s=c=>{!c||(c==="all"?(e.multiTracksSelection=[],l.partListNames.forEach(o=>{e.multiTracksSelection.push(o.value)})):c==="invert"?l.partListNames.forEach(o=>{const a=e.multiTracksSelection.indexOf(o.value);a>-1?e.multiTracksSelection.splice(a,1):e.multiTracksSelection.push(o.value)}):c==="allUncheck"&&(e.multiTracksSelection=[]))},F=()=>{var a;if(e.sourceType=="PLATFORM"){l.ownerName="";return}if(!e.musicSheetExtend||!e.sourceType||!((a=e.musicSheetExtend)!=null&&a.userId))return;const c=e.musicSheetExtend.applicationId,o=l.appData.filter(m=>m.id==c);o.length>0&&(l.ownerName=o[0].appName),e.sourceType=="ORG"?l.ownerName+="-"+e.musicSheetExtend.organizationRole:e.sourceType=="PERSON"&&(l.ownerName+="-"+Ft(e.musicSheetExtend.clientType,new Map(Object.entries(xt))),e.musicSheetExtend.userName&&(l.ownerName+="-"+e.musicSheetExtend.userName),e.musicSheetExtend.phone&&(l.ownerName+="("+e.musicSheetExtend.phone+")"))};return te(()=>x(this,null,function*(){var c;l.loading=!0,i.type==="preview"&&(l.previewMode=!0);{if(l.instrumentList&&l.instrumentList.length>0)return;try{const{data:o}=yield kt({page:1,rows:999}),a=o.rows||[];l.instrumentData=a,a.forEach(m=>{m.label=m.name,m.value=m.id+"",m.disabled=!m.enableFlag}),l.instrumentList=a}catch(o){}}l.subjectList=me(i.subjectList),l.subjectList.forEach(o=>{o.disabled=!o.enableFlag});{const o=Object.keys(ve),{data:a}=yield Ke({page:1,rows:999,parentId:0}),L=(a.rows||[]).filter(M=>o.includes(M.appKey));L.forEach(M=>{M.label=M.appName,M.value=M.id}),l.appData=L}try{const{data:o}=yield ge({enable:!0});l.musicSheetCategories=Ge(o,"musicSheetCategoriesList")}catch(o){}if(i.type==="edit"||i.type==="preview"){const o=i.data;try{const{data:a}=yield Pe({id:o.id});e.playMode=a.playMode,e.xmlFileUrl=a.xmlFileUrl,e.midiUrl=a.midiUrl,e.name=a.name,e.composer=a.composer,e.playSpeed=a.playSpeed,e.musicCover=a.musicCover,e.remark=a.remark,e.status=a.status,e.musicSheetType=a.musicSheetType||"SINGLE",e.sourceType=a.sourceType,e.appAuditFlag=a.appAuditFlag?1:0,e.midiFileUrl=a.midiFileUrl,e.subjectIds=[],a.subjectIds&&(a.subjectIds.split(",")||[]).forEach(L=>{e.subjectIds.includes(L)||e.subjectIds.push(L)}),e.musicalInstrumentIdList=a.musicalInstrumentIds?a.musicalInstrumentIds.split(","):[],e.musicCategoryId=a.musicCategoryId,(c=a.musicSheetAccompanimentList)==null||c.forEach(m=>{l.musicSheetAccompanimentUrlList.push(m.audioFileUrl)}),e.musicSheetAccompanimentList=a.musicSheetAccompanimentList,e.audioType=a.audioType,e.isPlayBeat=a.isPlayBeat,e.isUseSystemBeat=a.isUseSystemBeat;try{const m=a.extConfigJson?JSON.parse(a.extConfigJson):{};e.graduals=m.gradualTimes||{},e.repeatedBeats=!!m.repeatedBeats}catch(m){}e.evaluationStandard=a.evaluationStandard,e.musicSheetExtend=a.musicSheetExtend,F(),gt.get(a.xmlFileUrl).then(m=>{if(m!=null&&m.data){S.list=De(m==null?void 0:m.data).filter(w=>w.length===2),l.partListNames=v(m==null?void 0:m.data),e.multiTracksSelection=a.multiTracksSelection?a.multiTracksSelection.split(","):[];const L=a.musicSheetSoundList?a.musicSheetSoundList:[],M=[];l.partListNames.forEach(w=>{let E=null;L.forEach(A=>{A.track==w.value&&(E=A.audioFileUrl)}),e.musicSheetSoundList.push({audioFileUrl:E,track:w.value}),M.push(w.value)}),L.filter(w=>!M.includes(w.track)).forEach(w=>{e.musicSheetSoundList.push({audioFileUrl:w.audioFileUrl,track:w.track?w.track:null})})}})}catch(a){}}else l.subjectList=l.subjectList.filter(o=>o.enableFlag==!0),l.instrumentList=l.instrumentList.filter(o=>o.enableFlag==!0);l.loading=!1})),()=>{let c,o;return t("div",{style:"background: #fff; padding-top: 12px"},[t(Re,{show:l.loading},{default:()=>[t(Se,{class:se.formContainer,model:e,ref:b,"label-placement":"left","label-width":"150",disabled:l.previewMode},{default:()=>[t(ce,{showIcon:!1,style:{marginBottom:"12px"}},{default:()=>[g("\u66F2\u76EE\u4FE1\u606F")]}),t(B,{cols:2},{default:()=>[t(N,{label:"\u66F2\u76EE\u540D\u79F0",path:"name",rule:[{required:!0,message:"\u8BF7\u8F93\u5165\u66F2\u76EE\u540D\u79F0",trigger:["input","blur"]}]},{default:()=>[t(X,{value:e.name,"onUpdate:value":a=>e.name=a,placeholder:"\u8BF7\u8F93\u5165\u66F2\u76EE\u540D\u79F0",maxlength:50,showCount:!0},null)]}),t(N,{label:"\u97F3\u4E50\u4EBA",path:"composer",rule:[{required:!0,message:"\u8BF7\u8F93\u5165\u97F3\u4E50\u4EBA",trigger:["input","blur"]}]},{default:()=>[t(X,{value:e.composer,"onUpdate:value":a=>e.composer=a,placeholder:"\u8BF7\u8F93\u5165\u97F3\u4E50\u4EBA\u540D\u79F0",showCount:!0,maxlength:14},null)]})]}),t(B,{cols:2},{default:()=>[t(N,{label:"\u66F2\u76EE\u63CF\u8FF0",path:"remark"},{default:()=>[t(X,{placeholder:"\u8BF7\u8F93\u5165\u66F2\u76EE\u63CF\u8FF0",type:"textarea",rows:4,showCount:!0,maxlength:200,value:e.remark,"onUpdate:value":a=>e.remark=a},null)]}),t(N,{label:"\u66F2\u76EE\u5C01\u9762",path:"musicCover",rule:[{required:!0,message:"\u8BF7\u4E0A\u4F20\u66F2\u76EE\u5C01\u9762",trigger:["input","blur"]}]},{default:()=>[t(le,{desc:"\u5C01\u9762\u56FE",disabled:l.previewMode,accept:".jpg,.jpeg,.png",tips:"\u8BF7\u4E0A\u4F20\u5927\u5C0F1M\u4EE5\u5185\u7684JPG\u3001PNG\u56FE\u7247",size:1,fileList:e.musicCover,"onUpdate:fileList":a=>e.musicCover=a,cropper:!0,bucketName:"cbs",options:{autoCrop:!0,enlarge:2,autoCropWidth:200,fixedBox:!0,autoCropHeight:200,previewsCircle:!1,title:"\u66F2\u76EE\u5C01\u9762"}},null)]})]}),t(B,{cols:2},{default:()=>[t(N,{label:"\u4F5C\u8005\u5C5E\u6027",path:"sourceType",rule:[{required:!0,message:"\u8BF7\u9009\u62E9\u4F5C\u8005\u5C5E\u6027",trigger:"change"}]},{default:()=>[t(z,{value:e.sourceType,"onUpdate:value":a=>e.sourceType=a,options:fe(he),placeholder:"\u8BF7\u9009\u62E9\u4F5C\u8005\u5C5E\u6027",onUpdateValue:()=>{e.musicSheetExtend={},l.ownerName=null}},null)]}),e.sourceType==="PERSON"&&t(N,{label:"\u6240\u5C5E\u4EBA",path:"musicSheetExtend.userId",rule:[{required:!0,message:"\u8BF7\u9009\u62E9\u66F2\u76EE\u6240\u5C5E\u4EBA",trigger:["input","change"]}]},{default:()=>[t(k,{disabled:l.previewMode||!e.sourceType,type:"primary",size:"small",text:!0,onClick:()=>{l.showMusicSheetOwnerDialog=!0}},{default:()=>[l.ownerName?l.ownerName:"\u8BF7\u9009\u62E9\u6240\u5C5E\u4EBA"]})]}),e.sourceType==="ORG"&&t(N,{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(k,{disabled:l.previewMode||!e.sourceType,type:"primary",size:"small",text:!0,onClick:()=>{l.showMusicSheetOwnerDialog=!0}},{default:()=>[l.ownerName?l.ownerName:"\u8BF7\u9009\u62E9\u6240\u5C5E\u673A\u6784"]})]})]}),t(B,{cols:2},{default:()=>[t(N,{label:"\u5BA1\u6838\u7248\u672C",path:"appAuditFlag",rule:[{required:!0,message:"\u8BF7\u9009\u62E9\u5BA1\u6838\u7248\u672C",trigger:"change",type:"number"}]},{default:()=>[t(z,{options:[{label:"\u662F",value:1},{label:"\u5426",value:0}],value:e.appAuditFlag,"onUpdate:value":a=>e.appAuditFlag=a},null)]}),t(N,{label:"\u66F2\u76EE\u5206\u7C7B",path:"musicCategoryId",rule:[{required:!0,message:"\u8BF7\u9009\u62E9\u66F2\u76EE\u5206\u7C7B",trigger:["change"]}]},{default:()=>[t(Ie,{valueField:"id",labelField:"name","children-field":"musicSheetCategoriesList",placeholder:"\u8BF7\u9009\u62E9\u5206\u7C7B",value:e.musicCategoryId,"onUpdate:value":a=>e.musicCategoryId=a,options:l.musicSheetCategories,clearable:!0},null)]})]}),t(B,{cols:2},{default:()=>[t(N,{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(Q,{value:e.repeatedBeats,"onUpdate:value":a=>e.repeatedBeats=a},{default:()=>[t(O,{value:!0},{default:()=>[g("\u662F")]}),t(O,{value:!1},{default:()=>[g("\u5426")]})]})]}),t(N,{label:"\u8BC4\u5206\u6807\u51C6",path:"evaluationStandard",rule:[{required:!0}]},{default:()=>[t(Q,{value:e.evaluationStandard,"onUpdate:value":a=>e.evaluationStandard=a},{default:()=>[t(O,{value:"FREQUENCY"},{default:()=>[g("\u6807\u51C6\u8BC4\u6D4B")]}),t(O,{value:"AMPLITUDE"},{default:()=>[g("\u6253\u51FB\u4E50(\u632F\u5E45)")]}),t(O,{value:"DECIBELS"},{default:()=>[g("\u8282\u594F(\u5206\u8D1D)")]})]})]})]}),t(B,{cols:2},{default:()=>[t(N,{label:"\u901F\u5EA6",path:"playSpeed",rule:[{required:!1,message:"\u8BF7\u8F93\u5165\u901F\u5EA6"}]},{default:()=>[t(yt,{placeholder:"\u8BF7\u8F93\u5165\u901F\u5EA6",value:e.playSpeed,"onUpdate:value":a=>e.playSpeed=a,style:"width:100%"},null)]})]}),t(ce,{showIcon:!1,style:{marginBottom:"12px"}},{default:()=>[g("\u66F2\u76EE\u4E0A\u4F20")]}),t(B,{cols:2},{default:()=>[t(N,{label:"\u64AD\u653E\u6A21\u5F0F",path:"playMode",rule:[{required:!0,message:"\u8BF7\u9009\u62E9\u64AD\u653E\u6A21\u5F0F"}]},{default:()=>[t(Q,{value:e.playMode,"onUpdate:value":a=>e.playMode=a,onUpdateValue:a=>{a==="MP3"?e.playMode="MP3":e.playMode="MIDI"}},{default:()=>[t(O,{value:"MP3"},{default:()=>[g("MP3")]}),t(O,{value:"MIDI"},{default:()=>[g("MID")]})]})]}),e.playMode==="MP3"&&t(N,{label:"\u4F34\u594F\u7C7B\u578B",path:"audioType",rule:[{required:!0,message:"\u8BF7\u9009\u62E9\u4F34\u594F\u7C7B\u578B"}]},{default:()=>[t(Q,{value:e.audioType,"onUpdate:value":a=>e.audioType=a},{default:()=>[t(O,{value:"HOMEMODE"},{default:()=>[g("\u81EA\u5236\u4F34\u594F")]}),t(O,{value:"COMMON"},{default:()=>[g("\u666E\u901A\u4F34\u594F")]})]})]})]}),t(B,{cols:2},{default:()=>[e.playMode==="MP3"&&t(N,{label:"\u4E0A\u4F20\u4F34\u594F",path:"musicSheetAccompanimentList",rule:[{required:!1,message:"\u8BF7\u9009\u62E9\u4E0A\u4F20.mp3"}]},{default:()=>[t(le,{disabled:l.previewMode,size:10,imageList:l.musicSheetAccompanimentUrlList,"onUpdate:imageList":a=>l.musicSheetAccompanimentUrlList=a,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:10,desc:"\u4E0A\u4F20\u4F34\u594F\u6587\u4EF6","onUpload:success":a=>{var m;l.musicSheetAccompanimentUrls=[l.musicSheetAccompanimentUrls,a.url].filter(Boolean).join(","),l.musicSheetAccompanimentUrlList=(m=l.musicSheetAccompanimentUrls)==null?void 0:m.split(",").filter(Boolean),e.musicSheetAccompanimentList=[];for(let L=0;L<l.musicSheetAccompanimentUrlList.length;L++)e.musicSheetAccompanimentList.push({audioFileUrl:l.musicSheetAccompanimentUrlList[L],sortNumber:L+1})},onRemove:()=>{l.musicSheetAccompanimentUrlList=[],l.musicSheetAccompanimentUrls=""},multiple:!0},null)]}),e.playMode==="MIDI"&&t(N,{label:"\u4E0A\u4F20MID",path:"midiFileUrl",rule:[{required:!0,message:"\u8BF7\u9009\u62E9\u4E0A\u4F20.MID\u683C\u5F0F\u6587\u4EF6"}]},{default:()=>[t(le,{desc:"MIDI\u6587\u4EF6",disabled:l.previewMode,size:10,fileList:e.midiFileUrl,"onUpdate:fileList":a=>e.midiFileUrl=a,tips:"\u4EC5\u652F\u6301\u4E0A\u4F20.MID\u683C\u5F0F\u6587\u4EF6",listType:"image",accept:".mid",bucketName:"cloud-coach",text:"\u70B9\u51FB\u4E0A\u4F20MID\u6587\u4EF6"},null)]}),t(N,{label:"\u4E0A\u4F20XML",path:"xmlFileUrl",rule:[{required:!0,message:"\u8BF7\u9009\u62E9\u4E0A\u4F20XML",trigger:["change","input"]}]},{default:()=>[t(le,{desc:"XML\u6587\u4EF6",disabled:l.previewMode,size:10,key:"xmlFileUrl",fileList:e.xmlFileUrl,"onUpdate:fileList":a=>e.xmlFileUrl=a,tips:"\u4EC5\u652F\u6301\u4E0A\u4F20.xml/.mxml\u683C\u5F0F\u6587\u4EF6",listType:"image",accept:".xml,.mxml",bucketName:"cloud-coach",text:"\u70B9\u51FB\u4E0A\u4F20XML\u6587\u4EF6",onReadFileInputEventAsArrayBuffer:u,onRemove:()=>{e.multiTracksSelection=[],l.partListNames=[],e.musicSheetSoundList=[],e.musicalInstrumentIdList=[],e.subjectIds=[]}},null)]})]}),t(B,{cols:2},{default:()=>[t(N,{label:"\u53EF\u7528\u58F0\u90E8",path:"subjectIds",rule:[{required:!0,message:"\u8BF7\u9009\u62E9\u53EF\u7528\u58F0\u90E8",trigger:"change",type:"array"}]},{default:()=>[t(z,{value:e.subjectIds,"onUpdate:value":a=>e.subjectIds=a,options:l.subjectList,multiple:!0,filterable:!0,clearable:!0,placeholder:"\u8BF7\u9009\u62E9\u53EF\u7528\u58F0\u90E8",maxTagCount:2},null)]}),t(N,{label:"\u53EF\u7528\u4E50\u5668",path:"musicalInstrumentIdList",rule:[{required:!0,message:"\u8BF7\u9009\u62E9\u53EF\u7528\u4E50\u5668",trigger:"change",type:"array"}]},{default:()=>[t(z,{placeholder:"\u8BF7\u9009\u62E9\u53EF\u7528\u4E50\u5668",options:l.instrumentList,value:e.musicalInstrumentIdList,"onUpdate:value":a=>e.musicalInstrumentIdList=a,clearable:!0,multiple:!0,maxTagCount:2},null)]})]}),t(B,{cols:2},{default:()=>[t(N,{label:"\u591A\u58F0\u8F68\u6E32\u67D3",path:"musicSheetType",rule:[{required:!0,message:"\u8BF7\u9009\u62E9\u591A\u58F0\u8F68\u6E32\u67D3",trigger:"change"}]},{default:()=>[t(Q,{value:e.musicSheetType,"onUpdate:value":a=>e.musicSheetType=a},{default:()=>[t(O,{value:"SINGLE"},{default:()=>[g("\u662F")]}),t(O,{value:"CONCERT"},{default:()=>[g("\u5426")]})]})]})]}),e.musicSheetType&&t(B,{cols:1},{default:()=>[t(N,{label:`${e.musicSheetType==="SINGLE"?"\u9875\u9762\u6E32\u67D3\u58F0\u8F68":"\u7528\u6237\u53EF\u5207\u6362\u58F0\u8F68"}`,path:"multiTracksSelection",rule:[{required:!0,message:`\u8BF7\u9009\u62E9${e.musicSheetType==="SINGLE"?"\u9875\u9762\u6E32\u67D3\u58F0\u8F68":"\u7528\u6237\u53EF\u5207\u6362\u58F0\u8F68"}`,trigger:"change",type:"array"}]},{default:()=>[t(B,{style:"padding-top: 4px;"},{default:()=>[t(re,{span:24},{default:()=>[t(Q,{value:l.multiTracks,"onUpdate:value":a=>l.multiTracks=a,onUpdateValue:a=>{s(a)}},{default:()=>[t(O,{value:"all"},{default:()=>[g("\u5168\u9009")]}),t(O,{value:"allUncheck"},{default:()=>[g("\u91CD\u7F6E")]}),t(O,{value:"invert"},{default:()=>[g("\u53CD\u9009")]})]})]}),l.partListNames&&l.partListNames.length>0&&t(re,{span:24,style:"margin-top:5px"},{default:()=>[t(N,{label:"",path:"multiTracksSelection",rule:[{required:!1}]},{default:()=>[t(_e,{value:e.multiTracksSelection,"onUpdate:value":a=>e.multiTracksSelection=a},{default:()=>[t(B,{yGap:2,cols:4},Ee(c=l.partListNames.map(a=>t(re,null,{default:()=>[t(ze,{value:a.value,label:a.label},null)]})))?c:{default:()=>[c]})]})]})]})]})]})]}),t(B,{cols:2},{default:()=>[t(N,{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(Q,{value:e.isPlayBeat,"onUpdate:value":a=>e.isPlayBeat=a},{default:()=>[t(O,{value:!0},{default:()=>[g("\u662F")]}),t(O,{value:!1},{default:()=>[g("\u5426")]})]})]}),e.isPlayBeat&&t(N,{label:"\u64AD\u653E\u65B9\u5F0F",path:"isUseSystemBeat",rule:[{required:!0,message:"\u8BF7\u9009\u62E9\u64AD\u653E\u65B9\u5F0F"}]},{default:()=>[t(Q,{value:e.isUseSystemBeat,"onUpdate:value":a=>e.isUseSystemBeat=a},{default:()=>[t(O,{value:!0},{default:()=>[g("\u7CFB\u7EDF\u8282\u62CD\u5668")]}),t(O,{value:!1},{default:()=>[g("MP3\u8282\u62CD\u5668")]})]})]})]}),!!S.list.length&&t(ue,null,[t(ce,{showIcon:!1,type:"info"},{default:()=>[g("\u8BC6\u522B\u5230\u51711\u5904\u6E10\u53D8\u901F\u5EA6\uFF0C\u8BF7\u8F93\u5165Dorico\u5BF9\u5E94\u5C0F\u8282\u65F6\u95F4\u4FE1\u606F")]}),t(U,{label:"rit.",required:!0,style:{marginTop:"10px"}},{default:()=>[t(q,{vertical:!0},Ee(o=S.list.map((a,m)=>t(de,null,{default:()=>[t(U,{path:`graduals.${a[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(de,null,{default:()=>[t(Me,null,{default:()=>[a[0].measureIndex,g("\u5C0F\u8282\u5F00\u59CB")]}),t(X,{placeholder:"00:00:00",value:e.graduals[a[0].measureIndex],"onUpdate:value":L=>e.graduals[a[0].measureIndex]=L},null)]})]}),t("div",{style:{lineHeight:"30px",padding:"0 4px"}},[g("~")]),t(U,{path:`graduals.${a[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(de,null,{default:()=>[t(X,{placeholder:"00:00:00",value:e.graduals[a[1].measureIndex],"onUpdate:value":L=>e.graduals[a[1].measureIndex]=L},null),t(Me,null,{default:()=>[a[1].measureIndex,g("\u5C0F\u8282\u7ED3\u675F")]})]})]})]})))?o:{default:()=>[o]})]})]),e.playMode==="MP3"&&e.musicSheetSoundList.length>0&&t(ue,null,[e.musicSheetSoundList.map((a,m)=>{var L,M;return t(ue,null,[(!h(a.track)||((M=(L=a.track)==null?void 0:L.toLocaleUpperCase)==null?void 0:M.call(L))!="COMMON"&&e.multiTracksSelection.includes(a.track))&&t(B,{class:se.audioSection},{default:()=>[t(N,{span:12,label:"\u539F\u97F3",path:`musicSheetSoundList[${m}].audioFileUrl`,rule:[{required:!0,message:`\u8BF7\u4E0A\u4F20${a.track?a.track+"\u7684":"\u7B2C"+(m+1)+"\u4E2A"}\u539F\u97F3`}]},{default:()=>[t(le,{desc:"\u539F\u97F3\u6587\u4EF6",disabled:l.previewMode,size:100,fileList:a.audioFileUrl,"onUpdate:fileList":w=>a.audioFileUrl=w,tips:"\u4EC5\u652F\u6301\u4E0A\u4F20.mp3\u683C\u5F0F\u6587\u4EF6",listType:"image",accept:".mp3",bucketName:"cloud-coach"},null)]}),l.partListNames.length>0&&t(N,{span:12,label:"\u6240\u5C5E\u8F68\u9053",path:`musicSheetSoundList[${m}].track`,rule:[{required:!0,message:"\u8BF7\u9009\u62E9\u6240\u5C5E\u8F68\u9053"}]},{default:()=>[t(z,{placeholder:"\u8BF7\u9009\u62E9\u6240\u5C5E\u8F68\u9053",value:a.track,options:C(a.track),onUpdateValue:w=>{const E=a.track;if(E){e.musicSheetSoundList.forEach(j=>{j.track==w&&(j.track=E)});const A=e.multiTracksSelection.indexOf(a.track);e.multiTracksSelection.splice(A,1)}else e.musicSheetSoundList=e.musicSheetSoundList.filter(A=>A.track!=w);w&&!e.multiTracksSelection.includes(w)&&e.multiTracksSelection.push(w),a.track=w}},null)]}),t(re,{class:se.btnRemove},{default:()=>[t(k,{type:"primary",text:!0,onClick:()=>V(m)},{default:()=>[g("\u5220\u9664")]})]})]})])})])]})]}),i.type!=="preview"&&t(q,{justify:"end",style:"padding-top:12px"},{default:()=>[t(k,{type:"default",onClick:()=>p("close")},{default:()=>[g("\u53D6\u6D88")]}),t(k,{type:"primary",onClick:()=>r(),loading:I.value,disabled:I.value},{default:()=>[g("\u786E\u8BA4")]})]}),t(Z,{show:l.showMusicSheetOwnerDialog,"onUpdate:show":a=>l.showMusicSheetOwnerDialog=a,preset:"dialog",showIcon:!1,maskClosable:!1,title:"\u6240\u5C5E\u4EBA",style:{width:"800px"}},{default:()=>[t(Pt,{musicSheetExtend:e.musicSheetExtend,sourceType:e.sourceType,appData:l.appData,onClose:()=>{l.showMusicSheetOwnerDialog=!1},onChoseMusicSheetOwnerData:a=>{e.musicSheetExtend=D({},a),F()}},null)]}),t(Z,{class:se.productModal,title:"\u81EA\u52A8\u751F\u6210\u66F2\u8C31\u56FE\u7247",show:l.productOpen,"onUpdate:show":a=>l.productOpen=a,preset:"dialog",closeOnEsc:!1,maskClosable:!1,showIcon:!1},{default:()=>[t(Je,{xmlFileUrl:e.xmlFileUrl||"",onClose:()=>l.productOpen=!1,onConfirm:a=>x(this,null,function*(){try{e.musicImg=a.musicImg,e.musicFirstImg=a.musicFirstImg,e.musicJianImg=a.musicJianImg,r()}catch(m){console.log(m,"e")}setTimeout(()=>{l.isAutoSave=!1},50)})},null)]})])}}});function Vt(i){return typeof i=="function"||Object.prototype.toString.call(i)==="[object Object]"&&!be(i)}const Jt=W({name:"use-project",props:{useProject:{type:Array,required:!0,default:[]},id:{type:String,required:!0,default:null}},emits:["close","getList"],setup(i,{emit:y}){const d=H(),p=K({musicSheetId:null,useApplicationIds:[],useProjectParamConfig:{}});ae(()=>{const n=p.useProjectParamConfig.GYM,f=["musicSheetCategoryId","paymentType"];for(let r=0;r<f.length;r++)if(n[f[r]])return!0;return!1}),ae(()=>{const n=p.useProjectParamConfig.KLX,f=["availableType","musicSheetCategoryId","paymentType","musicPrice","topFlag","exquisiteFlag"];for(let r=0;r<f.length;r++){const u=n[f[r]];if(u!=null&&u!=null&&u!="")return!0}return!1}),ae(()=>{const n=p.useProjectParamConfig.KT,f=["musicSheetCategoryId"];for(let r=0;r<f.length;r++)if(n[f[r]])return!0;return!1}),ae(()=>{const n=p.useProjectParamConfig.GYT,f=["musicSheetCategoryId"];for(let r=0;r<f.length;r++)if(n[f[r]])return!0;return!1});const e=K({loading:!1,musicSheetData:null,tabName:null,selectAppKey:[],selectAppName:[],appKeyNameMap:null,userProjectList:[],musicSheetCategoryOptions:{},musicSheetCanBeUsedProjectKey:[]}),l=H(!1),S=ee();te(()=>x(this,null,function*(){e.loading=!0;const{data:n}=yield Pe({id:i.id});e.musicSheetData=n,n&&n.musicSheetExtend&&n.musicSheetExtend.useApplicationIds&&(p.useApplicationIds=n.musicSheetExtend.useApplicationIds.split(",")||[]);const f=Object.keys(ve);i.useProject.forEach(h=>{const T=f.indexOf(h.appKey);let v=!1;T>-1&&e.userProjectList.push($(D({},h),{disabled:v}))}),e.appKeyNameMap=new Map,e.userProjectList.forEach(h=>{p.useApplicationIds.includes(h.id)&&e.selectAppKey.push(h.appKey),e.appKeyNameMap.set(h.appKey,h.appName)}),e.selectAppKey.length>0&&(e.tabName=e.selectAppKey[0]);const r=[],u=new Map;i.useProject.forEach(h=>{r.push(h.id),u.set(h.id,h.appKey)}),e.loading=!1}));const I=H(),b=()=>x(this,null,function*(){I.value.validate(n=>x(this,null,function*(){var f;if(n){if(Array.isArray(n)&&n.length>0){const r=(f=n[0][0].field)==null?void 0:f.split(".")[1];r&&e.selectAppKey.includes(r)&&(e.tabName=r)}return}l.value=!0;try{const r=new Map;i.useProject.forEach(h=>{r.set(h.appKey,h.id)});const u={musicSheetId:i.id,useApplicationIds:p.useApplicationIds.join(",")};yield Ze(u),S.success("\u4FEE\u6539\u6210\u529F"),y("getList"),y("close")}catch(r){}l.value=!1}))});return()=>{let n;return t(Re,{show:e.loading},{default:()=>[t(Se,{class:se.formContainer,model:p,ref:I,"label-placement":"left","label-width":"85"},{default:()=>[t(U,{label:"\u9002\u7528\u5E94\u7528",path:"useApplicationIds",rule:[{required:!1,message:"\u8BF7\u9009\u62E9\u9002\u7528\u5E94\u7528"}]},{default:()=>[t(_e,{value:p.useApplicationIds,"onUpdate:value":f=>p.useApplicationIds=f,onUpdateValue:f=>{e.selectAppKey=[],e.userProjectList.forEach(r=>{f.includes(r.id)&&e.selectAppKey.push(r.appKey)}),e.selectAppKey.length==0?e.tabName="":e.tabName=e.selectAppKey[0],St(()=>{var r;return(r=d.value)==null?void 0:r.syncBarPosition()})}},Vt(n=e.userProjectList.map(f=>t(ze,{value:f.value},{default:()=>[f.label]})))?n:{default:()=>[n]})]})]}),t(q,{justify:"end",style:"margin-top: 10px"},{default:()=>[t(k,{type:"default",onClick:()=>y("close")},{default:()=>[g("\u53D6\u6D88")]}),t(k,{type:"primary",onClick:()=>b(),loading:l.value,disabled:l.value},{default:()=>[g("\u786E\u8BA4")]})]})]})}}}),Xt="_productModal_35hv9_1",Ht="_productIframe_35hv9_9",Wt={productModal:Xt,productIframe:Ht};function pe(i){return typeof i=="function"||Object.prototype.toString.call(i)==="[object Object]"&&!be(i)}const Yt=W({name:"music-list",props:["searchId","musicCategoryId"],setup(i,{emit:y}){const d=ye(),p=ee(),e=K({loading:!1,pagination:{page:1,rows:10,pageTotal:0},searchForm:{keyword:null,musicSheetType:null,subjectId:null,sourceType:null,composer:null,userId:null,applicationId:null,useAppId:[],status:null,appAuditFlag:null,categoriesId:null,musicCategoryId:null},dataList:[],subjectList:[],tagList:[],visiableMusic:!1,musicOperation:"add",musicData:{},musicSheetCategories:[],musicPreview:!1,musicScore:null,showUseProject:!1,useProjectData:[],showUseProjectId:null,detailReadonly:!1,userIdDisable:!0,userIdData:[],productOpen:!1,productItem:{}}),l=()=>[{type:"selection"},{title:"\u66F2\u76EE\u540D\u79F0",minWidth:"200px",key:"id",render(s){return t(oe,{labelPlacement:"left",column:1},{default:()=>[t(J,{label:"\u540D\u79F0"},{default:()=>[t(ie,{content:s.name},null)]}),t(J,{label:"\u7F16\u53F7"},{default:()=>[t(ie,{content:s.id},null)]})]})}},{title:"\u5C01\u9762\u56FE",key:"titleImg",render(s){return t(vt,{width:60,height:60,src:s.musicCover},null)}},{title:"\u66F2\u76EE\u4FE1\u606F",minWidth:"200px",key:"composer",render(s){let F;return t(oe,{labelPlacement:"left",column:1},{default:()=>[t(J,{label:"\u97F3\u4E50\u4EBA"},{default:()=>[s.composer]}),t(J,{label:"\u591A\u58F0\u8F68\u6E32\u67D3"},pe(F=Ue(s.musicSheetType,new Map(Object.entries(Ne))))?F:{default:()=>[F]}),t(J,{label:"\u5206\u7C7B"},{default:()=>[t(ie,{content:s.musicCategoryName},null)]}),t(J,{label:"\u53EF\u7528\u58F0\u90E8"},{default:()=>[t(ie,{content:s.subjectNames},null)]})]})}},{title:"\u4F5C\u8005\u5C5E\u6027",minWidth:"250px",key:"sourceType",render(s){let F,c;return t(oe,{labelPlacement:"left",column:1},{default:()=>[t(J,{label:"\u5C5E\u6027"},pe(F=Ue(s.sourceType,new Map(Object.entries(he))))?F:{default:()=>[F]}),t(J,{label:"\u6240\u5C5E\u4EBA"},pe(c=st(s.musicSheetExtend,s.sourceType))?c:{default:()=>[c]})]})}},{title:"\u9002\u7528\u9879\u76EE",key:"projectName",render(s){return t(q,null,{default:()=>[R(t(k,{type:"primary",size:"small",text:!0,onClick:()=>{e.showUseProject=!0,e.showUseProjectId=s.id}},{default:()=>[t(ie,{content:s.musicSheetExtend&&s.musicSheetExtend.useApplicationNames?s.musicSheetExtend.useApplicationNames:""},null),t(wt,{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(s){return t(oe,{labelPlacement:"left",column:1},{default:()=>[t(J,{label:"\u66F4\u65B0\u4EBA"},{default:()=>[s.updateByName]}),t(J,{label:"\u66F4\u65B0\u65F6\u95F4"},{default:()=>[s.updateTime]})]})}},{title:"\u5BA1\u6838\u7248\u672C",minWidth:"100px",key:"appAuditFlag",render(s){return t("div",null,[s.appAuditFlag?"\u662F":"\u5426"])}},{title:"\u72B6\u6001",minWidth:"50px",key:"status",render(s){return t(It,{type:s.status?"primary":"default"},{default:()=>[s.status?"\u542F\u7528":"\u505C\u7528"]})}},{title:"\u64CD\u4F5C",key:"operation",fixed:"right",width:"300px",render(s){return t(q,null,{default:()=>[t(k,{type:"primary",size:"small",text:!0,onClick:()=>{e.musicPreview=!0,e.musicScore=s}},{default:()=>[g("\u9884\u89C8")]}),R(t(k,{type:"primary",size:"small",text:!0,onClick:()=>{e.visiableMusic=!0,e.musicOperation="preview",e.musicData=s,e.detailReadonly=!0}},{default:()=>[g("\u67E5\u770B")]}),[[_("auth"),"musicSheet/detail1751241103201271810"]]),R(t(k,{type:"primary",size:"small",text:!0,onClick:()=>{e.visiableMusic=!0,e.musicOperation="edit",e.musicData=s,e.detailReadonly=!0}},{default:()=>[g("\u4FEE\u6539")]}),[[_("auth"),"musicSheet/save1751241178962984962"]]),R(t(k,{type:"primary",size:"small",text:!0,onClick:()=>b(s)},{default:()=>[s.status?"\u505C\u7528":"\u542F\u7528"]}),[[_("auth"),"musicSheet/statusList1751241653309407234"]]),R(t(k,{type:"primary",size:"small",text:!0,onClick:()=>{e.productOpen=!0,e.productItem=s}},{default:()=>[g("\u751F\u6210\u56FE\u7247")]}),[[_("auth"),"musicSheet/img1751240591299051522"]]),R(t(k,{type:"primary",size:"small",text:!0,disabled:!!s.status,onClick:()=>r(s)},{default:()=>[g("\u5220\u9664")]}),[[_("auth"),"musicSheet/save1751241178962984962"]])]})}}],S=H([]),I=s=>{S.value=s},b=s=>{const F=s.status?"\u505C\u7528":"\u542F\u7528";d.warning({title:"\u63D0\u793A",content:`\u662F\u5426${F}\uFF1F`,positiveText:"\u786E\u5B9A",negativeText:"\u53D6\u6D88",onPositiveClick:()=>x(this,null,function*(){try{yield xe({ids:new Array(s.id),status:!s.status}),u(),p.success(`${F}\u6210\u529F`)}catch(c){}})})},n=s=>{const F=S.value.length;F==0&&p.warning("\u672A\u9009\u62E9\u6570\u636E");const c=s?"\u542F\u7528":"\u505C\u7528";d.warning({title:"\u63D0\u793A",content:`\u662F\u5426${c}`+F+"\u6761\u6570\u636E\uFF1F",positiveText:"\u786E\u5B9A",negativeText:"\u53D6\u6D88",onPositiveClick:()=>x(this,null,function*(){try{yield xe({ids:S.value,status:s}),u(),p.success(`${c}\u6210\u529F`)}catch(o){}})})},f=s=>x(this,null,function*(){if(!!e.searchForm.applicationId&&(e.userIdData=[],e.searchForm.userId=null,s&&s!=="PLATFORM")){const{data:F}=yield Oe({page:1,rows:9999,sourceType:s,applicationId:e.searchForm.applicationId});(F.rows||[]).forEach(o=>{e.userIdData.push($(D({},o),{label:s==="PERSON"?o.userName:o.organizationRole,value:s==="PERSON"?o.userId:o.organizationRoleId}))})}}),r=s=>{d.warning({title:"\u63D0\u793A",content:`\u5220\u9664"${s.name}"\uFF0C\u662F\u5426\u7EE7\u7EED\uFF1F`,positiveText:"\u786E\u5B9A",negativeText:"\u53D6\u6D88",onPositiveClick:()=>x(this,null,function*(){try{yield lt({id:s.id}),u(),p.success("\u5220\u9664\u6210\u529F")}catch(F){}})})},u=()=>x(this,null,function*(){try{e.loading=!0;const s=e.searchForm.sourceType,F=e.searchForm.userId;let c=$(D({},e.searchForm),{useAppId:e.searchForm.useAppId?e.searchForm.useAppId.join(","):e.searchForm.useAppId});s&&s=="ORG"&&(c.organizationRoleId=F,c.userId=null);const{data:o}=yield at(D(D({},e.pagination),c));e.pagination.pageTotal=Number(o.total),e.dataList=o.rows||[]}catch(s){}e.loading=!1}),h=()=>x(this,null,function*(){try{const{data:s}=yield ge({});e.musicSheetCategories=s||[]}catch(s){}}),T=()=>x(this,null,function*(){try{const{data:s}=yield qe({page:1,rows:999}),F=s.rows||[];F.forEach(c=>{c.label=c.name,c.value=c.id+""}),e.subjectList=F}catch(s){}}),v=()=>x(this,null,function*(){try{const s=Object.keys(ve),{data:F}=yield Ke({page:1,rows:999}),c=F.rows||[];e.useProjectData=[],c.filter(a=>s.includes(a.appKey)).forEach(a=>{e.useProjectData.push($(D({},a),{label:a.appName,value:a.id}))})}catch(s){}}),C=H(),G=()=>{e.pagination.page=1,u()};bt(()=>i.searchId,s=>{console.log(s,"searchId")});const P=()=>{var s;(s=C.value)==null||s.submit()},V=()=>{var s;(s=C.value)==null||s.reset()};return te(()=>x(this,null,function*(){e.loading=!0,i.searchId&&(e.searchForm.categoriesId=i.searchId||null),i.musicCategoryId&&(e.searchForm.musicCategoryId=i.musicCategoryId||null),T(),v(),h(),u()})),()=>t("div",{class:"system-menu-container"},[t(Ae,{ref:C,model:e.searchForm,onSubmit:G,saveKey:"music-list",onSetModel:s=>e.searchForm=s},{default:()=>[t(U,{label:"\u5173\u952E\u8BCD",path:"keyword"},{default:()=>[t(X,{placeholder:"\u66F2\u76EE\u7F16\u53F7/\u540D\u79F0",value:e.searchForm.keyword,"onUpdate:value":s=>e.searchForm.keyword=s,clearable:!0},null)]}),t(U,{label:"\u591A\u58F0\u8F68\u6E32\u67D3",path:"musicSheetType"},{default:()=>[t(z,{placeholder:"\u8BF7\u9009\u62E9\u591A\u58F0\u8F68\u6E32\u67D3",value:e.searchForm.musicSheetType,"onUpdate:value":s=>e.searchForm.musicSheetType=s,options:fe(Ne),clearable:!0},null)]}),t(U,{label:"\u66F2\u76EE\u5206\u7C7B",path:"musicCategoryId"},{default:()=>[t(Ie,{valueField:"id",labelField:"name","children-field":"musicSheetCategoriesList",placeholder:"\u8BF7\u9009\u62E9\u66F2\u76EE\u5206\u7C7B",value:e.searchForm.musicCategoryId,"onUpdate:value":s=>e.searchForm.musicCategoryId=s,options:e.musicSheetCategories,clearable:!0},null)]}),t(U,{label:"\u53EF\u7528\u58F0\u90E8",path:"musicSubject"},{default:()=>[t(z,{placeholder:"\u8BF7\u9009\u62E9\u53EF\u7528\u58F0\u90E8",value:e.searchForm.subjectId,"onUpdate:value":s=>e.searchForm.subjectId=s,options:e.subjectList,clearable:!0},null)]}),t(U,{label:"\u97F3\u4E50\u4EBA",path:"composer"},{default:()=>[t(X,{placeholder:"\u8BF7\u9009\u62E9\u97F3\u4E50\u4EBA",value:e.searchForm.composer,"onUpdate:value":s=>e.searchForm.composer=s,clearable:!0},null)]}),t(U,{label:"\u4F5C\u8005\u5C5E\u6027",path:"sourceType"},{default:()=>[t(z,{placeholder:"\u8BF7\u9009\u62E9\u4F5C\u8005\u5C5E\u6027",value:e.searchForm.sourceType,"onUpdate:value":s=>e.searchForm.sourceType=s,options:fe(he),onUpdateValue:s=>x(this,null,function*(){e.userIdData=[],e.searchForm.userId=null,s&&s!=="PLATFORM"?(yield f(s),e.userIdDisable=!e.searchForm.applicationId):e.userIdDisable=!0}),clearable:!0},null)]}),t(U,{label:"\u9879\u76EE",path:"applicationId"},{default:()=>[t(z,{placeholder:"\u8BF7\u9009\u62E9\u9879\u76EE",value:e.searchForm.applicationId,"onUpdate:value":s=>e.searchForm.applicationId=s,options:e.useProjectData,clearable:!0,onUpdateValue:s=>x(this,null,function*(){e.searchForm.applicationId=s,s?(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(U,{label:"\u6240\u5C5E\u4EBA",path:"userId"},{label:()=>t("div",null,[g("\u6240\u5C5E\u4EBA")]),default:()=>t(z,{filterable:!0,placeholder:"\u8BF7\u9009\u62E9\u6240\u5C5E\u4EBA",disabled:e.userIdDisable||!e.searchForm.applicationId&&!e.searchForm.sourceType,value:e.searchForm.userId,"onUpdate:value":s=>e.searchForm.userId=s,options:e.userIdData,clearable:!0},null)}),t(U,{label:"\u9002\u7528\u9879\u76EE",path:"useAppId"},{default:()=>[t(z,{placeholder:"\u8BF7\u9009\u62E9\u9002\u7528\u9879\u76EE",value:e.searchForm.useAppId,"onUpdate:value":s=>e.searchForm.useAppId=s,options:e.useProjectData,multiple:!0,maxTagCount:1},null)]}),t(U,{label:"\u72B6\u6001",path:"status"},{default:()=>[t(z,{value:e.searchForm.status,"onUpdate:value":s=>e.searchForm.status=s,placeholder:"\u8BF7\u9009\u62E9\u72B6\u6001",clearable:!0,options:[{label:"\u542F\u7528",value:!0},{label:"\u505C\u7528",value:!1}]},null)]}),t(U,{label:"\u5BA1\u6838\u7248\u672C",path:"appAuditFlag"},{default:()=>[t(z,{value:e.searchForm.appAuditFlag,"onUpdate:value":s=>e.searchForm.appAuditFlag=s,placeholder:"\u8BF7\u9009\u62E9\u5BA1\u6838\u7248\u672C",clearable:!0,options:[{label:"\u662F",value:1},{label:"\u5426",value:0}]},null)]}),t(U,null,{default:()=>[t(q,null,{default:()=>[t(k,{type:"primary",onClick:P},{default:()=>[g("\u641C\u7D22")]}),t(k,{type:"default",onClick:V},{default:()=>[g("\u91CD\u7F6E")]})]})]})]}),t("div",{class:["section-container"]},[t(q,{style:{paddingBottom:"12px"}},{default:()=>[R(t(k,{type:"primary",onClick:()=>{e.visiableMusic=!0,e.musicOperation="add",e.musicData={},e.detailReadonly=!0}},{default:()=>[g("\u65B0\u589E\u66F2\u76EE")]}),[[_("auth"),"musicSheet/save1751241178962984962"]]),R(t(k,{disabled:S.value.length==0,onClick:()=>{n(!1)}},{default:()=>[g("\u6279\u91CF\u505C\u7528")]}),[[_("auth"),"musicSheet/statusList1751241653309407234"]]),R(t(k,{disabled:S.value.length==0,onClick:()=>{n(!0)}},{default:()=>[g("\u6279\u91CF\u542F\u7528")]}),[[_("auth"),"musicSheet/statusList1751241653309407234"]])]}),t(ne,{loading:e.loading,columns:l(),data:e.dataList,rowKey:s=>s.id,onUpdateCheckedRowKeys:I,scrollX:"1200"},null),t(je,{page:e.pagination.page,"onUpdate:page":s=>e.pagination.page=s,pageSize:e.pagination.rows,"onUpdate:pageSize":s=>e.pagination.rows=s,pageTotal:e.pagination.pageTotal,"onUpdate:pageTotal":s=>e.pagination.pageTotal=s,onList:u,sync:!0,saveKey:"music-list"},null)]),t(Z,{show:e.visiableMusic,"onUpdate:show":s=>e.visiableMusic=s,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($t,{type:e.musicOperation,data:e.musicData,subjectList:e.subjectList,onClose:()=>e.visiableMusic=!1,onGetList:u},null)]}),t(Z,{blockScroll:!0,show:e.musicPreview,"onUpdate:show":s=>e.musicPreview=s,preset:"dialog",showIcon:!1,title:"\u66F2\u76EE\u9884\u89C8",style:{width:"auto"}},{default:()=>[t(et,{item:e.musicScore,isMove:1},null)]}),t(Z,{blockScroll:!0,show:e.showUseProject,"onUpdate:show":s=>e.showUseProject=s,preset:"dialog",showIcon:!1,title:"\u9002\u7528\u9879\u76EE",style:{width:"500px"}},{default:()=>[t(Jt,{id:e.showUseProjectId,useProject:e.useProjectData,onClose:()=>e.showUseProject=!1,onGetList:u},null)]}),t(Z,{class:Wt.productModal,title:"\u81EA\u52A8\u751F\u6210\u66F2\u8C31\u56FE\u7247",show:e.productOpen,"onUpdate:show":s=>e.productOpen=s,preset:"dialog",closeOnEsc:!1,maskClosable:!1,showIcon:!1},{default:()=>[t(Je,{xmlFileUrl:e.productItem.xmlFileUrl,onClose:()=>e.productOpen=!1,onConfirm:s=>x(this,null,function*(){try{yield tt($(D({},s),{id:e.productItem.id}))}catch(F){}})},null)]})])}}),Qt=W({emits:["close","getList"],props:["actvieRow","saveMode","list"],name:"save-categroy-dialog",setup(i,{emit:y}){const d=ee(),p=H(),e=H([{name:"\u9876\u7EA7\u5206\u7C7B",id:0},...Ge(i.list,"musicSheetCategoriesList")]),l=K({loading:!1,dataList:[],btnLoading:!1}),S=K({id:"",name:"",enable:!0,parentId:"0"}),I=()=>x(this,null,function*(){var b;(b=p.value)==null||b.validate(n=>x(this,null,function*(){if(!n){l.btnLoading=!0;try{if(i.saveMode==="add"){const{data:f}=yield it(D({},S));y("getList"),d.success("\u6DFB\u52A0\u6210\u529F")}else{const{data:f}=yield ut(D({},S));y("getList"),d.success("\u4FEE\u6539\u6210\u529F")}}catch(f){}l.btnLoading=!1}}))});return te(()=>{if(i.saveMode==="add")i.actvieRow&&i.actvieRow.id&&(S.parentId=(i==null?void 0:i.actvieRow.id)+"");else for(let b in i==null?void 0:i.actvieRow)S[b]=i==null?void 0:i.actvieRow[b]}),()=>t("div",null,[t(Se,{ref:p,model:S},{default:()=>[i.saveMode==="add"&&i.actvieRow&&t(U,{label:"\u7236\u7EA7\u5206\u7C7B",path:"parentId"},{default:()=>[t(Ie,{placeholder:"\u8BF7\u9009\u62E9\u7236\u7EA7\u5206\u7C7B",value:S.parentId,"onUpdate:value":b=>S.parentId=b,options:e.value,checkStrategy:"all",expandTrigger:"hover",childrenField:"musicSheetCategoriesList",valueField:"id",labelField:"name",disabled:!0},null)]}),t(U,{label:"\u5206\u7C7B\u540D\u79F0",rule:[{required:!0,message:"\u8BF7\u8F93\u5165\u5206\u7C7B\u540D\u79F0",trigger:["blur","input"]}],path:"name"},{default:()=>[t(X,{value:S.name,"onUpdate:value":b=>S.name=b,placeholder:"\u8BF7\u8F93\u5165\u5206\u7C7B\u540D\u79F0",maxlength:25,showCount:!0,clearable:!0},null)]})]}),t(q,{justify:"end"},{default:()=>[t(k,{type:"default",onClick:()=>y("close")},{default:()=>[g("\u53D6\u6D88")]}),t(k,{type:"primary",onClick:()=>I(),loading:l.btnLoading,disabled:l.btnLoading},{default:()=>[g("\u786E\u8BA4")]})]})])}}),Zt=W({emits:["setTabName","jump"],name:"music-category",setup(i,{slots:y,attrs:d,emit:p}){const e=K({loading:!1,pagination:{page:1,rows:10},dataList:[],showSaveDialog:!1,saveMode:"add",saveRowData:null}),l=ye(),S=ee(),I=()=>x(this,null,function*(){try{e.loading=!0;const u={page:e.pagination.page,rows:e.pagination.rows},{data:h}=yield ge(u);e.dataList=h||[]}catch(u){}e.loading=!1});te(()=>{I()});const b=u=>{p("jump",u)},n=()=>[{title:"\u5206\u7C7B\u540D\u79F0",key:"id",render(u){return u.name+"("+u.id+")"}},{title:"\u66F2\u76EE\u6570\u91CF",key:"musicSheetNum",render(u){return t("div",null,[t(k,{type:"primary",size:"small",text:!0,onClick:()=>{b({tabName:"MusicList",musicCategoryId:u.id})}},{default:()=>[u.musicSheetNum]})])}},{title:"\u6700\u540E\u66F4\u65B0\u65F6\u95F4",key:"updateTime"},{title:"\u66F4\u65B0\u4EBA",key:"operatorName"},{title:"\u64CD\u4F5C",key:"operation",fixed:"right",render(u){return t(q,null,{default:()=>[R(t(k,{type:"error",size:"small",text:!0,onClick:()=>r(u)},{default:()=>[g("\u5220\u9664")]}),[[_("auth"),"musicSheetCategories/remove1751239397398806530"]]),R(t(k,{type:"primary",size:"small",text:!0,onClick:()=>{e.saveRowData=u,e.saveMode="edit",e.showSaveDialog=!0}},{default:()=>[g("\u4FEE\u6539")]}),[[_("auth"),"musicSheetCategories/update1751239533856292866"]]),R(t(k,{type:"primary",size:"small",text:!0,onClick:()=>{e.saveRowData=u,e.showSaveDialog=!0,e.saveMode="add"}},{default:()=>[g("\u6DFB\u52A0\u5B50\u5206\u7C7B")]}),[[_("auth"),"musicSheetCategories/save1751239479284203521"]])]})}}],f=()=>{e.pagination.page=1,I()},r=u=>x(this,null,function*(){l.warning({title:"\u63D0\u793A",content:"\u662F\u5426\u786E\u8BA4\u5220\u9664'"+u.name+"'?",positiveText:"\u786E\u5B9A",negativeText:"\u53D6\u6D88",onPositiveClick:()=>x(this,null,function*(){(yield rt(u.id)).data&&(f(),S.success("\u5220\u9664\u6210\u529F"))})})});return()=>t("div",{class:"system-menu-container"},[t("div",{class:["section-container"]},[t(q,{style:{paddingBottom:"12px"}},{default:()=>[R(t(k,{type:"primary",onClick:()=>{e.saveMode="add",e.showSaveDialog=!0,e.saveRowData=null}},{default:()=>[g("\u65B0\u589E\u5206\u7C7B")]}),[[_("auth"),"musicSheetCategories/save1751239479284203521"]])]}),t(ne,{loading:e.loading,columns:n(),data:e.dataList,rowKey:u=>u.id,childrenKey:"musicSheetCategoriesList"},null)]),t(Z,{show:e.showSaveDialog,"onUpdate:show":u=>e.showSaveDialog=u,preset:"dialog",showIcon:!1,title:e.saveRowData?"\u4FEE\u6539\u5206\u7C7B":"\u65B0\u589E\u5206\u7C7B",style:{width:"400px"}},{default:()=>[t(Qt,{onGetList:()=>{e.showSaveDialog=!1,I()},onClose:()=>{e.showSaveDialog=!1},list:e.dataList,saveMode:e.saveMode,actvieRow:e.saveRowData},null)]})])}}),Fa=W({name:"music-sheet",setup(){const i=K({tabName:"MusicList",searchId:null,musicCategoryId:null}),y=Lt();Tt(e=>{e.form.tabName&&(i.tabName=e.form.tabName)});const d=e=>{console.log("setTabName",e),i.tabName=e.tabName,i.searchId=e.id},p=e=>{Nt(e,"tabName",y)};return()=>t("div",{class:"system-menu-container"},[t("div",{class:["section-container"],style:"padding-top: 0"},[t(Ct,{type:"line",size:"large",value:i.tabName,"onUpdate:value":[e=>i.tabName=e,e=>p(e)]},{default:()=>[R(t(Te,{name:"MusicList",tab:"\u66F2\u76EE\u5217\u8868"},{default:()=>[t(Yt,{searchId:i.searchId,musicCategoryId:i.musicCategoryId},null)]}),[[_("auth"),"musicSheet/page1751238894313013249"]]),R(t(Te,{name:"CategroryList",tab:"\u66F2\u76EE\u5206\u7C7B"},{default:()=>[t(Zt,{onSetTabName:d,onJump:e=>{i.tabName=e.tabName,i.musicCategoryId=e.musicCategoryId}},null)]}),[[_("auth"),"musicSheetCategories/queryTree1751238805699952641"]])]})])])}});export{Fa as default};