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=(l,S,i)=>S in l?Ae(l,S,{enumerable:!0,configurable:!0,writable:!0,value:i}):l[S]=i,M=(l,S)=>{for(var i in S||(S={}))Be.call(S,i)&&ye(l,i,S[i]);if(ge)for(var i of ge(S))Re.call(S,i)&&ye(l,i,S[i]);return l},O=(l,S)=>Oe(l,Ke(S));var P=(l,S,i)=>new Promise((v,e)=>{var s=g=>{try{u(i.next(g))}catch(N){e(N)}},b=g=>{try{u(i.throw(g))}catch(N){e(N)}},u=g=>g.done?v(g.value):Promise.resolve(g.value).then(s,b);u((i=i.apply(l,S)).next())});import{S as we}from"./index.a9983230.js";import{P as xe}from"./index.9f8146c1.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.67edf403.js";import{U as $}from"./index.ed65e850.js";import{d as q,a as K,u as V,r as B,B as W,dj as le,i as t,l as L,ce as F,ag as Z,_ as R,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 G,a7 as j,cb as ae,dz as Fe,m as Me,aa as J,bk as ke,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.9256ea96.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.f225c445.js";import{y as Ue}from"./api.92440723.js";import{s as Ee}from"./api.10c7d4c4.js";import{f as De}from"./index.509a287c.js";import{N as T}from"./FormItemGridItem.656c3f8c.js";import{N as H}from"./Cascader.db000f21.js";import{g as Ce}from"./filters.cb22ede1.js";import{g as rt,s as nt}from"./use-async.b9f22c73.js";import"./searchs.b637f0d6.js";import"./api.e2d3a9a5.js";import"./vuedraggable.umd.66f1c02c.js";import"./DeleteFilled.39ec5d56.js";import"./api.b32ad3d1.js";import"./searchArray.cacb4a2d.js";import"./knowledgeTypeData.3b15dd0b.js";import"./dateUtil.2c20b8d0.js";import"./dayjs.min.6ba71f07.js";const ct="_audioSection_1l6lr_1",dt="_btnRemove_1l6lr_9",pt="_formContainer_1l6lr_14",oe={audioSection:ct,btnRemove:dt,formContainer:pt},mt=q({name:"musicSheetOwnerDialog",props:{musicSheetExtend:{type:Object,default:()=>{}},sourceType:{type:String,required:!0},appData:{type:Array,required:!0,default:[]}},emits:["close","getList","choseMusicSheetOwnerData"],setup(l,{slots:S,attrs:i,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:[]}),s=V(),b=B(),u=()=>{e.pagination.page=1,N()},g=()=>{var o;(o=b.value)==null||o.submit()},N=()=>P(this,null,function*(){try{e.searchForm.applicationId||s.warning("\u83B7\u53D6\u5E94\u7528\u5217\u8868\u5931\u8D25"),e.loading=!0,e.searchForm.sourceType=l.sourceType;const{data:f}=yield Te(M(M({},e.pagination),e.searchForm));e.pagination.pageTotal=Number(f.total),e.dataList=f.rows||[]}catch(o){}e.loading=!1});W(()=>P(this,null,function*(){{if(e.appData=le(l.appData),e.appData.length==0){s.warning("\u83B7\u53D6\u5E94\u7528\u5217\u8868\u5931\u8D25");return}l.musicSheetExtend&&l.musicSheetExtend.applicationId?e.searchForm.applicationId=l.musicSheetExtend.applicationId:e.searchForm.applicationId=e.appData[0].value}N()}));const k=()=>e.searchForm.sourceType==="ORG"?[{title:"\u673A\u6784\u540D\u79F0",key:"orgName"},{title:"\u64CD\u4F5C",key:"operation",fixed:"right",render(o){return t(D,null,{default:()=>[t(x,{type:"primary",size:"small",text:!0,onClick:()=>{const f=O(M({},o),{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(o){return t(D,null,{default:()=>[t(x,{type:"primary",size:"small",text:!0,onClick:()=>{const f=O(M({},o),{applicationId:e.searchForm.applicationId});v("choseMusicSheetOwnerData",f),v("close")}},{default:()=>[y("\u9009\u62E9")]})]})}}],w=()=>[{title:"\u673A\u6784\u540D\u79F0",key:"organizationRole"},{title:"\u64CD\u4F5C",key:"operation",fixed:"right",render(o){return t(D,null,{default:()=>[t(x,{type:"primary",size:"small",text:!0,onClick:()=>{const f=O(M({},o),{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:u,onSetModel:o=>e.searchForm=o},{default:()=>[t(L,{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":o=>e.searchForm.applicationId=o,options:e.appData},null)]}),e.searchForm.sourceType==="PERSON"&&t(Z,null,[t(L,{label:"\u6240\u5C5E\u4EBA",path:"name",size:"small",style:"width:250px"},{default:()=>[t(R,{placeholder:"\u8BF7\u8F93\u5165\u6240\u5C5E\u4EBA/\u624B\u673A\u53F7",value:e.searchForm.name,"onUpdate:value":o=>e.searchForm.name=o,clearable:!0},null)]})]),e.searchForm.sourceType==="ORG"&&t(Z,null,[t(L,{label:"\u673A\u6784\u540D\u79F0",path:"orgName",size:"small",style:"width:250px"},{default:()=>[t(R,{placeholder:"\u8BF7\u8F93\u5165\u673A\u6784\u540D\u79F0",value:e.searchForm.orgName,"onUpdate:value":o=>e.searchForm.orgName=o,clearable:!0},null)]})]),t(L,{size:"small"},{default:()=>[t(D,null,{default:()=>[t(x,{type:"primary",onClick:g},{default:()=>[y("\u641C\u7D22")]})]})]})]}),t("div",{class:["section-container"]},[l.sourceType==="PERSON"&&t(ee,{loading:e.loading,columns:k(),data:e.dataList},null),l.sourceType==="ORG"&&t(ee,{loading:e.loading,columns:w(),data:e.dataList},null),t(xe,{page:e.pagination.page,"onUpdate:page":o=>e.pagination.page=o,pageSize:e.pagination.rows,"onUpdate:pageSize":o=>e.pagination.rows=o,pageTotal:e.pagination.pageTotal,"onUpdate:pageTotal":o=>e.pagination.pageTotal=o,onList:N,sync:!0,pageSlot:5},null)])])}});function ht(l){return typeof l=="function"||Object.prototype.toString.call(l)==="[object Object]"&&!ke(l)}const ft=(l,S)=>{var u;let i=0;const v=l.closest(S);let e=v;const s=v==null?void 0:v.closest("measure");let b=null;for(;!b&&i<((s==null?void 0:s.childNodes.length)||50);)i++,((u=e==null?void 0:e.nextElementSibling)==null?void 0:u.tagName)==="note"&&(b=e==null?void 0:e.nextElementSibling),e=e==null?void 0:e.nextElementSibling;return b},gt=(l,S)=>{var b,u;if(!l)return"";const i=new DOMParser().parseFromString(l,"text/xml"),v=((u=(b=i.getElementsByTagName("part-list"))==null?void 0:b[0])==null?void 0:u.getElementsByTagName("score-part"))||[],e=i.getElementsByTagName("part"),s=v[S];if(s){const g=s.getAttribute("id");Array.from(e).forEach(w=>{var o,f,n;if(w&&w.getAttribute("id")!==g&&((o=w.parentNode)==null||o.removeChild(w)),w&&w.getAttribute("id")===g){const p=w.getElementsByTagName("barline"),d=(f=p[p.length-1])==null?void 0:f.parentElement;if(((n=d==null?void 0:d.lastElementChild)==null?void 0:n.tagName)!=="barline"){const I=(d==null?void 0:d.children)||[];for(let m of I)if(m.tagName==="barline"){d==null||d.appendChild(m);break}}}}),Array.from(v).forEach(w=>{var o;w&&w.getAttribute("id")!==g&&((o=w.parentNode)==null||o.removeChild(w))});const N=i.getElementsByTagName("note"),k=w=>{var f;let o=N[w+1];for(let n=w;n<N.length;n++){const p=N[n];if(!((f=p.getElementsByTagName("grace"))!=null&&f.length)){o=p;break}}return o==null?void 0:o.getElementsByTagName("duration")[0]};Array.from(N).forEach((w,o)=>{var n;const f=w.getElementsByTagName("grace");f&&f.length&&w.appendChild((n=k(o))==null?void 0:n.cloneNode(!0))})}return new XMLSerializer().serializeToString(i)},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 Ie(l){var w,o,f,n;const S=gt(l,0),i=new DOMParser().parseFromString(S,"text/xml"),v=Array.from(i.querySelectorAll("measure")),e=Array.from(i.querySelectorAll("note")),s=Array.from(i.querySelectorAll("words")),b=Array.from(i.querySelectorAll("metronome")),u=[];for(const p of[...s,...b]){const d=ft(p,"direction");if(d){const I=d==null?void 0:d.closest("measure"),m=Array.from(I.querySelectorAll("note")),a=Array.from(I.childNodes).filter(h=>h.nodeName==="note").findIndex(h=>h===d);let c=0,r=0;for(let h=0;h<m.length;h++){const U=+(((w=m[h].querySelector("duration"))==null?void 0:w.textContent)||"0");c+=U,h<a&&(r=c)}u.push({ele:p,index:e.indexOf(d),noteInMeasureIndex:a,textContent:p.textContent,measureIndex:v.indexOf(I),type:p.tagName,allDuration:c,leftDuration:r})}}u.push({ele:e[e.length-1],index:e.length,noteInMeasureIndex:0,textContent:"",type:"metronome",allDuration:1,leftDuration:1,measureIndex:v.length});const g=[];u.sort((p,d)=>p.index-d.index);const N=Object.keys(yt).map(p=>p.toLocaleLowerCase());let k=!1;for(const p of u){const d=(o=p.textContent)==null?void 0:o.toLocaleLowerCase().trim();p===u[u.length-1]&&((f=g[g.length-1])==null?void 0:f.length)===1&&(k=!0);const I=N.find(m=>{const a=m.split(" ");return d&&a.includes(d)});if(p.type==="metronome"||p.type==="words"&&(d.startsWith("a tempo")||I)||k){const m=g.findIndex(a=>a.length===1);m>-1&&p.index>((n=g[m])==null?void 0:n[0].start)&&(g[m][1]={start:p.index,measureIndex:p.measureIndex,noteInMeasureIndex:p.noteInMeasureIndex,allDuration:p.allDuration,leftDuration:p.leftDuration,type:d})}p.type==="words"&&I&&g.push([{start:p.index,measureIndex:p.measureIndex,noteInMeasureIndex:p.noteInMeasureIndex,allDuration:p.allDuration,leftDuration:p.leftDuration,type:d}])}return g}const vt=q({name:"music-operation",props:{type:{type:String,default:"add"},data:{type:Object,default:()=>{}},tagList:{type:Array,default:()=>[]},subjectList:{type:Array,default:()=>[]}},emits:["close","getList"],setup(l,{slots:S,attrs:i,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:{}}),s=K({loading:!1,previewMode:!1,tagList:[...l.tagList],xmlFirstSpeed:null,partListNames:[],musicSheetCategories:[],musicSheetAccompanimentUrls:"",musicSheetAccompanimentUrlList:[],instrumentData:[],instrumentList:[],subjectList:[],showMusicSheetOwnerDialog:!1,multiTracks:null,appData:[],ownerName:null}),b=K({list:[],gradualRefs:[]}),u=B(!1),g=B(),N=V();re();const k=()=>P(this,null,function*(){g.value.validate(m=>P(this,null,function*(){if(!m){try{const a=O(M({},e),{musicTag:"-1",multiTracksSelection:e.multiTracksSelection.join(","),musicSheetSoundList:e.musicSheetSoundList.filter(c=>!!c.audioFileUrl&&e.multiTracksSelection.includes(c.track)),musicalInstrumentIds:e.musicalInstrumentIdList.join(","),extConfigJson:JSON.stringify({repeatedBeats:e.repeatedBeats?1:0,gradualTimes:e.graduals}),subjectIds:e.subjectIds.join(",")});e.audioType=="MIDI"&&(a.musicSheetSoundList=[]),u.value=!0,l.type==="add"?(yield ve(a),N.success("\u6DFB\u52A0\u6210\u529F")):l.type==="edit"&&(yield ve(O(M({},a),{id:l.data.id})),N.success("\u4FEE\u6539\u6210\u529F")),v("getList"),v("close")}catch(a){console.log(a)}setTimeout(()=>{u.value=!1},100)}}))}),w=m=>{const a=new FileReader;a.onload=c=>{var r,h;try{b.list=Ie((r=c==null?void 0:c.target)==null?void 0:r.result).filter(C=>C.length===2)}catch(C){}s.partListNames=o((h=c==null?void 0:c.target)==null?void 0:h.result);for(let C=0;C<s.partListNames.length;C++)e.musicSheetSoundList[C]||e.musicSheetSoundList.push({audioFileUrl:null,track:null}),e.musicSheetSoundList[C].track=s.partListNames[C].value;for(let C=e.musicSheetSoundList.length;C<s.partListNames.length;C++){const U=s.partListNames[C].value,z=O(M({},e.musicSheetSoundList[0]),{track:U});z.speed||(z.speed=s.xmlFirstSpeed),p(z)}e.musicSheetSoundList.length==0&&e.musicSheetSoundList.push({audioFileUrl:"",track:""})},a.readAsText(m)},o=m=>{var z,de,pe,me,he,fe;if(!m)return[];const a=new DOMParser().parseFromString(m,"text/xml"),c=((de=(z=a.getElementsByTagName("part-list"))==null?void 0:z[0])==null?void 0:de.getElementsByTagName("score-part"))||[],r=Array.from(c).map(A=>{var _;const te=((_=A.getElementsByTagName("part-name"))==null?void 0:_[0].textContent)||"";return{value:te,label:te}});r.length>0&&(e.musicSheetSoundList=e.musicSheetSoundList.slice(0,r.length)),s.xmlFirstSpeed=((me=(pe=a.getElementsByTagName("per-minute"))==null?void 0:pe[0])==null?void 0:me.textContent)||"",!e.playSpeed&&s.xmlFirstSpeed&&(e.playSpeed=Number.parseInt(s.xmlFirstSpeed));const h=[],C=a.getElementsByTagName("virtual-instrument");for(let A=0;A<C.length;A++){const _=((fe=(he=C[A].getElementsByTagName("virtual-name"))==null?void 0:he[0])==null?void 0:fe.textContent)||"";_&&!h.includes(_)&&h.push(_)}const U=new Map;return s.instrumentData.forEach(A=>{U.set(A.code,A.id+"")}),e.musicalInstrumentIdList=[],h.forEach(A=>{U.has(A)&&e.musicalInstrumentIdList.push(U.get(A))}),e.musicalInstrumentIdList.length>0&&n(e.musicalInstrumentIdList),r},f=m=>{const a=s.partListNames.filter(r=>{var h,C;return((C=(h=r.value)==null?void 0:h.toLocaleUpperCase)==null?void 0:C.call(h))!="COMMON"}),c=le(a)||[];return c.forEach(r=>{e.musicSheetSoundList.findIndex(C=>r.value==C.track)>-1&&m!=r.value?r.disabled=!0:r.disabled=!1}),c||[]},n=m=>P(this,null,function*(){try{const{data:a}=yield Ue({page:1,rows:999,musicalInstrumentIdList:m});(a.rows||[]).forEach(r=>{e.subjectIds.push(r.id+"")})}catch(a){}}),p=m=>{e.musicSheetSoundList.push(M({audioFileUrl:null,track:null},m))},d=m=>{!m||(m==="all"?(e.multiTracksSelection=[],s.partListNames.forEach(a=>{e.multiTracksSelection.push(a.value)})):m==="invert"?s.partListNames.forEach(a=>{const c=e.multiTracksSelection.indexOf(a.value);c>-1?e.multiTracksSelection.splice(c,1):e.multiTracksSelection.push(a.value)}):m==="allUncheck"&&(e.multiTracksSelection=[]))},I=()=>{var c;if(e.sourceType=="PLATFORM"){s.ownerName="";return}if(!e.musicSheetExtend||!e.sourceType||!((c=e.musicSheetExtend)!=null&&c.userId))return;const m=e.musicSheetExtend.applicationId,a=s.appData.filter(r=>r.id==m);a.length>0&&(s.ownerName=a[0].appName),e.sourceType=="ORG"?s.ownerName+="-"+e.musicSheetExtend.organizationRole:e.sourceType=="PERSON"&&(s.ownerName+="-"+ut(e.musicSheetExtend.clientType,new Map(Object.entries(lt))),e.musicSheetExtend.userName&&(s.ownerName+="-"+e.musicSheetExtend.userName),e.musicSheetExtend.phone&&(s.ownerName+="("+e.musicSheetExtend.phone+")"))};return W(()=>P(this,null,function*(){var m,a;s.loading=!0,l.type==="preview"&&(s.previewMode=!0);{if(s.instrumentList&&s.instrumentList.length>0)return;try{const{data:c}=yield ot({page:1,rows:999}),r=c.rows||[];s.instrumentData=r,r.forEach(h=>{h.label=h.name,h.value=h.id+"",h.disabled=!h.enableFlag}),s.instrumentList=r}catch(c){}}s.subjectList=le(l.subjectList),s.subjectList.forEach(c=>{c.disabled=!c.enableFlag});{const c=Object.keys(ce),{data:r}=yield Ee({page:1,rows:999,parentId:0}),C=(r.rows||[]).filter(U=>c.includes(U.appKey));C.forEach(U=>{U.label=U.appName,U.value=U.id}),s.appData=C}try{const{data:c}=yield Pe({enable:!0});s.musicSheetCategories=De(c,"musicSheetCategoriesList")}catch(c){}if(l.type==="edit"||l.type==="preview"){const c=l.data;try{const{data:r}=yield Ne({id:c.id});e.audioType=r.audioType,e.musicSheetAccompanimentList=r.musicSheetAccompanimentList,(m=r.musicSheetAccompanimentList)==null||m.forEach(h=>{s.musicSheetAccompanimentUrlList.push(h.audioFileUrl)}),e.playMode=r.playMode,e.xmlFileUrl=r.xmlFileUrl,e.midiUrl=r.midiUrl,e.name=r.name,e.composer=r.composer,e.playSpeed=r.playSpeed,e.musicCover=r.musicCover,e.remark=r.remark,e.status=r.status,e.musicCategoryId=r.musicCategoryId,e.musicSheetType=r.musicSheetType||"SINGLE",e.evaluationStandard=r.evaluationStandard,e.musicalInstrumentIdList=r.musicalInstrumentIds.split(",")||[],e.subjectIds=((a=r.subjectIds)==null?void 0:a.split(","))||[],e.sourceType=r.sourceType,e.musicSheetExtend=r.musicSheetExtend,e.musicSheetSoundList=r.musicSheetSoundList||[],e.musicSheetSoundList.forEach(h=>{e.multiTracksSelection.push(h.track)});try{const h=r.extConfigJson?JSON.parse(r.extConfigJson):{};e.graduals=h.gradualTimes||{}}catch(h){}I(),Je.get(r.xmlFileUrl).then(h=>{h!=null&&h.data&&(b.list=Ie(h==null?void 0:h.data).filter(C=>C.length===2))})}catch(r){}}else s.subjectList=s.subjectList.filter(c=>c.enableFlag==!0),s.instrumentList=s.instrumentList.filter(c=>c.enableFlag==!0);s.loading=!1})),()=>{let m;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:s.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(R,{value:e.name,"onUpdate:value":a=>e.name=a,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(R,{value:e.composer,"onUpdate:value":a=>e.composer=a,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(R,{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(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: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(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":a=>e.musicSheetType=a,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":a=>e.sourceType=a,options:Y(ue),placeholder:"\u8BF7\u9009\u62E9\u4F5C\u8005\u5C5E\u6027",onUpdateValue:()=>{e.musicSheetExtend={},s.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: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(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: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(T,{label:"\u901F\u5EA6",path:"playSpeed"},{default:()=>[t(X,{placeholder:"\u8BF7\u8F93\u5165\u901F\u5EA6",value:e.playSpeed,"onUpdate:value":a=>e.playSpeed=a,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":a=>e.appAuditFlag=a},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":a=>e.musicCategoryId=a,options:s.musicSheetCategories,clearable:!0},null)]})]}),t(E,{cols:2},{default:()=>[t(T,{label:"\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(G,{value:e.repeatedBeats,"onUpdate:value":a=>e.repeatedBeats=a},{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(G,{value:e.evaluationStandard,"onUpdate:value":a=>e.evaluationStandard=a},{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(G,{value:e.playMode,"onUpdate:value":a=>e.playMode=a,onUpdateValue:a=>{a==="MP3"?e.playMode="MP3":e.playMode="MIDI"}},{default:()=>[t(j,{value:"MP3"},{default:()=>[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(G,{value:e.audioType,"onUpdate:value":a=>e.audioType=a},{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:s.previewMode,size:10,imageList:s.musicSheetAccompanimentUrlList,"onUpdate:imageList":a=>s.musicSheetAccompanimentUrlList=a,tips:"\u4EC5\u652F\u6301\u4E0A\u4F20.mp3\u683C\u5F0F\u6587\u4EF6",listType:"image",accept:".mp3",bucketName:"cloud-coach",text:"\u70B9\u51FB\u4E0A\u4F20\u4F34\u594F\u6587\u4EF6",max:10,desc:"\u4E0A\u4F20\u4F34\u594F\u6587\u4EF6","onUpload:success":a=>{var c;s.musicSheetAccompanimentUrls=[s.musicSheetAccompanimentUrls,a.url].filter(Boolean).join(","),s.musicSheetAccompanimentUrlList=(c=s.musicSheetAccompanimentUrls)==null?void 0:c.split(",").filter(Boolean),e.musicSheetAccompanimentList=[];for(let r=0;r<s.musicSheetAccompanimentUrlList.length;r++)e.musicSheetAccompanimentList.push({audioFileUrl:s.musicSheetAccompanimentUrlList[r],sortNumber:r+1})},onRemove:()=>{s.musicSheetAccompanimentUrlList=[],s.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:s.previewMode,size:10,fileList:e.midiFileUrl,"onUpdate:fileList":a=>e.midiFileUrl=a,tips:"\u4EC5\u652F\u6301\u4E0A\u4F20.MID\u683C\u5F0F\u6587\u4EF6",listType:"image",accept:".mid",bucketName:"cloud-coach",text:"\u70B9\u51FB\u4E0A\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:s.previewMode,size:10,fileList:e.xmlFileUrl,"onUpdate:fileList":a=>e.xmlFileUrl=a,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:w,onRemove:()=>{e.multiTracksSelection=[],s.partListNames=[],e.musicSheetSoundList=[],e.musicalInstrumentIdList=[],e.subjectIds=[]}},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":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(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:s.instrumentList,value:e.musicalInstrumentIdList,"onUpdate:value":a=>e.musicalInstrumentIdList=a,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(G,{value:s.multiTracks,"onUpdate:value":a=>s.multiTracks=a,onUpdateValue:a=>{d(a)}},{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":a=>e.multiTracksSelection=a},{default:()=>[t(E,{yGap:2,cols:4},ht(m=s.partListNames.map(a=>t(ae,null,{default:()=>[t(Me,{value:a.value,label:a.label},null)]})))?m:{default:()=>[m]})]})]})]})]})]})]}),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(G,{value:e.isPlayBeat,"onUpdate:value":a=>e.isPlayBeat=a},{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(G,{value:e.isUseSystemBeat,"onUpdate:value":a=>e.isUseSystemBeat=a},{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((a,c)=>{var r,h;return t(Z,null,[((h=(r=a.track)==null?void 0:r.toLocaleUpperCase)==null?void 0:h.call(r))!="COMMON"&&e.multiTracksSelection.indexOf(a.track)>-1&&t(E,{class:oe.audioSection},{default:()=>[t(T,{span:12,label:"\u539F\u97F3",path:`musicSheetSoundList[${c}].audioFileUrl`,rule:[{required:!0,message:`\u8BF7\u4E0A\u4F20${a.track?a.track+"\u7684":"\u7B2C"+(c+1)+"\u4E2A"}\u539F\u97F3`}]},{default:()=>[t($,{desc:"\u539F\u97F3\u6587\u4EF6",disabled:s.previewMode,size:10,fileList:a.audioFileUrl,"onUpdate:fileList":C=>a.audioFileUrl=C,tips:"\u4EC5\u652F\u6301\u4E0A\u4F20.mp3\u683C\u5F0F\u6587\u4EF6",listType:"image",accept:".mp3",bucketName:"cloud-coach"},null)]}),s.partListNames.length>1&&t(T,{span:12,label:"\u6240\u5C5E\u8F68\u9053",path:`musicSheetSoundList[${c}].track`,rule:[{required:!0,message:"\u8BF7\u9009\u62E9\u6240\u5C5E\u8F68\u9053"}]},{default:()=>[t(F,{placeholder:"\u8BF7\u9009\u62E9\u6240\u5C5E\u8F68\u9053",value:a.track,"onUpdate:value":C=>a.track=C,options:f(a.track)},null)]})]})])}),t(x,{type:"primary",dashed:!0,block:!0,disabled:s.partListNames.length<=e.musicSheetSoundList.length,style:{marginBottom:"24px"},onClick:p},{default:()=>[y("\u6DFB\u52A0\u539F\u97F3")]})])]}),l.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:()=>k(),loading:u.value,disabled:u.value},{default:()=>[y("\u786E\u8BA4")]})]}),t(J,{show:s.showMusicSheetOwnerDialog,"onUpdate:show":a=>s.showMusicSheetOwnerDialog=a,preset:"dialog",showIcon:!1,maskClosable:!1,title:"\u6240\u5C5E\u4EBA",style:{width:"800px"}},{default:()=>[t(mt,{musicSheetExtend:e.musicSheetExtend,sourceType:e.sourceType,appData:s.appData,onClose:()=>{s.showMusicSheetOwnerDialog=!1},onChoseMusicSheetOwnerData:a=>{e.musicSheetExtend=M({},a),I()}},null)]})])}}}),St=q({name:"musicPreView",props:{item:{type:Object,default:()=>{}}},setup(l,{emit:S}){const v=He().getToken,s=(/(localhost|192)/.test(location.host)?"https://dev.kt.colexiu.com/":location.origin)+`/instrument/?_t=${Date.now()}&id=${l.item.id}&modelType=practise&modeType=json&Authorization=${v}&isMove=1&isCbs=true`;return()=>t("div",null,[t("iframe",{width:"667px",height:"375px",frameborder:"0",src:s},null)])}});function Le(l){return typeof l=="function"||Object.prototype.toString.call(l)==="[object Object]"&&!ke(l)}const bt=q({name:"use-project",props:{useProject:{type:Array,required:!0,default:[]},id:{type:String,required:!0,default:null}},emits:["close","getList"],setup(l,{emit:S}){const i=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 o=i.useProjectParamConfig.GYM,f=["musicSheetCategoryId","paymentType"];for(let n=0;n<f.length;n++)if(o[f[n]])return!0;return!1}),e=Q(()=>{const o=i.useProjectParamConfig.KLX,f=["availableType","musicSheetCategoryId","paymentType","musicPrice","topFlag","exquisiteFlag"];for(let n=0;n<f.length;n++)if(o[f[n]])return!0;return!1}),s=Q(()=>{const o=i.useProjectParamConfig.KT,f=["musicSheetCategoryId"];for(let n=0;n<f.length;n++)if(o[f[n]])return!0;return!1}),b=Q(()=>{const o=i.useProjectParamConfig.GYT,f=["musicSheetCategoryId"];for(let n=0;n<f.length;n++)if(o[f[n]])return!0;return!1}),u=K({loading:!1,musicSheetData:null,tabName:null,selectAppKey:[],selectAppName:[],appKeyNameMap:null,userProjectList:[],musicSheetCategoryOptions:{},musicSheetCanBeUsedProjectKey:[]}),g=B(!1),N=V();W(()=>P(this,null,function*(){var d;u.loading=!0;const{data:o}=yield Ne({id:l.id});u.musicSheetData=o,o&&o.musicSheetExtend&&(i.useApplicationIds=((d=o.musicSheetExtend.useApplicationIds)==null?void 0:d.split(","))||[]);const f=Object.keys(ce);l.useProject.forEach(I=>{const m=f.indexOf(I.appKey);let a=!1;m>-1&&u.userProjectList.push(O(M({},I),{disabled:a}))}),u.appKeyNameMap=new Map,u.userProjectList.forEach(I=>{i.useApplicationIds.includes(I.id)&&u.selectAppKey.push(I.appKey),u.appKeyNameMap.set(I.appKey,I.appName)}),u.selectAppKey.length>0&&(u.tabName=u.selectAppKey[0]);const n=[],p=new Map;if(l.useProject.forEach(I=>{n.push(I.id),p.set(I.id,I.appKey)}),n.length>0){const{data:I}=yield qe({applicationIds:n.join(",")});I.forEach(m=>{const a=p.get(m.applicationId);a&&(u.musicSheetCategoryOptions[a]=m.musicSheetCategories)})}{const{data:I}=yield Ge({musicSheetId:l.id});I.forEach(m=>{const a=m.appKey;i.useProjectParamConfig[a]=m})}u.loading=!1}));const k=B(),w=()=>P(this,null,function*(){k.value.validate(o=>P(this,null,function*(){var f;if(o){if(Array.isArray(o)&&o.length>0){const n=(f=o[0][0].field)==null?void 0:f.split(".")[1];n&&u.selectAppKey.includes(n)&&(u.tabName=n)}return}g.value=!0;try{const n=new Map;l.useProject.forEach(I=>{n.set(I.appKey,I.id)});const p=[];u.selectAppKey.forEach(I=>{Object.keys(i.useProjectParamConfig).forEach(m=>{if(I===m){const a=i.useProjectParamConfig[m];p.push(O(M({},a),{musicSheetId:l.id,applicationId:n.get(m)}))}})});const d={musicSheetId:l.id,useApplicationIds:i.useApplicationIds.join(","),applicationExtends:p};yield ze(d),N.success("\u4FEE\u6539\u6210\u529F"),S("getList"),S("close")}catch(n){console.log(n)}g.value=!1}))});return()=>{let o,f;return t("div",null,[t(ne,{class:oe.formContainer,model:i,ref:k,"label-placement":"left","label-width":"85"},{default:()=>[t(L,{label:"\u9002\u7528\u5E94\u7528",path:"useApplicationIds",rule:[{required:!0,message:"\u8BF7\u9009\u62E9\u9002\u7528\u5E94\u7528"}]},{default:()=>[t(Fe,{value:i.useApplicationIds,"onUpdate:value":n=>i.useApplicationIds=n,onUpdateValue:n=>{u.selectAppKey=[],u.userProjectList.forEach(p=>{n.includes(p.id)&&u.selectAppKey.push(p.appKey)}),u.selectAppKey.length==0?u.tabName="":u.tabName=u.selectAppKey[0]}},Le(o=u.userProjectList.map(n=>t(Me,{value:n.value},{default:()=>[n.label]})))?o:{default:()=>[o]})]}),u.selectAppKey.length>0&&t(je,{type:"line",value:u.tabName,"onUpdate:value":[n=>u.tabName=n,n=>{u.tabName=n}]},Le(f=u.selectAppKey.map((n,p)=>t(se,{tab:u.appKeyNameMap.get(n),name:n,displayDirective:"show"},{default:()=>[n==="GYM"&&t("div",null,[t(L,{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:i.useProjectParamConfig.GYM.musicSheetCategoryId,"onUpdate:value":d=>i.useProjectParamConfig.GYM.musicSheetCategoryId=d,options:u.musicSheetCategoryOptions.GYM,onChange:()=>{},clearable:!0},null)]}),t(L,{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:i.useProjectParamConfig.GYM.paymentType,"onUpdate:value":d=>i.useProjectParamConfig.GYM.paymentType=d,options:Y(st)},null)]}),t(L,{label:"\u6392\u5E8F\u503C",path:"useProjectParamConfig.GYM.sortNo"},{default:()=>[t(X,{value:i.useProjectParamConfig.GYM.sortNo,"onUpdate:value":d=>i.useProjectParamConfig.GYM.sortNo=d,placeholder:"\u8BF7\u8F93\u5165\u6392\u5E8F\u503C",clearable:!0,min:0,max:9999,style:{width:"100%"}},null)]})]),n==="GYT"&&t("div",null,[t(L,{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:i.useProjectParamConfig.GYT.musicSheetCategoryId,"onUpdate:value":d=>i.useProjectParamConfig.GYT.musicSheetCategoryId=d,options:u.musicSheetCategoryOptions.GYT,clearable:!0},null)]}),t(L,{label:"\u6392\u5E8F\u503C",path:"useProjectParamConfig.GYT.sortNo"},{default:()=>[t(X,{value:i.useProjectParamConfig.GYT.sortNo,"onUpdate:value":d=>i.useProjectParamConfig.GYT.sortNo=d,placeholder:"\u8BF7\u8F93\u5165\u6392\u5E8F\u503C",clearable:!0,min:0,max:9999,style:{width:"100%"}},null)]})]),n==="KLX"&&t("div",null,[t(L,{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:i.useProjectParamConfig.KLX.availableType,"onUpdate:value":d=>i.useProjectParamConfig.KLX.availableType=d,options:Y(it)},null)]}),t(L,{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:i.useProjectParamConfig.KLX.musicSheetCategoryId,"onUpdate:value":d=>i.useProjectParamConfig.KLX.musicSheetCategoryId=d,options:[]},null)]}),t(L,{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:i.useProjectParamConfig.KLX.paymentType,"onUpdate:value":d=>i.useProjectParamConfig.KLX.paymentType=d,options:[{label:"\u662F",value:1},{label:"\u5426",value:0}]},null)]}),t(L,{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:i.useProjectParamConfig.KLX.musicPrice,"onUpdate:value":d=>i.useProjectParamConfig.KLX.musicPrice=d},null)]}),t(L,{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:i.useProjectParamConfig.KLX.topFlag,"onUpdate:value":d=>i.useProjectParamConfig.KLX.topFlag=d,options:[{label:"\u662F",value:1},{label:"\u5426",value:0}]},null)]}),t(L,{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:i.useProjectParamConfig.KLX.exquisiteFlag,"onUpdate:value":d=>i.useProjectParamConfig.KLX.exquisiteFlag=d,options:[{label:"\u662F",value:1},{label:"\u5426",value:0}]},null)]}),t(L,{label:"\u6392\u5E8F\u503C",path:"useProjectParamConfig.KLX.sortNo"},{default:()=>[t(X,{value:i.useProjectParamConfig.KLX.sortNo,"onUpdate:value":d=>i.useProjectParamConfig.KLX.sortNo=d,placeholder:"\u8BF7\u8F93\u5165\u6392\u5E8F\u503C",clearable:!0,min:0,max:9999,style:{width:"100%"}},null)]})]),n==="KT"&&t("div",null,[t(L,{label:"\u4E50\u8C31\u6559\u6750",path:"useProjectParamConfig.KT.musicSheetCategoryId",rule:[{required:s.value,message:"\u8BF7\u9009\u62E9\u4E50\u8C31\u6559\u6750"}]},{default:()=>[t(H,{valueField:"id",labelField:"name","children-field":"children",placeholder:"\u8BF7\u9009\u62E9\u4E50\u8C31\u6559\u6750",value:i.useProjectParamConfig.KT.musicSheetCategoryId,"onUpdate:value":d=>i.useProjectParamConfig.KT.musicSheetCategoryId=d,options:u.musicSheetCategoryOptions.KT,clearable:!0},null)]}),t(L,{label:"\u6392\u5E8F\u503C",path:"useProjectParamConfig.KT.sortNo"},{default:()=>[t(X,{value:i.useProjectParamConfig.KT.sortNo,"onUpdate:value":d=>i.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:()=>w(),loading:g.value,disabled:g.value},{default:()=>[y("\u786E\u8BA4")]})]})])}}}),Ct=q({name:"music-list",props:["searchId"],setup(l,{emit:S}){const i=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:[]}),s=()=>[{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:()=>w(a)},{default:()=>[y("\u5220\u9664")]})]})}}],b=B([]),u=a=>{b.value=a},g=a=>{const c=a.status?"\u505C\u7528":"\u542F\u7528";i.warning({title:"\u63D0\u793A",content:`\u662F\u5426${c}\uFF1F`,positiveText:"\u786E\u5B9A",negativeText:"\u53D6\u6D88",onPositiveClick:()=>P(this,null,function*(){try{yield Se({ids:new Array(a.id),status:!a.status}),o(),v.success(`${c}\u6210\u529F`)}catch(r){}})})},N=a=>{const c=b.value.length;c==0&&v.warning("\u672A\u9009\u62E9\u6570\u636E");const r=a?"\u542F\u7528":"\u505C\u7528";i.warning({title:"\u63D0\u793A",content:`\u662F\u5426${r}`+c+"\u6761\u6570\u636E\uFF1F",positiveText:"\u786E\u5B9A",negativeText:"\u53D6\u6D88",onPositiveClick:()=>P(this,null,function*(){try{yield Se({ids:b.value,status:a}),o(),v.success(`${r}\u6210\u529F`)}catch(h){}})})},k=a=>P(this,null,function*(){if(!!e.searchForm.useAppId&&(e.userIdData=[],e.searchForm.userId=null,a&&a!=="PLATFORM")){const{data:c}=yield Te({page:1,rows:9999,sourceType:a,applicationId:e.searchForm.useAppId});(c.rows||[]).forEach(h=>{e.userIdData.push(O(M({},h),{label:h.userName,value:h.userId}))})}}),w=a=>{i.warning({title:"\u8B66\u544A",content:`\u5220\u9664"${a.name}"\uFF0C\u662F\u5426\u7EE7\u7EED\uFF1F`,positiveText:"\u786E\u5B9A",negativeText:"\u53D6\u6D88",onPositiveClick:()=>P(this,null,function*(){try{yield Ye({id:a.id}),o(),v.success("\u5220\u9664\u6210\u529F")}catch(c){}})})},o=()=>P(this,null,function*(){try{e.loading=!0;const{data:a}=yield Xe(M(M({},e.pagination),e.searchForm));e.pagination.pageTotal=Number(a.total),e.dataList=a.rows||[]}catch(a){}e.loading=!1}),f=()=>P(this,null,function*(){try{const{data:a}=yield Ue({page:1,rows:999}),c=a.rows||[];c.forEach(r=>{r.label=r.name,r.value=r.id+""}),e.subjectList=c}catch(a){}}),n=()=>P(this,null,function*(){try{const a=Object.keys(ce),{data:c}=yield Ee({page:1,rows:999}),r=c.rows||[];e.useProjectData=[],r.filter(C=>a.includes(C.appKey)).forEach(C=>{e.useProjectData.push(O(M({},C),{label:C.appName,value:C.id}))})}catch(a){}}),p=B(),d=()=>{e.pagination.page=1,o()};Qe(()=>l.searchId,a=>{console.log(a,"searchId")});const I=()=>{var a;(a=p.value)==null||a.submit()},m=()=>{var a;(a=p.value)==null||a.reset()};return W(()=>P(this,null,function*(){e.loading=!0,l.searchId&&(e.searchForm.categoriesId=l.searchId||null),f(),n(),o()})),()=>t("div",{class:"system-menu-container"},[t(we,{ref:p,model:e.searchForm,onSubmit:d,saveKey:"music-list",onSetModel:a=>e.searchForm=a},{default:()=>[t(L,{label:"\u5173\u952E\u8BCD",path:"keyword"},{default:()=>[t(R,{placeholder:"\u66F2\u76EE\u7F16\u53F7/\u540D\u79F0",value:e.searchForm.keyword,"onUpdate:value":a=>e.searchForm.keyword=a,clearable:!0},null)]}),t(L,{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(L,{label:"\u53EF\u7528\u58F0\u90E8",path:"musicSubject"},{default:()=>[t(F,{placeholder:"\u8BF7\u9009\u62E9\u53EF\u7528\u58F0\u90E8",value:e.searchForm.subjectId,"onUpdate:value":a=>e.searchForm.subjectId=a,options:e.subjectList,clearable:!0},null)]}),t(L,{label:"\u97F3\u4E50\u4EBA",path:"composer"},{default:()=>[t(R,{placeholder:"\u8BF7\u9009\u62E9\u97F3\u4E50\u4EBA",value:e.searchForm.composer,"onUpdate:value":a=>e.searchForm.composer=a,clearable:!0},null)]}),t(L,{label:"\u4F5C\u8005\u5C5E\u6027",path:"sourceType"},{default:()=>[t(F,{placeholder:"\u8BF7\u9009\u62E9\u4F5C\u8005\u5C5E\u6027",value:e.searchForm.sourceType,"onUpdate:value":a=>e.searchForm.sourceType=a,options:Y(ue),onUpdateValue:a=>P(this,null,function*(){e.userIdData=[],e.searchForm.userId=null,a&&a!=="PLATFORM"?(yield k(a),e.userIdDisable=!e.searchForm.useAppId):e.userIdDisable=!0}),clearable:!0},null)]}),t(L,{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=>P(this,null,function*(){e.searchForm.useAppId=a,a?(yield k(e.searchForm.sourceType),e.userIdDisable=!(e.searchForm.sourceType&&e.searchForm.sourceType!=="PLATFORM")):(e.searchForm.userId=null,e.userIdDisable=!0,e.userIdData=[])})},null)]}),t(L,{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(L,{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(L,{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(L,null,{default:()=>[t(D,null,{default:()=>[t(x,{type:"primary",onClick:I},{default:()=>[y("\u641C\u7D22")]}),t(x,{type:"default",onClick:m},{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:()=>{N(!1)}},{default:()=>[y("\u6279\u91CF\u505C\u7528")]}),t(x,{disabled:b.value.length==0,onClick:()=>{N(!0)}},{default:()=>[y("\u6279\u91CF\u542F\u7528")]})]}),t(ee,{loading:e.loading,columns:s(),data:e.dataList,rowKey:a=>a.id,onUpdateCheckedRowKeys:u,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:o,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:o},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:o},null)]})])}}),It=q({emits:["close","getList"],props:["actvieRow","saveMode","list"],name:"save-categroy-dialog",setup(l,{emit:S}){const i=V(),v=B(),e=B([{name:"\u9876\u7EA7\u5206\u7C7B",id:0},...De(l.list,"musicSheetCategoriesList")]),s=K({loading:!1,dataList:[],btnLoading:!1}),b=K({id:"",name:"",enable:!0,parentId:"0"}),u=()=>P(this,null,function*(){var g;(g=v.value)==null||g.validate(N=>P(this,null,function*(){if(!N){s.btnLoading=!0;try{if(l.saveMode==="add"){const{data:k}=yield Ve(M({},b));S("getList"),i.success("\u6DFB\u52A0\u6210\u529F")}else{const{data:k}=yield We(M({},b));S("getList"),i.success("\u4FEE\u6539\u6210\u529F")}}catch(k){}s.btnLoading=!1}}))});return W(()=>{if(l.saveMode==="add")l.actvieRow&&l.actvieRow.id&&(b.parentId=(l==null?void 0:l.actvieRow.id)+"");else for(let g in l==null?void 0:l.actvieRow)b[g]=l==null?void 0:l.actvieRow[g]}),()=>t("div",null,[t(ne,{ref:v,model:b},{default:()=>[l.saveMode==="add"&&l.actvieRow&&t(L,{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(L,{label:"\u5206\u7C7B\u540D\u79F0",rule:[{required:!0,message:"\u8BF7\u8F93\u5165\u5206\u7C7B\u540D\u79F0",trigger:["blur","input"]}],path:"name"},{default:()=>[t(R,{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:()=>u(),loading:s.btnLoading,disabled:s.btnLoading},{default:()=>[y("\u786E\u8BA4")]})]})])}}),Lt=q({emits:["setTabName"],name:"music-category",setup(){const l=K({loading:!1,pagination:{page:1,rows:10},dataList:[],showSaveDialog:!1,saveMode:"add",saveRowData:null}),S=re(),i=V(),v=()=>P(this,null,function*(){try{l.loading=!0;const u={page:l.pagination.page,rows:l.pagination.rows},{data:g}=yield Pe(u);l.dataList=g||[]}catch(u){}l.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(u){return t(D,null,{default:()=>[t(x,{type:"error",size:"small",text:!0,onClick:()=>b(u)},{default:()=>[y("\u5220\u9664")]}),t(x,{type:"primary",size:"small",text:!0,onClick:()=>{l.saveRowData=u,l.saveMode="edit",l.showSaveDialog=!0}},{default:()=>[y("\u4FEE\u6539")]}),t(x,{type:"primary",size:"small",text:!0,onClick:()=>{l.saveRowData=u,l.showSaveDialog=!0,l.saveMode="add"}},{default:()=>[y("\u6DFB\u52A0\u5B50\u5206\u7C7B")]})]})}}],s=()=>{l.pagination.page=1,v()},b=u=>P(this,null,function*(){S.warning({title:"\u8B66\u544A",content:"\u662F\u5426\u786E\u8BA4\u5220\u9664'"+u.name+"'?",positiveText:"\u786E\u5B9A",negativeText:"\u53D6\u6D88",onPositiveClick:()=>P(this,null,function*(){(yield $e(u.id)).data&&(s(),i.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:()=>{l.saveMode="add",l.showSaveDialog=!0,l.saveRowData=null}},{default:()=>[y("\u65B0\u589E\u5206\u7C7B")]})]}),t(ee,{loading:l.loading,columns:e(),data:l.dataList,rowKey:u=>u.id,childrenKey:"musicSheetCategoriesList"},null)]),t(J,{show:l.showSaveDialog,"onUpdate:show":u=>l.showSaveDialog=u,preset:"dialog",showIcon:!1,title:l.saveRowData?"\u4FEE\u6539\u5206\u7C7B":"\u65B0\u589E\u5206\u7C7B",style:{width:"550px"}},{default:()=>[t(It,{onGetList:()=>{l.showSaveDialog=!1,v()},onClose:()=>{l.showSaveDialog=!1},list:l.dataList,saveMode:l.saveMode,actvieRow:l.saveRowData},null)]})])}}),$t=q({name:"music-sheet",setup(){const l=K({tabName:"MusicList",searchId:null}),S=at();rt(e=>{e.form.tabName&&(l.tabName=e.form.tabName)});const i=e=>{console.log("setTabName",e),l.tabName=e.tabName,l.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:l.tabName,"onUpdate:value":[e=>l.tabName=e,e=>v(e)]},{default:()=>[t(se,{name:"MusicList",tab:"\u66F2\u76EE\u5217\u8868"},{default:()=>[t(Ct,{searchId:l.searchId},null)]}),t(se,{name:"CategroryList",tab:"\u66F2\u76EE\u5206\u7C7B\u7BA1\u7406"},{default:()=>[t(Lt,{onSetTabName:i},null)]})]})])])}});export{$t as default};
|