var He=Object.defineProperty,We=Object.defineProperties;var Ye=Object.getOwnPropertyDescriptors;var Le=Object.getOwnPropertySymbols;var Qe=Object.prototype.hasOwnProperty,Ze=Object.prototype.propertyIsEnumerable;var Ce=(i,y,p)=>y in i?He(i,y,{enumerable:!0,configurable:!0,writable:!0,value:p}):i[y]=p,D=(i,y)=>{for(var p in y||(y={}))Qe.call(y,p)&&Ce(i,p,y[p]);if(Le)for(var p of Le(y))Ze.call(y,p)&&Ce(i,p,y[p]);return i},$=(i,y)=>We(i,Ye(y));var x=(i,y,p)=>new Promise((m,e)=>{var s=b=>{try{I(p.next(b))}catch(n){e(n)}},S=b=>{try{I(p.throw(b))}catch(n){e(n)}},I=b=>b.done?m(b.value):Promise.resolve(b.value).then(s,S);I((p=p.apply(i,y)).next())});import{S as je}from"./index.b24e8dc3.js";import{P as Pe}from"./index.70371ae0.js";import{m as Oe,a as ge,b as Be,c as xe,d as et,M as tt,e as at,f as Fe,g as lt,h as st,i as it,j as ut,k as rt,l as ot}from"./musicUtil.99bcdb58.js";import{g as nt,o as ct,U as se}from"./index.06e28872.js";import{cj as dt,cG as pt,d as Y,cI as mt,cJ as Re,F as te,cP as ht,bi as ke,dx as ft,dy as Te,a as K,u as Z,r as H,B as ee,dj as me,i as t,l as E,ce as R,aj as ue,_ as X,a9 as q,p as k,k as g,cg as ne,bx as gt,ai as ye,dz as yt,dk as _e,q as Se,di as ce,ac as B,a8 as W,a7 as A,db as St,ad as re,dA as ze,m as qe,ag as de,aa as Q,bn as be,U as bt,M as vt,H as _,ae as It,ch as wt,d9 as J,da as oe,bC as z,a0 as Lt,e as Ct,d7 as xt,d8 as Ne}from"./index.789dd106.js";import{B as ve,D as he,c as Ft,E as Ue}from"./constant.ded25e36.js";import{g as fe,a as kt}from"./objectUtil.ec24ceed.js";import{c as Tt}from"./api.32da9f90.js";import{y as Ke}from"./api.4caafe9d.js";import{s as Ge}from"./api.3d694ea1.js";import{f as $e}from"./index.2e5fe1a2.js";import{N}from"./FormItemGridItem.266fd41a.js";import{N as Ie}from"./Cascader.85b68ac2.js";import{g as Ee}from"./filters.de6e9e5f.js";import{T as ie}from"./index.e0017534.js";import{g as Nt,s as Ut}from"./use-async.64e4c0e6.js";import"./searchs.b637f0d6.js";import"./api.cd91a8fe.js";import"./vuedraggable.umd.3c509ca7.js";import"./DeleteFilled.12f6975e.js";import"./api.abb70d8c.js";import"./searchArray.c8aafeb3.js";import"./knowledgeTypeData.3b15dd0b.js";import"./dateUtil.862a46f3.js";import"./dayjs.min.61ba4767.js";const Et=dt("input-group-label",` position: relative; user-select: none; -webkit-user-select: none; box-sizing: border-box; padding: 0 12px; display: inline-block; border-radius: var(--n-border-radius); background-color: var(--n-group-label-color); color: var(--n-group-label-text-color); font-size: var(--n-font-size); line-height: var(--n-height); height: var(--n-height); flex-shrink: 0; white-space: nowrap; transition: color .3s var(--n-bezier), background-color .3s var(--n-bezier), box-shadow .3s var(--n-bezier); `,[pt("border",` position: absolute; left: 0; right: 0; top: 0; bottom: 0; border-radius: inherit; border: var(--n-group-label-border); transition: border-color .3s var(--n-bezier); `)]),Mt=Object.assign(Object.assign({},Re.props),{size:{type:String,default:"medium"},bordered:{type:Boolean,default:void 0}}),Me=Y({name:"InputGroupLabel",props:Mt,setup(i){const{mergedBorderedRef:y,mergedClsPrefixRef:p,inlineThemeDisabled:m}=mt(i),e=Re("Input","-input-group-label",Et,ft,i,p),s=te(()=>{const{size:I}=i,{common:{cubicBezierEaseInOut:b},self:{groupLabelColor:n,borderRadius:f,groupLabelTextColor:r,lineHeight:u,groupLabelBorder:h,[Te("fontSize",I)]:T,[Te("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=m?ht("input-group-label",te(()=>i.size[0]),s,i):void 0;return{mergedClsPrefix:p,mergedBordered:y,cssVars:m?void 0:s,themeClass:S==null?void 0:S.themeClass,onRender:S==null?void 0:S.onRender}},render(){var i,y,p;const{mergedClsPrefix:m}=this;return(i=this.onRender)===null||i===void 0||i.call(this),ke("div",{class:[`${m}-input-group-label`,this.themeClass],style:this.cssVars},(p=(y=this.$slots).default)===null||p===void 0?void 0:p.call(y),this.mergedBordered?ke("div",{class:`${m}-input-group-label__border`}):null)}}),Dt="_audioSection_o5wty_1",At="_btnRemove_o5wty_9",jt="_formContainer_o5wty_14",Pt="_productModal_o5wty_19",Ot="_productIframe_o5wty_27",ae={audioSection:Dt,btnRemove:At,formContainer:jt,productModal:Pt,productIframe:Ot},Bt=Y({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:p,emit:m}){const e=K({loading:!1,pagination:{page:1,rows:10,pageTotal:0},searchForm:{applicationId:null,name:null,sourceType:null},dataList:[],appData:[]}),s=Z(),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||s.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});ee(()=>x(this,null,function*(){{if(e.appData=me(i.appData),e.appData.length==0){s.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});m("choseMusicSheetOwnerData",h),m("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});m("choseMusicSheetOwnerData",h),m("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});m("choseMusicSheetOwnerData",h),m("close")}},{default:()=>[g("\u9009\u62E9")]})]})}}];return()=>t("div",{class:"system-menu-container"},[t(je,{ref:S,model:e.searchForm,onSubmit:I,onSetModel:u=>e.searchForm=u},{default:()=>[t(E,{label:"\u6240\u5C5E\u9879\u76EE",path:"applicationId",size:"small",style:"width:250px"},{default:()=>[t(R,{placeholder:"\u8BF7\u9009\u62E9\u9002\u7528\u6240\u5C5E\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(E,{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(E,{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(E,{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(Pe,{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)])])}}),Ve="gyt",Je="public-read",Rt=`https://${Ve}.ks3-cn-beijing.ksyuncs.com/`,_t=i=>x(void 0,null,function*(){const y={filename:i,bucketName:Ve,postData:{filename:i,acl:Je,key:i,unknowValueField:[]}},{data:p}=yield nt(y);return console.log(p),p}),zt=(i,y,p,m)=>x(void 0,null,function*(){const e={policy:i.policy,signature:i.signature,key:y,KSSAccessKeyId:i.kssAccessKeyId,acl:Je,name:y,file:p};return yield ct(Rt,e)}),qt=(i,y)=>x(void 0,null,function*(){var s;const p=Date.now()+((s=i.name)==null?void 0:s.slice(i.name.lastIndexOf("."))),m=yield _t(p);return yield zt(m,p,i)}),Xe=Y({name:"music-create-img",props:{xmlFileUrl:{type:String,default:""}},emits:["close","confirm"],setup(i,{emit:y}){const p=Z(),m=K({productOpen:!1,productIfameSrc:""}),e=K({musicImg:"",musicFirstImg:"",musicJianImg:""}),s=()=>{if(!i.xmlFileUrl){p.error("\u8BF7\u5148\u4E0A\u4F20XML");return}const n={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")?"online":"dev",r=n[f],u=/(localhost|192)/.test(location.host)?"https://dev.kt.colexiu.com":r,h=encodeURIComponent(i.xmlFileUrl);m.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?(p.success("\u751F\u6210\u6210\u529F"),I(r)):p.error("\u751F\u6210\u5931\u8D25")}},I=n=>x(this,null,function*(){var f,r,u;for(let h=0;h{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 ee(()=>{s(),window.addEventListener("message",S)}),gt(()=>{window.removeEventListener("message",S)}),()=>t("iframe",{class:ae.productIframe,src:m.productIfameSrc},null)}});function De(i){return typeof i=="function"||Object.prototype.toString.call(i)==="[object Object]"&&!be(i)}const Kt=(i,y)=>{var I;let p=0;const m=i.closest(y);let e=m;const s=m==null?void 0:m.closest("measure");let S=null;for(;!S&&p<((s==null?void 0:s.childNodes.length)||50);)p++,((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},Gt=(i,y)=>{var S,I;if(!i)return"";const p=new DOMParser().parseFromString(i,"text/xml"),m=((I=(S=p.getElementsByTagName("part-list"))==null?void 0:S[0])==null?void 0:I.getElementsByTagName("score-part"))||[],e=p.getElementsByTagName("part"),s=m[y];if(s){const b=s.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(m).forEach(r=>{var u;r&&r.getAttribute("id")!==b&&((u=r.parentNode)==null||u.removeChild(r))});const n=p.getElementsByTagName("note"),f=r=>{var h;let u=n[r+1];for(let T=r;T{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(p)},$t={"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 Ae(i){var r,u,h,T;const y=Gt(i,0),p=new DOMParser().parseFromString(y,"text/xml"),m=Array.from(p.querySelectorAll("measure")),e=Array.from(p.querySelectorAll("note")),s=Array.from(p.querySelectorAll("words")),S=Array.from(p.querySelectorAll("metronome")),I=[];for(const v of[...s,...S]){const C=Kt(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 l=0,F=0;for(let c=0;cv.index-C.index);const n=Object.keys($t).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 Vt=Y({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:p,emit:m}){const e=K({details:{},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:"",isEvxml:!1,isShowFingering:!0}),s=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=Z(),f=ye(),r=()=>x(this,null,function*(){b.value.validate(c=>x(this,null,function*(){if(!c){if(!s.isAutoSave){s.isAutoSave=!0,s.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,isEvxml:e.isEvxml?1:0}),subjectIds:e.subjectIds.join(",")});e.audioType=="MIDI"&&(o.musicSheetSoundList=[]),I.value=!0,i.type==="add"?(yield xe(o),n.success("\u6DFB\u52A0\u6210\u529F")):i.type==="edit"&&(yield xe($(D({},o),{id:i.data.id})),n.success("\u4FEE\u6539\u6210\u529F")),m("getList"),m("close")}catch(o){console.log(o)}setTimeout(()=>{I.value=!1},100)}}))}),u=c=>{const o=new FileReader;o.onload=a=>{var d,L,U;try{S.list=Ae((d=a==null?void 0:a.target)==null?void 0:d.result).filter(w=>w.length===2)}catch(w){}s.partListNames=v((L=a==null?void 0:a.target)==null?void 0:L.result),T((U=a==null?void 0:a.target)==null?void 0:U.result);for(let w=0;w{for(let o=0;o{var U,w;if(!c)return;const o=new DOMParser().parseFromString(c,"text/xml"),a=[],d=o.getElementsByTagName("virtual-instrument");for(let M=0;M{L.set(M.code,M.id+"")}),e.musicalInstrumentIdList=[],a.forEach(M=>{L.has(M)&&e.musicalInstrumentIdList.push(L.get(M))}),e.musicalInstrumentIdList.length>0&&G(e.musicalInstrumentIdList)},v=c=>{var L,U,w,M;if(!c)return[];const o=new DOMParser().parseFromString(c,"text/xml"),a=((U=(L=o.getElementsByTagName("part-list"))==null?void 0:L[0])==null?void 0:U.getElementsByTagName("score-part"))||[];let d=Array.from(a).map(O=>{var le,we;let j=((we=(le=O.getElementsByTagName("part-name"))==null?void 0:le[0])==null?void 0:we.textContent)||"";return e.isEvxml&&(j=j||"noPartName"),{value:j,label:j}});return d.length===1&&e.details.id&&!d[0].value&&(d[0]={value:e.details.multiTracksSelection,label:e.details.multiTracksSelection}),d=d.filter(O=>{var j,le;return((le=(j=O.value)==null?void 0:j.toLocaleUpperCase)==null?void 0:le.call(j))!="COMMON"}),d.length>0&&(e.musicSheetSoundList=e.musicSheetSoundList.slice(0,d.length)),s.xmlFirstSpeed=((M=(w=o.getElementsByTagName("per-minute"))==null?void 0:w[0])==null?void 0:M.textContent)||"",e.playSpeed||(s.xmlFirstSpeed?e.playSpeed=Number.parseInt(s.xmlFirstSpeed):e.playSpeed=100),d},C=c=>{const o=me(s.partListNames)||[],a=e.multiTracksSelection;return o.forEach(d=>{a.includes(d.value)?d.disabled=!0:d.disabled=!1}),o||[]},G=c=>x(this,null,function*(){try{const{data:o}=yield Ke({page:1,rows:999,musicalInstrumentIdList:c});(o.rows||[]).forEach(d=>{e.subjectIds.push(d.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 d=e.multiTracksSelection.indexOf(a);d>-1&&e.multiTracksSelection.splice(d,1)}else e.musicSheetSoundList.splice(c,1)})})},l=c=>{!c||(c==="all"?(e.multiTracksSelection=[],s.partListNames.forEach(o=>{e.multiTracksSelection.push(o.value)})):c==="invert"?s.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"){s.ownerName="";return}if(!e.musicSheetExtend||!e.sourceType||!((a=e.musicSheetExtend)!=null&&a.userId))return;const c=e.musicSheetExtend.applicationId,o=s.appData.filter(d=>d.id==c);o.length>0&&(s.ownerName=o[0].appName),e.sourceType=="ORG"?s.ownerName+="-"+e.musicSheetExtend.organizationRole:e.sourceType=="PERSON"&&(s.ownerName+="-"+kt(e.musicSheetExtend.clientType,new Map(Object.entries(Ft))),e.musicSheetExtend.userName&&(s.ownerName+="-"+e.musicSheetExtend.userName),e.musicSheetExtend.phone&&(s.ownerName+="("+e.musicSheetExtend.phone+")"))};return ee(()=>x(this,null,function*(){var c;s.loading=!0,i.type==="preview"&&(s.previewMode=!0);{if(s.instrumentList&&s.instrumentList.length>0)return;try{const{data:o}=yield Tt({page:1,rows:999}),a=o.rows||[];s.instrumentData=a,a.forEach(d=>{d.label=d.name,d.value=d.id+"",d.disabled=!d.enableFlag}),s.instrumentList=a}catch(o){}}s.subjectList=me(i.subjectList),s.subjectList.forEach(o=>{o.disabled=!o.enableFlag});{const o=Object.keys(ve),{data:a}=yield Ge({page:1,rows:999,parentId:0}),L=(a.rows||[]).filter(U=>o.includes(U.appKey));L.forEach(U=>{U.label=U.appName,U.value=U.id}),s.appData=L}try{const{data:o}=yield ge({enable:!0});s.musicSheetCategories=$e(o,"musicSheetCategoriesList")}catch(o){}if(i.type==="edit"||i.type==="preview"){const o=i.data;try{const{data:a}=yield Be({id:o.id});e.details=a,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.isShowFingering=a.isShowFingering,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(d=>{s.musicSheetAccompanimentUrlList.push(d.audioFileUrl)}),e.musicSheetAccompanimentList=a.musicSheetAccompanimentList,e.audioType=a.audioType,e.isPlayBeat=a.isPlayBeat,e.isUseSystemBeat=a.isUseSystemBeat;try{const d=a.extConfigJson?JSON.parse(a.extConfigJson):{};e.graduals=d.gradualTimes||{},e.repeatedBeats=!!d.repeatedBeats,e.isEvxml=!!d.isEvxml}catch(d){}e.evaluationStandard=a.evaluationStandard,e.musicSheetExtend=a.musicSheetExtend,F(),yt.get(a.xmlFileUrl).then(d=>{if(d!=null&&d.data){S.list=Ae(d==null?void 0:d.data).filter(U=>U.length===2),s.partListNames=v(d==null?void 0:d.data),e.multiTracksSelection=a.multiTracksSelection?a.multiTracksSelection.split(","):[];const L=a.musicSheetSoundList?a.musicSheetSoundList:[];if(L.length===1&&L[0].track==="P1")e.musicSheetSoundList.push({audioFileUrl:L[0].audioFileUrl,track:s.partListNames[0].value||null});else{const U=[];s.partListNames.forEach(w=>{let M=null;L.forEach(O=>{O.track==w.value&&(M=O.audioFileUrl)}),e.musicSheetSoundList.push({audioFileUrl:M,track:w.value}),U.push(w.value)}),L.filter(w=>!U.includes(w.track)).forEach(w=>{e.musicSheetSoundList.push({audioFileUrl:w.audioFileUrl,track:w.track?w.track:null})})}}})}catch(a){}}else s.subjectList=s.subjectList.filter(o=>o.enableFlag==!0),s.instrumentList=s.instrumentList.filter(o=>o.enableFlag==!0);s.loading=!1})),()=>{let c,o;return t("div",{style:"background: #fff; padding-top: 12px"},[t(_e,{show:s.loading},{default:()=>[t(Se,{class:ae.formContainer,model:e,ref:b,"label-placement":"left","label-width":"150",disabled:s.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(se,{desc:"\u5C01\u9762\u56FE",disabled:s.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(R,{value:e.sourceType,"onUpdate:value":a=>e.sourceType=a,options:fe(he),placeholder:"\u8BF7\u9009\u62E9\u4F5C\u8005\u5C5E\u6027",onUpdateValue:()=>{e.musicSheetExtend={},s.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:s.previewMode||!e.sourceType,type:"primary",size:"small",text:!0,onClick:()=>{s.showMusicSheetOwnerDialog=!0}},{default:()=>[s.ownerName?s.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:s.previewMode||!e.sourceType,type:"primary",size:"small",text:!0,onClick:()=>{s.showMusicSheetOwnerDialog=!0}},{default:()=>[s.ownerName?s.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(R,{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:s.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(W,{value:e.repeatedBeats,"onUpdate:value":a=>e.repeatedBeats=a},{default:()=>[t(A,{value:!0},{default:()=>[g("\u662F")]}),t(A,{value:!1},{default:()=>[g("\u5426")]})]})]}),t(N,{label:"\u8BC4\u5206\u6807\u51C6",path:"evaluationStandard",rule:[{required:!0}]},{default:()=>[t(W,{value:e.evaluationStandard,"onUpdate:value":a=>e.evaluationStandard=a},{default:()=>[t(A,{value:"FREQUENCY"},{default:()=>[g("\u6807\u51C6\u8BC4\u6D4B")]}),t(A,{value:"AMPLITUDE"},{default:()=>[g("\u6253\u51FB\u4E50(\u632F\u5E45)")]}),t(A,{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(St,{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(W,{value:e.playMode,"onUpdate:value":a=>e.playMode=a,onUpdateValue:a=>{a==="MP3"?e.playMode="MP3":e.playMode="MIDI"}},{default:()=>[t(A,{value:"MP3"},{default:()=>[g("MP3")]}),t(A,{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(W,{value:e.audioType,"onUpdate:value":a=>e.audioType=a},{default:()=>[t(A,{value:"HOMEMODE"},{default:()=>[g("\u81EA\u5236\u4F34\u594F")]}),t(A,{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(se,{disabled:s.previewMode,size:10,imageList:s.musicSheetAccompanimentUrlList,"onUpdate:imageList":a=>s.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 d;s.musicSheetAccompanimentUrls=[s.musicSheetAccompanimentUrls,a.url].filter(Boolean).join(","),s.musicSheetAccompanimentUrlList=(d=s.musicSheetAccompanimentUrls)==null?void 0:d.split(",").filter(Boolean),e.musicSheetAccompanimentList=[];for(let L=0;L{s.musicSheetAccompanimentUrlList=[],s.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(se,{desc:"MIDI\u6587\u4EF6",disabled:s.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(se,{desc:"XML\u6587\u4EF6",disabled:s.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,.evxml",bucketName:"cloud-coach",text:"\u70B9\u51FB\u4E0A\u4F20XML\u6587\u4EF6",onReadFileInputEventAsArrayBuffer:u,onRemove:()=>{e.multiTracksSelection=[],s.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(R,{value:e.subjectIds,"onUpdate:value":a=>e.subjectIds=a,options:s.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(R,{placeholder:"\u8BF7\u9009\u62E9\u53EF\u7528\u4E50\u5668",options:s.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(W,{value:e.musicSheetType,"onUpdate:value":a=>e.musicSheetType=a},{default:()=>[t(A,{value:"SINGLE"},{default:()=>[g("\u662F")]}),t(A,{value:"CONCERT"},{default:()=>[g("\u5426")]})]})]}),t(N,{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":a=>e.isShowFingering=a},{default:()=>[t(A,{value:!0},{default:()=>[g("\u662F")]}),t(A,{value:!1},{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(W,{value:s.multiTracks,"onUpdate:value":a=>s.multiTracks=a,onUpdateValue:a=>{l(a)}},{default:()=>[t(A,{value:"all"},{default:()=>[g("\u5168\u9009")]}),t(A,{value:"allUncheck"},{default:()=>[g("\u91CD\u7F6E")]}),t(A,{value:"invert"},{default:()=>[g("\u53CD\u9009")]})]})]}),s.partListNames&&s.partListNames.length>0&&t(re,{span:24,style:"margin-top:5px"},{default:()=>[t(N,{label:"",path:"multiTracksSelection",rule:[{required:!1}]},{default:()=>[t(ze,{value:e.multiTracksSelection,"onUpdate:value":a=>e.multiTracksSelection=a},{default:()=>[t(B,{yGap:2,cols:4},De(c=s.partListNames.map(a=>t(re,null,{default:()=>[t(qe,{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(W,{value:e.isPlayBeat,"onUpdate:value":a=>e.isPlayBeat=a},{default:()=>[t(A,{value:!0},{default:()=>[g("\u662F")]}),t(A,{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(W,{value:e.isUseSystemBeat,"onUpdate:value":a=>e.isUseSystemBeat=a},{default:()=>[t(A,{value:!0},{default:()=>[g("\u7CFB\u7EDF\u8282\u62CD\u5668")]}),t(A,{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(E,{label:"rit.",required:!0,style:{marginTop:"10px"}},{default:()=>[t(q,{vertical:!0},De(o=S.list.map((a,d)=>t(de,null,{default:()=>[t(E,{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(E,{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,d)=>{var L,U;return t(ue,null,[(!h(a.track)||((U=(L=a.track)==null?void 0:L.toLocaleUpperCase)==null?void 0:U.call(L))!="COMMON"&&e.multiTracksSelection.includes(a.track))&&t(B,{class:ae.audioSection},{default:()=>[t(N,{span:12,label:"\u539F\u97F3",path:`musicSheetSoundList[${d}].audioFileUrl`,rule:[{required:!0,message:`\u8BF7\u4E0A\u4F20${a.track?a.track+"\u7684":"\u7B2C"+(d+1)+"\u4E2A"}\u539F\u97F3`}]},{default:()=>[t(se,{desc:"\u539F\u97F3\u6587\u4EF6",disabled:s.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)]}),s.partListNames.length>0&&t(N,{span:12,label:"\u6240\u5C5E\u8F68\u9053",path:`musicSheetSoundList[${d}].track`,rule:[{required:!0,message:"\u8BF7\u9009\u62E9\u6240\u5C5E\u8F68\u9053"}]},{default:()=>[t(R,{placeholder:"\u8BF7\u9009\u62E9\u6240\u5C5E\u8F68\u9053",value:a.track,options:C(a.track),onUpdateValue:w=>{const M=a.track;if(M){e.musicSheetSoundList.forEach(j=>{j.track==w&&(j.track=M)});const O=e.multiTracksSelection.indexOf(a.track);e.multiTracksSelection.splice(O,1)}else e.musicSheetSoundList=e.musicSheetSoundList.filter(O=>O.track!=w);w&&!e.multiTracksSelection.includes(w)&&e.multiTracksSelection.push(w),a.track=w}},null)]}),t(re,{class:ae.btnRemove},{default:()=>[t(k,{type:"primary",text:!0,onClick:()=>V(d)},{default:()=>[g("\u5220\u9664")]})]})]})])})])]})]}),i.type!=="preview"&&t(q,{justify:"end",style:"padding-top:12px"},{default:()=>[t(k,{type:"default",onClick:()=>m("close")},{default:()=>[g("\u53D6\u6D88")]}),t(k,{type:"primary",onClick:()=>r(),loading:I.value,disabled:I.value},{default:()=>[g("\u786E\u8BA4")]})]}),t(Q,{show:s.showMusicSheetOwnerDialog,"onUpdate:show":a=>s.showMusicSheetOwnerDialog=a,preset:"dialog",showIcon:!1,maskClosable:!1,title:"\u6240\u5C5E\u4EBA",style:{width:"800px"}},{default:()=>[t(Bt,{musicSheetExtend:e.musicSheetExtend,sourceType:e.sourceType,appData:s.appData,onClose:()=>{s.showMusicSheetOwnerDialog=!1},onChoseMusicSheetOwnerData:a=>{e.musicSheetExtend=D({},a),F()}},null)]}),t(Q,{class:ae.productModal,title:"\u81EA\u52A8\u751F\u6210\u66F2\u8C31\u56FE\u7247",show:s.productOpen,"onUpdate:show":a=>s.productOpen=a,preset:"dialog",closeOnEsc:!1,maskClosable:!1,showIcon:!1},{default:()=>[t(Xe,{xmlFileUrl:e.xmlFileUrl||"",onClose:()=>s.productOpen=!1,onConfirm:a=>x(this,null,function*(){try{e.musicImg=a.musicImg,e.musicFirstImg=a.musicFirstImg,e.musicJianImg=a.musicJianImg,r()}catch(d){console.log(d,"e")}setTimeout(()=>{s.isAutoSave=!1},50)})},null)]})])}}});function Jt(i){return typeof i=="function"||Object.prototype.toString.call(i)==="[object Object]"&&!be(i)}const Xt=Y({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 p=H(),m=K({musicSheetId:null,useApplicationIds:[],useProjectParamConfig:{}});te(()=>{const n=m.useProjectParamConfig.GYM,f=["musicSheetCategoryId","paymentType"];for(let r=0;r{const n=m.useProjectParamConfig.KLX,f=["availableType","musicSheetCategoryId","paymentType","musicPrice","topFlag","exquisiteFlag"];for(let r=0;r{const n=m.useProjectParamConfig.KT,f=["musicSheetCategoryId"];for(let r=0;r{const n=m.useProjectParamConfig.GYT,f=["musicSheetCategoryId"];for(let r=0;rx(this,null,function*(){e.loading=!0;const{data:n}=yield Be({id:i.id});e.musicSheetData=n,n&&n.musicSheetExtend&&n.musicSheetExtend.useApplicationIds&&(m.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=>{m.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}s.value=!0;try{const r=new Map;i.useProject.forEach(h=>{r.set(h.appKey,h.id)});const u={musicSheetId:i.id,useApplicationIds:m.useApplicationIds.join(",")};yield et(u),S.success("\u4FEE\u6539\u6210\u529F"),y("getList"),y("close")}catch(r){}s.value=!1}))});return()=>{let n;return t(_e,{show:e.loading},{default:()=>[t(Se,{class:ae.formContainer,model:m,ref:I,"label-placement":"left","label-width":"85"},{default:()=>[t(E,{label:"\u9002\u7528\u5E94\u7528",path:"useApplicationIds",rule:[{required:!1,message:"\u8BF7\u9009\u62E9\u9002\u7528\u5E94\u7528"}]},{default:()=>[t(ze,{value:m.useApplicationIds,"onUpdate:value":f=>m.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],bt(()=>{var r;return(r=p.value)==null?void 0:r.syncBarPosition()})}},Jt(n=e.userProjectList.map(f=>t(qe,{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:s.value,disabled:s.value},{default:()=>[g("\u786E\u8BA4")]})]})]})}}}),Ht="_productModal_35hv9_1",Wt="_productIframe_35hv9_9",Yt={productModal:Ht,productIframe:Wt};function pe(i){return typeof i=="function"||Object.prototype.toString.call(i)==="[object Object]"&&!be(i)}const Qt=Y({name:"music-list",props:["searchId","musicCategoryId"],setup(i,{emit:y}){const p=ye(),m=Z(),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,dataCorrect: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:{}}),s=()=>[{type:"selection"},{title:"\u66F2\u76EE\u540D\u79F0",minWidth:"200px",key:"id",render(l){return t(oe,{labelPlacement:"left",column:1},{default:()=>[t(J,{label:"\u540D\u79F0"},{default:()=>[t(ie,{content:l.name},null)]}),t(J,{label:"\u7F16\u53F7"},{default:()=>[t(ie,{content:l.id},null)]})]})}},{title:"\u5C01\u9762\u56FE",key:"titleImg",render(l){return t(It,{width:60,height:60,src:l.musicCover},null)}},{title:"\u66F2\u76EE\u4FE1\u606F",minWidth:"200px",key:"composer",render(l){let F;return t(oe,{labelPlacement:"left",column:1},{default:()=>[t(J,{label:"\u97F3\u4E50\u4EBA"},{default:()=>[l.composer]}),t(J,{label:"\u591A\u58F0\u8F68\u6E32\u67D3"},pe(F=Ee(l.musicSheetType,new Map(Object.entries(Ue))))?F:{default:()=>[F]}),t(J,{label:"\u5206\u7C7B"},{default:()=>[t(ie,{content:l.musicCategoryName},null)]}),t(J,{label:"\u53EF\u7528\u58F0\u90E8"},{default:()=>[t(ie,{content:l.subjectNames},null)]})]})}},{title:"\u4F5C\u8005\u5C5E\u6027",minWidth:"250px",key:"sourceType",render(l){let F,c;return t(oe,{labelPlacement:"left",column:1},{default:()=>[t(J,{label:"\u5C5E\u6027"},pe(F=Ee(l.sourceType,new Map(Object.entries(he))))?F:{default:()=>[F]}),t(J,{label:"\u6240\u5C5E\u4EBA"},pe(c=st(l.musicSheetExtend,l.sourceType))?c:{default:()=>[c]})]})}},{title:"\u9002\u7528\u9879\u76EE",key:"projectName",render(l){return t(q,null,{default:()=>[_(t(k,{type:"primary",size:"small",text:!0,onClick:()=>{e.showUseProject=!0,e.showUseProjectId=l.id}},{default:()=>[t(ie,{content:l.musicSheetExtend&&l.musicSheetExtend.useApplicationNames?l.musicSheetExtend.useApplicationNames:""},null),t(Lt,{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)])]})]}),[[z("auth"),"musicSheetApplicationExtend/save1752901206883221506"]])]})}},{title:"\u66F4\u65B0\u4FE1\u606F",minWidth:"250px",key:"updateBy",render(l){return t(oe,{labelPlacement:"left",column:1},{default:()=>[t(J,{label:"\u66F4\u65B0\u4EBA"},{default:()=>[l.updateByName]}),t(J,{label:"\u66F4\u65B0\u65F6\u95F4"},{default:()=>[l.updateTime]})]})}},{title:"\u5BA1\u6838\u7248\u672C",minWidth:"100px",key:"appAuditFlag",render(l){return t("div",null,[l.appAuditFlag?"\u662F":"\u5426"])}},{title:"\u72B6\u6001",minWidth:"50px",key:"status",render(l){return t(wt,{type:l.status?"primary":"default"},{default:()=>[l.status?"\u542F\u7528":"\u505C\u7528"]})}},{title:"\u64CD\u4F5C",key:"operation",fixed:"right",width:"300px",render(l){return t(q,null,{default:()=>[t(k,{type:"primary",size:"small",text:!0,onClick:()=>{e.musicPreview=!0,e.musicScore=l}},{default:()=>[g("\u9884\u89C8")]}),_(t(k,{type:"primary",size:"small",text:!0,onClick:()=>{e.visiableMusic=!0,e.musicOperation="preview",e.musicData=l,e.detailReadonly=!0}},{default:()=>[g("\u67E5\u770B")]}),[[z("auth"),"musicSheet/detail1751241103201271810"]]),_(t(k,{type:"primary",size:"small",text:!0,onClick:()=>{e.visiableMusic=!0,e.musicOperation="edit",e.musicData=l,e.detailReadonly=!0}},{default:()=>[g("\u4FEE\u6539")]}),[[z("auth"),"musicSheet/save1751241178962984962"]]),_(t(k,{type:"primary",size:"small",text:!0,onClick:()=>b(l)},{default:()=>[l.status?"\u505C\u7528":"\u542F\u7528"]}),[[z("auth"),"musicSheet/statusList1751241653309407234"]]),_(t(k,{type:"primary",size:"small",text:!0,onClick:()=>{e.productOpen=!0,e.productItem=l}},{default:()=>[g("\u751F\u6210\u56FE\u7247")]}),[[z("auth"),"musicSheet/img1751240591299051522"]]),_(t(k,{type:"primary",size:"small",text:!0,disabled:!!l.status,onClick:()=>r(l)},{default:()=>[g("\u5220\u9664")]}),[[z("auth"),"musicSheet/remove1753457445635645442"]])]})}}],S=H([]),I=l=>{S.value=l},b=l=>{const F=l.status?"\u505C\u7528":"\u542F\u7528";p.warning({title:"\u63D0\u793A",content:`\u662F\u5426${F}\uFF1F`,positiveText:"\u786E\u5B9A",negativeText:"\u53D6\u6D88",onPositiveClick:()=>x(this,null,function*(){try{yield Fe({ids:new Array(l.id),status:!l.status}),u(),m.success(`${F}\u6210\u529F`)}catch(c){}})})},n=l=>{const F=S.value.length;F==0&&m.warning("\u672A\u9009\u62E9\u6570\u636E");const c=l?"\u542F\u7528":"\u505C\u7528";p.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 Fe({ids:S.value,status:l}),u(),m.success(`${c}\u6210\u529F`)}catch(o){}})})},f=l=>x(this,null,function*(){if(!!e.searchForm.applicationId&&(e.userIdData=[],e.searchForm.userId=null,l&&l!=="PLATFORM")){const{data:F}=yield Oe({page:1,rows:9999,sourceType:l,applicationId:e.searchForm.applicationId});(F.rows||[]).forEach(o=>{e.userIdData.push($(D({},o),{label:l==="PERSON"?o.userName:o.organizationRole,value:l==="PERSON"?o.userId:o.organizationRoleId}))})}}),r=l=>{p.warning({title:"\u63D0\u793A",content:`\u5220\u9664"${l.name}"\uFF0C\u662F\u5426\u7EE7\u7EED\uFF1F`,positiveText:"\u786E\u5B9A",negativeText:"\u53D6\u6D88",onPositiveClick:()=>x(this,null,function*(){try{yield it({id:l.id}),u(),m.success("\u5220\u9664\u6210\u529F")}catch(F){}})})},u=()=>x(this,null,function*(){try{e.loading=!0;const l=e.searchForm.sourceType,F=e.searchForm.userId;let c=$(D({},e.searchForm),{useAppId:e.searchForm.useAppId?e.searchForm.useAppId.join(","):e.searchForm.useAppId});l&&l=="ORG"&&(c.organizationRoleId=F,c.userId=null);const{data:o}=yield lt(D(D({},e.pagination),c));e.pagination.pageTotal=Number(o.total),e.dataList=o.rows||[]}catch(l){}e.loading=!1}),h=()=>x(this,null,function*(){try{const{data:l}=yield ge({});e.musicSheetCategories=l||[]}catch(l){}}),T=()=>x(this,null,function*(){try{const{data:l}=yield Ke({page:1,rows:999}),F=l.rows||[];F.forEach(c=>{c.label=c.name,c.value=c.id+""}),e.subjectList=F}catch(l){}}),v=()=>x(this,null,function*(){try{const l=Object.keys(ve),{data:F}=yield Ge({page:1,rows:999}),c=F.rows||[];e.useProjectData=[],c.filter(a=>l.includes(a.appKey)).forEach(a=>{e.useProjectData.push($(D({},a),{label:a.appName,value:a.id}))})}catch(l){}}),C=H(),G=()=>{e.pagination.page=1,u()};vt(()=>i.searchId,l=>{console.log(l,"searchId")});const P=()=>{var l;(l=C.value)==null||l.submit()},V=()=>{var l;(l=C.value)==null||l.reset()};return ee(()=>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(je,{ref:C,model:e.searchForm,onSubmit:G,saveKey:"music-list",onSetModel:l=>e.searchForm=l},{default:()=>[t(E,{label:"\u5173\u952E\u8BCD",path:"keyword"},{default:()=>[t(X,{placeholder:"\u66F2\u76EE\u7F16\u53F7/\u540D\u79F0",value:e.searchForm.keyword,"onUpdate:value":l=>e.searchForm.keyword=l,clearable:!0},null)]}),t(E,{label:"\u591A\u58F0\u8F68\u6E32\u67D3",path:"musicSheetType"},{default:()=>[t(R,{placeholder:"\u8BF7\u9009\u62E9\u591A\u58F0\u8F68\u6E32\u67D3",value:e.searchForm.musicSheetType,"onUpdate:value":l=>e.searchForm.musicSheetType=l,options:fe(Ue),clearable:!0},null)]}),t(E,{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":l=>e.searchForm.musicCategoryId=l,options:e.musicSheetCategories,clearable:!0},null)]}),t(E,{label:"\u53EF\u7528\u58F0\u90E8",path:"musicSubject"},{default:()=>[t(R,{placeholder:"\u8BF7\u9009\u62E9\u53EF\u7528\u58F0\u90E8",value:e.searchForm.subjectId,"onUpdate:value":l=>e.searchForm.subjectId=l,options:e.subjectList,clearable:!0},null)]}),t(E,{label:"\u97F3\u4E50\u4EBA",path:"composer"},{default:()=>[t(X,{placeholder:"\u8BF7\u9009\u62E9\u97F3\u4E50\u4EBA",value:e.searchForm.composer,"onUpdate:value":l=>e.searchForm.composer=l,clearable:!0},null)]}),t(E,{label:"\u4F5C\u8005\u5C5E\u6027",path:"sourceType"},{default:()=>[t(R,{placeholder:"\u8BF7\u9009\u62E9\u4F5C\u8005\u5C5E\u6027",value:e.searchForm.sourceType,"onUpdate:value":l=>e.searchForm.sourceType=l,options:fe(he),onUpdateValue:l=>x(this,null,function*(){e.userIdData=[],e.searchForm.userId=null,l&&l!=="PLATFORM"?(yield f(l),e.userIdDisable=!e.searchForm.applicationId):e.userIdDisable=!0}),clearable:!0},null)]}),t(E,{label:"\u6240\u5C5E\u9879\u76EE",path:"applicationId"},{default:()=>[t(R,{placeholder:"\u8BF7\u9009\u62E9\u6240\u5C5E\u9879\u76EE",value:e.searchForm.applicationId,"onUpdate:value":l=>e.searchForm.applicationId=l,options:e.useProjectData,clearable:!0,onUpdateValue:l=>x(this,null,function*(){e.searchForm.applicationId=l,l?(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(E,{label:"\u6240\u5C5E\u4EBA",path:"userId"},{label:()=>t("div",null,[g("\u6240\u5C5E\u4EBA")]),default:()=>t(R,{filterable:!0,placeholder:"\u8BF7\u9009\u62E9\u6240\u5C5E\u4EBA",disabled:e.userIdDisable||!e.searchForm.applicationId&&!e.searchForm.sourceType,value:e.searchForm.userId,"onUpdate:value":l=>e.searchForm.userId=l,options:e.userIdData,clearable:!0},null)}),t(E,{label:"\u9002\u7528\u9879\u76EE",path:"useAppId"},{default:()=>[t(R,{placeholder:"\u8BF7\u9009\u62E9\u9002\u7528\u9879\u76EE",value:e.searchForm.useAppId,"onUpdate:value":l=>e.searchForm.useAppId=l,options:e.useProjectData,multiple:!0,maxTagCount:1},null)]}),t(E,{label:"\u72B6\u6001",path:"status"},{default:()=>[t(R,{value:e.searchForm.status,"onUpdate:value":l=>e.searchForm.status=l,placeholder:"\u8BF7\u9009\u62E9\u72B6\u6001",clearable:!0,options:[{label:"\u542F\u7528",value:!0},{label:"\u505C\u7528",value:!1}]},null)]}),t(E,{label:"\u5BA1\u6838\u7248\u672C",path:"appAuditFlag"},{default:()=>[t(R,{value:e.searchForm.appAuditFlag,"onUpdate:value":l=>e.searchForm.appAuditFlag=l,placeholder:"\u8BF7\u9009\u62E9\u5BA1\u6838\u7248\u672C",clearable:!0,options:[{label:"\u662F",value:1},{label:"\u5426",value:0}]},null)]}),t(E,{label:"\u6570\u636E\u4FEE\u590D",path:"dataCorrect"},{default:()=>[t(R,{value:e.searchForm.dataCorrect,"onUpdate:value":l=>e.searchForm.dataCorrect=l,placeholder:"\u8BF7\u9009\u62E9\u6570\u636E\u4FEE\u590D",clearable:!0,options:[{label:"\u662F",value:!0},{label:"\u5426",value:!1}]},null)]}),t(E,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:()=>[_(t(k,{type:"primary",onClick:()=>{e.visiableMusic=!0,e.musicOperation="add",e.musicData={},e.detailReadonly=!0}},{default:()=>[g("\u65B0\u589E\u66F2\u76EE")]}),[[z("auth"),"musicSheet/save1751241178962984962"]]),_(t(k,{disabled:S.value.length==0,onClick:()=>{n(!1)}},{default:()=>[g("\u6279\u91CF\u505C\u7528")]}),[[z("auth"),"musicSheet/statusList1751241653309407234"]]),_(t(k,{disabled:S.value.length==0,onClick:()=>{n(!0)}},{default:()=>[g("\u6279\u91CF\u542F\u7528")]}),[[z("auth"),"musicSheet/statusList1751241653309407234"]])]}),t(ne,{loading:e.loading,columns:s(),data:e.dataList,rowKey:l=>l.id,onUpdateCheckedRowKeys:I,scrollX:"1200"},null),t(Pe,{page:e.pagination.page,"onUpdate:page":l=>e.pagination.page=l,pageSize:e.pagination.rows,"onUpdate:pageSize":l=>e.pagination.rows=l,pageTotal:e.pagination.pageTotal,"onUpdate:pageTotal":l=>e.pagination.pageTotal=l,onList:u,sync:!0,saveKey:"music-list"},null)]),t(Q,{show:e.visiableMusic,"onUpdate:show":l=>e.visiableMusic=l,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(Vt,{type:e.musicOperation,data:e.musicData,subjectList:e.subjectList,onClose:()=>e.visiableMusic=!1,onGetList:u},null)]}),t(Q,{blockScroll:!0,show:e.musicPreview,"onUpdate:show":l=>e.musicPreview=l,preset:"dialog",showIcon:!1,title:"\u66F2\u76EE\u9884\u89C8",style:{width:"auto"}},{default:()=>[t(tt,{item:e.musicScore,isMove:1},null)]}),t(Q,{blockScroll:!0,show:e.showUseProject,"onUpdate:show":l=>e.showUseProject=l,preset:"dialog",showIcon:!1,title:"\u9002\u7528\u9879\u76EE",style:{width:"500px"}},{default:()=>[t(Xt,{id:e.showUseProjectId,useProject:e.useProjectData,onClose:()=>e.showUseProject=!1,onGetList:u},null)]}),t(Q,{class:Yt.productModal,title:"\u81EA\u52A8\u751F\u6210\u66F2\u8C31\u56FE\u7247",show:e.productOpen,"onUpdate:show":l=>e.productOpen=l,preset:"dialog",closeOnEsc:!1,maskClosable:!1,showIcon:!1},{default:()=>[t(Xe,{xmlFileUrl:e.productItem.xmlFileUrl,onClose:()=>e.productOpen=!1,onConfirm:l=>x(this,null,function*(){try{yield at($(D({},l),{id:e.productItem.id}))}catch(F){}})},null)]})])}}),Zt=Y({emits:["close","getList"],props:["actvieRow","saveMode","list"],name:"save-categroy-dialog",setup(i,{emit:y}){const p=Z(),m=H(),e=H([{name:"\u9876\u7EA7\u5206\u7C7B",id:0},...$e(i.list,"musicSheetCategoriesList")]),s=K({loading:!1,dataList:[],btnLoading:!1}),S=K({id:"",name:"",enable:!0,parentId:"0"}),I=()=>x(this,null,function*(){var b;(b=m.value)==null||b.validate(n=>x(this,null,function*(){if(!n){s.btnLoading=!0;try{if(i.saveMode==="add"){const{data:f}=yield ut(D({},S));y("getList"),p.success("\u6DFB\u52A0\u6210\u529F")}else{const{data:f}=yield rt(D({},S));y("getList"),p.success("\u4FEE\u6539\u6210\u529F")}}catch(f){}s.btnLoading=!1}}))});return ee(()=>{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:m,model:S},{default:()=>[i.saveMode==="add"&&i.actvieRow&&t(E,{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(E,{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:s.btnLoading,disabled:s.btnLoading},{default:()=>[g("\u786E\u8BA4")]})]})])}}),ea=Y({emits:["setTabName","jump"],name:"music-category",setup(i,{slots:y,attrs:p,emit:m}){const e=K({loading:!1,pagination:{page:1,rows:10},dataList:[],showSaveDialog:!1,saveMode:"add",saveRowData:null}),s=ye(),S=Z(),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});ee(()=>{I()});const b=u=>{m("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:()=>[_(t(k,{type:"error",size:"small",text:!0,onClick:()=>r(u)},{default:()=>[g("\u5220\u9664")]}),[[z("auth"),"musicSheetCategories/remove1751239397398806530"]]),_(t(k,{type:"primary",size:"small",text:!0,onClick:()=>{e.saveRowData=u,e.saveMode="edit",e.showSaveDialog=!0}},{default:()=>[g("\u4FEE\u6539")]}),[[z("auth"),"musicSheetCategories/update1751239533856292866"]]),_(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")]}),[[z("auth"),"musicSheetCategories/save1751239479284203521"]])]})}}],f=()=>{e.pagination.page=1,I()},r=u=>x(this,null,function*(){s.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 ot(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:()=>[_(t(k,{type:"primary",onClick:()=>{e.saveMode="add",e.showSaveDialog=!0,e.saveRowData=null}},{default:()=>[g("\u65B0\u589E\u5206\u7C7B")]}),[[z("auth"),"musicSheetCategories/save1751239479284203521"]])]}),t(ne,{loading:e.loading,columns:n(),data:e.dataList,rowKey:u=>u.id,childrenKey:"musicSheetCategoriesList"},null)]),t(Q,{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(Zt,{onGetList:()=>{e.showSaveDialog=!1,I()},onClose:()=>{e.showSaveDialog=!1},list:e.dataList,saveMode:e.saveMode,actvieRow:e.saveRowData},null)]})])}}),ka=Y({name:"music-sheet",setup(){const i=K({tabName:"MusicList",searchId:null,musicCategoryId:null}),y=Ct();Nt(e=>{e.form.tabName&&(i.tabName=e.form.tabName)});const p=e=>{console.log("setTabName",e),i.tabName=e.tabName,i.searchId=e.id},m=e=>{Ut(e,"tabName",y)};return()=>t("div",{class:"system-menu-container"},[t("div",{class:["section-container"],style:"padding-top: 0"},[t(xt,{type:"line",size:"large",value:i.tabName,"onUpdate:value":[e=>i.tabName=e,e=>m(e)]},{default:()=>[_(t(Ne,{name:"MusicList",tab:"\u66F2\u76EE\u5217\u8868"},{default:()=>[t(Qt,{searchId:i.searchId,musicCategoryId:i.musicCategoryId},null)]}),[[z("auth"),"musicSheet/page1751238894313013249"]]),_(t(Ne,{name:"CategroryList",tab:"\u66F2\u76EE\u5206\u7C7B"},{default:()=>[t(ea,{onSetTabName:p,onJump:e=>{i.tabName=e.tabName,i.musicCategoryId=e.musicCategoryId}},null)]}),[[z("auth"),"musicSheetCategories/queryTree1751238805699952641"]])]})])])}});export{ka as default};