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