index.71ea06c5.js 53 KB

1
  1. var Ae=Object.defineProperty,Oe=Object.defineProperties;var Ke=Object.getOwnPropertyDescriptors;var ge=Object.getOwnPropertySymbols;var Be=Object.prototype.hasOwnProperty,Re=Object.prototype.propertyIsEnumerable;var ye=(s,S,u)=>S in s?Ae(s,S,{enumerable:!0,configurable:!0,writable:!0,value:u}):s[S]=u,k=(s,S)=>{for(var u in S||(S={}))Be.call(S,u)&&ye(s,u,S[u]);if(ge)for(var u of ge(S))Re.call(S,u)&&ye(s,u,S[u]);return s},O=(s,S)=>Oe(s,Ke(S));var N=(s,S,u)=>new Promise((v,e)=>{var i=g=>{try{o(u.next(g))}catch(P){e(P)}},b=g=>{try{o(u.throw(g))}catch(P){e(P)}},o=g=>g.done?v(g.value):Promise.resolve(g.value).then(i,b);o((u=u.apply(s,S)).next())});import{S as we}from"./index.3db0ec19.js";import{P as xe}from"./index.e2067f18.js";import{m as Te,a as Pe,b as Ne,c as ve,d as qe,e as Ge,f as ze,g as _e,h as Se,i as Xe,j as Ye,k as Ve,l as We,n as $e}from"./musicUtil.94f8834a.js";import{U as $}from"./index.5dba49a9.js";import{d as G,a as K,u as V,r as B,B as W,dj as le,i as t,l as w,ce as F,ag as Z,_ as q,a9 as D,p as x,k as y,cg as ee,af as re,dy as Je,q as ne,di as be,ca as E,db as X,a8 as z,a7 as j,cb as ae,dz as Fe,m as ke,aa as J,bk as Me,b as He,F as Q,d7 as je,d8 as se,M as Qe,dk as Ze,ch as et,a0 as tt,e as at}from"./index.59bd3422.js";import{B as ce,D as ie,E as ue,c as lt,F as st,G as it}from"./constant.811f1023.js";import{g as Y,a as ut}from"./objectUtil.ec24ceed.js";import{c as ot}from"./api.69357994.js";import{y as Ue}from"./api.48b1741b.js";import{s as Ee}from"./api.52f4468d.js";import{f as De}from"./index.c716380f.js";import{N as T}from"./FormItemGridItem.27a92459.js";import{N as H}from"./Cascader.49d2f122.js";import{g as Ce}from"./filters.cb22ede1.js";import{g as rt,s as nt}from"./use-async.6acb7ae6.js";import"./searchs.b637f0d6.js";import"./api.f9c6dcc5.js";import"./vuedraggable.umd.60a0edcf.js";import"./DeleteFilled.2e0b1a73.js";import"./api.5a8226c1.js";import"./searchArray.cacb4a2d.js";import"./knowledgeTypeData.3b15dd0b.js";import"./dateUtil.e70dff09.js";import"./dayjs.min.1104dd66.js";const ct="_audioSection_1l6lr_1",dt="_btnRemove_1l6lr_9",pt="_formContainer_1l6lr_14",oe={audioSection:ct,btnRemove:dt,formContainer:pt},mt=G({name:"musicSheetOwnerDialog",props:{musicSheetExtend:{type:Object,default:()=>{}},sourceType:{type:String,required:!0},appData:{type:Array,required:!0,default:[]}},emits:["close","getList","choseMusicSheetOwnerData"],setup(s,{slots:S,attrs:u,emit:v}){const e=K({loading:!1,pagination:{page:1,rows:10,pageTotal:0},searchForm:{applicationId:null,orgName:null,name:null,sourceType:null},dataList:[],appData:[]}),i=V(),b=B(),o=()=>{e.pagination.page=1,P()},g=()=>{var r;(r=b.value)==null||r.submit()},P=()=>N(this,null,function*(){try{e.searchForm.applicationId||i.warning("\u83B7\u53D6\u5E94\u7528\u5217\u8868\u5931\u8D25"),e.loading=!0,e.searchForm.sourceType=s.sourceType;const{data:f}=yield Te(k(k({},e.pagination),e.searchForm));e.pagination.pageTotal=Number(f.total),e.dataList=f.rows||[]}catch(r){}e.loading=!1});W(()=>N(this,null,function*(){{if(e.appData=le(s.appData),e.appData.length==0){i.warning("\u83B7\u53D6\u5E94\u7528\u5217\u8868\u5931\u8D25");return}s.musicSheetExtend&&s.musicSheetExtend.applicationId?e.searchForm.applicationId=s.musicSheetExtend.applicationId:e.searchForm.applicationId=e.appData[0].value}P()}));const M=()=>e.searchForm.sourceType==="ORG"?[{title:"\u673A\u6784\u540D\u79F0",key:"orgName"},{title:"\u64CD\u4F5C",key:"operation",fixed:"right",render(r){return t(D,null,{default:()=>[t(x,{type:"primary",size:"small",text:!0,onClick:()=>{const f=O(k({},r),{applicationId:e.searchForm.applicationId});v("choseMusicSheetOwnerData",f),v("close")}},{default:()=>[y("\u9009\u62E9")]})]})}}]:[{title:"\u4EBA\u5458\u540D\u79F0",key:"userName"},{title:"\u624B\u673A\u53F7",key:"phone"},{title:"\u64CD\u4F5C",key:"operation",fixed:"right",render(r){return t(D,null,{default:()=>[t(x,{type:"primary",size:"small",text:!0,onClick:()=>{const f=O(k({},r),{applicationId:e.searchForm.applicationId});v("choseMusicSheetOwnerData",f),v("close")}},{default:()=>[y("\u9009\u62E9")]})]})}}],C=()=>[{title:"\u673A\u6784\u540D\u79F0",key:"organizationRole"},{title:"\u64CD\u4F5C",key:"operation",fixed:"right",render(r){return t(D,null,{default:()=>[t(x,{type:"primary",size:"small",text:!0,onClick:()=>{const f=O(k({},r),{applicationId:e.searchForm.applicationId});v("choseMusicSheetOwnerData",f),v("close")}},{default:()=>[y("\u9009\u62E9")]})]})}}];return()=>t("div",{class:"system-menu-container"},[t(we,{ref:b,model:e.searchForm,onSubmit:o,onSetModel:r=>e.searchForm=r},{default:()=>[t(w,{label:"\u5E94\u7528",path:"applicationId",size:"small",style:"width:250px"},{default:()=>[t(F,{placeholder:"\u8BF7\u9009\u62E9\u9002\u7528\u9879\u76EE",value:e.searchForm.applicationId,"onUpdate:value":r=>e.searchForm.applicationId=r,options:e.appData},null)]}),e.searchForm.sourceType==="PERSON"&&t(Z,null,[t(w,{label:"\u6240\u5C5E\u4EBA",path:"name",size:"small",style:"width:250px"},{default:()=>[t(q,{placeholder:"\u8BF7\u8F93\u5165\u6240\u5C5E\u4EBA/\u624B\u673A\u53F7",value:e.searchForm.name,"onUpdate:value":r=>e.searchForm.name=r,clearable:!0},null)]})]),e.searchForm.sourceType==="ORG"&&t(Z,null,[t(w,{label:"\u673A\u6784\u540D\u79F0",path:"orgName",size:"small",style:"width:250px"},{default:()=>[t(q,{placeholder:"\u8BF7\u8F93\u5165\u673A\u6784\u540D\u79F0",value:e.searchForm.orgName,"onUpdate:value":r=>e.searchForm.orgName=r,clearable:!0},null)]})]),t(w,{size:"small"},{default:()=>[t(D,null,{default:()=>[t(x,{type:"primary",onClick:g},{default:()=>[y("\u641C\u7D22")]})]})]})]}),t("div",{class:["section-container"]},[s.sourceType==="PERSON"&&t(ee,{loading:e.loading,columns:M(),data:e.dataList},null),s.sourceType==="ORG"&&t(ee,{loading:e.loading,columns:C(),data:e.dataList},null),t(xe,{page:e.pagination.page,"onUpdate:page":r=>e.pagination.page=r,pageSize:e.pagination.rows,"onUpdate:pageSize":r=>e.pagination.rows=r,pageTotal:e.pagination.pageTotal,"onUpdate:pageTotal":r=>e.pagination.pageTotal=r,onList:P,sync:!0,pageSlot:5},null)])])}});function ht(s){return typeof s=="function"||Object.prototype.toString.call(s)==="[object Object]"&&!Me(s)}const ft=(s,S)=>{var o;let u=0;const v=s.closest(S);let e=v;const i=v==null?void 0:v.closest("measure");let b=null;for(;!b&&u<((i==null?void 0:i.childNodes.length)||50);)u++,((o=e==null?void 0:e.nextElementSibling)==null?void 0:o.tagName)==="note"&&(b=e==null?void 0:e.nextElementSibling),e=e==null?void 0:e.nextElementSibling;return b},gt=(s,S)=>{var b,o;if(!s)return"";const u=new DOMParser().parseFromString(s,"text/xml"),v=((o=(b=u.getElementsByTagName("part-list"))==null?void 0:b[0])==null?void 0:o.getElementsByTagName("score-part"))||[],e=u.getElementsByTagName("part"),i=v[S];if(i){const g=i.getAttribute("id");Array.from(e).forEach(C=>{var r,f,c;if(C&&C.getAttribute("id")!==g&&((r=C.parentNode)==null||r.removeChild(C)),C&&C.getAttribute("id")===g){const h=C.getElementsByTagName("barline"),d=(f=h[h.length-1])==null?void 0:f.parentElement;if(((c=d==null?void 0:d.lastElementChild)==null?void 0:c.tagName)!=="barline"){const I=(d==null?void 0:d.children)||[];for(let a of I)if(a.tagName==="barline"){d==null||d.appendChild(a);break}}}}),Array.from(v).forEach(C=>{var r;C&&C.getAttribute("id")!==g&&((r=C.parentNode)==null||r.removeChild(C))});const P=u.getElementsByTagName("note"),M=C=>{var f;let r=P[C+1];for(let c=C;c<P.length;c++){const h=P[c];if(!((f=h.getElementsByTagName("grace"))!=null&&f.length)){r=h;break}}return r==null?void 0:r.getElementsByTagName("duration")[0]};Array.from(P).forEach((C,r)=>{var c;const f=C.getElementsByTagName("grace");f&&f.length&&C.appendChild((c=M(r))==null?void 0:c.cloneNode(!0))})}return new XMLSerializer().serializeToString(u)},yt={"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 Le(s){var C,r,f,c;const S=gt(s,0),u=new DOMParser().parseFromString(S,"text/xml"),v=Array.from(u.querySelectorAll("measure")),e=Array.from(u.querySelectorAll("note")),i=Array.from(u.querySelectorAll("words")),b=Array.from(u.querySelectorAll("metronome")),o=[];for(const h of[...i,...b]){const d=ft(h,"direction");if(d){const I=d==null?void 0:d.closest("measure"),a=Array.from(I.querySelectorAll("note")),l=Array.from(I.childNodes).filter(m=>m.nodeName==="note").findIndex(m=>m===d);let p=0,n=0;for(let m=0;m<a.length;m++){const U=+(((C=a[m].querySelector("duration"))==null?void 0:C.textContent)||"0");p+=U,m<l&&(n=p)}o.push({ele:h,index:e.indexOf(d),noteInMeasureIndex:l,textContent:h.textContent,measureIndex:v.indexOf(I),type:h.tagName,allDuration:p,leftDuration:n})}}o.push({ele:e[e.length-1],index:e.length,noteInMeasureIndex:0,textContent:"",type:"metronome",allDuration:1,leftDuration:1,measureIndex:v.length});const g=[];o.sort((h,d)=>h.index-d.index);const P=Object.keys(yt).map(h=>h.toLocaleLowerCase());let M=!1;for(const h of o){const d=(r=h.textContent)==null?void 0:r.toLocaleLowerCase().trim();h===o[o.length-1]&&((f=g[g.length-1])==null?void 0:f.length)===1&&(M=!0);const I=P.find(a=>{const l=a.split(" ");return d&&l.includes(d)});if(h.type==="metronome"||h.type==="words"&&(d.startsWith("a tempo")||I)||M){const a=g.findIndex(l=>l.length===1);a>-1&&h.index>((c=g[a])==null?void 0:c[0].start)&&(g[a][1]={start:h.index,measureIndex:h.measureIndex,noteInMeasureIndex:h.noteInMeasureIndex,allDuration:h.allDuration,leftDuration:h.leftDuration,type:d})}h.type==="words"&&I&&g.push([{start:h.index,measureIndex:h.measureIndex,noteInMeasureIndex:h.noteInMeasureIndex,allDuration:h.allDuration,leftDuration:h.leftDuration,type:d}])}return g}const vt=G({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(s,{slots:S,attrs:u,emit:v}){const e=K({graduals:{},playMode:"MP3",xmlFileUrl:null,midiUrl:null,name:null,composer:null,playSpeed:null,musicCover:null,remark:null,musicSheetSoundList:[],status:!1,musicSheetType:"SINGLE",sourceType:null,appAuditFlag:0,midiFileUrl:null,subjectIds:[],musicalInstrumentIdList:[],musicCategoryId:null,musicSheetAccompanimentList:[],audioType:"HOMEMODE",isPlayBeat:!0,isUseSystemBeat:!0,repeatedBeats:!1,evaluationStandard:"FREQUENCY",multiTracksSelection:[],musicSheetExtend:{}}),i=K({loading:!1,previewMode:!1,tagList:[...s.tagList],xmlFirstSpeed:null,partListNames:[],musicSheetCategories:[],musicSheetAccompanimentUrls:"",musicSheetAccompanimentUrlList:[],instrumentData:[],instrumentList:[],subjectList:[],showMusicSheetOwnerDialog:!1,multiTracks:null,appData:[],ownerName:null}),b=K({list:[],gradualRefs:[]}),o=B(!1),g=B(),P=V();re();const M=()=>N(this,null,function*(){g.value.validate(a=>N(this,null,function*(){if(!a){try{const l=O(k({},e),{musicTag:"-1",multiTracksSelection:e.multiTracksSelection.join(","),musicSheetSoundList:e.musicSheetSoundList.filter(p=>!!p.audioFileUrl),musicalInstrumentIds:e.musicalInstrumentIdList.join(","),extConfigJson:JSON.stringify({gradualTimes:e.graduals}),subjectIds:e.subjectIds.join(",")});e.audioType=="MIDI"&&(l.musicSheetSoundList=[]),o.value=!0,s.type==="add"?(yield ve(l),P.success("\u6DFB\u52A0\u6210\u529F")):s.type==="edit"&&(yield ve(O(k({},l),{id:s.data.id})),P.success("\u4FEE\u6539\u6210\u529F")),v("getList"),v("close")}catch(l){console.log(l)}setTimeout(()=>{o.value=!1},100)}}))}),C=a=>{const l=new FileReader;l.onload=p=>{var n,m;try{b.list=Le((n=p==null?void 0:p.target)==null?void 0:n.result).filter(L=>L.length===2)}catch(L){}i.partListNames=r((m=p==null?void 0:p.target)==null?void 0:m.result);for(let L=0;L<i.partListNames.length;L++)e.musicSheetSoundList[L]||e.musicSheetSoundList.push({audioFileUrl:null,track:null}),e.musicSheetSoundList[L].track=i.partListNames[L].value;for(let L=e.musicSheetSoundList.length;L<i.partListNames.length;L++){const U=i.partListNames[L].value,R=O(k({},e.musicSheetSoundList[0]),{track:U});R.speed||(R.speed=i.xmlFirstSpeed),h(R)}e.musicSheetSoundList.length==0&&e.musicSheetSoundList.push({audioFileUrl:"",track:""})},l.readAsText(a)},r=a=>{var R,de,pe,me,he,fe;if(!a)return[];const l=new DOMParser().parseFromString(a,"text/xml"),p=((de=(R=l.getElementsByTagName("part-list"))==null?void 0:R[0])==null?void 0:de.getElementsByTagName("score-part"))||[],n=Array.from(p).map(A=>{var _;const te=((_=A.getElementsByTagName("part-name"))==null?void 0:_[0].textContent)||"";return{value:te,label:te}});n.length>0&&(e.musicSheetSoundList=e.musicSheetSoundList.slice(0,n.length)),i.xmlFirstSpeed=((me=(pe=l.getElementsByTagName("per-minute"))==null?void 0:pe[0])==null?void 0:me.textContent)||"",!e.playSpeed&&i.xmlFirstSpeed&&(e.playSpeed=Number.parseInt(i.xmlFirstSpeed));const m=[],L=l.getElementsByTagName("virtual-instrument");for(let A=0;A<L.length;A++){const _=((fe=(he=L[A].getElementsByTagName("virtual-name"))==null?void 0:he[0])==null?void 0:fe.textContent)||"";_&&!m.includes(_)&&m.push(_)}const U=new Map;return i.instrumentData.forEach(A=>{U.set(A.code,A.id+"")}),e.musicalInstrumentIdList=[],m.forEach(A=>{U.has(A)&&e.musicalInstrumentIdList.push(U.get(A))}),e.musicalInstrumentIdList.length>0&&c(e.musicalInstrumentIdList),n},f=a=>{const l=i.partListNames.filter(n=>{var m,L;return((L=(m=n.value)==null?void 0:m.toLocaleUpperCase)==null?void 0:L.call(m))!="COMMON"}),p=le(l)||[];return p.forEach(n=>{e.musicSheetSoundList.findIndex(L=>n.value==L.track)>-1&&a!=n.value?n.disabled=!0:n.disabled=!1}),p||[]},c=a=>N(this,null,function*(){try{const{data:l}=yield Ue({page:1,rows:999,musicalInstrumentIdList:a});(l.rows||[]).forEach(n=>{e.subjectIds.push(n.id+"")})}catch(l){}}),h=a=>{e.musicSheetSoundList.push(k({audioFileUrl:null,track:null},a))},d=a=>{!a||(a==="all"?(e.multiTracksSelection=[],i.partListNames.forEach(l=>{e.multiTracksSelection.push(l.value)})):a==="invert"?i.partListNames.forEach(l=>{const p=e.multiTracksSelection.indexOf(l.value);p>-1?e.multiTracksSelection.splice(p,1):e.multiTracksSelection.push(l.value)}):a==="allUncheck"&&(e.multiTracksSelection=[]))},I=()=>{var p;if(e.sourceType=="PLATFORM"){i.ownerName="";return}if(!e.musicSheetExtend||!e.sourceType||!((p=e.musicSheetExtend)!=null&&p.userId))return;const a=e.musicSheetExtend.applicationId,l=i.appData.filter(n=>n.id==a);l.length>0&&(i.ownerName=l[0].appName),e.sourceType=="ORG"?i.ownerName+="-"+e.musicSheetExtend.organizationRole:e.sourceType=="PERSON"&&(i.ownerName+="-"+ut(e.musicSheetExtend.clientType,new Map(Object.entries(lt))),e.musicSheetExtend.userName&&(i.ownerName+="-"+e.musicSheetExtend.userName),e.musicSheetExtend.phone&&(i.ownerName+="("+e.musicSheetExtend.phone+")"))};return W(()=>N(this,null,function*(){var a,l;i.loading=!0;{if(i.instrumentList&&i.instrumentList.length>0)return;try{const{data:p}=yield ot({page:1,rows:999}),n=p.rows||[];i.instrumentData=n,n.forEach(m=>{m.label=m.name,m.value=m.id+"",m.disabled=!m.enableFlag}),i.instrumentList=n}catch(p){}}i.subjectList=le(s.subjectList),i.subjectList.forEach(p=>{p.disabled=!p.enableFlag});{const p=Object.keys(ce),{data:n}=yield Ee({page:1,rows:999,parentId:0}),L=(n.rows||[]).filter(U=>p.includes(U.appKey));L.forEach(U=>{U.label=U.appName,U.value=U.id}),i.appData=L}try{const{data:p}=yield Pe({enable:!0});i.musicSheetCategories=De(p,"musicSheetCategoriesList")}catch(p){}if(s.type==="edit"||s.type==="preview"){const p=s.data;try{s.type==="preview"&&(i.previewMode=!0);const{data:n}=yield Ne({id:p.id});e.audioType=n.audioType,e.musicSheetAccompanimentList=n.musicSheetAccompanimentList,(a=n.musicSheetAccompanimentList)==null||a.forEach(m=>{i.musicSheetAccompanimentUrlList.push(m.audioFileUrl)}),e.playMode=n.playMode,e.xmlFileUrl=n.xmlFileUrl,e.midiUrl=n.midiUrl,e.name=n.name,e.composer=n.composer,e.playSpeed=n.playSpeed,e.musicCover=n.musicCover,e.remark=n.remark,e.status=n.status,e.musicCategoryId=n.musicCategoryId,e.musicSheetType=n.musicSheetType||"SINGLE",e.evaluationStandard=n.evaluationStandard,e.musicalInstrumentIdList=n.musicalInstrumentIds.split(",")||[],e.subjectIds=((l=n.subjectIds)==null?void 0:l.split(","))||[],e.sourceType=n.sourceType,e.musicSheetExtend=n.musicSheetExtend;try{const m=n.extConfigJson?JSON.parse(n.extConfigJson):{};e.graduals=m.gradualTimes||{}}catch(m){}I(),Je.get(n.xmlFileUrl).then(m=>{m!=null&&m.data&&(b.list=Le(m==null?void 0:m.data).filter(L=>L.length===2),i.partListNames=r(m==null?void 0:m.data),e.musicSheetSoundList=n.musicSheetSoundList||[],e.musicSheetSoundList.forEach(L=>{e.multiTracksSelection.push(L.track)}),i.partListNames.forEach(L=>{e.musicSheetSoundList.map(R=>R.track).indexOf(L.label)<=-1&&e.musicSheetSoundList.push({audioFileUrl:"",track:L.label})}))})}catch(n){}}else i.subjectList=i.subjectList.filter(p=>p.enableFlag==!0),i.instrumentList=i.instrumentList.filter(p=>p.enableFlag==!0);i.loading=!1})),()=>{let a;return t("div",{style:"background: #fff; padding-top: 12px"},[t(ne,{class:oe.formContainer,model:e,ref:g,"label-placement":"left","label-width":"130",disabled:i.previewMode},{default:()=>[t(be,{showIcon:!1,style:{marginBottom:"12px"}},{default:()=>[y("\u66F2\u76EE\u4FE1\u606F")]}),t(E,{cols:2},{default:()=>[t(T,{label:"\u66F2\u76EE\u540D\u79F0",path:"name",rule:[{required:!0,message:"\u8BF7\u8F93\u5165\u66F2\u76EE\u540D\u79F0"}]},{default:()=>[t(q,{value:e.name,"onUpdate:value":l=>e.name=l,placeholder:"\u8BF7\u8F93\u5165\u66F2\u76EE\u540D\u79F0",maxlength:25,showCount:!0},null)]}),t(T,{label:"\u97F3\u4E50\u4EBA",path:"composer",rule:[{required:!0,message:"\u8BF7\u8F93\u5165\u97F3\u4E50\u4EBA"}]},{default:()=>[t(q,{value:e.composer,"onUpdate:value":l=>e.composer=l,placeholder:"\u8BF7\u8F93\u5165\u97F3\u4E50\u4EBA\u540D\u79F0",showCount:!0,maxlength:14},null)]})]}),t(E,{cols:2},{default:()=>[t(T,{label:"\u66F2\u76EE\u63CF\u8FF0",path:"remark"},{default:()=>[t(q,{placeholder:"\u8BF7\u8F93\u5165\u66F2\u76EE\u63CF\u8FF0",type:"textarea",rows:4,showCount:!0,maxlength:200,value:e.remark,"onUpdate:value":l=>e.remark=l},null)]}),t(T,{label:"\u66F2\u76EE\u5C01\u9762",path:"musicCover",rule:[{required:!0,message:"\u8BF7\u4E0A\u4F20\u66F2\u76EE\u5C01\u9762"}]},{default:()=>[t($,{desc:"\u5C01\u9762\u56FE",disabled:i.previewMode,accept:".jpg,.jpeg,.png",tips:"\u8BF7\u4E0A\u4F20\u5927\u5C0F1M\u4EE5\u5185\u7684JPG\u3001PNG\u56FE\u7247",size:1,fileList:e.musicCover,"onUpdate:fileList":l=>e.musicCover=l,cropper:!0,bucketName:"cbs",options:{autoCrop:!0,enlarge:2,autoCropWidth:200,fixedBox:!0,autoCropHeight:200,previewsCircle:!1,title:"\u66F2\u76EE\u5C01\u9762"}},null)]})]}),t(E,{cols:2},{default:()=>[t(T,{label:"\u66F2\u76EE\u7C7B\u578B",path:"musicSheetType",rule:[{required:!0,message:"\u8BF7\u9009\u62E9\u66F2\u76EE\u7C7B\u578B"}]},{default:()=>[t(F,{placeholder:"\u8BF7\u9009\u62E9\u66F2\u76EE\u7C7B\u578B",value:e.musicSheetType,"onUpdate:value":l=>e.musicSheetType=l,options:Y(ie)},null)]}),t(T,{label:"\u4F5C\u8005\u5C5E\u6027",path:"sourceType",rule:[{required:!0,message:"\u8BF7\u9009\u62E9\u4F5C\u8005\u5C5E\u6027"}]},{default:()=>[t(F,{value:e.sourceType,"onUpdate:value":l=>e.sourceType=l,options:Y(ue),placeholder:"\u8BF7\u9009\u62E9\u4F5C\u8005\u5C5E\u6027",onUpdateValue:()=>{e.musicSheetExtend={},i.ownerName=null}},null)]})]}),t(E,{cols:2},{default:()=>[e.sourceType==="PERSON"&&t(T,{label:"\u6240\u5C5E\u4EBA",path:"musicSheetExtend.userId",rule:[{required:!0,message:"\u8BF7\u9009\u62E9\u66F2\u76EE\u6240\u5C5E\u4EBA"}]},{default:()=>[t(x,{disabled:i.previewMode||!e.sourceType,type:"primary",size:"small",text:!0,onClick:()=>{i.showMusicSheetOwnerDialog=!0}},{default:()=>[i.ownerName?i.ownerName:"\u8BF7\u9009\u62E9\u6240\u5C5E\u4EBA"]})]}),e.sourceType==="ORG"&&t(T,{label:"\u6240\u5C5E\u4EBA",path:"musicSheetExtend.organizationRoleId",rule:[{required:!0,message:"\u8BF7\u9009\u62E9\u66F2\u76EE\u6240\u5C5E\u673A\u6784"}]},{default:()=>[t(x,{disabled:i.previewMode||!e.sourceType,type:"primary",size:"small",text:!0,onClick:()=>{i.showMusicSheetOwnerDialog=!0}},{default:()=>[i.ownerName?i.ownerName:"\u8BF7\u9009\u62E9\u6240\u5C5E\u673A\u6784"]})]}),t(T,{label:"\u901F\u5EA6",path:"playSpeed"},{default:()=>[t(X,{placeholder:"\u8BF7\u8F93\u5165\u901F\u5EA6",value:e.playSpeed,"onUpdate:value":l=>e.playSpeed=l,style:"width:100%"},null)]})]}),t(E,{cols:2},{default:()=>[t(T,{label:"\u5BA1\u6838\u7248\u672C",path:"appAuditFlag",rule:[{required:!0,message:"\u8BF7\u9009\u62E9\u66F2\u76EE\u6240\u5C5E\u4EBA"}]},{default:()=>[t(F,{options:[{label:"\u662F",value:1},{label:"\u5426",value:0}],value:e.appAuditFlag,"onUpdate:value":l=>e.appAuditFlag=l},null)]}),t(T,{label:"\u66F2\u76EE\u5206\u7C7B",path:"musicCategoryId",rule:[{required:!0,message:"\u8BF7\u9009\u62E9\u66F2\u76EE\u5206\u7C7B"}]},{default:()=>[t(H,{valueField:"id",labelField:"name","children-field":"musicSheetCategoriesList",placeholder:"\u8BF7\u9009\u62E9\u5206\u7C7B",value:e.musicCategoryId,"onUpdate:value":l=>e.musicCategoryId=l,options:i.musicSheetCategories,clearable:!0},null)]})]}),t(E,{cols:2},{default:()=>[t(T,{label:"\u662F\u5426\u91CD\u590D\u8282\u62CD\u65F6\u957F",path:"repeatedBeats",rule:[{required:!0,message:"\u8BF7\u9009\u62E9\u662F\u5426\u91CD\u590D\u8282\u62CD\u65F6\u957F"}]},{default:()=>[t(z,{value:e.repeatedBeats,"onUpdate:value":l=>e.repeatedBeats=l},{default:()=>[t(j,{value:!0},{default:()=>[y("\u662F")]}),t(j,{value:!1},{default:()=>[y("\u5426")]})]})]}),t(T,{label:"\u8BC4\u5206\u6807\u51C6",path:"evaluationStandard",rule:[{required:!0}]},{default:()=>[t(z,{value:e.evaluationStandard,"onUpdate:value":l=>e.evaluationStandard=l},{default:()=>[t(j,{value:"FREQUENCY"},{default:()=>[y("\u6807\u51C6\u8BC4\u6D4B")]}),t(j,{value:"AMPLITUDE"},{default:()=>[y("\u6253\u51FB\u4E50(\u632F\u5E45)")]}),t(j,{value:"DECIBELS"},{default:()=>[y("\u8282\u594F(\u5206\u8D1D)")]})]})]})]}),t(be,{showIcon:!1,style:{marginBottom:"12px"}},{default:()=>[y("\u66F2\u76EE\u4E0A\u4F20")]}),t(E,{cols:2},{default:()=>[t(T,{label:"\u64AD\u653E\u6A21\u5F0F",path:"playMode",rule:[{required:!0,message:"\u8BF7\u9009\u62E9\u64AD\u653E\u6A21\u5F0F"}]},{default:()=>[t(z,{value:e.playMode,"onUpdate:value":l=>e.playMode=l,onUpdateValue:l=>{l==="MP3"?e.playMode="MP3":e.playMode="MIDI"}},{default:()=>[t(j,{value:"MP3"},{default:()=>[y("MP3")]}),t(j,{value:"MIDI"},{default:()=>[y("MIDI")]})]})]}),e.playMode==="MP3"&&t(T,{label:"\u4F34\u594F\u7C7B\u578B",path:"audioType",rule:[{required:!0,message:"\u8BF7\u9009\u62E9\u4F34\u594F\u7C7B\u578B"}]},{default:()=>[t(z,{value:e.audioType,"onUpdate:value":l=>e.audioType=l},{default:()=>[t(j,{value:"HOMEMODE"},{default:()=>[y("\u81EA\u5236\u4F34\u594F")]}),t(j,{value:"COMMON"},{default:()=>[y("\u666E\u901A\u4F34\u594F")]})]})]})]}),t(E,{cols:2},{default:()=>[e.playMode==="MP3"&&t(T,{label:"\u4E0A\u4F20\u4F34\u594F",path:"musicSheetAccompanimentList",rule:[{required:!1,message:"\u8BF7\u9009\u62E9\u4E0A\u4F20.mp3"}]},{default:()=>[t($,{disabled:i.previewMode,size:10,imageList:i.musicSheetAccompanimentUrlList,"onUpdate:imageList":l=>i.musicSheetAccompanimentUrlList=l,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":l=>{var p;i.musicSheetAccompanimentUrls=[i.musicSheetAccompanimentUrls,l.url].filter(Boolean).join(","),i.musicSheetAccompanimentUrlList=(p=i.musicSheetAccompanimentUrls)==null?void 0:p.split(",").filter(Boolean),e.musicSheetAccompanimentList=[];for(let n=0;n<i.musicSheetAccompanimentUrlList.length;n++)e.musicSheetAccompanimentList.push({audioFileUrl:i.musicSheetAccompanimentUrlList[n],sortNumber:n+1})},onRemove:()=>{i.musicSheetAccompanimentUrlList=[],i.musicSheetAccompanimentUrls=""},multiple:!0},null)]}),e.playMode==="MIDI"&&t(T,{label:"\u4E0A\u4F20MIDI",path:"midiFileUrl",rule:[{required:!0,message:"\u8BF7\u9009\u62E9\u4E0A\u4F20.MIDI\u683C\u5F0F\u6587\u4EF6"}]},{default:()=>[t($,{desc:"MIDI\u6587\u4EF6",disabled:i.previewMode,size:10,fileList:e.midiFileUrl,"onUpdate:fileList":l=>e.midiFileUrl=l,tips:"\u4EC5\u652F\u6301\u4E0A\u4F20.MIDI\u683C\u5F0F\u6587\u4EF6",listType:"image",accept:".mp3,.aac",bucketName:"cloud-coach",text:"\u70B9\u51FB\u4E0A\u4F20MIDI\u6587\u4EF6"},null)]}),t(T,{label:"\u4E0A\u4F20XML",path:"xmlFileUrl",rule:[{required:!0,message:"\u8BF7\u9009\u62E9\u4E0A\u4F20XML"}]},{default:()=>[t($,{desc:"XML\u6587\u4EF6",disabled:i.previewMode,size:10,fileList:e.xmlFileUrl,"onUpdate:fileList":l=>e.xmlFileUrl=l,tips:"\u4EC5\u652F\u6301\u4E0A\u4F20.xml\u683C\u5F0F\u6587\u4EF6",listType:"image",accept:".xml,.mxml",bucketName:"cloud-coach",text:"\u70B9\u51FB\u4E0A\u4F20XML\u6587\u4EF6",onReadFileInputEventAsArrayBuffer:C,onRemove:()=>{e.multiTracksSelection=[],i.partListNames=[],e.musicSheetSoundList=[]}},null)]})]}),t(E,{cols:2},{default:()=>[t(T,{label:"\u53EF\u7528\u58F0\u90E8",path:"subjectIds",rule:[{required:!0,message:"\u8BF7\u9009\u62E9\u53EF\u7528\u58F0\u90E8"}]},{default:()=>[t(F,{value:e.subjectIds,"onUpdate:value":l=>e.subjectIds=l,options:i.subjectList,multiple:!0,filterable:!0,clearable:!0,placeholder:"\u8BF7\u9009\u62E9\u53EF\u7528\u58F0\u90E8",maxTagCount:2},null)]}),t(T,{label:"\u53EF\u7528\u4E50\u5668",path:"musicalInstrumentIdList",rule:[{required:!0,message:"\u8BF7\u9009\u62E9\u53EF\u7528\u4E50\u5668"}]},{default:()=>[t(F,{placeholder:"\u8BF7\u9009\u62E9\u53EF\u7528\u4E50\u5668",options:i.instrumentList,value:e.musicalInstrumentIdList,"onUpdate:value":l=>e.musicalInstrumentIdList=l,clearable:!0,multiple:!0,maxTagCount:2},null)]})]}),e.musicSheetType&&t(E,{cols:1},{default:()=>[t(T,{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"}`}]},{default:()=>[t(E,{style:"padding-top: 4px;"},{default:()=>[t(ae,{span:24},{default:()=>[t(z,{value:i.multiTracks,"onUpdate:value":l=>i.multiTracks=l,onUpdateValue:l=>{d(l)}},{default:()=>[t(j,{value:"all"},{default:()=>[y("\u5168\u9009")]}),t(j,{value:"allUncheck"},{default:()=>[y("\u91CD\u7F6E")]}),t(j,{value:"invert"},{default:()=>[y("\u53CD\u9009")]})]})]}),t(ae,{span:24,style:"margin-top:5px"},{default:()=>[t(T,{label:"",path:"multiTracksSelection",rule:[{required:!1}]},{default:()=>[t(Fe,{value:e.multiTracksSelection,"onUpdate:value":l=>e.multiTracksSelection=l},{default:()=>[t(E,{yGap:2,cols:4},ht(a=i.partListNames.map(l=>t(ae,null,{default:()=>[t(ke,{value:l.value,label:l.label},null)]})))?a:{default:()=>[a]})]})]})]})]})]})]}),t(E,{cols:2},{default:()=>[t(T,{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(z,{value:e.isPlayBeat,"onUpdate:value":l=>e.isPlayBeat=l},{default:()=>[t(j,{value:!0},{default:()=>[y("\u662F")]}),t(j,{value:!1},{default:()=>[y("\u5426")]})]})]}),e.isPlayBeat&&t(T,{label:"\u64AD\u653E\u65B9\u5F0F",path:"audioType",rule:[{required:!0,message:"\u8BF7\u9009\u62E9\u64AD\u653E\u65B9\u5F0F"}]},{default:()=>[t(z,{value:e.isUseSystemBeat,"onUpdate:value":l=>e.isUseSystemBeat=l},{default:()=>[t(j,{value:!0},{default:()=>[y("\u7CFB\u7EDF\u8282\u62CD\u5668")]}),t(j,{value:!1},{default:()=>[y("MP3\u8282\u62CD\u5668")]})]})]})]}),e.playMode==="MP3"&&e.musicSheetSoundList.length>0&&t(Z,null,[e.musicSheetSoundList.map((l,p)=>{var n,m;return t(Z,null,[((m=(n=l.track)==null?void 0:n.toLocaleUpperCase)==null?void 0:m.call(n))!="COMMON"&&e.multiTracksSelection.indexOf(l.track)>-1&&t(E,{class:oe.audioSection},{default:()=>[t(T,{span:12,label:"\u539F\u97F3",path:`musicSheetSoundList[${p}].audioFileUrl`,rule:[{required:!0,message:`\u8BF7\u4E0A\u4F20${l.track?l.track+"\u7684":"\u7B2C"+(p+1)+"\u4E2A"}\u539F\u97F3`}]},{default:()=>[t($,{desc:"\u539F\u97F3\u6587\u4EF6",disabled:i.previewMode,size:10,fileList:l.audioFileUrl,"onUpdate:fileList":L=>l.audioFileUrl=L,tips:"\u4EC5\u652F\u6301\u4E0A\u4F20.mp3/.aac\u683C\u5F0F\u6587\u4EF6",listType:"image",accept:".mp3,.aac",bucketName:"cloud-coach"},null)]}),i.partListNames.length>1&&t(T,{span:12,label:"\u6240\u5C5E\u8F68\u9053",path:`musicSheetSoundList[${p}].track`,rule:[{required:!0,message:"\u8BF7\u9009\u62E9\u6240\u5C5E\u8F68\u9053"}]},{default:()=>[t(F,{placeholder:"\u8BF7\u9009\u62E9\u6240\u5C5E\u8F68\u9053",value:l.track,"onUpdate:value":L=>l.track=L,options:f(l.track)},null)]})]})])}),t(x,{type:"primary",dashed:!0,block:!0,disabled:i.partListNames.length<=e.musicSheetSoundList.length,style:{marginBottom:"24px"},onClick:h},{default:()=>[y("\u6DFB\u52A0\u539F\u97F3")]})])]}),s.type!=="preview"&&t(D,{justify:"end",style:"padding-top:12px"},{default:()=>[t(x,{type:"default",onClick:()=>v("close")},{default:()=>[y("\u53D6\u6D88")]}),t(x,{type:"primary",onClick:()=>M(),loading:o.value,disabled:o.value},{default:()=>[y("\u786E\u8BA4")]})]}),t(J,{show:i.showMusicSheetOwnerDialog,"onUpdate:show":l=>i.showMusicSheetOwnerDialog=l,preset:"dialog",showIcon:!1,maskClosable:!1,title:"\u6240\u5C5E\u4EBA",style:{width:"800px"}},{default:()=>[t(mt,{musicSheetExtend:e.musicSheetExtend,sourceType:e.sourceType,appData:i.appData,onClose:()=>{i.showMusicSheetOwnerDialog=!1},onChoseMusicSheetOwnerData:l=>{e.musicSheetExtend=k({},l),I()}},null)]})])}}}),St=G({name:"musicPreView",props:{item:{type:Object,default:()=>{}}},setup(s,{emit:S}){const v=He().getToken,i=(/(localhost|192)/.test(location.host)?"https://dev.kt.colexiu.com/":location.origin)+`/instrument/?_t=${Date.now()}&id=${s.item.id}&modelType=practice&modeType=json&Authorization=${v}&isMove=1&isCbs=true`;return()=>t("div",null,[t("iframe",{width:"667px",height:"375px",frameborder:"0",src:i},null)])}});function Ie(s){return typeof s=="function"||Object.prototype.toString.call(s)==="[object Object]"&&!Me(s)}const bt=G({name:"use-project",props:{useProject:{type:Array,required:!0,default:[]},id:{type:String,required:!0,default:null}},emits:["close","getList"],setup(s,{emit:S}){const u=K({musicSheetId:null,useApplicationIds:[],useProjectParamConfig:{GYM:{musicSheetCategoryId:null,sortNo:null,paymentType:null},GYT:{musicSheetCategoryId:null,sortNo:null},KLX:{availableType:null,musicSheetCategoryId:null,paymentType:null,musicPrice:null,topFlag:null,exquisiteFlag:null,sortNo:null},KT:{musicSheetCategoryId:null,sortNo:null}}}),v=Q(()=>{const r=u.useProjectParamConfig.GYM,f=["musicSheetCategoryId","paymentType"];for(let c=0;c<f.length;c++)if(r[f[c]])return!0;return!1}),e=Q(()=>{const r=u.useProjectParamConfig.KLX,f=["availableType","musicSheetCategoryId","paymentType","musicPrice","topFlag","exquisiteFlag"];for(let c=0;c<f.length;c++)if(r[f[c]])return!0;return!1}),i=Q(()=>{const r=u.useProjectParamConfig.KT,f=["musicSheetCategoryId"];for(let c=0;c<f.length;c++)if(r[f[c]])return!0;return!1}),b=Q(()=>{const r=u.useProjectParamConfig.GYT,f=["musicSheetCategoryId"];for(let c=0;c<f.length;c++)if(r[f[c]])return!0;return!1}),o=K({loading:!1,musicSheetData:null,tabName:null,selectAppKey:[],selectAppName:[],appKeyNameMap:null,userProjectList:[],musicSheetCategoryOptions:{},musicSheetCanBeUsedProjectKey:[]}),g=B(!1),P=V();W(()=>N(this,null,function*(){var d;o.loading=!0;const{data:r}=yield Ne({id:s.id});o.musicSheetData=r,r&&r.musicSheetExtend&&(u.useApplicationIds=((d=r.musicSheetExtend.useApplicationIds)==null?void 0:d.split(","))||[]);const f=Object.keys(ce);s.useProject.forEach(I=>{const a=f.indexOf(I.appKey);let l=!1;a>-1&&o.userProjectList.push(O(k({},I),{disabled:l}))}),o.appKeyNameMap=new Map,o.userProjectList.forEach(I=>{u.useApplicationIds.includes(I.id)&&o.selectAppKey.push(I.appKey),o.appKeyNameMap.set(I.appKey,I.appName)}),o.selectAppKey.length>0&&(o.tabName=o.selectAppKey[0]);const c=[],h=new Map;if(s.useProject.forEach(I=>{c.push(I.id),h.set(I.id,I.appKey)}),c.length>0){const{data:I}=yield qe({applicationIds:c.join(",")});I.forEach(a=>{const l=h.get(a.applicationId);l&&(o.musicSheetCategoryOptions[l]=a.musicSheetCategories)})}{const{data:I}=yield Ge({musicSheetId:s.id});I.forEach(a=>{const l=a.appKey;u.useProjectParamConfig[l]=a})}o.loading=!1}));const M=B(),C=()=>N(this,null,function*(){M.value.validate(r=>N(this,null,function*(){var f;if(r){if(Array.isArray(r)&&r.length>0){const c=(f=r[0][0].field)==null?void 0:f.split(".")[1];c&&o.selectAppKey.includes(c)&&(o.tabName=c)}return}g.value=!0;try{const c=new Map;s.useProject.forEach(I=>{c.set(I.appKey,I.id)});const h=[];o.selectAppKey.forEach(I=>{Object.keys(u.useProjectParamConfig).forEach(a=>{if(I===a){const l=u.useProjectParamConfig[a];h.push(O(k({},l),{musicSheetId:s.id,applicationId:c.get(a)}))}})});const d={musicSheetId:s.id,useApplicationIds:u.useApplicationIds.join(","),applicationExtends:h};yield ze(d),P.success("\u4FEE\u6539\u6210\u529F"),S("getList"),S("close")}catch(c){console.log(c)}g.value=!1}))});return()=>{let r,f;return t("div",null,[t(ne,{class:oe.formContainer,model:u,ref:M,"label-placement":"left","label-width":"85"},{default:()=>[t(w,{label:"\u9002\u7528\u5E94\u7528",path:"useApplicationIds",rule:[{required:!0,message:"\u8BF7\u9009\u62E9\u9002\u7528\u5E94\u7528"}]},{default:()=>[t(Fe,{value:u.useApplicationIds,"onUpdate:value":c=>u.useApplicationIds=c,onUpdateValue:c=>{o.selectAppKey=[],o.userProjectList.forEach(h=>{c.includes(h.id)&&o.selectAppKey.push(h.appKey)}),o.selectAppKey.length==0?o.tabName="":o.tabName=o.selectAppKey[0]}},Ie(r=o.userProjectList.map(c=>t(ke,{value:c.value},{default:()=>[c.label]})))?r:{default:()=>[r]})]}),o.selectAppKey.length>0&&t(je,{type:"line",value:o.tabName,"onUpdate:value":[c=>o.tabName=c,c=>{o.tabName=c}]},Ie(f=o.selectAppKey.map((c,h)=>t(se,{tab:o.appKeyNameMap.get(c),name:c,displayDirective:"show"},{default:()=>[c==="GYM"&&t("div",null,[t(w,{label:"\u66F2\u76EE\u5206\u7C7B",path:"useProjectParamConfig.GYM.musicSheetCategoryId",rule:[{required:v.value,message:"\u8BF7\u9009\u62E9\u66F2\u76EE\u5206\u7C7B"}]},{default:()=>[t(H,{valueField:"id",labelField:"name","children-field":"children",placeholder:"\u8BF7\u9009\u62E9\u5206\u7C7B",value:u.useProjectParamConfig.GYM.musicSheetCategoryId,"onUpdate:value":d=>u.useProjectParamConfig.GYM.musicSheetCategoryId=d,options:o.musicSheetCategoryOptions.GYM,onChange:()=>{},clearable:!0},null)]}),t(w,{label:"\u662F\u5426\u6536\u8D39",path:"useProjectParamConfig.GYM.paymentType",rule:[{required:v.value,message:"\u8BF7\u9009\u62E9\u6536\u8D39\u7C7B\u578B"}]},{default:()=>[t(F,{placeholder:"\u8BF7\u9009\u62E9\u6536\u8D39\u7C7B\u578B",clearable:!0,value:u.useProjectParamConfig.GYM.paymentType,"onUpdate:value":d=>u.useProjectParamConfig.GYM.paymentType=d,options:Y(st)},null)]}),t(w,{label:"\u6392\u5E8F\u503C",path:"useProjectParamConfig.GYM.sortNo"},{default:()=>[t(X,{value:u.useProjectParamConfig.GYM.sortNo,"onUpdate:value":d=>u.useProjectParamConfig.GYM.sortNo=d,placeholder:"\u8BF7\u8F93\u5165\u6392\u5E8F\u503C",clearable:!0,min:0,max:9999,style:{width:"100%"}},null)]})]),c==="GYT"&&t("div",null,[t(w,{label:"\u5206\u7C7B",path:"useProjectParamConfig.GYT.musicSheetCategoryId",rule:[{required:b.value,message:"\u8BF7\u9009\u62E9\u5206\u7C7B"}]},{default:()=>[t(H,{valueField:"id",labelField:"name","children-field":"children",placeholder:"\u8BF7\u9009\u62E9\u5206\u7C7B",value:u.useProjectParamConfig.GYT.musicSheetCategoryId,"onUpdate:value":d=>u.useProjectParamConfig.GYT.musicSheetCategoryId=d,options:o.musicSheetCategoryOptions.GYT,clearable:!0},null)]}),t(w,{label:"\u6392\u5E8F\u503C",path:"useProjectParamConfig.GYT.sortNo"},{default:()=>[t(X,{value:u.useProjectParamConfig.GYT.sortNo,"onUpdate:value":d=>u.useProjectParamConfig.GYT.sortNo=d,placeholder:"\u8BF7\u8F93\u5165\u6392\u5E8F\u503C",clearable:!0,min:0,max:9999,style:{width:"100%"}},null)]})]),c==="KLX"&&t("div",null,[t(w,{label:"\u53EF\u7528\u9014\u5F84",path:"useProjectParamConfig.KLX.availableType",rule:[{required:e.value,message:"\u8BF7\u9009\u62E9\u53EF\u7528\u9014\u5F84"}]},{default:()=>[t(F,{placeholder:"\u8BF7\u9009\u62E9\u53EF\u7528\u9014\u5F84",clearable:!0,value:u.useProjectParamConfig.KLX.availableType,"onUpdate:value":d=>u.useProjectParamConfig.KLX.availableType=d,options:Y(it)},null)]}),t(w,{label:"\u66F2\u76EE\u6807\u7B7E",path:"useProjectParamConfig.KLX.musicSheetCategoryId",rule:[{required:e.value,message:"\u8BF7\u9009\u62E9\u66F2\u76EE\u6807\u7B7E"}]},{default:()=>[t(F,{placeholder:"\u8BF7\u9009\u62E9\u66F2\u76EE\u6807\u7B7E",clearable:!0,value:u.useProjectParamConfig.KLX.musicSheetCategoryId,"onUpdate:value":d=>u.useProjectParamConfig.KLX.musicSheetCategoryId=d,options:[]},null)]}),t(w,{label:"\u662F\u5426\u6536\u8D39",path:"useProjectParamConfig.KLX.paymentType",rule:[{required:e.value,message:"\u8BF7\u9009\u62E9\u662F\u5426\u6536\u8D39"}]},{default:()=>[t(F,{placeholder:"\u8BF7\u9009\u62E9\u662F\u5426\u6536\u8D39",clearable:!0,value:u.useProjectParamConfig.KLX.paymentType,"onUpdate:value":d=>u.useProjectParamConfig.KLX.paymentType=d,options:[{label:"\u662F",value:1},{label:"\u5426",value:0}]},null)]}),t(w,{label:"\u66F2\u76EE\u4EF7\u683C",path:"useProjectParamConfig.KLX.musicPrice",rule:[{required:e.value,message:"\u8BF7\u8F93\u5165\u66F2\u76EE\u4EF7\u683C"}]},{default:()=>[t(X,{style:"width:100%",placeholder:"\u8BF7\u8F93\u5165\u66F2\u76EE\u4EF7\u683C",value:u.useProjectParamConfig.KLX.musicPrice,"onUpdate:value":d=>u.useProjectParamConfig.KLX.musicPrice=d},null)]}),t(w,{label:"\u662F\u5426\u7F6E\u9876",path:"useProjectParamConfig.KLX.topFlag",rule:[{required:e.value,message:"\u8BF7\u9009\u62E9\u662F\u5426\u7F6E\u9876"}]},{default:()=>[t(F,{placeholder:"\u8BF7\u9009\u62E9\u662F\u5426\u7F6E\u9876",clearable:!0,value:u.useProjectParamConfig.KLX.topFlag,"onUpdate:value":d=>u.useProjectParamConfig.KLX.topFlag=d,options:[{label:"\u662F",value:1},{label:"\u5426",value:0}]},null)]}),t(w,{label:"\u7CBE\u54C1\u4E50\u8C31",path:"useProjectParamConfig.KLX.exquisiteFlag",rule:[{required:e.value,message:"\u8BF7\u9009\u62E9\u662F\u5426\u7CBE\u54C1\u4E50\u8C31"}]},{default:()=>[t(F,{placeholder:"\u8BF7\u9009\u62E9\u662F\u5426\u7CBE\u54C1\u4E50\u8C31",clearable:!0,value:u.useProjectParamConfig.KLX.exquisiteFlag,"onUpdate:value":d=>u.useProjectParamConfig.KLX.exquisiteFlag=d,options:[{label:"\u662F",value:1},{label:"\u5426",value:0}]},null)]}),t(w,{label:"\u6392\u5E8F\u503C",path:"useProjectParamConfig.KLX.sortNo"},{default:()=>[t(X,{value:u.useProjectParamConfig.KLX.sortNo,"onUpdate:value":d=>u.useProjectParamConfig.KLX.sortNo=d,placeholder:"\u8BF7\u8F93\u5165\u6392\u5E8F\u503C",clearable:!0,min:0,max:9999,style:{width:"100%"}},null)]})]),c==="KT"&&t("div",null,[t(w,{label:"\u66F2\u76EE\u5206\u7C7B",path:"useProjectParamConfig.KT.musicSheetCategoryId",rule:[{required:i.value,message:"\u8BF7\u9009\u62E9\u66F2\u76EE\u5206\u7C7B"}]},{default:()=>[t(H,{valueField:"id",labelField:"name","children-field":"children",placeholder:"\u8BF7\u9009\u62E9\u5206\u7C7B",value:u.useProjectParamConfig.KT.musicSheetCategoryId,"onUpdate:value":d=>u.useProjectParamConfig.KT.musicSheetCategoryId=d,options:o.musicSheetCategoryOptions.KT,clearable:!0},null)]}),t(w,{label:"\u6392\u5E8F\u503C",path:"useProjectParamConfig.KT.sortNo"},{default:()=>[t(X,{value:u.useProjectParamConfig.KT.sortNo,"onUpdate:value":d=>u.useProjectParamConfig.KT.sortNo=d,placeholder:"\u8BF7\u8F93\u5165\u6392\u5E8F\u503C",clearable:!0,min:0,max:9999,style:{width:"100%"}},null)]})])]})))?f:{default:()=>[f]})]}),t(D,{justify:"end",style:"margin-top: 10px"},{default:()=>[t(x,{type:"default",onClick:()=>S("close")},{default:()=>[y("\u53D6\u6D88")]}),t(x,{type:"primary",onClick:()=>C(),loading:g.value,disabled:g.value},{default:()=>[y("\u786E\u8BA4")]})]})])}}}),Ct=G({name:"music-list",props:["searchId"],setup(s,{emit:S}){const u=re(),v=V(),e=K({loading:!1,pagination:{page:1,rows:10,pageTotal:0},searchForm:{keyword:null,musicSheetType:null,subjectId:null,sourceType:null,composer:null,userId:null,useAppId:null,status:null,appAuditFlag:null,categoriesId:null},dataList:[],subjectList:[],tagList:[],visiableMusic:!1,musicOperation:"add",musicData:{},musicPreview:!1,musicScore:null,showUseProject:!1,useProjectData:[],showUseProjectId:null,detailReadonly:!1,userIdDisable:!0,userIdData:[]}),i=()=>[{type:"selection"},{title:"\u66F2\u76EE\u7F16\u53F7",minWidth:"200px",key:"id"},{title:"\u66F2\u76EE\u540D\u79F0",minWidth:"200px",key:"name"},{title:"\u5C01\u9762\u56FE",key:"titleImg",render(a){return t(Ze,{width:60,height:60,src:a.musicCover},null)}},{title:"\u97F3\u4E50\u4EBA",minWidth:"100px",key:"composer"},{title:"\u66F2\u76EE\u7C7B\u578B",minWidth:"100px",key:"musicSheetType",render(a){return Ce(a.musicSheetType,new Map(Object.entries(ie)))}},{title:"\u53EF\u7528\u58F0\u90E8",minWidth:"100px",maxWidth:"300px",key:"subjectNames"},{title:"\u4F5C\u8005\u5C5E\u6027",minWidth:"100px",key:"sourceType",render(a){return Ce(a.sourceType,new Map(Object.entries(ue)))}},{title:"\u6240\u5C5E\u4EBA",minWidth:"200px",key:"composer",render(a){return t("div",null,[_e(a.musicSheetExtend,a.sourceType)])}},{title:"\u4E0A\u4F20\u4EBA",minWidth:"100px",key:"createByName"},{title:"\u4E0A\u4F20\u65F6\u95F4",minWidth:"150px",key:"createTime"},{title:"\u5BA1\u6838\u7248\u672C",minWidth:"100px",key:"appAuditFlag",render(a){return t("div",null,[a.appAuditFlag?"\u662F":"\u5426"])}},{title:"\u9002\u7528\u9879\u76EE",minWidth:"150px",key:"projectName",render(a){return t(D,null,{default:()=>[t(x,{type:"primary",size:"small",text:!0,onClick:()=>{e.showUseProject=!0,e.showUseProjectId=a.id}},{default:()=>[a.musicSheetExtend&&a.musicSheetExtend.useApplicationNames?a.musicSheetExtend.useApplicationNames:"",t(tt,{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)])]})]})]})}},{title:"\u72B6\u6001",minWidth:"50px",key:"status",render(a){return t(et,{type:a.status?"primary":"default"},{default:()=>[a.status?"\u542F\u7528":"\u505C\u7528"]})}},{title:"\u64CD\u4F5C",key:"operation",fixed:"right",width:"300px",render(a){return t(D,null,{default:()=>[t(x,{type:"primary",size:"small",text:!0,onClick:()=>{e.musicPreview=!0,e.musicScore=a}},{default:()=>[y("\u9884\u89C8")]}),t(x,{type:"primary",size:"small",text:!0,onClick:()=>{e.visiableMusic=!0,e.musicOperation="preview",e.musicData=a,e.detailReadonly=!0}},{default:()=>[y("\u67E5\u770B")]}),t(x,{type:"primary",size:"small",text:!0,onClick:()=>{e.visiableMusic=!0,e.musicOperation="edit",e.musicData=a,e.detailReadonly=!0}},{default:()=>[y("\u4FEE\u6539")]}),t(x,{type:"primary",size:"small",text:!0,onClick:()=>g(a)},{default:()=>[a.status?"\u505C\u7528":"\u542F\u7528"]}),t(x,{type:"primary",size:"small",text:!0,onClick:()=>{}},{default:()=>[y("\u751F\u6210\u56FE\u7247")]}),t(x,{type:"primary",size:"small",text:!0,disabled:!!a.status,onClick:()=>M(a)},{default:()=>[y("\u5220\u9664")]})]})}}],b=B([]),o=a=>{b.value=a},g=a=>{const l=a.status?"\u505C\u7528":"\u542F\u7528";u.warning({title:"\u63D0\u793A",content:`\u662F\u5426${l}\uFF1F`,positiveText:"\u786E\u5B9A",negativeText:"\u53D6\u6D88",onPositiveClick:()=>N(this,null,function*(){try{yield Se({ids:new Array(a.id),status:!a.status}),C(),v.success(`${l}\u6210\u529F`)}catch(p){}})})},P=a=>{const l=b.value.length;l==0&&v.warning("\u672A\u9009\u62E9\u6570\u636E");const p=a?"\u542F\u7528":"\u505C\u7528";u.warning({title:"\u63D0\u793A",content:`\u662F\u5426${p}`+l+"\u6761\u6570\u636E\uFF1F",positiveText:"\u786E\u5B9A",negativeText:"\u53D6\u6D88",onPositiveClick:()=>N(this,null,function*(){try{yield Se({ids:b.value,status:a}),C(),v.success(`${p}\u6210\u529F`)}catch(n){}})})},M=a=>{u.warning({title:"\u8B66\u544A",content:`\u5220\u9664"${a.name}"\uFF0C\u662F\u5426\u7EE7\u7EED\uFF1F`,positiveText:"\u786E\u5B9A",negativeText:"\u53D6\u6D88",onPositiveClick:()=>N(this,null,function*(){try{yield Ye({id:a.id}),C(),v.success("\u5220\u9664\u6210\u529F")}catch(l){}})})},C=()=>N(this,null,function*(){try{e.loading=!0;const{data:a}=yield Xe(k(k({},e.pagination),e.searchForm));e.pagination.pageTotal=Number(a.total),e.dataList=a.rows||[]}catch(a){}e.loading=!1}),r=()=>N(this,null,function*(){try{const{data:a}=yield Ue({page:1,rows:999}),l=a.rows||[];l.forEach(p=>{p.label=p.name,p.value=p.id+""}),e.subjectList=l}catch(a){}}),f=()=>N(this,null,function*(){try{const a=Object.keys(ce),{data:l}=yield Ee({page:1,rows:999}),p=l.rows||[];e.useProjectData=[],p.filter(m=>a.includes(m.appKey)).forEach(m=>{e.useProjectData.push(O(k({},m),{label:m.appName,value:m.id}))})}catch(a){}}),c=B(),h=()=>{e.pagination.page=1,C()};Qe(()=>s.searchId,a=>{console.log(a,"searchId")});const d=()=>{var a;(a=c.value)==null||a.submit()},I=()=>{var a;(a=c.value)==null||a.reset()};return W(()=>N(this,null,function*(){e.loading=!0,s.searchId&&(e.searchForm.categoriesId=s.searchId||null),r(),f(),C()})),()=>t("div",{class:"system-menu-container"},[t(we,{ref:c,model:e.searchForm,onSubmit:h,saveKey:"music-list",onSetModel:a=>e.searchForm=a},{default:()=>[t(w,{label:"\u5173\u952E\u8BCD",path:"keyword"},{default:()=>[t(q,{placeholder:"\u66F2\u76EE\u7F16\u53F7/\u540D\u79F0",value:e.searchForm.keyword,"onUpdate:value":a=>e.searchForm.keyword=a,clearable:!0},null)]}),t(w,{label:"\u66F2\u76EE\u7C7B\u578B",path:"musicSheetType"},{default:()=>[t(F,{placeholder:"\u8BF7\u9009\u62E9\u66F2\u76EE\u7C7B\u578B",value:e.searchForm.musicSheetType,"onUpdate:value":a=>e.searchForm.musicSheetType=a,options:Y(ie),clearable:!0},null)]}),t(w,{label:"\u58F0\u90E8",path:"musicSubject"},{default:()=>[t(F,{placeholder:"\u8BF7\u9009\u62E9\u58F0\u90E8",value:e.searchForm.subjectId,"onUpdate:value":a=>e.searchForm.subjectId=a,options:e.subjectList,clearable:!0},null)]}),t(w,{label:"\u97F3\u4E50\u4EBA",path:"composer"},{default:()=>[t(q,{placeholder:"\u8BF7\u9009\u62E9\u97F3\u4E50\u4EBA",value:e.searchForm.composer,"onUpdate:value":a=>e.searchForm.composer=a,clearable:!0},null)]}),t(w,{label:"\u9002\u7528\u9879\u76EE",path:"app"},{default:()=>[t(F,{placeholder:"\u8BF7\u9009\u62E9\u9002\u7528\u9879\u76EE",value:e.searchForm.useAppId,"onUpdate:value":a=>e.searchForm.useAppId=a,options:e.useProjectData,clearable:!0,onUpdateValue:a=>{e.searchForm.sourceType=null,e.searchForm.userId=null,e.userIdDisable=!0,e.userIdData=[],e.searchForm.useAppId=a}},null)]}),t(w,{label:"\u4F5C\u8005\u5C5E\u6027",path:"sourceType"},{default:()=>[t(F,{disabled:!e.searchForm.useAppId,placeholder:"\u8BF7\u9009\u62E9\u4F5C\u8005\u5C5E\u6027",value:e.searchForm.sourceType,"onUpdate:value":a=>e.searchForm.sourceType=a,options:Y(ue),onUpdateValue:a=>N(this,null,function*(){if(e.userIdData=[],e.searchForm.userId=null,a){const{data:l}=yield Te({page:1,rows:9999,sourceType:a,applicationId:e.searchForm.useAppId});(l.rows||[]).forEach(n=>{e.userIdData.push(O(k({},n),{label:n.userName,value:n.userId}))}),e.userIdDisable=!1}else e.userIdDisable=!0}),clearable:!0},null)]}),t(w,{label:"\u6240\u5C5E\u4EBA",path:"author"},{default:()=>[t(F,{filterable:!0,placeholder:"\u8BF7\u9009\u62E9\u6240\u5C5E\u4EBA",disabled:e.userIdDisable,value:e.searchForm.userId,"onUpdate:value":a=>e.searchForm.userId=a,options:e.userIdData,clearable:!0},null)]}),t(w,{label:"\u72B6\u6001",path:"status"},{default:()=>[t(F,{value:e.searchForm.status,"onUpdate:value":a=>e.searchForm.status=a,placeholder:"\u8BF7\u9009\u62E9\u72B6\u6001",clearable:!0,options:[{label:"\u542F\u7528",value:!0},{label:"\u505C\u7528",value:!1}]},null)]}),t(w,{label:"\u5BA1\u6838\u7248\u672C",path:"appAuditFlag"},{default:()=>[t(F,{value:e.searchForm.appAuditFlag,"onUpdate:value":a=>e.searchForm.appAuditFlag=a,placeholder:"\u8BF7\u9009\u62E9\u5BA1\u6838\u7248\u672C",clearable:!0,options:[{label:"\u662F",value:1},{label:"\u5426",value:0}]},null)]}),t(w,null,{default:()=>[t(D,null,{default:()=>[t(x,{type:"primary",onClick:d},{default:()=>[y("\u641C\u7D22")]}),t(x,{type:"default",onClick:I},{default:()=>[y("\u91CD\u7F6E")]})]})]})]}),t("div",{class:["section-container"]},[t(D,{style:{paddingBottom:"12px"}},{default:()=>[t(x,{type:"primary",onClick:()=>{e.visiableMusic=!0,e.musicOperation="add",e.musicData={},e.detailReadonly=!0}},{default:()=>[y("\u65B0\u589E\u66F2\u76EE")]}),t(x,{disabled:b.value.length==0,onClick:()=>{P(!1)}},{default:()=>[y("\u6279\u91CF\u505C\u7528")]}),t(x,{disabled:b.value.length==0,onClick:()=>{P(!0)}},{default:()=>[y("\u6279\u91CF\u542F\u7528")]})]}),t(ee,{loading:e.loading,columns:i(),data:e.dataList,rowKey:a=>a.id,onUpdateCheckedRowKeys:o,scrollX:"2000"},null),t(xe,{page:e.pagination.page,"onUpdate:page":a=>e.pagination.page=a,pageSize:e.pagination.rows,"onUpdate:pageSize":a=>e.pagination.rows=a,pageTotal:e.pagination.pageTotal,"onUpdate:pageTotal":a=>e.pagination.pageTotal=a,onList:C,sync:!0,saveKey:"music-list"},null)]),t(J,{show:e.visiableMusic,"onUpdate:show":a=>e.visiableMusic=a,preset:"dialog",showIcon:!1,maskClosable:!1,title:()=>e.musicOperation==="add"?"\u6DFB\u52A0\u66F2\u76EE":e.musicOperation==="preview"?"\u66F2\u76EE\u8BE6\u60C5":"\u4FEE\u6539\u66F2\u76EE",style:{width:"980px"}},{default:()=>[t(vt,{type:e.musicOperation,data:e.musicData,subjectList:e.subjectList,onClose:()=>e.visiableMusic=!1,onGetList:C},null)]}),t(J,{blockScroll:!0,show:e.musicPreview,"onUpdate:show":a=>e.musicPreview=a,preset:"dialog",showIcon:!1,title:"\u66F2\u76EE\u9884\u89C8",style:{width:"auto"}},{default:()=>[t(St,{item:e.musicScore},null)]}),t(J,{blockScroll:!0,show:e.showUseProject,"onUpdate:show":a=>e.showUseProject=a,preset:"dialog",showIcon:!1,title:"\u9002\u7528\u9879\u76EE",style:{width:"500px"}},{default:()=>[t(bt,{id:e.showUseProjectId,useProject:e.useProjectData,onClose:()=>e.showUseProject=!1,onGetList:C},null)]})])}}),Lt=G({emits:["close","getList"],props:["actvieRow","saveMode","list"],name:"save-categroy-dialog",setup(s,{emit:S}){const u=V(),v=B(),e=B([{name:"\u9876\u7EA7\u5206\u7C7B",id:0},...De(s.list,"musicSheetCategoriesList")]),i=K({loading:!1,dataList:[],btnLoading:!1}),b=K({id:"",name:"",enable:!1,parentId:"0"}),o=()=>N(this,null,function*(){var g;(g=v.value)==null||g.validate(P=>N(this,null,function*(){if(!P){i.btnLoading=!0;try{if(s.saveMode==="add"){const{data:M}=yield Ve(k({},b));S("getList"),u.success("\u6DFB\u52A0\u6210\u529F")}else{const{data:M}=yield We(k({},b));S("getList"),u.success("\u4FEE\u6539\u6210\u529F")}}catch(M){}i.btnLoading=!1}}))});return W(()=>{if(s.saveMode==="add")s.actvieRow&&s.actvieRow.id&&(b.parentId=(s==null?void 0:s.actvieRow.id)+"");else for(let g in s==null?void 0:s.actvieRow)b[g]=s==null?void 0:s.actvieRow[g]}),()=>t("div",null,[t(ne,{ref:v,model:b},{default:()=>[s.saveMode==="add"&&s.actvieRow&&t(w,{label:"\u7236\u7EA7\u5206\u7C7B",path:"parentId"},{default:()=>[t(H,{placeholder:"\u8BF7\u9009\u62E9\u7236\u7EA7\u5206\u7C7B",value:b.parentId,"onUpdate:value":g=>b.parentId=g,options:e.value,checkStrategy:"all",expandTrigger:"hover",childrenField:"musicSheetCategoriesList",valueField:"id",labelField:"name",disabled:!0},null)]}),t(w,{label:"\u5206\u7C7B\u540D\u79F0",rule:[{required:!0,message:"\u8BF7\u8F93\u5165\u5206\u7C7B\u540D\u79F0",trigger:["blur","input"]}],path:"name"},{default:()=>[t(q,{value:b.name,"onUpdate:value":g=>b.name=g,placeholder:"\u8BF7\u8F93\u5165\u5206\u7C7B\u540D\u79F0",maxlength:25,showCount:!0,clearable:!0},null)]})]}),t(D,{justify:"end"},{default:()=>[t(x,{type:"default",onClick:()=>S("close")},{default:()=>[y("\u53D6\u6D88")]}),t(x,{type:"primary",onClick:()=>o(),loading:i.btnLoading,disabled:i.btnLoading},{default:()=>[y("\u786E\u8BA4")]})]})])}}),It=G({emits:["setTabName"],name:"music-category",setup(){const s=K({loading:!1,pagination:{page:1,rows:10},dataList:[],showSaveDialog:!1,saveMode:"add",saveRowData:null}),S=re(),u=V(),v=()=>N(this,null,function*(){try{s.loading=!0;const o={page:s.pagination.page,rows:s.pagination.rows},{data:g}=yield Pe(o);s.dataList=g||[]}catch(o){}s.loading=!1});W(()=>{v()});const e=()=>[{title:"\u7F16\u53F7",key:"id"},{title:"\u5206\u7C7B\u540D\u79F0",key:"name"},{title:"\u66F2\u76EE\u6570\u91CF",key:"musicSheetNum"},{title:"\u6700\u540E\u66F4\u65B0\u65F6\u95F4",key:"updateTime"},{title:"\u66F4\u65B0\u4EBA",key:"operatorName"},{title:"\u64CD\u4F5C",key:"operation",fixed:"right",render(o){return t(D,null,{default:()=>[t(x,{type:"error",size:"small",text:!0,onClick:()=>b(o)},{default:()=>[y("\u5220\u9664")]}),t(x,{type:"primary",size:"small",text:!0,onClick:()=>{s.saveRowData=o,s.saveMode="edit",s.showSaveDialog=!0}},{default:()=>[y("\u4FEE\u6539")]}),t(x,{type:"primary",size:"small",text:!0,onClick:()=>{s.saveRowData=o,s.showSaveDialog=!0,s.saveMode="add"}},{default:()=>[y("\u6DFB\u52A0\u5B50\u5206\u7C7B")]})]})}}],i=()=>{s.pagination.page=1,v()},b=o=>N(this,null,function*(){S.warning({title:"\u8B66\u544A",content:"\u662F\u5426\u786E\u8BA4\u5220\u9664'"+o.name+"'?",positiveText:"\u786E\u5B9A",negativeText:"\u53D6\u6D88",onPositiveClick:()=>N(this,null,function*(){(yield $e(o.id)).data&&(i(),u.success("\u5220\u9664\u6210\u529F"))})})});return()=>t("div",{class:"system-menu-container"},[t("div",{class:["section-container"]},[t(D,{style:{paddingBottom:"12px"}},{default:()=>[t(x,{type:"primary",onClick:()=>{s.saveMode="add",s.showSaveDialog=!0,s.saveRowData=null}},{default:()=>[y("\u65B0\u589E\u5206\u7C7B")]})]}),t(ee,{loading:s.loading,columns:e(),data:s.dataList,rowKey:o=>o.id,childrenKey:"musicSheetCategoriesList"},null)]),t(J,{show:s.showSaveDialog,"onUpdate:show":o=>s.showSaveDialog=o,preset:"dialog",showIcon:!1,title:s.saveRowData?"\u4FEE\u6539\u5206\u7C7B":"\u65B0\u589E\u5206\u7C7B",style:{width:"550px"}},{default:()=>[t(Lt,{onGetList:()=>{s.showSaveDialog=!1,v()},onClose:()=>{s.showSaveDialog=!1},list:s.dataList,saveMode:s.saveMode,actvieRow:s.saveRowData},null)]})])}}),$t=G({name:"music-sheet",setup(){const s=K({tabName:"MusicList",searchId:null}),S=at();rt(e=>{e.form.tabName&&(s.tabName=e.form.tabName)});const u=e=>{console.log("setTabName",e),s.tabName=e.tabName,s.searchId=e.id},v=e=>{nt(e,"tabName",S)};return()=>t("div",{class:"system-menu-container"},[t("div",{class:["section-container"],style:"padding-top: 0"},[t(je,{type:"line",size:"large",value:s.tabName,"onUpdate:value":[e=>s.tabName=e,e=>v(e)]},{default:()=>[t(se,{name:"MusicList",tab:"\u66F2\u76EE\u5217\u8868"},{default:()=>[t(Ct,{searchId:s.searchId},null)]}),t(se,{name:"CategroryList",tab:"\u66F2\u76EE\u5206\u7C7B\u7BA1\u7406"},{default:()=>[t(It,{onSetTabName:u},null)]})]})])])}});export{$t as default};