1234567891011121314151617181920212223242526272829 |
- var Je=Object.defineProperty,Xe=Object.defineProperties;var He=Object.getOwnPropertyDescriptors;var Le=Object.getOwnPropertySymbols;var We=Object.prototype.hasOwnProperty,Ye=Object.prototype.propertyIsEnumerable;var xe=(i,v,f)=>v in i?Je(i,v,{enumerable:!0,configurable:!0,writable:!0,value:f}):i[v]=f,D=(i,v)=>{for(var f in v||(v={}))We.call(v,f)&&xe(i,f,v[f]);if(Le)for(var f of Le(v))Ye.call(v,f)&&xe(i,f,v[f]);return i},$=(i,v)=>Xe(i,He(v));var F=(i,v,f)=>new Promise((p,e)=>{var s=S=>{try{I(f.next(S))}catch(n){e(n)}},y=S=>{try{I(f.throw(S))}catch(n){e(n)}},I=S=>S.done?p(S.value):Promise.resolve(S.value).then(s,y);I((f=f.apply(i,v)).next())});import{S as je}from"./index.499ab265.js";import{P as Pe}from"./index.2e16308a.js";import{a as Oe,m as ge,b as Be,c as Ce,d as Qe,e as Ze,f as Fe,g as et,h as tt,i as at,j as lt,k as st}from"./api.7240d663.js";import{U as se}from"./index.7383c396.js";import{cj as it,cG as ut,d as Y,cI as rt,cJ as Re,F as te,cP as ot,bi as Te,dx as nt,dy as ke,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 T,k as g,cg as ne,bx as ct,ai as ye,dz as dt,dk as _e,q as Se,di as ce,ac as B,a8 as W,a7 as A,db as pt,ad as re,dA as ze,m as qe,ag as de,aa as Q,bn as be,U as mt,M as ht,H as _,ae as ft,ch as gt,d9 as J,da as oe,bC as z,a0 as yt,e as St,d7 as bt,d8 as Ne}from"./index.bfa8babc.js";import{B as ve,D as he,c as vt,E as Ue}from"./constant.d4a76877.js";import{g as fe,a as It}from"./objectUtil.ec24ceed.js";import{c as wt}from"./api.b23362ed.js";import{x as Ke}from"./api.c9ec8f44.js";import{s as Ge}from"./api.0239478a.js";import{f as $e}from"./index.11827a1c.js";import{a as Lt}from"./uploadFile.87df876c.js";import{N}from"./FormItemGridItem.5c587b00.js";import{N as Ie}from"./Cascader.918cd1a9.js";import{M as xt,c as Ct,g as Ft}from"./musicUtil.c91ea54f.js";import{g as Ee}from"./filters.21e6bf24.js";import{T as ie}from"./index.829bfe70.js";import{g as Tt,s as kt}from"./use-async.2df90bb7.js";import"./searchs.b637f0d6.js";import"./oss-file-upload.5e9de1eb.js";import"./api.9a0c39cd.js";import"./vuedraggable.umd.826a8b04.js";import"./DeleteFilled.12ec65e4.js";import"./api.ad162c67.js";import"./knowledgeTypeData.3b15dd0b.js";import"./dateUtil.22f7adbc.js";import"./dayjs.min.3e32b948.js";const Nt=it("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);
- `,[ut("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);
- `)]),Ut=Object.assign(Object.assign({},Re.props),{size:{type:String,default:"medium"},bordered:{type:Boolean,default:void 0}}),Me=Y({name:"InputGroupLabel",props:Ut,setup(i){const{mergedBorderedRef:v,mergedClsPrefixRef:f,inlineThemeDisabled:p}=rt(i),e=Re("Input","-input-group-label",Nt,nt,i,f),s=te(()=>{const{size:I}=i,{common:{cubicBezierEaseInOut:S},self:{groupLabelColor:n,borderRadius:h,groupLabelTextColor:r,lineHeight:u,groupLabelBorder:m,[ke("fontSize",I)]:k,[ke("height",I)]:b}}=e.value;return{"--n-bezier":S,"--n-group-label-color":n,"--n-group-label-border":m,"--n-border-radius":h,"--n-group-label-text-color":r,"--n-font-size":k,"--n-line-height":u,"--n-height":b}}),y=p?ot("input-group-label",te(()=>i.size[0]),s,i):void 0;return{mergedClsPrefix:f,mergedBordered:v,cssVars:p?void 0:s,themeClass:y==null?void 0:y.themeClass,onRender:y==null?void 0:y.onRender}},render(){var i,v,f;const{mergedClsPrefix:p}=this;return(i=this.onRender)===null||i===void 0||i.call(this),Te("div",{class:[`${p}-input-group-label`,this.themeClass],style:this.cssVars},(f=(v=this.$slots).default)===null||f===void 0?void 0:f.call(v),this.mergedBordered?Te("div",{class:`${p}-input-group-label__border`}):null)}}),Et="_audioSection_o5wty_1",Mt="_btnRemove_o5wty_9",Dt="_formContainer_o5wty_14",At="_productModal_o5wty_19",jt="_productIframe_o5wty_27",ae={audioSection:Et,btnRemove:Mt,formContainer:Dt,productModal:At,productIframe:jt},Pt=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:v,attrs:f,emit:p}){const e=K({loading:!1,pagination:{page:1,rows:10,pageTotal:0},searchForm:{applicationId:null,name:null,sourceType:null},dataList:[],appData:[]}),s=Z(),y=H(),I=()=>{e.pagination.page=1,n()},S=()=>{var u;(u=y.value)==null||u.submit()},n=()=>F(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:m}=yield Oe(D(D({},e.pagination),e.searchForm));e.pagination.pageTotal=Number(m.total),e.dataList=m.rows||[]}catch(u){}e.loading=!1});ee(()=>F(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 h=()=>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(T,{type:"primary",size:"small",text:!0,onClick:()=>{const m=$(D({},u),{applicationId:e.searchForm.applicationId});p("choseMusicSheetOwnerData",m),p("close")}},{default:()=>[g("\u9009\u62E9")]})]})}}]:[{title:"\u4EBA\u5458\u540D\u79F0",key:"userName"},{title:"\u624B\u673A\u53F7",key:"phone"},{title:"\u64CD\u4F5C",key:"operation",fixed:"right",render(u){return t(q,null,{default:()=>[t(T,{type:"primary",size:"small",text:!0,onClick:()=>{const m=$(D({},u),{applicationId:e.searchForm.applicationId});p("choseMusicSheetOwnerData",m),p("close")}},{default:()=>[g("\u9009\u62E9")]})]})}}],r=()=>[{title:"\u673A\u6784\u540D\u79F0",key:"organizationRole"},{title:"\u64CD\u4F5C",key:"operation",fixed:"right",render(u){return t(q,null,{default:()=>[t(T,{type:"primary",size:"small",text:!0,onClick:()=>{const m=$(D({},u),{applicationId:e.searchForm.applicationId});p("choseMusicSheetOwnerData",m),p("close")}},{default:()=>[g("\u9009\u62E9")]})]})}}];return()=>t("div",{class:"system-menu-container"},[t(je,{ref:y,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(T,{type:"primary",onClick:S},{default:()=>[g("\u641C\u7D22")]})]})]})]}),t("div",{class:["section-container"]},[i.sourceType==="PERSON"&&t(ne,{loading:e.loading,columns:h(),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=Y({name:"music-create-img",props:{xmlFileUrl:{type:String,default:""}},emits:["close","confirm"],setup(i,{emit:v}){const f=Z(),p=K({productOpen:!1,productIfameSrc:""}),e=K({musicImg:"",musicFirstImg:"",musicJianImg:""}),s=()=>{if(!i.xmlFileUrl){f.error("\u8BF7\u5148\u4E0A\u4F20XML");return}const n={dev:"https://dev.kt.colexiu.com",test:"https://test.lexiaoya.cn",online:"https://mec.colexiu.com"},h=location.origin.includes("//dev")?"dev":location.origin.includes("//test")?"test":location.origin.includes("//mec")?"online":"dev",r=n[h],u=/(localhost|192)/.test(location.host)?"https://dev.kt.colexiu.com":r,m=encodeURIComponent(i.xmlFileUrl);p.productIfameSrc=u+`/instrument/#/product-img?xmlUrl=${m}&isCreateImg=true&isCbs=true`},y=n=>{const h=n.data;if((h==null?void 0:h.api)==="webApi_renderSvg"){let r=[];try{r=JSON.parse(h.product)}catch(u){console.log("\u{1F680} ~ error:",u)}r=r.filter(u=>u.base64),r.length===3?(f.success("\u751F\u6210\u6210\u529F"),I(r)):f.error("\u751F\u6210\u5931\u8D25")}},I=n=>F(this,null,function*(){var h,r,u;for(let m=0;m<n.length;m++){const k=S(n[m].base64,`${Date.now()}p${m}.png`);n[m].url=yield Lt(k)}e.musicImg=((h=n[0])==null?void 0:h.url)||"",e.musicFirstImg=((r=n[1])==null?void 0:r.url)||"",e.musicJianImg=((u=n[2])==null?void 0:u.url)||"",n=[],v("close"),v("confirm",e)}),S=(n,h)=>{var x;let r=n.split(",")||[],u=(x=r[0].match(/:(.*?);/))==null?void 0:x[1],m=atob(r[1]),k=m.length,b=new Uint8Array(k);for(;k--;)b[k]=m.charCodeAt(k);return new File([b],h,{type:u})};return ee(()=>{s(),window.addEventListener("message",y)}),ct(()=>{window.removeEventListener("message",y)}),()=>t("iframe",{class:ae.productIframe,src:p.productIfameSrc},null)}});function De(i){return typeof i=="function"||Object.prototype.toString.call(i)==="[object Object]"&&!be(i)}const Ot=(i,v)=>{var I;let f=0;const p=i.closest(v);let e=p;const s=p==null?void 0:p.closest("measure");let y=null;for(;!y&&f<((s==null?void 0:s.childNodes.length)||50);)f++,((I=e==null?void 0:e.nextElementSibling)==null?void 0:I.tagName)==="note"&&(y=e==null?void 0:e.nextElementSibling),e=e==null?void 0:e.nextElementSibling;return y},Bt=(i,v)=>{var y,I;if(!i)return"";const f=new DOMParser().parseFromString(i,"text/xml"),p=((I=(y=f.getElementsByTagName("part-list"))==null?void 0:y[0])==null?void 0:I.getElementsByTagName("score-part"))||[],e=f.getElementsByTagName("part"),s=p[v];if(s){const S=s.getAttribute("id");Array.from(e).forEach(r=>{var u,m,k;if(r&&r.getAttribute("id")!==S&&((u=r.parentNode)==null||u.removeChild(r)),r&&r.getAttribute("id")===S){const b=r.getElementsByTagName("barline"),x=(m=b[b.length-1])==null?void 0:m.parentElement;if(((k=x==null?void 0:x.lastElementChild)==null?void 0:k.tagName)!=="barline"){const G=(x==null?void 0:x.children)||[];for(let P of G)if(P.tagName==="barline"){x==null||x.appendChild(P);break}}}}),Array.from(p).forEach(r=>{var u;r&&r.getAttribute("id")!==S&&((u=r.parentNode)==null||u.removeChild(r))});const n=f.getElementsByTagName("note"),h=r=>{var m;let u=n[r+1];for(let k=r;k<n.length;k++){const b=n[k];if(!((m=b.getElementsByTagName("grace"))!=null&&m.length)){u=b;break}}return u==null?void 0:u.getElementsByTagName("duration")[0]};Array.from(n).forEach((r,u)=>{var k;const m=r.getElementsByTagName("grace");m&&m.length&&r.appendChild((k=h(u))==null?void 0:k.cloneNode(!0))})}return new XMLSerializer().serializeToString(f)},Rt={"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,m,k;const v=Bt(i,0),f=new DOMParser().parseFromString(v,"text/xml"),p=Array.from(f.querySelectorAll("measure")),e=Array.from(f.querySelectorAll("note")),s=Array.from(f.querySelectorAll("words")),y=Array.from(f.querySelectorAll("metronome")),I=[];for(const b of[...s,...y]){const x=Ot(b,"direction");if(x){const G=x==null?void 0:x.closest("measure"),P=Array.from(G.querySelectorAll("note")),V=Array.from(G.childNodes).filter(c=>c.nodeName==="note").findIndex(c=>c===x);let l=0,C=0;for(let c=0;c<P.length;c++){const a=+(((r=P[c].querySelector("duration"))==null?void 0:r.textContent)||"0");l+=a,c<V&&(C=l)}I.push({ele:b,index:e.indexOf(x),noteInMeasureIndex:V,textContent:b.textContent,measureIndex:p.indexOf(G),type:b.tagName,allDuration:l,leftDuration:C})}}I.push({ele:e[e.length-1],index:e.length,noteInMeasureIndex:0,textContent:"",type:"metronome",allDuration:1,leftDuration:1,measureIndex:p.length});const S=[];I.sort((b,x)=>b.index-x.index);const n=Object.keys(Rt).map(b=>b.toLocaleLowerCase());let h=!1;for(const b of I){const x=(u=b.textContent)==null?void 0:u.toLocaleLowerCase().trim();b===I[I.length-1]&&((m=S[S.length-1])==null?void 0:m.length)===1&&(h=!0);const G=n.find(P=>{const V=P.split(" ");return x&&V.includes(x)});if(b.type==="metronome"||b.type==="words"&&(x.startsWith("a tempo")||G)||h){const P=S.findIndex(V=>V.length===1);P>-1&&b.index>((k=S[P])==null?void 0:k[0].start)&&(S[P][1]={start:b.index,measureIndex:b.measureIndex,noteInMeasureIndex:b.noteInMeasureIndex,allDuration:b.allDuration,leftDuration:b.leftDuration,type:x})}b.type==="words"&&G&&S.push([{start:b.index,measureIndex:b.measureIndex,noteInMeasureIndex:b.noteInMeasureIndex,allDuration:b.allDuration,leftDuration:b.leftDuration,type:x}])}return S}const _t=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:v,attrs:f,emit:p}){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}),y=K({list:[],gradualRefs:[]}),I=H(!1),S=H(),n=Z(),h=ye(),r=()=>F(this,null,function*(){S.value.validate(c=>F(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 Ce(o),n.success("\u6DFB\u52A0\u6210\u529F")):i.type==="edit"&&(yield Ce($(D({},o),{id:i.data.id})),n.success("\u4FEE\u6539\u6210\u529F")),p("getList"),p("close")}catch(o){console.log(o)}setTimeout(()=>{I.value=!1},100)}}))}),u=c=>{const o=new FileReader;o.onload=a=>{var d,L,U;try{y.list=Ae((d=a==null?void 0:a.target)==null?void 0:d.result).filter(w=>w.length===2)}catch(w){}s.partListNames=b((L=a==null?void 0:a.target)==null?void 0:L.result),k((U=a==null?void 0:a.target)==null?void 0:U.result);for(let w=0;w<s.partListNames.length;w++)e.musicSheetSoundList[w]||e.musicSheetSoundList.push({audioFileUrl:null,track:null}),e.musicSheetSoundList[w].track=s.partListNames[w].value;for(let w=e.musicSheetSoundList.length;w<s.partListNames.length;w++){const M=s.partListNames[w].value,O=$(D({},e.musicSheetSoundList[0]),{track:M});O.speed||(O.speed=s.xmlFirstSpeed),P(O)}e.musicSheetSoundList.length==0&&e.musicSheetSoundList.push({audioFileUrl:"",track:""})},o.readAsText(c)},m=c=>{for(let o=0;o<s.partListNames.length;o++)if(s.partListNames[o].value==c)return!0;return!1},k=c=>{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<d.length;M++){const j=((w=(U=d[M].getElementsByTagName("virtual-name"))==null?void 0:U[0])==null?void 0:w.textContent)||"";j&&!a.includes(j)&&a.push(j)}const L=new Map;s.instrumentData.forEach(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)},b=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.parseFloat(s.xmlFirstSpeed):e.playSpeed=100),d},x=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=>F(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=>{h.warning({title:"\u63D0\u793A",content:"\u662F\u5426\u786E\u8BA4\u5220\u9664\u6B64\u539F\u97F3\uFF1F",positiveText:"\u786E\u5B9A",negativeText:"\u53D6\u6D88",onPositiveClick:()=>F(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=[]))},C=()=>{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+="-"+It(e.musicSheetExtend.clientType,new Map(Object.entries(vt))),e.musicSheetExtend.userName&&(s.ownerName+="-"+e.musicSheetExtend.userName),e.musicSheetExtend.phone&&(s.ownerName+="("+e.musicSheetExtend.phone+")"))};return ee(()=>F(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 wt({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?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(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,C(),dt.get(a.xmlFileUrl).then(d=>{if(d!=null&&d.data){y.list=Ae(d==null?void 0:d.data).filter(U=>U.length===2),s.partListNames=b(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:S,"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(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(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(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(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:!0,message:"\u8BF7\u8F93\u5165\u901F\u5EA6"}]},{default:()=>[t(pt,{placeholder:"\u8BF7\u8F93\u5165\u901F\u5EA6",value:e.playSpeed,"onUpdate:value":a=>e.playSpeed=a,min:"0",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: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 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.length;L++)e.musicSheetAccompanimentList.push({audioFileUrl:s.musicSheetAccompanimentUrlList[L],sortNumber:L+1})},onRemove:()=>{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: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(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: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(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")]})]})]})]}),!!y.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=y.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,[(!m(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:x(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(T,{type:"primary",text:!0,onClick:()=>V(d)},{default:()=>[g("\u5220\u9664")]})]})]})])})])]})]}),i.type!=="preview"&&t(q,{justify:"end",style:"padding-top:12px"},{default:()=>[t(T,{type:"default",onClick:()=>p("close")},{default:()=>[g("\u53D6\u6D88")]}),t(T,{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(Pt,{musicSheetExtend:e.musicSheetExtend,sourceType:e.sourceType,appData:s.appData,onClose:()=>{s.showMusicSheetOwnerDialog=!1},onChoseMusicSheetOwnerData:a=>{e.musicSheetExtend=D({},a),C()}},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(Ve,{xmlFileUrl:e.xmlFileUrl||"",onClose:()=>s.productOpen=!1,onConfirm:a=>F(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 zt(i){return typeof i=="function"||Object.prototype.toString.call(i)==="[object Object]"&&!be(i)}const qt=Y({name:"use-project",props:{useProject:{type:Array,required:!0,default:[]},id:{type:String,required:!0,default:null}},emits:["close","getList"],setup(i,{emit:v}){const f=H(),p=K({musicSheetId:null,useApplicationIds:[],useProjectParamConfig:{}});te(()=>{const n=p.useProjectParamConfig.GYM,h=["musicSheetCategoryId","paymentType"];for(let r=0;r<h.length;r++)if(n[h[r]])return!0;return!1}),te(()=>{const n=p.useProjectParamConfig.KLX,h=["availableType","musicSheetCategoryId","paymentType","musicPrice","topFlag","exquisiteFlag"];for(let r=0;r<h.length;r++){const u=n[h[r]];if(u!=null&&u!=null&&u!="")return!0}return!1}),te(()=>{const n=p.useProjectParamConfig.KT,h=["musicSheetCategoryId"];for(let r=0;r<h.length;r++)if(n[h[r]])return!0;return!1}),te(()=>{const n=p.useProjectParamConfig.GYT,h=["musicSheetCategoryId"];for(let r=0;r<h.length;r++)if(n[h[r]])return!0;return!1});const e=K({loading:!1,musicSheetData:null,tabName:null,selectAppKey:[],selectAppName:[],appKeyNameMap:null,userProjectList:[],musicSheetCategoryOptions:{},musicSheetCanBeUsedProjectKey:[]}),s=H(!1),y=Z();ee(()=>F(this,null,function*(){e.loading=!0;const{data:n}=yield Be({id:i.id});e.musicSheetData=n,n&&n.musicSheetExtend&&n.musicSheetExtend.useApplicationIds&&(p.useApplicationIds=n.musicSheetExtend.useApplicationIds.split(",")||[]);const h=Object.keys(ve);i.useProject.forEach(m=>{const k=h.indexOf(m.appKey);let b=!1;k>-1&&e.userProjectList.push($(D({},m),{disabled:b}))}),e.appKeyNameMap=new Map,e.userProjectList.forEach(m=>{p.useApplicationIds.includes(m.id)&&e.selectAppKey.push(m.appKey),e.appKeyNameMap.set(m.appKey,m.appName)}),e.selectAppKey.length>0&&(e.tabName=e.selectAppKey[0]);const r=[],u=new Map;i.useProject.forEach(m=>{r.push(m.id),u.set(m.id,m.appKey)}),e.loading=!1}));const I=H(),S=()=>F(this,null,function*(){I.value.validate(n=>F(this,null,function*(){var h;if(n){if(Array.isArray(n)&&n.length>0){const r=(h=n[0][0].field)==null?void 0:h.split(".")[1];r&&e.selectAppKey.includes(r)&&(e.tabName=r)}return}s.value=!0;try{const r=new Map;i.useProject.forEach(m=>{r.set(m.appKey,m.id)});const u={musicSheetId:i.id,useApplicationIds:p.useApplicationIds.join(",")};yield Qe(u),y.success("\u4FEE\u6539\u6210\u529F"),v("getList"),v("close")}catch(r){}s.value=!1}))});return()=>{let n;return t(_e,{show:e.loading},{default:()=>[t(Se,{class:ae.formContainer,model:p,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:p.useApplicationIds,"onUpdate:value":h=>p.useApplicationIds=h,onUpdateValue:h=>{e.selectAppKey=[],e.userProjectList.forEach(r=>{h.includes(r.id)&&e.selectAppKey.push(r.appKey)}),e.selectAppKey.length==0?e.tabName="":e.tabName=e.selectAppKey[0],mt(()=>{var r;return(r=f.value)==null?void 0:r.syncBarPosition()})}},zt(n=e.userProjectList.map(h=>t(qe,{value:h.value},{default:()=>[h.label]})))?n:{default:()=>[n]})]})]}),t(q,{justify:"end",style:"margin-top: 10px"},{default:()=>[t(T,{type:"default",onClick:()=>v("close")},{default:()=>[g("\u53D6\u6D88")]}),t(T,{type:"primary",onClick:()=>S(),loading:s.value,disabled:s.value},{default:()=>[g("\u786E\u8BA4")]})]})]})}}}),Kt="_productModal_35hv9_1",Gt="_productIframe_35hv9_9",$t={productModal:Kt,productIframe:Gt};function pe(i){return typeof i=="function"||Object.prototype.toString.call(i)==="[object Object]"&&!be(i)}const Vt=Y({name:"music-list",props:["searchId","musicCategoryId"],setup(i,{emit:v}){const f=ye(),p=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("div",{onDblclick:()=>{Ct(p,l.id)}},[t(ie,{content:l.id},null)])]})]})}},{title:"\u5C01\u9762\u56FE",key:"titleImg",render(l){return t(ft,{width:60,height:60,src:l.musicCover},null)}},{title:"\u66F2\u76EE\u4FE1\u606F",minWidth:"200px",key:"composer",render(l){let C;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(C=Ee(l.musicSheetType,new Map(Object.entries(Ue))))?C:{default:()=>[C]}),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 C,c;return t(oe,{labelPlacement:"left",column:1},{default:()=>[t(J,{label:"\u5C5E\u6027"},pe(C=Ee(l.sourceType,new Map(Object.entries(he))))?C:{default:()=>[C]}),t(J,{label:"\u6240\u5C5E\u4EBA"},pe(c=Ft(l.musicSheetExtend,l.sourceType))?c:{default:()=>[c]})]})}},{title:"\u9002\u7528\u9879\u76EE",key:"projectName",render(l){return t(q,null,{default:()=>[_(t(T,{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(yt,{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(gt,{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(T,{type:"primary",size:"small",text:!0,onClick:()=>{e.musicPreview=!0,e.musicScore=l}},{default:()=>[g("\u9884\u89C8")]}),_(t(T,{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(T,{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(T,{type:"primary",size:"small",text:!0,onClick:()=>S(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:()=>[g("\u751F\u6210\u56FE\u7247")]}),[[z("auth"),"musicSheet/img1751240591299051522"]]),_(t(T,{type:"primary",size:"small",text:!0,disabled:!!l.status,onClick:()=>r(l)},{default:()=>[g("\u5220\u9664")]}),[[z("auth"),"musicSheet/remove1753457445635645442"]])]})}}],y=H([]),I=l=>{y.value=l},S=l=>{const C=l.status?"\u505C\u7528":"\u542F\u7528";f.warning({title:"\u63D0\u793A",content:`\u662F\u5426${C}\uFF1F`,positiveText:"\u786E\u5B9A",negativeText:"\u53D6\u6D88",onPositiveClick:()=>F(this,null,function*(){try{yield Fe({ids:new Array(l.id),status:!l.status}),u(),p.success(`${C}\u6210\u529F`)}catch(c){}})})},n=l=>{const C=y.value.length;C==0&&p.warning("\u672A\u9009\u62E9\u6570\u636E");const c=l?"\u542F\u7528":"\u505C\u7528";f.warning({title:"\u63D0\u793A",content:`\u662F\u5426${c}`+C+"\u6761\u6570\u636E\uFF1F",positiveText:"\u786E\u5B9A",negativeText:"\u53D6\u6D88",onPositiveClick:()=>F(this,null,function*(){try{yield Fe({ids:y.value,status:l}),u(),p.success(`${c}\u6210\u529F`)}catch(o){}})})},h=l=>F(this,null,function*(){if(!!e.searchForm.applicationId&&(e.userIdData=[],e.searchForm.userId=null,l&&l!=="PLATFORM")){const{data:C}=yield Oe({page:1,rows:9999,sourceType:l,applicationId:e.searchForm.applicationId});(C.rows||[]).forEach(o=>{e.userIdData.push($(D({},o),{label:l==="PERSON"?o.userName:o.organizationRole,value:l==="PERSON"?o.userId:o.organizationRoleId}))})}}),r=l=>{f.warning({title:"\u63D0\u793A",content:`\u5220\u9664"${l.name}"\uFF0C\u662F\u5426\u7EE7\u7EED\uFF1F`,positiveText:"\u786E\u5B9A",negativeText:"\u53D6\u6D88",onPositiveClick:()=>F(this,null,function*(){try{yield tt({id:l.id}),u(),p.success("\u5220\u9664\u6210\u529F")}catch(C){}})})},u=()=>F(this,null,function*(){try{e.loading=!0;const l=e.searchForm.sourceType,C=e.searchForm.userId;let c=$(D({},e.searchForm),{useAppId:e.searchForm.useAppId?e.searchForm.useAppId.join(","):e.searchForm.useAppId});l&&l=="ORG"&&(c.organizationRoleId=C,c.userId=null);const{data:o}=yield et(D(D({},e.pagination),c));e.pagination.pageTotal=Number(o.total),e.dataList=o.rows||[]}catch(l){}e.loading=!1}),m=()=>F(this,null,function*(){try{const{data:l}=yield ge({});e.musicSheetCategories=l||[]}catch(l){}}),k=()=>F(this,null,function*(){try{const{data:l}=yield Ke({page:1,rows:999}),C=l.rows||[];C.forEach(c=>{c.label=c.name,c.value=c.id+""}),e.subjectList=C}catch(l){}}),b=()=>F(this,null,function*(){try{const l=Object.keys(ve),{data:C}=yield Ge({page:1,rows:999}),c=C.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){}}),x=H(),G=()=>{e.pagination.page=1,u()};ht(()=>i.searchId,l=>{console.log(l,"searchId")});const P=()=>{var l;(l=x.value)==null||l.submit()},V=()=>{var l;(l=x.value)==null||l.reset()};return ee(()=>F(this,null,function*(){e.loading=!0,i.searchId&&(e.searchForm.categoriesId=i.searchId||null),i.musicCategoryId&&(e.searchForm.musicCategoryId=i.musicCategoryId||null),k(),b(),m(),u()})),()=>t("div",{class:"system-menu-container"},[t(je,{ref:x,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=>F(this,null,function*(){e.userIdData=[],e.searchForm.userId=null,l&&l!=="PLATFORM"?(yield h(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=>F(this,null,function*(){e.searchForm.applicationId=l,l?(yield h(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(T,{type:"primary",onClick:P},{default:()=>[g("\u641C\u7D22")]}),t(T,{type:"default",onClick:V},{default:()=>[g("\u91CD\u7F6E")]})]})]})]}),t("div",{class:["section-container"]},[t(q,{style:{paddingBottom:"12px"}},{default:()=>[_(t(T,{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(T,{disabled:y.value.length==0,onClick:()=>{n(!1)}},{default:()=>[g("\u6279\u91CF\u505C\u7528")]}),[[z("auth"),"musicSheet/statusList1751241653309407234"]]),_(t(T,{disabled:y.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(_t,{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(xt,{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(qt,{id:e.showUseProjectId,useProject:e.useProjectData,onClose:()=>e.showUseProject=!1,onGetList:u},null)]}),t(Q,{class:$t.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(Ve,{xmlFileUrl:e.productItem.xmlFileUrl,onClose:()=>e.productOpen=!1,onConfirm:l=>F(this,null,function*(){try{yield Ze($(D({},l),{id:e.productItem.id}))}catch(C){}})},null)]})])}}),Jt=Y({emits:["close","getList"],props:["actvieRow","saveMode","list"],name:"save-categroy-dialog",setup(i,{emit:v}){const f=Z(),p=H(),e=H([{name:"\u9876\u7EA7\u5206\u7C7B",id:0},...$e(i.list,"musicSheetCategoriesList")]),s=K({loading:!1,dataList:[],btnLoading:!1}),y=K({id:"",name:"",enable:!0,parentId:"0"}),I=()=>F(this,null,function*(){var S;(S=p.value)==null||S.validate(n=>F(this,null,function*(){if(!n){s.btnLoading=!0;try{if(i.saveMode==="add"){const{data:h}=yield at(D({},y));v("getList"),f.success("\u6DFB\u52A0\u6210\u529F")}else{const{data:h}=yield lt(D({},y));v("getList"),f.success("\u4FEE\u6539\u6210\u529F")}}catch(h){}s.btnLoading=!1}}))});return ee(()=>{if(i.saveMode==="add")i.actvieRow&&i.actvieRow.id&&(y.parentId=(i==null?void 0:i.actvieRow.id)+"");else for(let S in i==null?void 0:i.actvieRow)y[S]=i==null?void 0:i.actvieRow[S]}),()=>t("div",null,[t(Se,{ref:p,model:y},{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:y.parentId,"onUpdate:value":S=>y.parentId=S,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:y.name,"onUpdate:value":S=>y.name=S,placeholder:"\u8BF7\u8F93\u5165\u5206\u7C7B\u540D\u79F0",maxlength:25,showCount:!0,clearable:!0},null)]})]}),t(q,{justify:"end"},{default:()=>[t(T,{type:"default",onClick:()=>v("close")},{default:()=>[g("\u53D6\u6D88")]}),t(T,{type:"primary",onClick:()=>I(),loading:s.btnLoading,disabled:s.btnLoading},{default:()=>[g("\u786E\u8BA4")]})]})])}}),Xt=Y({emits:["setTabName","jump"],name:"music-category",setup(i,{slots:v,attrs:f,emit:p}){const e=K({loading:!1,pagination:{page:1,rows:10},dataList:[],showSaveDialog:!1,saveMode:"add",saveRowData:null}),s=ye(),y=Z(),I=()=>F(this,null,function*(){try{e.loading=!0;const u={page:e.pagination.page,rows:e.pagination.rows},{data:m}=yield ge(u);e.dataList=m||[]}catch(u){}e.loading=!1});ee(()=>{I()});const S=u=>{p("jump",u)},n=()=>[{title:"\u5206\u7C7B\u540D\u79F0",key:"id",render(u){return u.name+"("+u.id+")"}},{title:"\u66F2\u76EE\u6570\u91CF",key:"musicSheetNum",render(u){return t("div",null,[t(T,{type:"primary",size:"small",text:!0,onClick:()=>{S({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(T,{type:"error",size:"small",text:!0,onClick:()=>r(u)},{default:()=>[g("\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:()=>[g("\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:()=>[g("\u6DFB\u52A0\u5B50\u5206\u7C7B")]}),[[z("auth"),"musicSheetCategories/save1751239479284203521"]])]})}}],h=()=>{e.pagination.page=1,I()},r=u=>F(this,null,function*(){s.warning({title:"\u63D0\u793A",content:"\u662F\u5426\u786E\u8BA4\u5220\u9664'"+u.name+"'?",positiveText:"\u786E\u5B9A",negativeText:"\u53D6\u6D88",onPositiveClick:()=>F(this,null,function*(){(yield st(u.id)).data&&(h(),y.success("\u5220\u9664\u6210\u529F"))})})});return()=>t("div",{class:"system-menu-container"},[t("div",{class:["section-container"]},[t(q,{style:{paddingBottom:"12px"}},{default:()=>[_(t(T,{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(Jt,{onGetList:()=>{e.showSaveDialog=!1,I()},onClose:()=>{e.showSaveDialog=!1},list:e.dataList,saveMode:e.saveMode,actvieRow:e.saveRowData},null)]})])}}),La=Y({name:"music-sheet",setup(){const i=K({tabName:"MusicList",searchId:null,musicCategoryId:null}),v=St();Tt(e=>{e.form.tabName&&(i.tabName=e.form.tabName)});const f=e=>{console.log("setTabName",e),i.tabName=e.tabName,i.searchId=e.id},p=e=>{kt(e,"tabName",v)};return()=>t("div",{class:"system-menu-container"},[t("div",{class:["section-container"],style:"padding-top: 0"},[t(bt,{type:"line",size:"large",value:i.tabName,"onUpdate:value":[e=>i.tabName=e,e=>p(e)]},{default:()=>[_(t(Ne,{name:"MusicList",tab:"\u66F2\u76EE\u5217\u8868"},{default:()=>[t(Vt,{searchId:i.searchId,musicCategoryId:i.musicCategoryId},null)]}),[[z("auth"),"musicSheet/page1751238894313013249"]]),_(t(Ne,{name:"CategroryList",tab:"\u66F2\u76EE\u5206\u7C7B"},{default:()=>[t(Xt,{onSetTabName:f,onJump:e=>{i.tabName=e.tabName,i.musicCategoryId=e.musicCategoryId}},null)]}),[[z("auth"),"musicSheetCategories/queryTree1751238805699952641"]])]})])])}});export{La as default};
|