index.adfd3448.js 55 KB

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