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,b,i)=>b in l?Ae(l,b,{enumerable:!0,configurable:!0,writable:!0,value:i}):l[b]=i,j=(l,b)=>{for(var i in b||(b={}))Be.call(b,i)&&ye(l,i,b[i]);if(ge)for(var i of ge(b))Re.call(b,i)&&ye(l,i,b[i]);return l},O=(l,b)=>Oe(l,Ke(b));var x=(l,b,i)=>new Promise((v,e)=>{var s=f=>{try{u(i.next(f))}catch(N){e(N)}},S=f=>{try{u(i.throw(f))}catch(N){e(N)}},u=f=>f.done?v(f.value):Promise.resolve(f.value).then(s,S);u((i=i.apply(l,b)).next())});import{S as we}from"./index.4b2db784.js";import{P as Pe}from"./index.cb20c5c2.js";import{m as Te,a as xe,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.1b8860e4.js";import{U as $}from"./index.b1149e09.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 P,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 k,cb as ae,dz as Fe,m as je,aa as J,bk as Me,b as He,F as Q,d7 as ke,d8 as se,M as Qe,dk as Ze,ch as et,a0 as tt,e as at}from"./index.8bc79152.js";import{B as ce,D as ie,E as oe,c as lt,F as st,G as it}from"./constant.811f1023.js";import{g as Y,a as ot}from"./objectUtil.ec24ceed.js";import{c as ut}from"./api.84b3de2b.js";import{y as Ue}from"./api.68b628d5.js";import{s as Ee}from"./api.3c23b679.js";import{f as De}from"./index.270b5fe9.js";import{N as T}from"./FormItemGridItem.7d2fce39.js";import{N as H}from"./Cascader.57fec086.js";import{g as Ce}from"./filters.cb22ede1.js";import{g as rt,s as nt}from"./use-async.65bfa3f1.js";import"./searchs.b637f0d6.js";import"./api.6fca997a.js";import"./vuedraggable.umd.dfbd56a7.js";import"./DeleteFilled.38108cbf.js";import"./api.d4672076.js";import"./searchArray.cacb4a2d.js";import"./knowledgeTypeData.3b15dd0b.js";import"./dateUtil.31d3e04f.js";import"./dayjs.min.536eadda.js";const ct="_audioSection_1l6lr_1",dt="_btnRemove_1l6lr_9",pt="_formContainer_1l6lr_14",ue={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:b,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(),S=B(),u=()=>{e.pagination.page=1,N()},f=()=>{var r;(r=S.value)==null||r.submit()},N=()=>x(this,null,function*(){try{e.searchForm.applicationId||s.warning("\u83B7\u53D6\u5E94\u7528\u5217\u8868\u5931\u8D25"),e.loading=!0,e.searchForm.sourceType=l.sourceType;const{data:g}=yield Te(j(j({},e.pagination),e.searchForm));e.pagination.pageTotal=Number(g.total),e.dataList=g.rows||[]}catch(r){}e.loading=!1});W(()=>x(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 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(P,{type:"primary",size:"small",text:!0,onClick:()=>{const g=O(j({},r),{applicationId:e.searchForm.applicationId});v("choseMusicSheetOwnerData",g),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(P,{type:"primary",size:"small",text:!0,onClick:()=>{const g=O(j({},r),{applicationId:e.searchForm.applicationId});v("choseMusicSheetOwnerData",g),v("close")}},{default:()=>[y("\u9009\u62E9")]})]})}}],w=()=>[{title:"\u673A\u6784\u540D\u79F0",key:"organizationRole"},{title:"\u64CD\u4F5C",key:"operation",fixed:"right",render(r){return t(D,null,{default:()=>[t(P,{type:"primary",size:"small",text:!0,onClick:()=>{const g=O(j({},r),{applicationId:e.searchForm.applicationId});v("choseMusicSheetOwnerData",g),v("close")}},{default:()=>[y("\u9009\u62E9")]})]})}}];return()=>t("div",{class:"system-menu-container"},[t(we,{ref:S,model:e.searchForm,onSubmit:u,onSetModel:r=>e.searchForm=r},{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":r=>e.searchForm.applicationId=r,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":r=>e.searchForm.name=r,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":r=>e.searchForm.orgName=r,clearable:!0},null)]})]),t(L,{size:"small"},{default:()=>[t(D,null,{default:()=>[t(P,{type:"primary",onClick:f},{default:()=>[y("\u641C\u7D22")]})]})]})]}),t("div",{class:["section-container"]},[l.sourceType==="PERSON"&&t(ee,{loading:e.loading,columns:M(),data:e.dataList},null),l.sourceType==="ORG"&&t(ee,{loading:e.loading,columns:w(),data:e.dataList},null),t(Pe,{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:N,sync:!0,pageSlot:5},null)])])}});function ht(l){return typeof l=="function"||Object.prototype.toString.call(l)==="[object Object]"&&!Me(l)}const ft=(l,b)=>{var u;let i=0;const v=l.closest(b);let e=v;const s=v==null?void 0:v.closest("measure");let S=null;for(;!S&&i<((s==null?void 0:s.childNodes.length)||50);)i++,((u=e==null?void 0:e.nextElementSibling)==null?void 0:u.tagName)==="note"&&(S=e==null?void 0:e.nextElementSibling),e=e==null?void 0:e.nextElementSibling;return S},gt=(l,b)=>{var S,u;if(!l)return"";const i=new DOMParser().parseFromString(l,"text/xml"),v=((u=(S=i.getElementsByTagName("part-list"))==null?void 0:S[0])==null?void 0:u.getElementsByTagName("score-part"))||[],e=i.getElementsByTagName("part"),s=v[b];if(s){const f=s.getAttribute("id");Array.from(e).forEach(w=>{var r,g,d;if(w&&w.getAttribute("id")!==f&&((r=w.parentNode)==null||r.removeChild(w)),w&&w.getAttribute("id")===f){const m=w.getElementsByTagName("barline"),p=(g=m[m.length-1])==null?void 0:g.parentElement;if(((d=p==null?void 0:p.lastElementChild)==null?void 0:d.tagName)!=="barline"){const I=(p==null?void 0:p.children)||[];for(let n of I)if(n.tagName==="barline"){p==null||p.appendChild(n);break}}}}),Array.from(v).forEach(w=>{var r;w&&w.getAttribute("id")!==f&&((r=w.parentNode)==null||r.removeChild(w))});const N=i.getElementsByTagName("note"),M=w=>{var g;let r=N[w+1];for(let d=w;d<N.length;d++){const m=N[d];if(!((g=m.getElementsByTagName("grace"))!=null&&g.length)){r=m;break}}return r==null?void 0:r.getElementsByTagName("duration")[0]};Array.from(N).forEach((w,r)=>{var d;const g=w.getElementsByTagName("grace");g&&g.length&&w.appendChild((d=M(r))==null?void 0:d.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,r,g,d;const b=gt(l,0),i=new DOMParser().parseFromString(b,"text/xml"),v=Array.from(i.querySelectorAll("measure")),e=Array.from(i.querySelectorAll("note")),s=Array.from(i.querySelectorAll("words")),S=Array.from(i.querySelectorAll("metronome")),u=[];for(const m of[...s,...S]){const p=ft(m,"direction");if(p){const I=p==null?void 0:p.closest("measure"),n=Array.from(I.querySelectorAll("note")),a=Array.from(I.childNodes).filter(h=>h.nodeName==="note").findIndex(h=>h===p);let c=0,o=0;for(let h=0;h<n.length;h++){const U=+(((w=n[h].querySelector("duration"))==null?void 0:w.textContent)||"0");c+=U,h<a&&(o=c)}u.push({ele:m,index:e.indexOf(p),noteInMeasureIndex:a,textContent:m.textContent,measureIndex:v.indexOf(I),type:m.tagName,allDuration:c,leftDuration:o})}}u.push({ele:e[e.length-1],index:e.length,noteInMeasureIndex:0,textContent:"",type:"metronome",allDuration:1,leftDuration:1,measureIndex:v.length});const f=[];u.sort((m,p)=>m.index-p.index);const N=Object.keys(yt).map(m=>m.toLocaleLowerCase());let M=!1;for(const m of u){const p=(r=m.textContent)==null?void 0:r.toLocaleLowerCase().trim();m===u[u.length-1]&&((g=f[f.length-1])==null?void 0:g.length)===1&&(M=!0);const I=N.find(n=>{const a=n.split(" ");return p&&a.includes(p)});if(m.type==="metronome"||m.type==="words"&&(p.startsWith("a tempo")||I)||M){const n=f.findIndex(a=>a.length===1);n>-1&&m.index>((d=f[n])==null?void 0:d[0].start)&&(f[n][1]={start:m.index,measureIndex:m.measureIndex,noteInMeasureIndex:m.noteInMeasureIndex,allDuration:m.allDuration,leftDuration:m.leftDuration,type:p})}m.type==="words"&&I&&f.push([{start:m.index,measureIndex:m.measureIndex,noteInMeasureIndex:m.noteInMeasureIndex,allDuration:m.allDuration,leftDuration:m.leftDuration,type:p}])}return f}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:b,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}),S=K({list:[],gradualRefs:[]}),u=B(!1),f=B(),N=V();re();const M=()=>x(this,null,function*(){f.value.validate(n=>x(this,null,function*(){if(!n){try{const a=O(j({},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(j({},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=n=>{const a=new FileReader;a.onload=c=>{var o,h;try{S.list=Ie((o=c==null?void 0:c.target)==null?void 0:o.result).filter(C=>C.length===2)}catch(C){}s.partListNames=r((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(j({},e.musicSheetSoundList[0]),{track:U});z.speed||(z.speed=s.xmlFirstSpeed),m(z)}e.musicSheetSoundList.length==0&&e.musicSheetSoundList.push({audioFileUrl:"",track:""})},a.readAsText(n)},r=n=>{var z,de,pe,me,he,fe;if(!n)return[];const a=new DOMParser().parseFromString(n,"text/xml"),c=((de=(z=a.getElementsByTagName("part-list"))==null?void 0:z[0])==null?void 0:de.getElementsByTagName("score-part"))||[],o=Array.from(c).map(A=>{var _;const te=((_=A.getElementsByTagName("part-name"))==null?void 0:_[0].textContent)||"";return{value:te,label:te}});o.length>0&&(e.musicSheetSoundList=e.musicSheetSoundList.slice(0,o.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):e.playSpeed=100);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&&d(e.musicalInstrumentIdList),o},g=n=>{const a=s.partListNames.filter(o=>{var h,C;return((C=(h=o.value)==null?void 0:h.toLocaleUpperCase)==null?void 0:C.call(h))!="COMMON"}),c=le(a)||[];return c.forEach(o=>{e.musicSheetSoundList.findIndex(C=>o.value==C.track)>-1&&n!=o.value?o.disabled=!0:o.disabled=!1}),c||[]},d=n=>x(this,null,function*(){try{const{data:a}=yield Ue({page:1,rows:999,musicalInstrumentIdList:n});(a.rows||[]).forEach(o=>{e.subjectIds.push(o.id+"")})}catch(a){}}),m=n=>{e.musicSheetSoundList.push(j({audioFileUrl:null,track:null},n))},p=n=>{!n||(n==="all"?(e.multiTracksSelection=[],s.partListNames.forEach(a=>{e.multiTracksSelection.push(a.value)})):n==="invert"?s.partListNames.forEach(a=>{const c=e.multiTracksSelection.indexOf(a.value);c>-1?e.multiTracksSelection.splice(c,1):e.multiTracksSelection.push(a.value)}):n==="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 n=e.musicSheetExtend.applicationId,a=s.appData.filter(o=>o.id==n);a.length>0&&(s.ownerName=a[0].appName),e.sourceType=="ORG"?s.ownerName+="-"+e.musicSheetExtend.organizationRole:e.sourceType=="PERSON"&&(s.ownerName+="-"+ot(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(()=>x(this,null,function*(){var n,a;s.loading=!0,l.type==="preview"&&(s.previewMode=!0);{if(s.instrumentList&&s.instrumentList.length>0)return;try{const{data:c}=yield ut({page:1,rows:999}),o=c.rows||[];s.instrumentData=o,o.forEach(h=>{h.label=h.name,h.value=h.id+"",h.disabled=!h.enableFlag}),s.instrumentList=o}catch(c){}}s.subjectList=le(l.subjectList),s.subjectList.forEach(c=>{c.disabled=!c.enableFlag});{const c=Object.keys(ce),{data:o}=yield Ee({page:1,rows:999,parentId:0}),C=(o.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 xe({enable:!0});s.musicSheetCategories=De(c,"musicSheetCategoriesList")}catch(c){}if(l.type==="edit"||l.type==="preview"){const c=l.data;try{const{data:o}=yield Ne({id:c.id});e.audioType=o.audioType,e.musicSheetAccompanimentList=o.musicSheetAccompanimentList,(n=o.musicSheetAccompanimentList)==null||n.forEach(h=>{s.musicSheetAccompanimentUrlList.push(h.audioFileUrl)}),e.playMode=o.playMode,e.xmlFileUrl=o.xmlFileUrl,e.midiUrl=o.midiUrl,e.name=o.name,e.composer=o.composer,e.playSpeed=o.playSpeed,e.musicCover=o.musicCover,e.remark=o.remark,e.status=o.status,e.musicCategoryId=o.musicCategoryId,e.musicSheetType=o.musicSheetType||"SINGLE",e.evaluationStandard=o.evaluationStandard,e.musicalInstrumentIdList=o.musicalInstrumentIds.split(",")||[],e.subjectIds=((a=o.subjectIds)==null?void 0:a.split(","))||[],e.sourceType=o.sourceType,e.musicSheetExtend=o.musicSheetExtend,e.musicSheetSoundList=o.musicSheetSoundList||[],e.musicSheetSoundList.forEach(h=>{e.multiTracksSelection.push(h.track)});try{const h=o.extConfigJson?JSON.parse(o.extConfigJson):{};e.graduals=h.gradualTimes||{}}catch(h){}I(),Je.get(o.xmlFileUrl).then(h=>{h!=null&&h.data&&(S.list=Ie(h==null?void 0:h.data).filter(C=>C.length===2))})}catch(o){}}else s.subjectList=s.subjectList.filter(c=>c.enableFlag==!0),s.instrumentList=s.instrumentList.filter(c=>c.enableFlag==!0);s.loading=!1})),()=>{let n;return t("div",{style:"background: #fff; padding-top: 12px"},[t(ne,{class:ue.formContainer,model:e,ref:f,"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(oe),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(P,{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(P,{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",rule:[{required:!1,message:"\u8BF7\u8F93\u5165\u901F\u5EA6"}]},{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(k,{value:!0},{default:()=>[y("\u662F")]}),t(k,{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(k,{value:"FREQUENCY"},{default:()=>[y("\u6807\u51C6\u8BC4\u6D4B")]}),t(k,{value:"AMPLITUDE"},{default:()=>[y("\u6253\u51FB\u4E50(\u632F\u5E45)")]}),t(k,{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(k,{value:"MP3"},{default:()=>[y("MP3")]}),t(k,{value:"MIDI"},{default:()=>[y("MID")]})]})]}),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(k,{value:"HOMEMODE"},{default:()=>[y("\u81EA\u5236\u4F34\u594F")]}),t(k,{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 o=0;o<s.musicSheetAccompanimentUrlList.length;o++)e.musicSheetAccompanimentList.push({audioFileUrl:s.musicSheetAccompanimentUrlList[o],sortNumber:o+1})},onRemove:()=>{s.musicSheetAccompanimentUrlList=[],s.musicSheetAccompanimentUrls=""},multiple:!0},null)]}),e.playMode==="MIDI"&&t(T,{label:"\u4E0A\u4F20MID",path:"midiFileUrl",rule:[{required:!0,message:"\u8BF7\u9009\u62E9\u4E0A\u4F20.MID\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\u4F20MID\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/.mxml\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=>{p(a)}},{default:()=>[t(k,{value:"all"},{default:()=>[y("\u5168\u9009")]}),t(k,{value:"allUncheck"},{default:()=>[y("\u91CD\u7F6E")]}),t(k,{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(n=s.partListNames.map(a=>t(ae,null,{default:()=>[t(je,{value:a.value,label:a.label},null)]})))?n:{default:()=>[n]})]})]})]})]})]})]}),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(k,{value:!0},{default:()=>[y("\u662F")]}),t(k,{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(k,{value:!0},{default:()=>[y("\u7CFB\u7EDF\u8282\u62CD\u5668")]}),t(k,{value:!1},{default:()=>[y("MP3\u8282\u62CD\u5668")]})]})]})]}),e.playMode==="MP3"&&e.musicSheetSoundList.length>0&&t(Z,null,[e.musicSheetSoundList.map((a,c)=>{var o,h;return t(Z,null,[((h=(o=a.track)==null?void 0:o.toLocaleUpperCase)==null?void 0:h.call(o))!="COMMON"&&e.multiTracksSelection.indexOf(a.track)>-1&&t(E,{class:ue.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:g(a.track)},null)]})]})])}),t(P,{type:"primary",dashed:!0,block:!0,disabled:s.partListNames.length<=e.musicSheetSoundList.length,style:{marginBottom:"24px"},onClick:m},{default:()=>[y("\u6DFB\u52A0\u539F\u97F3")]})])]}),l.type!=="preview"&&t(D,{justify:"end",style:"padding-top:12px"},{default:()=>[t(P,{type:"default",onClick:()=>v("close")},{default:()=>[y("\u53D6\u6D88")]}),t(P,{type:"primary",onClick:()=>M(),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=j({},a),I()}},null)]})])}}}),St=q({name:"musicPreView",props:{item:{type:Object,default:()=>{}}},setup(l,{emit:b}){const v=He().getToken,e={dev:"https://dev.kt.colexiu.com",test:"https://test.lexiaoya.cn",online:"https://kt.colexiu.com"},s=location.origin.includes("//dev")?"dev":location.origin.includes("//test")?"test":location.origin.includes("//online")?"online":"dev",S=e[s],f=(/(localhost|192)/.test(location.host)?"https://dev.kt.colexiu.com/":S)+`/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:f},null)])}});function Le(l){return typeof l=="function"||Object.prototype.toString.call(l)==="[object Object]"&&!Me(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:b}){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 r=i.useProjectParamConfig.GYM,g=["musicSheetCategoryId","paymentType"];for(let d=0;d<g.length;d++)if(r[g[d]])return!0;return!1}),e=Q(()=>{const r=i.useProjectParamConfig.KLX,g=["availableType","musicSheetCategoryId","paymentType","musicPrice","topFlag","exquisiteFlag"];for(let d=0;d<g.length;d++)if(r[g[d]])return!0;return!1}),s=Q(()=>{const r=i.useProjectParamConfig.KT,g=["musicSheetCategoryId"];for(let d=0;d<g.length;d++)if(r[g[d]])return!0;return!1}),S=Q(()=>{const r=i.useProjectParamConfig.GYT,g=["musicSheetCategoryId"];for(let d=0;d<g.length;d++)if(r[g[d]])return!0;return!1}),u=K({loading:!1,musicSheetData:null,tabName:null,selectAppKey:[],selectAppName:[],appKeyNameMap:null,userProjectList:[],musicSheetCategoryOptions:{},musicSheetCanBeUsedProjectKey:[]}),f=B(!1),N=V();W(()=>x(this,null,function*(){var p;u.loading=!0;const{data:r}=yield Ne({id:l.id});u.musicSheetData=r,r&&r.musicSheetExtend&&(i.useApplicationIds=((p=r.musicSheetExtend.useApplicationIds)==null?void 0:p.split(","))||[]);const g=Object.keys(ce);l.useProject.forEach(I=>{const n=g.indexOf(I.appKey);let a=!1;n>-1&&u.userProjectList.push(O(j({},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 d=[],m=new Map;if(l.useProject.forEach(I=>{d.push(I.id),m.set(I.id,I.appKey)}),d.length>0){const{data:I}=yield qe({applicationIds:d.join(",")});I.forEach(n=>{const a=m.get(n.applicationId);a&&(u.musicSheetCategoryOptions[a]=n.musicSheetCategories)})}{const{data:I}=yield Ge({musicSheetId:l.id});I.forEach(n=>{const a=n.appKey;a==="GYM"?(i.useProjectParamConfig[a].musicSheetCategoryId=n.musicSheetCategories,i.useProjectParamConfig[a].sortNo=n.sortNo,i.useProjectParamConfig[a].paymentType=n.paymentType):a==="GYT"?(i.useProjectParamConfig[a].musicSheetCategoryId=n.musicSheetCategoryId,i.useProjectParamConfig[a].sortNo=n.sortNo):a==="KLX"?(i.useProjectParamConfig[a].availableType=n.availableType,i.useProjectParamConfig[a].musicSheetCategoryId=n.musicSheetCategoryId,i.useProjectParamConfig[a].paymentType=n.paymentType,i.useProjectParamConfig[a].musicPrice=n.musicPrice,i.useProjectParamConfig[a].topFlag=n.topFlag,i.useProjectParamConfig[a].exquisiteFlag=n.exquisiteFlag,i.useProjectParamConfig[a].sortNo=n.sortNo):a==="KT"&&(i.useProjectParamConfig[a].musicSheetCategoryId=n.musicSheetCategoryId,i.useProjectParamConfig[a].sortNo=n.sortNo)})}u.loading=!1}));const M=B(),w=()=>x(this,null,function*(){M.value.validate(r=>x(this,null,function*(){var g;if(r){if(Array.isArray(r)&&r.length>0){const d=(g=r[0][0].field)==null?void 0:g.split(".")[1];d&&u.selectAppKey.includes(d)&&(u.tabName=d)}return}f.value=!0;try{const d=new Map;l.useProject.forEach(I=>{d.set(I.appKey,I.id)});const m=[];u.selectAppKey.forEach(I=>{Object.keys(i.useProjectParamConfig).forEach(n=>{if(I===n){const a=i.useProjectParamConfig[n];a.sortNo||(a.sortNo=0),Object.values(a).every(o=>!(o==null||o===""))&&m.push(O(j({},a),{musicSheetId:l.id,applicationId:d.get(n)}))}})});const p={musicSheetId:l.id,useApplicationIds:i.useApplicationIds.join(","),applicationExtends:m};yield ze(p),N.success("\u4FEE\u6539\u6210\u529F"),b("getList"),b("close")}catch(d){console.log(d)}f.value=!1}))});return()=>{let r,g;return t("div",null,[t(ne,{class:ue.formContainer,model:i,ref:M,"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":d=>i.useApplicationIds=d,onUpdateValue:d=>{u.selectAppKey=[],u.userProjectList.forEach(m=>{d.includes(m.id)&&u.selectAppKey.push(m.appKey)}),u.selectAppKey.length==0?u.tabName="":u.tabName=u.selectAppKey[0]}},Le(r=u.userProjectList.map(d=>t(je,{value:d.value},{default:()=>[d.label]})))?r:{default:()=>[r]})]}),u.selectAppKey.length>0&&t(ke,{type:"line",value:u.tabName,"onUpdate:value":[d=>u.tabName=d,d=>{u.tabName=d}]},Le(g=u.selectAppKey.map((d,m)=>t(se,{tab:u.appKeyNameMap.get(d),name:d,displayDirective:"show"},{default:()=>[d==="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":p=>i.useProjectParamConfig.GYM.musicSheetCategoryId=p,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":p=>i.useProjectParamConfig.GYM.paymentType=p,options:Y(st)},null)]}),t(L,{label:"\u6392\u5E8F\u503C",path:"useProjectParamConfig.GYM.sortNo"},{default:()=>[t(X,{value:i.useProjectParamConfig.GYM.sortNo,"onUpdate:value":p=>i.useProjectParamConfig.GYM.sortNo=p,placeholder:"\u8BF7\u8F93\u5165\u6392\u5E8F\u503C",clearable:!0,min:0,max:9999,style:{width:"100%"}},null)]})]),d==="GYT"&&t("div",null,[t(L,{label:"\u5206\u7C7B",path:"useProjectParamConfig.GYT.musicSheetCategoryId",rule:[{required:S.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":p=>i.useProjectParamConfig.GYT.musicSheetCategoryId=p,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":p=>i.useProjectParamConfig.GYT.sortNo=p,placeholder:"\u8BF7\u8F93\u5165\u6392\u5E8F\u503C",clearable:!0,min:0,max:9999,style:{width:"100%"}},null)]})]),d==="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":p=>i.useProjectParamConfig.KLX.availableType=p,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":p=>i.useProjectParamConfig.KLX.musicSheetCategoryId=p,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":p=>i.useProjectParamConfig.KLX.paymentType=p,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":p=>i.useProjectParamConfig.KLX.musicPrice=p},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":p=>i.useProjectParamConfig.KLX.topFlag=p,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":p=>i.useProjectParamConfig.KLX.exquisiteFlag=p,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":p=>i.useProjectParamConfig.KLX.sortNo=p,placeholder:"\u8BF7\u8F93\u5165\u6392\u5E8F\u503C",clearable:!0,min:0,max:9999,style:{width:"100%"}},null)]})]),d==="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":p=>i.useProjectParamConfig.KT.musicSheetCategoryId=p,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":p=>i.useProjectParamConfig.KT.sortNo=p,placeholder:"\u8BF7\u8F93\u5165\u6392\u5E8F\u503C",clearable:!0,min:0,max:9999,style:{width:"100%"}},null)]})])]})))?g:{default:()=>[g]})]}),t(D,{justify:"end",style:"margin-top: 10px"},{default:()=>[t(P,{type:"default",onClick:()=>b("close")},{default:()=>[y("\u53D6\u6D88")]}),t(P,{type:"primary",onClick:()=>w(),loading:f.value,disabled:f.value},{default:()=>[y("\u786E\u8BA4")]})]})])}}}),Ct=q({name:"music-list",props:["searchId"],setup(l,{emit:b}){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(oe)))}},{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(P,{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(P,{type:"primary",size:"small",text:!0,onClick:()=>{e.musicPreview=!0,e.musicScore=a}},{default:()=>[y("\u9884\u89C8")]}),t(P,{type:"primary",size:"small",text:!0,onClick:()=>{e.visiableMusic=!0,e.musicOperation="preview",e.musicData=a,e.detailReadonly=!0}},{default:()=>[y("\u67E5\u770B")]}),t(P,{type:"primary",size:"small",text:!0,onClick:()=>{e.visiableMusic=!0,e.musicOperation="edit",e.musicData=a,e.detailReadonly=!0}},{default:()=>[y("\u4FEE\u6539")]}),t(P,{type:"primary",size:"small",text:!0,onClick:()=>f(a)},{default:()=>[a.status?"\u505C\u7528":"\u542F\u7528"]}),t(P,{type:"primary",size:"small",text:!0,onClick:()=>{}},{default:()=>[y("\u751F\u6210\u56FE\u7247")]}),t(P,{type:"primary",size:"small",text:!0,disabled:!!a.status,onClick:()=>w(a)},{default:()=>[y("\u5220\u9664")]})]})}}],S=B([]),u=a=>{S.value=a},f=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:()=>x(this,null,function*(){try{yield Se({ids:new Array(a.id),status:!a.status}),r(),v.success(`${c}\u6210\u529F`)}catch(o){}})})},N=a=>{const c=S.value.length;c==0&&v.warning("\u672A\u9009\u62E9\u6570\u636E");const o=a?"\u542F\u7528":"\u505C\u7528";i.warning({title:"\u63D0\u793A",content:`\u662F\u5426${o}`+c+"\u6761\u6570\u636E\uFF1F",positiveText:"\u786E\u5B9A",negativeText:"\u53D6\u6D88",onPositiveClick:()=>x(this,null,function*(){try{yield Se({ids:S.value,status:a}),r(),v.success(`${o}\u6210\u529F`)}catch(h){}})})},M=a=>x(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(j({},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:()=>x(this,null,function*(){try{yield Ye({id:a.id}),r(),v.success("\u5220\u9664\u6210\u529F")}catch(c){}})})},r=()=>x(this,null,function*(){try{e.loading=!0;const{data:a}=yield Xe(j(j({},e.pagination),e.searchForm));e.pagination.pageTotal=Number(a.total),e.dataList=a.rows||[]}catch(a){}e.loading=!1}),g=()=>x(this,null,function*(){try{const{data:a}=yield Ue({page:1,rows:999}),c=a.rows||[];c.forEach(o=>{o.label=o.name,o.value=o.id+""}),e.subjectList=c}catch(a){}}),d=()=>x(this,null,function*(){try{const a=Object.keys(ce),{data:c}=yield Ee({page:1,rows:999}),o=c.rows||[];e.useProjectData=[],o.filter(C=>a.includes(C.appKey)).forEach(C=>{e.useProjectData.push(O(j({},C),{label:C.appName,value:C.id}))})}catch(a){}}),m=B(),p=()=>{e.pagination.page=1,r()};Qe(()=>l.searchId,a=>{console.log(a,"searchId")});const I=()=>{var a;(a=m.value)==null||a.submit()},n=()=>{var a;(a=m.value)==null||a.reset()};return W(()=>x(this,null,function*(){e.loading=!0,l.searchId&&(e.searchForm.categoriesId=l.searchId||null),g(),d(),r()})),()=>t("div",{class:"system-menu-container"},[t(we,{ref:m,model:e.searchForm,onSubmit:p,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(oe),onUpdateValue:a=>x(this,null,function*(){e.userIdData=[],e.searchForm.userId=null,a&&a!=="PLATFORM"?(yield M(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=>x(this,null,function*(){e.searchForm.useAppId=a,a?(yield M(e.searchForm.sourceType),e.userIdDisable=!(e.searchForm.sourceType&&e.searchForm.sourceType!=="PLATFORM")):(e.searchForm.userId=null,e.userIdDisable=!0,e.userIdData=[])})},null)]}),t(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(P,{type:"primary",onClick:I},{default:()=>[y("\u641C\u7D22")]}),t(P,{type:"default",onClick:n},{default:()=>[y("\u91CD\u7F6E")]})]})]})]}),t("div",{class:["section-container"]},[t(D,{style:{paddingBottom:"12px"}},{default:()=>[t(P,{type:"primary",onClick:()=>{e.visiableMusic=!0,e.musicOperation="add",e.musicData={},e.detailReadonly=!0}},{default:()=>[y("\u65B0\u589E\u66F2\u76EE")]}),t(P,{disabled:S.value.length==0,onClick:()=>{N(!1)}},{default:()=>[y("\u6279\u91CF\u505C\u7528")]}),t(P,{disabled:S.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(Pe,{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:r,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:r},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:r},null)]})])}}),It=q({emits:["close","getList"],props:["actvieRow","saveMode","list"],name:"save-categroy-dialog",setup(l,{emit:b}){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}),S=K({id:"",name:"",enable:!0,parentId:"0"}),u=()=>x(this,null,function*(){var f;(f=v.value)==null||f.validate(N=>x(this,null,function*(){if(!N){s.btnLoading=!0;try{if(l.saveMode==="add"){const{data:M}=yield Ve(j({},S));b("getList"),i.success("\u6DFB\u52A0\u6210\u529F")}else{const{data:M}=yield We(j({},S));b("getList"),i.success("\u4FEE\u6539\u6210\u529F")}}catch(M){}s.btnLoading=!1}}))});return W(()=>{if(l.saveMode==="add")l.actvieRow&&l.actvieRow.id&&(S.parentId=(l==null?void 0:l.actvieRow.id)+"");else for(let f in l==null?void 0:l.actvieRow)S[f]=l==null?void 0:l.actvieRow[f]}),()=>t("div",null,[t(ne,{ref:v,model:S},{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:S.parentId,"onUpdate:value":f=>S.parentId=f,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:S.name,"onUpdate:value":f=>S.name=f,placeholder:"\u8BF7\u8F93\u5165\u5206\u7C7B\u540D\u79F0",maxlength:25,showCount:!0,clearable:!0},null)]})]}),t(D,{justify:"end"},{default:()=>[t(P,{type:"default",onClick:()=>b("close")},{default:()=>[y("\u53D6\u6D88")]}),t(P,{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}),b=re(),i=V(),v=()=>x(this,null,function*(){try{l.loading=!0;const u={page:l.pagination.page,rows:l.pagination.rows},{data:f}=yield xe(u);l.dataList=f||[]}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(P,{type:"error",size:"small",text:!0,onClick:()=>S(u)},{default:()=>[y("\u5220\u9664")]}),t(P,{type:"primary",size:"small",text:!0,onClick:()=>{l.saveRowData=u,l.saveMode="edit",l.showSaveDialog=!0}},{default:()=>[y("\u4FEE\u6539")]}),t(P,{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()},S=u=>x(this,null,function*(){b.warning({title:"\u8B66\u544A",content:"\u662F\u5426\u786E\u8BA4\u5220\u9664'"+u.name+"'?",positiveText:"\u786E\u5B9A",negativeText:"\u53D6\u6D88",onPositiveClick:()=>x(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(P,{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}),b=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",b)};return()=>t("div",{class:"system-menu-container"},[t("div",{class:["section-container"],style:"padding-top: 0"},[t(ke,{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};
|