index.39154c7a.js 114 KB

1
  1. var Be=Object.defineProperty,qe=Object.defineProperties;var He=Object.getOwnPropertyDescriptors;var Ue=Object.getOwnPropertySymbols;var Ge=Object.prototype.hasOwnProperty,_e=Object.prototype.propertyIsEnumerable;var Me=(m,k,w)=>k in m?Be(m,k,{enumerable:!0,configurable:!0,writable:!0,value:w}):m[k]=w,T=(m,k)=>{for(var w in k||(k={}))Ge.call(k,w)&&Me(m,w,k[w]);if(Ue)for(var w of Ue(k))_e.call(k,w)&&Me(m,w,k[w]);return m},D=(m,k)=>qe(m,He(k));var y=(m,k,w)=>new Promise((a,v)=>{var h=F=>{try{i(w.next(F))}catch(S){v(S)}},t=F=>{try{i(w.throw(F))}catch(S){v(S)}},i=F=>F.done?a(F.value):Promise.resolve(F.value).then(h,t);i((w=w.apply(m,k)).next())});import{d as $,ai as ie,u as ee,r as U,a as V,B as X,i as e,a9 as x,dw as Ie,dB as le,l as p,_ as J,ce as f,p as g,k as b,cg as Q,dj as fe,bi as j,db as _,ae as ne,a0 as B,q as we,cf as Fe,H as L,aa as W,da as Y,d9 as R,aj as se,ch as Te,bn as be,bC as P,e as $e,U as Ne,d7 as Xe,d8 as We}from"./index.4dd4953c.js";import{g as Ye,s as Je}from"./use-async.4f413d7a.js";import{B as ae,E as q,D as H,F as re,G as oe,H as ve}from"./constant.d4a76877.js";import{s as he}from"./api.c9ec5031.js";import{S as ce}from"./index.326b402b.js";import{P as pe}from"./index.8bcb0a62.js";import{T as A}from"./index.fa56e54c.js";import{g as E,a as N}from"./objectUtil.ec24ceed.js";import{l as ge,g as Se,n as xe,a as de,o as Ce,p as De,q as ke,r as ue,s as je,t as Ve}from"./api.f9797602.js";import{g as me,M as Re,c as Le}from"./musicUtil.956f52e5.js";import{N as Z}from"./Cascader.d28926d0.js";import{y as Pe,c as ye}from"./api.1d817932.js";import{f as Ee}from"./dateUtil.14a80aaa.js";import"./searchs.b637f0d6.js";import"./dayjs.min.ad0d0e20.js";const Qe=$({name:"kt-addMusic",props:{appId:{type:String,required:!0},subjectList:{type:Array,default:()=>[]},musicSheetCategories:{type:Array,default:()=>[]}},emits:["close","getList"],setup(m,{slots:k,attrs:w,emit:a}){const v=ie(),h=ee(),t=U(!1),i=V({loading:!1,pagination:{page:1,rows:5,pageTotal:0},stepPagination:{page:1,rows:5,pageTotal:0},searchForm:{keyword:null,musicSheetType:null,subjectId:null,sourceType:null,composer:null,userId:null,applicationId:null},subjectList:[],showAdd:!1,currentStep:1,dataList:[],selectRowData:[],musicSheetCategories:[],startSortNum:null,projectMusicCategoryId:null,useProjectData:[],userIdDisable:!0,userIdData:[],globalPaymentType:null});X(()=>y(this,null,function*(){i.searchForm.keyword=null,i.searchForm.musicSheetType=null,i.searchForm.subjectId=null,i.searchForm.sourceType=null,i.searchForm.composer=null,i.searchForm.userId=null,i.searchForm.applicationId=null,i.loading=!0,i.subjectList=m.subjectList;try{const{data:r}=yield ge({applicationIds:m.appId});r&&r.length>0&&(i.musicSheetCategories=r[0].musicSheetCategories)}catch(r){}yield F(),yield S()}));const F=()=>y(this,null,function*(){try{const r=Object.keys(ae),{data:u}=yield he({page:1,rows:999}),n=u.rows||[];i.useProjectData=[],n.filter(te=>r.includes(te.appKey)).forEach(te=>{i.useProjectData.push(D(T({},te),{label:te.appName,value:te.id}))})}catch(r){}}),S=()=>y(this,null,function*(){try{i.loading=!0;const r=D(T({},i.searchForm),{userId:i.searchForm.sourceType&&i.searchForm.sourceType=="PERSON"?i.searchForm.userId:null,organizationRoleId:i.searchForm.sourceType&&i.searchForm.sourceType=="ORG"?i.searchForm.userId:null}),{data:u}=yield Se(D(T(T({},i.pagination),r),{addAppId:m.appId}));i.pagination.pageTotal=Number(u.total),i.dataList=u.rows||[]}catch(r){}i.loading=!1}),d=U(),I=()=>{var r;(r=d.value)==null||r.submit()},M=()=>{var r;(r=d.value)==null||r.reset()},z=()=>{i.pagination.page=1,S()},K=()=>y(this,null,function*(){if(i.selectRowData.length==0){h.error("\u672A\u9009\u62E9\u66F2\u76EE");return}const r=[];for(let u=0;u<i.selectRowData.length;u++){const n=i.selectRowData[u];if(!n.projectMusicCategoryId){h.error("\u4E50\u8C31\u6559\u6750\u4E0D\u80FD\u4E3A\u7A7A");return}if(!n.paymentType){h.error("\u6536\u8D39\u65B9\u5F0F\u4E0D\u80FD\u4E3A\u7A7A");return}n.sortNo||(n.sortNo=0),r.push(D(T({},n),{musicSheetId:n.id,musicSheetCategoryId:n.projectMusicCategoryId,applicationId:m.appId,id:null}))}t.value=!0;try{const u=yield xe(r);u&&u.code=="200"&&(h.success("\u6DFB\u52A0\u6210\u529F"),a("getList"),a("close"))}catch(u){}t.value=!1}),O=[{type:"selection"},{title:"\u66F2\u76EE\u7F16\u53F7",key:"id"},{title:"\u5C01\u9762\u56FE",key:"titleImg",render(r){return e(ne,{width:40,height:40,src:r.musicCover},null)}},{title:"\u53EF\u7528\u58F0\u90E8",key:"subjectNames",render:r=>e(A,{content:r.subjectNames},null)},{title:"\u66F2\u76EE\u540D\u79F0",key:"name"},{title:"\u97F3\u4E50\u4EBA",key:"composer"},{title:"\u591A\u58F0\u8F68\u6E32\u67D3",key:"musicSheetType",render:r=>e("div",null,[N(r.musicSheetType,new Map(Object.entries(q)))])},{title:"\u66F2\u76EE\u6765\u6E90",key:"sourceType",render(r){return N(r.sourceType,new Map(Object.entries(H)))}},{title:"\u6240\u5C5E\u4EBA",key:"userName",render:r=>e(A,{content:me(r.musicSheetExtend,r.sourceType)},null)}],G=()=>O,l=()=>{const r=fe(O);return r.splice(0,1),r.push({title(u){return e(x,null,{default:()=>[b("\u4E50\u8C31\u6559\u6750"),e(g,{type:"primary",size:"small",text:!0,onClick:()=>{v.create({title:"\u8BF7\u9009\u62E9\u4E50\u8C31\u6559\u6750",showIcon:!1,content:()=>j("div",{class:"flex flex-col justify-center items-center text-14px"},[j(Z,{onUpdateValue(n){i.projectMusicCategoryId=n},valueField:"id",labelField:"name",childrenField:"children",placeholderField:"\u8BF7\u9009\u62E9\u4E50\u8C31\u6559\u6750",filterable:!0,options:i.musicSheetCategories})]),positiveText:"\u786E\u5B9A",negativeText:"\u53D6\u6D88",onPositiveClick:()=>{for(let n=0;n<i.selectRowData.length;n++){const C=i.selectRowData[n];C.projectMusicCategoryId=i.projectMusicCategoryId}}})}},{default:()=>[e(B,{size:15,style:"padding-left: 5px;margin-top:4px"},{default:()=>[e("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32"},[e("path",{d:"M2 26h28v2H2z",fill:"currentColor"},null),e("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)])]})]})]})},key:"projectMusicCategoryId",fixed:"right",width:200,render:u=>e(Z,{valueField:"id",labelField:"name","children-field":"children",placeholder:"\u8BF7\u9009\u62E9\u66F2\u76EE\u5206\u7C7B",value:u.projectMusicCategoryId,options:i.musicSheetCategories,onUpdateValue:n=>{u.projectMusicCategoryId=n},filterable:!0,clearable:!0},null)}),r.push({title(u){return e(x,null,{default:()=>[b("\u6536\u8D39\u65B9\u5F0F"),e(g,{type:"primary",size:"small",text:!0,onClick:()=>{v.create({title:"\u8BF7\u9009\u62E9\u6536\u8D39\u65B9\u5F0F",showIcon:!1,content:()=>j("div",{class:"flex flex-col justify-center items-center text-14px"},[j(f,{onUpdateValue(n){i.globalPaymentType=n},clearable:!0,options:[{label:"\u514D\u8D39",value:"FREE"},{label:"\u4F1A\u5458",value:"VIP"}]})]),positiveText:"\u786E\u5B9A",negativeText:"\u53D6\u6D88",onPositiveClick:()=>{for(let n=0;n<i.selectRowData.length;n++){const C=i.selectRowData[n];C.paymentType=i.globalPaymentType}}})}},{default:()=>[e(B,{size:15,style:"padding-left: 5px;margin-top:4px"},{default:()=>[e("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32"},[e("path",{d:"M2 26h28v2H2z",fill:"currentColor"},null),e("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)])]})]})]})},key:"paymentType",width:200,render:u=>e(f,{placeholder:"\u8BF7\u9009\u62E9\u6536\u8D39\u65B9\u5F0F",value:u.paymentType,options:[{label:"\u514D\u8D39",value:"FREE"},{label:"\u4F1A\u5458",value:"VIP"}],clearable:!0,onUpdateValue:n=>{u.paymentType=n}},null)}),r.push({title(u){return e(x,null,{default:()=>[b("\u6392\u5E8F"),e(g,{type:"primary",size:"small",text:!0,onClick:()=>{v.create({title:"\u8BF7\u8F93\u5165\u6392\u5E8F\u8D77\u59CB\u503C",showIcon:!1,content:()=>j("div",{class:"flex flex-col justify-center items-center text-14px"},[j(_,{onUpdateValue(n){i.startSortNum=n},min:0,max:9999})]),positiveText:"\u786E\u5B9A",negativeText:"\u53D6\u6D88",onPositiveClick:()=>{if(i.startSortNum)for(let n=0;n<i.selectRowData.length;n++){const C=i.selectRowData[n];C.sortNo=i.startSortNum+n}}})}},{default:()=>[e(B,{size:15,style:"padding-left: 5px;margin-top:4px"},{default:()=>[e("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32"},[e("path",{d:"M2 26h28v2H2z",fill:"currentColor"},null),e("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)])]})]})]})},key:"sortNo",fixed:"right",width:150,render:u=>j(_,{value:u.sortNo,min:0,max:9999,defaultValue:0,onUpdateValue(n){u.sortNo=n}})}),r.push({title:"\u64CD\u4F5C",key:"operation",fixed:"right",render(u){return e(x,null,{default:()=>[e(g,{type:"primary",size:"small",text:!0,onClick:()=>{v.warning({title:"\u63D0\u793A",content:"\u662F\u5426\u5220\u9664\u8BE5\u6570\u636E\uFF1F",positiveText:"\u786E\u5B9A",negativeText:"\u53D6\u6D88",onPositiveClick:()=>y(this,null,function*(){try{const n=i.selectRowData.findIndex(te=>{if(te.id==u.id)return!0});n>-1&&i.selectRowData.splice(n,1),o.value.findIndex(te=>{if(te==u.id)return!0})>-1&&o.value.splice(n,1)}catch(n){}})})}},{default:()=>[b("\u79FB\u9664")]})]})}}),r},o=U([]),c=r=>{o.value=r,i.dataList.forEach(u=>{o.value.includes(u.id)&&(i.selectRowData.find(C=>C.id===u.id)||i.selectRowData.push(u))}),i.selectRowData=i.selectRowData.filter(u=>o.value.includes(u.id))},s=r=>y(this,null,function*(){if(!!i.searchForm.applicationId&&(i.userIdData=[],i.searchForm.userId=null,r&&r!=="PLATFORM")){const{data:u}=yield de({page:1,rows:9999,sourceType:r,applicationId:i.searchForm.applicationId});(u.rows||[]).forEach(C=>{i.userIdData.push(D(T({},C),{label:r==="PERSON"?C.userName:C.organizationRole,value:r==="PERSON"?C.userId:C.organizationRoleId}))})}});return()=>e("div",{class:"system-menu-container"},[e(x,{vertical:!0,size:"medium"},{default:()=>[e(Ie,{current:i.currentStep,style:"margin-bottom: 10px;margin-top: 10px"},{default:()=>[e(le,{title:"\u9009\u62E9\u66F2\u76EE",description:""},null),e(le,{title:"\u8BBE\u7F6E\u66F2\u76EE\u4FE1\u606F",description:""},null)]})]}),i.currentStep===1&&e("div",{class:"system-menu-container"},[e(ce,{ref:d,model:i.searchForm,onSubmit:z,onSetModel:r=>i.searchForm=r},{default:()=>[e(p,{label:"\u5173\u952E\u8BCD",path:"keyword"},{default:()=>[e(J,{value:i.searchForm.keyword,"onUpdate:value":r=>i.searchForm.keyword=r,placeholder:"\u8BF7\u8F93\u5165\u66F2\u76EE\u540D\u79F0/\u7F16\u53F7",clearable:!0},null)]}),e(p,{label:"\u591A\u58F0\u8F68\u6E32\u67D3",path:"musicSheetType"},{default:()=>[e(f,{placeholder:"\u8BF7\u9009\u62E9\u591A\u58F0\u8F68\u6E32\u67D3",value:i.searchForm.musicSheetType,"onUpdate:value":r=>i.searchForm.musicSheetType=r,options:E(q),clearable:!0},null)]}),e(p,{label:"\u53EF\u7528\u58F0\u90E8",path:"musicSubject"},{default:()=>[e(f,{placeholder:"\u8BF7\u9009\u62E9\u53EF\u7528\u58F0\u90E8",value:i.searchForm.subjectId,"onUpdate:value":r=>i.searchForm.subjectId=r,options:i.subjectList,clearable:!0},null)]}),e(p,{label:"\u97F3\u4E50\u4EBA",path:"composer"},{default:()=>[e(J,{placeholder:"\u8BF7\u9009\u62E9\u97F3\u4E50\u4EBA",value:i.searchForm.composer,"onUpdate:value":r=>i.searchForm.composer=r,clearable:!0},null)]}),e(p,{label:"\u66F2\u76EE\u6765\u6E90",path:"sourceType"},{default:()=>[e(f,{placeholder:"\u8BF7\u9009\u62E9\u66F2\u76EE\u6765\u6E90",value:i.searchForm.sourceType,"onUpdate:value":r=>i.searchForm.sourceType=r,options:E(H),onUpdateValue:r=>y(this,null,function*(){i.userIdData=[],i.searchForm.userId=null,r&&r!=="PLATFORM"?(yield s(r),i.userIdDisable=!1):i.userIdDisable=!0}),clearable:!0},null)]}),e(p,{label:"\u6240\u5C5E\u9879\u76EE",path:"applicationId"},{default:()=>[e(f,{placeholder:"\u8BF7\u9009\u62E9\u6240\u5C5E\u9879\u76EE",value:i.searchForm.applicationId,"onUpdate:value":r=>i.searchForm.applicationId=r,options:i.useProjectData,clearable:!0,onUpdateValue:r=>y(this,null,function*(){i.searchForm.applicationId=r,r?(yield s(i.searchForm.sourceType),i.userIdDisable=!(i.searchForm.sourceType&&i.searchForm.sourceType!=="PLATFORM")):(i.searchForm.userId=null,i.userIdDisable=!0,i.userIdData=[])})},null)]}),e(p,{label:"\u6240\u5C5E\u4EBA",path:"author"},{default:()=>[e(f,{filterable:!0,placeholder:"\u8BF7\u9009\u62E9\u6240\u5C5E\u4EBA",disabled:i.userIdDisable||!i.searchForm.applicationId&&!i.searchForm.sourceType,value:i.searchForm.userId,"onUpdate:value":r=>i.searchForm.userId=r,options:i.userIdData,clearable:!0},null)]}),e(p,null,{default:()=>[e(x,null,{default:()=>[e(g,{type:"primary",onClick:I},{default:()=>[b("\u641C\u7D22")]}),e(g,{type:"default",onClick:M},{default:()=>[b("\u91CD\u7F6E")]})]})]})]}),e("p",{style:{paddingBottom:"12px"}},[b("\u4F60\u9009\u62E9\u4E86"),e("span",{style:"color:red;padding:0 8px"},[i.selectRowData.length]),b("\u6761\u66F2\u76EE")]),e(Q,{loading:i.loading,columns:G(),data:i.dataList,rowKey:r=>r.id,onUpdateCheckedRowKeys:c},null),e(pe,{page:i.pagination.page,"onUpdate:page":r=>i.pagination.page=r,pageSize:i.pagination.rows,"onUpdate:pageSize":r=>i.pagination.rows=r,pageTotal:i.pagination.pageTotal,"onUpdate:pageTotal":r=>i.pagination.pageTotal=r,onList:S,sync:!0},null)]),i.currentStep===2&&e("div",{class:"system-menu-container",style:"margin-top: 15px;"},[e(Q,{loading:i.loading,columns:l(),data:i.selectRowData,rowKey:r=>r.id,maxHeight:500},null)]),e(x,{justify:"end",style:"margin-top:10px"},{default:()=>[e(g,{type:"default",onClick:()=>{i.currentStep>1?i.currentStep=i.currentStep-1:a("close")}},{default:()=>[i.currentStep===1?"\u53D6\u6D88":"\u4E0A\u4E00\u6B65"]}),e(g,{type:"primary",onClick:()=>{if(i.currentStep<2){if(i.selectRowData.length==0){h.warning("\u8BF7\u9009\u62E9\u66F2\u76EE");return}i.currentStep=i.currentStep+1}else K()},loading:t.value,disabled:t.value},{default:()=>[i.currentStep===2?"\u786E\u5B9A":"\u4E0B\u4E00\u6B65"]})]})])}}),Ze=$({name:"project-music-cooleshow-edu-updateMusic",props:{appId:{type:String,required:!0},rowData:{type:Object,required:!0},musicSheetCategories:{type:Array,default:()=>[]}},emits:["close","getList"],setup(m,{slots:k,attrs:w,emit:a}){const v=ee(),h=U(!1),t=V({musicSheetCategoryId:null,sortNo:null,paymentType:null}),i=U(),F=V({rowData:null,musicSheetCategories:[]});X(()=>y(this,null,function*(){F.rowData=m.rowData,F.musicSheetCategories=m.musicSheetCategories;const{data:d}=yield Ce({musicSheetId:F.rowData.id,applicationId:m.appId});if(!d){v.error("\u52A0\u8F7D\u5E94\u7528\u5931\u8D25");return}t.musicSheetCategoryId=d[0].musicSheetCategoryId,t.sortNo=d[0].sortNo,t.paymentType=d[0].paymentType}));const S=()=>y(this,null,function*(){i.value.validate(d=>y(this,null,function*(){if(d)return!1;h.value=!0;try{const I=yield De(D(T({},t),{musicSheetId:F.rowData.id,applicationId:m.appId}));I&&I.code===200&&(a("close"),a("getList"))}catch(I){}h.value=!1}))});return()=>e("div",{style:"background: #fff; padding-top: 12px"},[e(we,{ref:i,labelPlacement:"top",model:t,"label-placement":"left","label-width":"auto"},{default:()=>[e(p,{label:"\u4E50\u8C31\u6559\u6750",path:"musicSheetCategoryId",rule:[{required:!0,message:"\u8BF7\u9009\u62E9\u4E50\u8C31\u6559\u6750"}]},{default:()=>[e(Z,{valueField:"id",labelField:"name","children-field":"children",placeholder:"\u8BF7\u9009\u62E9\u4E50\u8C31\u6559\u6750",value:t.musicSheetCategoryId,options:F.musicSheetCategories,onUpdateValue:d=>{t.musicSheetCategoryId=d},clearable:!0},null)]}),e(p,{label:"\u6536\u8D39\u65B9\u5F0F",path:"paymentType",rule:[{required:!0,message:"\u8BF7\u9009\u62E9\u6536\u8D39\u65B9\u5F0F"}]},{default:()=>[e(f,{placeholder:"\u8BF7\u9009\u62E9\u6536\u8D39\u65B9\u5F0F",options:[{label:"\u514D\u8D39",value:"FREE"},{label:"\u4F1A\u5458",value:"VIP"}],value:t.paymentType,"onUpdate:value":d=>t.paymentType=d,clearable:!0},null)]}),e(p,{label:"\u6392\u5E8F\u503C",path:"sortNo",rule:[{required:!0,message:"\u8BF7\u8F93\u5165\u6392\u5E8F\u503C"}]},{default:()=>[e(_,{value:t.sortNo,"onUpdate:value":d=>t.sortNo=d,placeholder:"\u8BF7\u8F93\u5165\u6392\u5E8F\u503C",clearable:!0,min:0,max:9999,style:{width:"100%"}},null)]})]}),e(x,{justify:"end"},{default:()=>[e(g,{onClick:()=>a("close")},{default:()=>[b("\u53D6\u6D88")]}),e(g,{type:"primary",onClick:S,loading:h.value,disabled:h.value},{default:()=>[b("\u4FDD\u5B58")]})]})])}});function Ae(m){return typeof m=="function"||Object.prototype.toString.call(m)==="[object Object]"&&!be(m)}const et=$({name:"project-music-sheet-KT",props:{appKey:{type:String,default:"KT"}},setup(m){const k=ie(),w=ee(),a=V({loading:!1,appId:null,pagination:{page:1,rows:10,pageTotal:0},searchForm:{keyword:null,musicSheetType:null,subjectId:null,subjectIds:null,musicCategoryIds:null,status:null,sourceType:null,paymentType:null,userId:null,musicCategoryId:null,times:null,audioType:null,exquisiteFlag:null,topFlag:null,availableType:null,appAuditFlag:null,detailFlag:null,applicationId:null,extendApplicationId:null},subjectList:[],dataList:[],musicSheetCategories:[],showAddDialog:!1,showEditDialog:!1,userIdDisable:!0,userIdData:[],updateRow:{},applicationId:null,musicPreview:!1,musicScore:null,useProjectData:[]});X(()=>y(this,null,function*(){a.loading=!0;try{const o=(yield he({page:1,rows:1,appKey:m.appKey})).data.rows||[];if(!o||o.length==0){a.loading=!1,w.error("\u52A0\u8F7D\u9879\u76EE\u4FE1\u606F\u5931\u8D25");return}a.appId=o[0].id,a.applicationId=o[0].id;const{data:c}=yield Pe({applicationId:a.applicationId}),s=c||[];s.forEach(u=>{u.label=u.subjectName,u.value=u.subjectId}),a.subjectList=s;const r=yield ge({applicationIds:a.appId});r.data&&r.data.length>0&&(a.musicSheetCategories=r.data[0].musicSheetCategories)}catch(l){}v(),I()}));const v=()=>y(this,null,function*(){try{const l=Object.keys(ae),{data:o}=yield he({page:1,rows:999}),c=o.rows||[];a.useProjectData=[],c.filter(r=>l.includes(r.appKey)).forEach(r=>{a.useProjectData.push(D(T({},r),{label:r.appName,value:r.id}))})}catch(l){}}),h=U(),t=()=>{var l;(l=h.value)==null||l.submit()},i=()=>{var l;(l=h.value)==null||l.reset()},F=()=>{a.pagination.page=1,I()},S=U([]),d=l=>{S.value=l},I=()=>y(this,null,function*(){a.loading=!0;try{const l=a.searchForm.sourceType,{data:o}=yield ke(D(T(D(T(T({},a.pagination),a.searchForm),{userId:l&&l==="PERSON"?a.searchForm.userId:null,organizationRoleId:l&&l==="ORG"?a.searchForm.userId:null}),Ee(a.searchForm.times,["startTime","endTime"])),{applicationId:a.applicationId}));a.pagination.pageTotal=Number(o.total),a.dataList=o.rows||[]}catch(l){}a.loading=!1}),M=l=>{const o=l.status?"\u505C\u7528":"\u542F\u7528";k.warning({title:"\u63D0\u793A",content:`\u662F\u5426${o}\uFF1F`,positiveText:"\u786E\u5B9A",negativeText:"\u53D6\u6D88",onPositiveClick:()=>y(this,null,function*(){try{yield ue({ids:l.applicationExtendId,status:!l.status}),I(),w.success(`${o}\u6210\u529F`)}catch(c){}})})},z=l=>{const o=S.value.length;o==0&&w.warning("\u672A\u9009\u62E9\u6570\u636E");const c=l?"\u542F\u7528":"\u505C\u7528";k.warning({title:"\u63D0\u793A",content:`\u662F\u5426${c}`+o+"\u6761\u6570\u636E\uFF1F",positiveText:"\u786E\u5B9A",negativeText:"\u53D6\u6D88",onPositiveClick:()=>y(this,null,function*(){try{yield ue({ids:S.value.join(","),status:l}),I(),w.success(`${c}\u6210\u529F`)}catch(s){}})})},K=l=>y(this,null,function*(){if(!!a.searchForm.extendApplicationId&&(a.userIdData=[],a.searchForm.userId=null,l&&l!=="PLATFORM")){const{data:o}=yield de({page:1,rows:9999,sourceType:l,applicationId:a.searchForm.extendApplicationId});(o.rows||[]).forEach(s=>{a.userIdData.push(D(T({},s),{label:l==="PERSON"?s.userName:s.organizationRole,value:l==="PERSON"?s.userId:s.organizationRoleId}))})}}),O=l=>{k.warning({title:"\u63D0\u793A",content:"\u5220\u9664\u66F2\u76EE\uFF0C\u662F\u5426\u7EE7\u7EED\uFF1F",positiveText:"\u786E\u5B9A",negativeText:"\u53D6\u6D88",onPositiveClick:()=>y(this,null,function*(){try{yield je(l.applicationExtendId),I(),w.success("\u5220\u9664\u6210\u529F")}catch(o){}})})},G=()=>[{type:"selection"},{title:"\u66F2\u76EE\u540D\u79F0",key:"id",render:l=>e(se,null,[e(Y,{labelPlacement:"left",column:1},{default:()=>[e(R,{label:"\u66F2\u76EE\u540D\u79F0"},{default:()=>[e(A,{content:l.name},null)," "]}),e(R,{label:"\u66F2\u76EE\u7F16\u53F7"},{default:()=>[e("div",{onDblclick:()=>{Le(w,l.id)}},[e(A,{content:l.id},null)])]})]})])},{title:"\u5C01\u9762\u56FE",key:"musicCover",render(l){return e(ne,{width:60,height:60,src:l.musicCover},null)}},{title:"\u66F2\u76EE\u4FE1\u606F",key:"musicSheetCategoriesName",render:l=>{let o,c;return e(se,null,[e(Y,{labelPlacement:"left",column:1},{default:()=>[e(R,{label:"\u66F2\u76EE\u6765\u6E90"},Ae(o=N(l.sourceType,new Map(Object.entries(H))))?o:{default:()=>[o]}),e(R,{label:"\u591A\u58F0\u8F68\u6E32\u67D3"},Ae(c=N(l.musicSheetType,new Map(Object.entries(q))))?c:{default:()=>[c]}),e(R,{label:"\u6240\u5C5E\u4EBA"},{default:()=>[e(A,{content:me(l.musicSheetExtend,l.sourceType)},null)]}),e(R,{label:"\u53EF\u7528\u58F0\u90E8"},{default:()=>[e(A,{content:l.subjectNames},null)]})]})])}},{title:"\u4F34\u594F\u7C7B\u578B",key:"audioType",render:l=>e("div",null,[N(l.audioType,new Map(Object.entries(re)))])},{title:"\u4E50\u8C31\u6559\u6750",key:"musicSheetCategoryName"},{title:"\u6536\u8D39\u65B9\u5F0F",key:"paymentType",render:l=>e("div",null,[N(l.paymentType,new Map(Object.entries(oe)))])},{title:"\u4E0A\u4F20\u4EBA",minWidth:"150px",key:"composer",render(l){return e(Y,{labelPlacement:"left",column:1},{default:()=>[e(R,{label:"\u4E0A\u4F20\u4EBA"},{default:()=>[l.createByName]}),e(R,{label:"\u4E0A\u4F20\u65F6\u95F4"},{default:()=>[l.createTime]})]})}},{title:"\u72B6\u6001",key:"status",render(l){return e(Te,{type:l.status?"primary":"default"},{default:()=>[l.status?"\u542F\u7528":"\u505C\u7528"]})}},{title:"\u64CD\u4F5C",key:"operation",fixed:"right",render(l){return e(x,null,{default:()=>[e(g,{type:"primary",size:"small",text:!0,onClick:()=>{a.musicPreview=!0,a.musicScore=l}},{default:()=>[b("\u9884\u89C8")]}),L(e(g,{type:"primary",size:"small",text:!0,onClick:()=>M(l)},{default:()=>[l.status?"\u505C\u7528":"\u542F\u7528"]}),[[P("auth"),"musicSheetApplicationExtend/status1751235210464198657"]]),L(e(g,{type:"primary",size:"small",text:!0,onClick:()=>{a.showEditDialog=!0,a.updateRow=l}},{default:()=>[b("\u4FEE\u6539")]}),[[P("auth"),"musicSheetApplicationExtend/update1751230252163530754"]]),L(e(g,{type:"primary",size:"small",text:!0,disabled:!!l.status,onClick:()=>O(l)},{default:()=>[b("\u5220\u9664")]}),[[P("auth"),"musicSheetApplicationExtend/del1770696070576254977"]])]})}}];return()=>e("div",{class:"system-menu-container"},[e(ce,{ref:h,model:a.searchForm,onSubmit:F,saveKey:"music-sheet-kt",onSetModel:l=>a.searchForm=l},{default:()=>[e(p,{label:"\u5173\u952E\u8BCD",path:"keyword"},{default:()=>[e(J,{placeholder:"\u8BF7\u8F93\u5165\u66F2\u76EE\u540D\u79F0/\u7F16\u53F7",value:a.searchForm.keyword,"onUpdate:value":l=>a.searchForm.keyword=l,clearable:!0},null)]}),e(p,{label:"\u66F2\u76EE\u6765\u6E90",path:"sourceType"},{default:()=>[e(f,{placeholder:"\u8BF7\u9009\u62E9\u66F2\u76EE\u6765\u6E90",value:a.searchForm.sourceType,"onUpdate:value":l=>a.searchForm.sourceType=l,options:E(H),onUpdateValue:l=>y(this,null,function*(){a.userIdData=[],a.searchForm.userId=null,l&&l!=="PLATFORM"?(yield K(l),a.userIdDisable=!a.searchForm.extendApplicationId):a.userIdDisable=!0}),clearable:!0},null)]}),e(p,{label:"\u6240\u5C5E\u9879\u76EE",path:"applicationId"},{default:()=>[e(f,{placeholder:"\u8BF7\u9009\u62E9\u6240\u5C5E\u9879\u76EE",value:a.searchForm.extendApplicationId,"onUpdate:value":l=>a.searchForm.extendApplicationId=l,options:a.useProjectData,clearable:!0,onUpdateValue:l=>y(this,null,function*(){a.searchForm.extendApplicationId=l,l?(yield K(a.searchForm.sourceType),a.userIdDisable=!(a.searchForm.sourceType&&a.searchForm.sourceType!=="PLATFORM")):(a.searchForm.userId=null,a.userIdDisable=!0,a.userIdData=[])})},null)]}),e(p,{label:"\u6240\u5C5E\u4EBA",path:"userId"},{default:()=>[e(f,{filterable:!0,placeholder:"\u8BF7\u9009\u62E9\u6240\u5C5E\u4EBA",disabled:a.userIdDisable,value:a.searchForm.userId,"onUpdate:value":l=>a.searchForm.userId=l,options:a.userIdData,clearable:!0},null)]}),e(p,{label:"\u591A\u58F0\u8F68\u6E32\u67D3",path:"subjectType"},{default:()=>[e(f,{placeholder:"\u8BF7\u9009\u62E9\u591A\u58F0\u8F68\u6E32\u67D3",value:a.searchForm.musicSheetType,"onUpdate:value":l=>a.searchForm.musicSheetType=l,options:E(q),clearable:!0},null)]}),e(p,{label:"\u4F34\u594F\u7C7B\u578B",path:"audioType"},{default:()=>[e(f,{placeholder:"\u8BF7\u9009\u62E9\u4F34\u594F\u7C7B\u578B",value:a.searchForm.audioType,"onUpdate:value":l=>a.searchForm.audioType=l,options:E(re),clearable:!0},null)]}),e(p,{label:"\u53EF\u7528\u58F0\u90E8",path:"subjectId"},{default:()=>[e(f,{placeholder:"\u8BF7\u9009\u62E9\u53EF\u7528\u58F0\u90E8",value:a.searchForm.subjectId,"onUpdate:value":l=>a.searchForm.subjectId=l,options:a.subjectList,clearable:!0},null)]}),e(p,{label:"\u4E50\u8C31\u6559\u6750",path:"musicCategoryId"},{default:()=>[e(Z,{valueField:"id",labelField:"name","children-field":"children",placeholder:"\u8BF7\u9009\u62E9\u4E50\u8C31\u6559\u6750",value:a.searchForm.musicCategoryId,"onUpdate:value":l=>a.searchForm.musicCategoryId=l,options:a.musicSheetCategories,clearable:!0},null)]}),e(p,{label:"\u6536\u8D39\u65B9\u5F0F",path:"paymentType"},{default:()=>[e(f,{value:a.searchForm.paymentType,"onUpdate:value":l=>a.searchForm.paymentType=l,placeholder:"\u8BF7\u9009\u62E9\u6536\u8D39\u65B9\u5F0F",options:[{label:"\u514D\u8D39",value:"FREE"},{label:"\u4F1A\u5458",value:"VIP"}],clearable:!0},null)]}),e(p,{label:"\u72B6\u6001",path:"status"},{default:()=>[e(f,{value:a.searchForm.status,"onUpdate:value":l=>a.searchForm.status=l,placeholder:"\u8BF7\u9009\u62E9\u72B6\u6001",options:[{label:"\u542F\u7528",value:!0},{label:"\u505C\u7528",value:!1}],clearable:!0},null)]}),e(p,{label:"\u4E0A\u4F20\u65F6\u95F4",path:"authorFrom"},{default:()=>[e(Fe,{value:a.searchForm.times,"onUpdate:value":l=>a.searchForm.times=l,type:"daterange",clearable:!0,"value-format":"yyyy.MM.dd",startPlaceholder:"\u5F00\u59CB\u65F6\u95F4",endPlaceholder:"\u7ED3\u675F\u65F6\u95F4"},null)]}),e(p,null,{default:()=>[e(x,null,{default:()=>[e(g,{type:"primary",onClick:t},{default:()=>[b("\u641C\u7D22")]}),e(g,{type:"default",onClick:i},{default:()=>[b("\u91CD\u7F6E")]})]})]})]}),e("div",{class:["section-container"]},[e(x,{style:{paddingBottom:"12px"}},{default:()=>[L(e(g,{type:"primary",onClick:()=>{a.showAddDialog=!0}},{default:()=>[b("\u6DFB\u52A0\u66F2\u76EE")]}),[[P("auth"),"musicSheetApplicationExtend/saveBatch1751234344277508097"]]),L(e(g,{disabled:S.value.length==0,onClick:()=>{z(!1)}},{default:()=>[b("\u6279\u91CF\u505C\u7528")]}),[[P("auth"),"musicSheetApplicationExtend/status1751235210464198657"]]),L(e(g,{disabled:S.value.length==0,onClick:()=>{z(!0)}},{default:()=>[b("\u6279\u91CF\u542F\u7528")]}),[[P("auth"),"musicSheetApplicationExtend/status1751235210464198657"]])]}),e(Q,{loading:a.loading,columns:G(),data:a.dataList,rowKey:l=>l.applicationExtendId,onUpdateCheckedRowKeys:d,scrollX:"1400"},null),e(pe,{page:a.pagination.page,"onUpdate:page":l=>a.pagination.page=l,pageSize:a.pagination.rows,"onUpdate:pageSize":l=>a.pagination.rows=l,pageTotal:a.pagination.pageTotal,"onUpdate:pageTotal":l=>a.pagination.pageTotal=l,onList:I,sync:!0,saveKey:"music-sheet-kt"},null)]),e(W,{show:a.showAddDialog,"onUpdate:show":l=>a.showAddDialog=l,preset:"dialog",showIcon:!1,title:"\u6DFB\u52A0\u66F2\u76EE",style:{width:"1300px"}},{default:()=>[e(Qe,{onClose:()=>a.showAddDialog=!1,onGetList:()=>{a.pagination.page=1,I()},subjectList:a.subjectList,appId:a.appId,musicSheetCategories:a.musicSheetCategories},null)]}),e(W,{show:a.showEditDialog,"onUpdate:show":l=>a.showEditDialog=l,preset:"dialog",showIcon:!1,title:"\u4FEE\u6539\u66F2\u76EE",style:{width:"500px"}},{default:()=>[e(Ze,{onClose:()=>a.showEditDialog=!1,onGetList:()=>{a.pagination.page=1,I()},rowData:a.updateRow,appId:a.appId,musicSheetCategories:a.musicSheetCategories},null)]}),e(W,{blockScroll:!0,show:a.musicPreview,"onUpdate:show":l=>a.musicPreview=l,preset:"dialog",showIcon:!1,title:"\u66F2\u76EE\u9884\u89C8",style:{width:"auto"}},{default:()=>[e(Re,{item:a.musicScore},null)]})])}}),tt=$({name:"gym-addMusic",props:{appId:{type:String,required:!0},subjectList:{type:Array,default:()=>[]},musicSheetCategories:{type:Array,default:()=>[]}},emits:["close","getList"],setup(m,{slots:k,attrs:w,emit:a}){const v=ie(),h=ee(),t=V({loading:!1,pagination:{page:1,rows:5,pageTotal:0},stepPagination:{page:1,rows:5,pageTotal:0},searchForm:{keyword:null,musicSheetType:null,subjectId:null,sourceType:null,composer:null,userId:null,applicationId:null},subjectList:[],showAdd:!1,currentStep:1,dataList:[],selectRowData:[],musicSheetCategories:[],startSortNum:null,projectMusicCategoryId:null,globalPaymentType:null,userIdDisable:!0,userIdData:[],useProjectData:[]});X(()=>y(this,null,function*(){t.searchForm.keyword=null,t.searchForm.musicSheetType=null,t.searchForm.subjectId=null,t.searchForm.sourceType=null,t.searchForm.composer=null,t.searchForm.userId=null,t.searchForm.applicationId=null,t.loading=!0,t.subjectList=m.subjectList;try{const{data:s}=yield ge({applicationIds:m.appId});s&&s.length>0&&(t.musicSheetCategories=s[0].musicSheetCategories)}catch(s){}yield i(),yield S()}));const i=()=>y(this,null,function*(){try{const s=Object.keys(ae),{data:r}=yield he({page:1,rows:999}),u=r.rows||[];t.useProjectData=[],u.filter(C=>s.includes(C.appKey)).forEach(C=>{t.useProjectData.push(D(T({},C),{label:C.appName,value:C.id}))})}catch(s){}}),F=s=>y(this,null,function*(){if(!!t.searchForm.applicationId&&(t.userIdData=[],t.searchForm.userId=null,s&&s!=="PLATFORM")){const{data:r}=yield de({page:1,rows:9999,sourceType:s,applicationId:t.searchForm.applicationId});(r.rows||[]).forEach(n=>{t.userIdData.push(D(T({},n),{label:s==="PERSON"?n.userName:n.organizationRole,value:s==="PERSON"?n.userId:n.organizationRoleId}))})}}),S=()=>y(this,null,function*(){try{t.loading=!0;const s=t.searchForm.sourceType,{data:r}=yield Se(D(T(T({},t.pagination),t.searchForm),{userId:s&&s==="PERSON"?t.searchForm.userId:null,organizationRoleId:s&&s==="ORG"?t.searchForm.userId:null,addAppId:m.appId}));t.pagination.pageTotal=Number(r.total),t.dataList=r.rows||[]}catch(s){}t.loading=!1}),d=U(),I=()=>{var s;(s=d.value)==null||s.submit()},M=()=>{var s;(s=d.value)==null||s.reset()},z=()=>{t.pagination.page=1,S()},K=()=>y(this,null,function*(){if(t.selectRowData.length==0){h.error("\u672A\u9009\u62E9\u66F2\u76EE");return}const s=[];for(let u=0;u<t.selectRowData.length;u++){const n=t.selectRowData[u];if(!n.projectMusicCategoryId){h.error("\u66F2\u76EE\u5206\u7C7B\u4E0D\u80FD\u4E3A\u7A7A");return}if(n.sortNo===null||n.sortNo===void 0||n.sortNo===""){h.error("\u6392\u5E8F\u53F7\u4E0D\u80FD\u4E3A\u7A7A");return}s.push(D(T({},n),{musicSheetId:n.id,musicSheetCategoryId:n.projectMusicCategoryId,applicationId:m.appId,id:null}))}const r=yield xe(s);r&&r.code=="200"&&(h.success("\u6DFB\u52A0\u6210\u529F"),a("getList"),a("close"))}),O=[{type:"selection"},{title:"\u66F2\u76EE\u7F16\u53F7",key:"id"},{title:"\u5C01\u9762\u56FE",key:"titleImg",render(s){return e(ne,{width:40,height:40,src:s.musicCover},null)}},{title:"\u58F0\u90E8",key:"subjectNames",render:s=>e(A,{content:s.subjectNames},null)},{title:"\u66F2\u76EE\u540D\u79F0",key:"name"},{title:"\u97F3\u4E50\u4EBA",key:"composer"},{title:"\u591A\u58F0\u8F68\u6E32\u67D3",key:"musicSheetType",render:s=>e("div",null,[N(s.musicSheetType,new Map(Object.entries(q)))])},{title:"\u66F2\u76EE\u6765\u6E90",key:"sourceType",render(s){return N(s.sourceType,new Map(Object.entries(H)))}},{title:"\u6240\u5C5E\u4EBA",key:"userName",width:200,render:s=>e(A,{content:me(s.musicSheetExtend,s.sourceType)},null)}],G=()=>O,l=()=>{const s=fe(O);return s.splice(0,1),s.push({title(r){return e(x,null,{default:()=>[b("\u66F2\u76EE\u5206\u7C7B"),e(g,{type:"primary",size:"small",text:!0,onClick:()=>{v.create({title:"\u8BF7\u9009\u62E9\u66F2\u76EE\u5206\u7C7B",showIcon:!1,content:()=>j("div",{class:"flex flex-col justify-center items-center text-14px"},[j(Z,{onUpdateValue(u){t.projectMusicCategoryId=u},valueField:"id",labelField:"name",childrenField:"children",placeholderField:"\u8BF7\u9009\u62E9\u66F2\u76EE\u5206\u7C7B",filterable:!0,options:t.musicSheetCategories})]),positiveText:"\u786E\u5B9A",negativeText:"\u53D6\u6D88",onPositiveClick:()=>{for(let u=0;u<t.selectRowData.length;u++){const n=t.selectRowData[u];n.projectMusicCategoryId=t.projectMusicCategoryId}}})}},{default:()=>[e(B,{size:15,style:"padding-left: 5px;margin-top:4px"},{default:()=>[e("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32"},[e("path",{d:"M2 26h28v2H2z",fill:"currentColor"},null),e("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)])]})]})]})},key:"projectMusicCategoryId",width:200,render:r=>e(Z,{valueField:"id",labelField:"name","children-field":"children",placeholder:"\u8BF7\u9009\u62E9\u66F2\u76EE\u5206\u7C7B",value:r.projectMusicCategoryId,options:t.musicSheetCategories,onUpdateValue:u=>{r.projectMusicCategoryId=u},filterable:!0,clearable:!0},null)}),s.push({title(r){return e(x,null,{default:()=>[b("\u6536\u8D39\u65B9\u5F0F"),e(g,{type:"primary",size:"small",text:!0,onClick:()=>{v.create({title:"\u8BF7\u9009\u62E9\u6536\u8D39\u65B9\u5F0F",showIcon:!1,content:()=>j("div",{class:"flex flex-col justify-center items-center text-14px"},[j(f,{onUpdateValue(u){t.globalPaymentType=u},clearable:!0,options:[{label:"\u514D\u8D39",value:"FREE"},{label:"\u6536\u8D39",value:"CHARGE"}]})]),positiveText:"\u786E\u5B9A",negativeText:"\u53D6\u6D88",onPositiveClick:()=>{for(let u=0;u<t.selectRowData.length;u++){const n=t.selectRowData[u];n.paymentType=t.globalPaymentType}}})}},{default:()=>[e(B,{size:15,style:"padding-left: 5px;margin-top:4px"},{default:()=>[e("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32"},[e("path",{d:"M2 26h28v2H2z",fill:"currentColor"},null),e("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)])]})]})]})},key:"paymentType",width:200,render:r=>e(f,{placeholder:"\u8BF7\u9009\u62E9\u6536\u8D39\u65B9\u5F0F",value:r.paymentType,options:[{label:"\u514D\u8D39",value:"FREE"},{label:"\u6536\u8D39",value:"CHARGE"}],clearable:!0,onUpdateValue:u=>{r.paymentType=u}},null)}),s.push({title(r){return e(x,null,{default:()=>[b("\u6392\u5E8F"),e(g,{type:"primary",size:"small",text:!0,onClick:()=>{v.create({title:"\u8BF7\u8F93\u5165\u6392\u5E8F\u8D77\u59CB\u503C",showIcon:!1,content:()=>j("div",{class:"flex flex-col justify-center items-center text-14px"},[j(_,{onUpdateValue(u){t.startSortNum=u},min:0,max:9999})]),positiveText:"\u786E\u5B9A",negativeText:"\u53D6\u6D88",onPositiveClick:()=>{if(t.startSortNum)for(let u=0;u<t.selectRowData.length;u++){const n=t.selectRowData[u];n.sortNo=t.startSortNum+u}}})}},{default:()=>[e(B,{size:15,style:"padding-left: 5px;margin-top:4px"},{default:()=>[e("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32"},[e("path",{d:"M2 26h28v2H2z",fill:"currentColor"},null),e("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)])]})]})]})},key:"sortNo",width:150,render:r=>j(_,{value:r.sortNo,min:0,max:9999,onUpdateValue(u){r.sortNo=u}})}),s.push({title:"\u64CD\u4F5C",key:"operation",fixed:"right",render(r){return e(x,null,{default:()=>[e(g,{type:"primary",size:"small",text:!0,onClick:()=>{v.warning({title:"\u63D0\u793A",content:"\u662F\u5426\u5220\u9664\u8BE5\u6570\u636E\uFF1F",positiveText:"\u786E\u5B9A",negativeText:"\u53D6\u6D88",onPositiveClick:()=>y(this,null,function*(){try{const u=t.selectRowData.findIndex(C=>{if(C.id==r.id)return!0});u>-1&&t.selectRowData.splice(u,1),o.value.findIndex(C=>{if(C==r.id)return!0})>-1&&o.value.splice(u,1)}catch(u){}})})}},{default:()=>[b("\u79FB\u9664")]})]})}}),s},o=U([]),c=s=>{o.value=s,t.dataList.forEach(r=>{o.value.includes(r.id)&&(t.selectRowData.find(n=>n.id===r.id)||t.selectRowData.push(r))}),t.selectRowData=t.selectRowData.filter(r=>o.value.includes(r.id))};return()=>e("div",{class:"system-menu-container"},[e(x,{vertical:!0,size:"medium"},{default:()=>[e(Ie,{current:t.currentStep,style:"margin-bottom: 10px;margin-top: 10px"},{default:()=>[e(le,{title:"\u9009\u62E9\u66F2\u76EE",description:""},null),e(le,{title:"\u8BBE\u7F6E\u66F2\u76EE\u4FE1\u606F",description:""},null)]})]}),t.currentStep===1&&e("div",{class:"system-menu-container"},[e(ce,{ref:d,model:t.searchForm,onSubmit:z,onSetModel:s=>t.searchForm=s},{default:()=>[e(p,{label:"\u5173\u952E\u8BCD",path:"keyword"},{default:()=>[e(J,{value:t.searchForm.keyword,"onUpdate:value":s=>t.searchForm.keyword=s,placeholder:"\u8BF7\u8F93\u5165\u66F2\u76EE\u540D\u79F0/\u7F16\u53F7",clearable:!0},null)]}),e(p,{label:"\u591A\u58F0\u8F68\u6E32\u67D3",path:"musicSheetType"},{default:()=>[e(f,{placeholder:"\u8BF7\u9009\u62E9\u591A\u58F0\u8F68\u6E32\u67D3",value:t.searchForm.musicSheetType,"onUpdate:value":s=>t.searchForm.musicSheetType=s,options:E(q),clearable:!0},null)]}),e(p,{label:"\u53EF\u7528\u58F0\u90E8",path:"musicSubject"},{default:()=>[e(f,{placeholder:"\u8BF7\u9009\u62E9\u53EF\u7528\u58F0\u90E8",value:t.searchForm.subjectId,"onUpdate:value":s=>t.searchForm.subjectId=s,options:t.subjectList,clearable:!0},null)]}),e(p,{label:"\u97F3\u4E50\u4EBA",path:"composer"},{default:()=>[e(J,{placeholder:"\u8BF7\u9009\u62E9\u97F3\u4E50\u4EBA",value:t.searchForm.composer,"onUpdate:value":s=>t.searchForm.composer=s,clearable:!0},null)]}),e(p,{label:"\u66F2\u76EE\u6765\u6E90",path:"sourceType"},{default:()=>[e(f,{placeholder:"\u8BF7\u9009\u62E9\u66F2\u76EE\u6765\u6E90",value:t.searchForm.sourceType,"onUpdate:value":s=>t.searchForm.sourceType=s,options:E(H),onUpdateValue:s=>y(this,null,function*(){t.userIdData=[],t.searchForm.userId=null,s&&s!=="PLATFORM"?(yield F(s),t.userIdDisable=!1):t.userIdDisable=!0}),clearable:!0},null)]}),e(p,{label:"\u6240\u5C5E\u9879\u76EE",path:"applicationId"},{default:()=>[e(f,{placeholder:"\u8BF7\u9009\u62E9\u6240\u5C5E\u9879\u76EE",value:t.searchForm.applicationId,"onUpdate:value":s=>t.searchForm.applicationId=s,options:t.useProjectData,clearable:!0,onUpdateValue:s=>y(this,null,function*(){t.searchForm.applicationId=s,s?(yield F(t.searchForm.sourceType),t.userIdDisable=!(t.searchForm.sourceType&&t.searchForm.sourceType!=="PLATFORM")):(t.searchForm.userId=null,t.userIdDisable=!0,t.userIdData=[])})},null)]}),e(p,{label:"\u6240\u5C5E\u4EBA",path:"author"},{default:()=>[e(f,{filterable:!0,placeholder:"\u8BF7\u9009\u62E9\u6240\u5C5E\u4EBA",disabled:t.userIdDisable||!t.searchForm.applicationId&&!t.searchForm.sourceType,value:t.searchForm.userId,"onUpdate:value":s=>t.searchForm.userId=s,options:t.userIdData,clearable:!0},null)]}),e(p,null,{default:()=>[e(x,null,{default:()=>[e(g,{type:"primary",onClick:I},{default:()=>[b("\u641C\u7D22")]}),e(g,{type:"default",onClick:M},{default:()=>[b("\u91CD\u7F6E")]})]})]})]}),e("p",{style:{paddingBottom:"12px"}},[b("\u4F60\u9009\u62E9\u4E86"),e("span",{style:"color:red;padding:0 8px"},[t.selectRowData.length]),b("\u6761\u66F2\u76EE")]),e(Q,{loading:t.loading,columns:G(),data:t.dataList,rowKey:s=>s.id,onUpdateCheckedRowKeys:c},null),e(pe,{page:t.pagination.page,"onUpdate:page":s=>t.pagination.page=s,pageSize:t.pagination.rows,"onUpdate:pageSize":s=>t.pagination.rows=s,pageTotal:t.pagination.pageTotal,"onUpdate:pageTotal":s=>t.pagination.pageTotal=s,onList:S,sync:!0},null)]),t.currentStep===2&&e("div",{class:"system-menu-container",style:"margin-top: 15px;"},[e(Q,{loading:t.loading,columns:l(),data:t.selectRowData,rowKey:s=>s.id,maxHeight:500,scrollX:1800},null)]),e(x,{justify:"end",style:"margin-top:10px"},{default:()=>[e(g,{type:"default",onClick:()=>{t.currentStep>1?t.currentStep=t.currentStep-1:a("close")}},{default:()=>[t.currentStep===1?"\u53D6\u6D88":"\u4E0A\u4E00\u6B65"]}),e(g,{type:"primary",onClick:()=>{if(t.currentStep<2){if(t.selectRowData.length==0){h.warning("\u8BF7\u9009\u62E9\u66F2\u76EE");return}t.currentStep=t.currentStep+1}else K()}},{default:()=>[t.currentStep===2?"\u786E\u5B9A":"\u4E0B\u4E00\u6B65"]})]})])}}),at=$({name:"project-music-cooleshow-edu-updateMusic",props:{appId:{type:String,required:!0},rowData:{type:Object,required:!0},musicSheetCategories:{type:Array,default:()=>[]}},emits:["close","getList"],setup(m,{slots:k,attrs:w,emit:a}){const v=ee(),h=U(!1),t=V({musicSheetCategoryId:null,sortNo:null,paymentType:null}),i=U(),F=V({rowData:null,musicSheetCategories:[]});X(()=>y(this,null,function*(){F.rowData=m.rowData,F.musicSheetCategories=m.musicSheetCategories;const{data:d}=yield Ce({musicSheetId:F.rowData.id,applicationId:m.appId});if(!d){v.error("\u52A0\u8F7D\u5E94\u7528\u5931\u8D25");return}t.musicSheetCategoryId=d[0].musicSheetCategoryId,t.sortNo=d[0].sortNo,t.paymentType=d[0].paymentType}));const S=()=>y(this,null,function*(){i.value.validate(d=>y(this,null,function*(){if(d)return!1;h.value=!0;try{const I=yield De(D(T({},t),{musicSheetId:F.rowData.id,applicationId:m.appId}));I&&I.code===200&&(a("close"),a("getList"))}catch(I){}h.value=!1}))});return()=>e("div",{style:"background: #fff; padding-top: 12px"},[e(we,{ref:i,labelPlacement:"top",model:t,"label-placement":"left","label-width":"auto"},{default:()=>[e(p,{label:"\u66F2\u76EE\u5206\u7C7B",path:"musicSheetCategoryId",rule:[{required:!0,message:"\u8BF7\u9009\u62E9\u66F2\u76EE\u5206\u7C7B"}]},{default:()=>[e(Z,{valueField:"id",labelField:"name","children-field":"children",placeholder:"\u8BF7\u9009\u62E9\u66F2\u76EE\u5206\u7C7B",value:t.musicSheetCategoryId,options:F.musicSheetCategories,onUpdateValue:d=>{t.musicSheetCategoryId=d},clearable:!0},null)]}),e(p,{label:"\u6536\u8D39\u65B9\u5F0F",path:"paymentType",rule:[{required:!0,message:"\u8BF7\u9009\u62E9\u6536\u8D39\u65B9\u5F0F"}]},{default:()=>[e(f,{placeholder:"\u8BF7\u9009\u62E9\u6536\u8D39\u65B9\u5F0F",options:[{label:"\u514D\u8D39",value:"FREE"},{label:"\u6536\u8D39",value:"CHARGE"}],value:t.paymentType,"onUpdate:value":d=>t.paymentType=d,clearable:!0},null)]}),e(p,{label:"\u6392\u5E8F\u503C",path:"sortNo",rule:[{required:!0,message:"\u8BF7\u8F93\u5165\u6392\u5E8F\u503C"}]},{default:()=>[e(_,{value:t.sortNo,"onUpdate:value":d=>t.sortNo=d,placeholder:"\u8BF7\u8F93\u5165\u6392\u5E8F\u503C",clearable:!0,min:0,max:9999,style:{width:"100%"}},null)]})]}),e(x,{justify:"end"},{default:()=>[e(g,{onClick:()=>a("close")},{default:()=>[b("\u53D6\u6D88")]}),e(g,{type:"primary",onClick:S,loading:h.value,disabled:h.value},{default:()=>[b("\u4FDD\u5B58")]})]})])}});function ze(m){return typeof m=="function"||Object.prototype.toString.call(m)==="[object Object]"&&!be(m)}const lt=$({name:"project-music-sheet-mec",props:{appKey:{type:String,default:"GYT"}},setup(m){const k=ie(),w=ee(),a=V({loading:!1,appId:null,pagination:{page:1,rows:10,pageTotal:0},searchForm:{keyword:null,musicSheetType:null,musicalInstrumentId:null,musicCategoryIds:null,status:null,sourceType:null,paymentType:null,userId:null,musicCategoryId:null,times:null,audioType:null,exquisiteFlag:null,topFlag:null,availableType:null,appAuditFlag:null,detailFlag:null,applicationId:null,extendApplicationId:null},subjectList:[],dataList:[],musicSheetCategories:[],showAddDialog:!1,showEditDialog:!1,userIdDisable:!0,userIdData:[],updateRow:{},applicationId:null,musicPreview:!1,musicScore:null,useProjectData:[],subjectInstrumentMap:new Map,subjectId:null});X(()=>y(this,null,function*(){a.loading=!0;try{const{data:l}=yield ye({page:1,rows:1,appKey:m.appKey}),o=l.rows||[];if(!o||o.length==0){a.loading=!1,w.error("\u52A0\u8F7D\u9879\u76EE\u4FE1\u606F\u5931\u8D25");return}a.appId=o[0].id,a.applicationId=o[0].id}catch(l){}try{const{data:l}=yield Pe({applicationId:a.applicationId}),o=l||[];o.forEach(c=>{c.label=c.subjectName,c.value=c.subjectId,a.subjectInstrumentMap.set(c.subjectId,c.instrumentId)}),a.subjectList=o}catch(l){}try{const{data:l}=yield ge({applicationIds:a.appId});l&&l.length>0&&(a.musicSheetCategories=l[0].musicSheetCategories)}catch(l){}v(),I()}));const v=()=>y(this,null,function*(){try{const l=Object.keys(ae),{data:o}=yield ye({page:1,rows:999}),c=o.rows||[];a.useProjectData=[],c.filter(r=>l.includes(r.appKey)).forEach(r=>{a.useProjectData.push(D(T({},r),{label:r.appName,value:r.id}))})}catch(l){}}),h=U(),t=()=>{var l;(l=h.value)==null||l.submit()},i=()=>{var l;(l=h.value)==null||l.reset()},F=()=>{a.pagination.page=1,I()},S=U([]),d=l=>{S.value=l},I=()=>y(this,null,function*(){try{a.loading=!0,a.subjectId?a.searchForm.musicalInstrumentId=a.subjectInstrumentMap.get(a.subjectId):a.searchForm.musicalInstrumentId=null;const l=a.searchForm.sourceType,{data:o}=yield ke(D(T(D(T(T({},a.pagination),a.searchForm),{userId:l&&l==="PERSON"?a.searchForm.userId:null,organizationRoleId:l&&l==="ORG"?a.searchForm.userId:null}),Ee(a.searchForm.times,["startTime","endTime"])),{applicationId:a.applicationId}));a.pagination.pageTotal=Number(o.total),a.dataList=o.rows||[]}catch(l){}a.loading=!1}),M=l=>{const o=l.status?"\u505C\u7528":"\u542F\u7528";k.warning({title:"\u63D0\u793A",content:`\u662F\u5426${o}\uFF1F`,positiveText:"\u786E\u5B9A",negativeText:"\u53D6\u6D88",onPositiveClick:()=>y(this,null,function*(){try{yield ue({ids:l.applicationExtendId,status:!l.status}),I(),w.success(`${o}\u6210\u529F`)}catch(c){}})})},z=l=>{const o=S.value.length;o==0&&w.warning("\u672A\u9009\u62E9\u6570\u636E");const c=l?"\u542F\u7528":"\u505C\u7528";k.warning({title:"\u63D0\u793A",content:`\u662F\u5426${c}`+o+"\u6761\u6570\u636E\uFF1F",positiveText:"\u786E\u5B9A",negativeText:"\u53D6\u6D88",onPositiveClick:()=>y(this,null,function*(){try{yield ue({ids:S.value.join(","),status:l}),I(),w.success(`${c}\u6210\u529F`)}catch(s){}})})},K=l=>y(this,null,function*(){if(!!a.searchForm.extendApplicationId&&(a.userIdData=[],a.searchForm.userId=null,l&&l!=="PLATFORM")){const{data:o}=yield de({page:1,rows:9999,sourceType:l,applicationId:a.searchForm.extendApplicationId});(o.rows||[]).forEach(s=>{a.userIdData.push(D(T({},s),{label:l==="PERSON"?s.userName:s.organizationRole,value:l==="PERSON"?s.userId:s.organizationRoleId}))})}}),O=l=>{k.warning({title:"\u63D0\u793A",content:"\u5220\u9664\u66F2\u76EE\uFF0C\u662F\u5426\u7EE7\u7EED\uFF1F",positiveText:"\u786E\u5B9A",negativeText:"\u53D6\u6D88",onPositiveClick:()=>y(this,null,function*(){try{yield je(l.applicationExtendId),I(),w.success("\u5220\u9664\u6210\u529F")}catch(o){}})})},G=()=>[{type:"selection"},{title:"\u66F2\u76EE\u540D\u79F0",key:"id",render:l=>e(se,null,[e(Y,{labelPlacement:"left",column:1},{default:()=>[e(R,{label:"\u66F2\u76EE\u540D\u79F0"},{default:()=>[e(A,{content:l.name},null)," "]}),e(R,{label:"\u66F2\u76EE\u7F16\u53F7"},{default:()=>[e("div",{onDblclick:()=>{Le(w,l.id)}},[e(A,{content:l.id},null)])]})]})])},{title:"\u5C01\u9762\u56FE",key:"musicCover",render(l){return e(ne,{width:60,height:60,src:l.musicCover},null)}},{title:"\u66F2\u76EE\u4FE1\u606F",key:"musicSheetCategoriesName",render:l=>{let o,c;return e(se,null,[e(Y,{labelPlacement:"left",column:1},{default:()=>[e(R,{label:"\u66F2\u76EE\u6765\u6E90"},ze(o=N(l.sourceType,new Map(Object.entries(H))))?o:{default:()=>[o]}),e(R,{label:"\u591A\u58F0\u8F68\u6E32\u67D3"},ze(c=N(l.musicSheetType,new Map(Object.entries(q))))?c:{default:()=>[c]}),e(R,{label:"\u6240\u5C5E\u4EBA"},{default:()=>[e(A,{content:me(l.musicSheetExtend,l.sourceType)},null)]}),e(R,{label:"\u53EF\u7528\u58F0\u90E8"},{default:()=>[e(A,{content:l.subjectNames},null)]})]})])}},{title:"\u4F34\u594F\u7C7B\u578B",key:"audioType",render:l=>e("div",null,[N(l.audioType,new Map(Object.entries(re)))])},{title:"\u66F2\u76EE\u5206\u7C7B",key:"musicSheetCategoryName"},{title:"\u6536\u8D39\u65B9\u5F0F",key:"paymentType",render:l=>e("div",null,[N(l.paymentType,new Map(Object.entries(oe)))])},{title:"\u4E0A\u4F20\u4EBA",minWidth:"150px",key:"composer",render(l){return e(Y,{labelPlacement:"left",column:1},{default:()=>[e(R,{label:"\u4E0A\u4F20\u4EBA"},{default:()=>[l.createByName]}),e(R,{label:"\u4E0A\u4F20\u65F6\u95F4"},{default:()=>[l.createTime]})]})}},{title:"\u72B6\u6001",key:"status",render(l){return e(Te,{type:l.status?"primary":"default"},{default:()=>[l.status?"\u542F\u7528":"\u505C\u7528"]})}},{title:"\u64CD\u4F5C",key:"operation",fixed:"right",render(l){return e(x,null,{default:()=>[e(g,{type:"primary",size:"small",text:!0,onClick:()=>{a.musicPreview=!0,a.musicScore=l}},{default:()=>[b("\u9884\u89C8")]}),L(e(g,{type:"primary",size:"small",text:!0,onClick:()=>M(l)},{default:()=>[l.status?"\u505C\u7528":"\u542F\u7528"]}),[[P("auth"),"musicSheetApplicationExtend/status1751235150422736897"]]),L(e(g,{type:"primary",size:"small",text:!0,onClick:()=>{a.showEditDialog=!0,a.updateRow=l}},{default:()=>[b("\u4FEE\u6539")]}),[[P("auth"),"musicSheetApplicationExtend/update1751235534826504193"]]),L(e(g,{type:"primary",size:"small",text:!0,disabled:!!l.status,onClick:()=>O(l)},{default:()=>[b("\u5220\u9664")]}),[[P("auth"),"musicSheetApplicationExtend/del1770708555010191362"]])]})}}];return()=>e("div",{class:"system-menu-container"},[e(ce,{ref:h,model:a.searchForm,onSubmit:F,saveKey:"music-sheet-gym",onSetModel:l=>a.searchForm=l},{default:()=>[e(p,{label:"\u5173\u952E\u8BCD",path:"keyword"},{default:()=>[e(J,{placeholder:"\u8BF7\u8F93\u5165\u66F2\u76EE\u540D\u79F0/\u7F16\u53F7",value:a.searchForm.keyword,"onUpdate:value":l=>a.searchForm.keyword=l,clearable:!0},null)]}),e(p,{label:"\u66F2\u76EE\u6765\u6E90",path:"sourceType"},{default:()=>[e(f,{placeholder:"\u8BF7\u9009\u62E9\u66F2\u76EE\u6765\u6E90",value:a.searchForm.sourceType,"onUpdate:value":l=>a.searchForm.sourceType=l,options:E(H),onUpdateValue:l=>y(this,null,function*(){a.userIdData=[],a.searchForm.userId=null,l&&l!=="PLATFORM"?(yield K(l),a.userIdDisable=!a.searchForm.extendApplicationId):a.userIdDisable=!0}),clearable:!0},null)]}),e(p,{label:"\u6240\u5C5E\u9879\u76EE",path:"extendApplicationId"},{default:()=>[e(f,{placeholder:"\u8BF7\u9009\u62E9\u6240\u5C5E\u9879\u76EE",value:a.searchForm.extendApplicationId,"onUpdate:value":l=>a.searchForm.extendApplicationId=l,options:a.useProjectData,clearable:!0,onUpdateValue:l=>y(this,null,function*(){a.searchForm.extendApplicationId=l,l?(yield K(a.searchForm.sourceType),a.userIdDisable=!(a.searchForm.sourceType&&a.searchForm.sourceType!=="PLATFORM")):(a.searchForm.userId=null,a.userIdDisable=!0,a.userIdData=[])})},null)]}),e(p,{label:"\u6240\u5C5E\u4EBA",path:"userId"},{default:()=>[e(f,{filterable:!0,placeholder:"\u8BF7\u9009\u62E9\u6240\u5C5E\u4EBA",disabled:a.userIdDisable,value:a.searchForm.userId,"onUpdate:value":l=>a.searchForm.userId=l,options:a.userIdData,clearable:!0},null)]}),e(p,{label:"\u591A\u58F0\u8F68\u6E32\u67D3",path:"subjectType"},{default:()=>[e(f,{placeholder:"\u8BF7\u9009\u62E9\u591A\u58F0\u8F68\u6E32\u67D3",value:a.searchForm.musicSheetType,"onUpdate:value":l=>a.searchForm.musicSheetType=l,options:E(q),clearable:!0},null)]}),e(p,{label:"\u4F34\u594F\u7C7B\u578B",path:"audioType"},{default:()=>[e(f,{placeholder:"\u8BF7\u9009\u62E9\u4F34\u594F\u7C7B\u578B",value:a.searchForm.audioType,"onUpdate:value":l=>a.searchForm.audioType=l,options:E(re),clearable:!0},null)]}),e(p,{label:"\u53EF\u7528\u58F0\u90E8",path:"musicalInstrumentId"},{default:()=>[e(f,{placeholder:"\u8BF7\u9009\u62E9\u53EF\u7528\u58F0\u90E8",value:a.subjectId,"onUpdate:value":l=>a.subjectId=l,options:a.subjectList,clearable:!0},null)]}),e(p,{label:"\u66F2\u76EE\u5206\u7C7B",path:"musicCategoryId"},{default:()=>[e(Z,{valueField:"id",labelField:"name","children-field":"children",placeholder:"\u8BF7\u9009\u62E9\u66F2\u76EE\u5206\u7C7B",value:a.searchForm.musicCategoryId,"onUpdate:value":l=>a.searchForm.musicCategoryId=l,options:a.musicSheetCategories,clearable:!0},null)]}),e(p,{label:"\u6536\u8D39\u65B9\u5F0F",path:"paymentType"},{default:()=>[e(f,{placeholder:"\u8BF7\u9009\u62E9\u6536\u8D39\u65B9\u5F0F",value:a.searchForm.paymentType,"onUpdate:value":l=>a.searchForm.paymentType=l,options:E(oe),clearable:!0},null)]}),e(p,{label:"\u72B6\u6001",path:"status"},{default:()=>[e(f,{value:a.searchForm.status,"onUpdate:value":l=>a.searchForm.status=l,placeholder:"\u8BF7\u9009\u62E9\u72B6\u6001",options:[{label:"\u542F\u7528",value:!0},{label:"\u505C\u7528",value:!1}],clearable:!0},null)]}),e(p,{label:"\u4E0A\u4F20\u65F6\u95F4",path:"authorFrom"},{default:()=>[e(Fe,{value:a.searchForm.times,"onUpdate:value":l=>a.searchForm.times=l,type:"daterange",clearable:!0,"value-format":"yyyy.MM.dd",startPlaceholder:"\u5F00\u59CB\u65F6\u95F4",endPlaceholder:"\u7ED3\u675F\u65F6\u95F4"},null)]}),e(p,null,{default:()=>[e(x,null,{default:()=>[e(g,{type:"primary",onClick:t},{default:()=>[b("\u641C\u7D22")]}),e(g,{type:"default",onClick:i},{default:()=>[b("\u91CD\u7F6E")]})]})]})]}),e("div",{class:["section-container"]},[e(x,{style:{paddingBottom:"12px"}},{default:()=>[L(e(g,{type:"primary",onClick:()=>{a.showAddDialog=!0}},{default:()=>[b("\u6DFB\u52A0\u66F2\u76EE")]}),[[P("auth"),"musicSheetApplicationExtend/saveBatch1751234300275064833"]]),L(e(g,{disabled:S.value.length==0,onClick:()=>{z(!1)}},{default:()=>[b("\u6279\u91CF\u505C\u7528")]}),[[P("auth"),"musicSheetApplicationExtend/status1751235150422736897"]]),L(e(g,{disabled:S.value.length==0,onClick:()=>{z(!0)}},{default:()=>[b("\u6279\u91CF\u542F\u7528")]}),[[P("auth"),"musicSheetApplicationExtend/status1751235150422736897"]])]}),e(Q,{loading:a.loading,columns:G(),data:a.dataList,rowKey:l=>l.applicationExtendId,onUpdateCheckedRowKeys:d,scrollX:"1400"},null),e(pe,{page:a.pagination.page,"onUpdate:page":l=>a.pagination.page=l,pageSize:a.pagination.rows,"onUpdate:pageSize":l=>a.pagination.rows=l,pageTotal:a.pagination.pageTotal,"onUpdate:pageTotal":l=>a.pagination.pageTotal=l,onList:I,sync:!0,saveKey:"music-sheet-gym"},null)]),e(W,{show:a.showAddDialog,"onUpdate:show":l=>a.showAddDialog=l,preset:"dialog",showIcon:!1,title:"\u6DFB\u52A0\u66F2\u76EE",style:{width:"1300px"}},{default:()=>[e(tt,{onClose:()=>a.showAddDialog=!1,onGetList:()=>{a.pagination.page=1,I()},subjectList:a.subjectList,appId:a.appId,musicSheetCategories:a.musicSheetCategories},null)]}),e(W,{show:a.showEditDialog,"onUpdate:show":l=>a.showEditDialog=l,preset:"dialog",showIcon:!1,title:"\u4FEE\u6539\u66F2\u76EE",style:{width:"500px"}},{default:()=>[e(at,{onClose:()=>a.showEditDialog=!1,onGetList:()=>{a.pagination.page=1,I()},rowData:a.updateRow,appId:a.appId,musicSheetCategories:a.musicSheetCategories},null)]}),e(W,{blockScroll:!0,show:a.musicPreview,"onUpdate:show":l=>a.musicPreview=l,preset:"dialog",showIcon:!1,title:"\u66F2\u76EE\u9884\u89C8",style:{width:"auto"}},{default:()=>[e(Re,{item:a.musicScore},null)]})])}}),st=$({name:"gyt-addMusic",props:{appId:{type:String,required:!0},subjectList:{type:Array,default:()=>[]},musicSheetCategories:{type:Array,default:()=>[]}},emits:["close","getList"],setup(m,{slots:k,attrs:w,emit:a}){const v=ie(),h=ee(),t=V({loading:!1,pagination:{page:1,rows:5,pageTotal:0},stepPagination:{page:1,rows:5,pageTotal:0},searchForm:{keyword:null,musicSheetType:null,subjectId:null,sourceType:null,composer:null,userId:null,applicationId:null},subjectList:[],showAdd:!1,currentStep:1,dataList:[],selectRowData:[],musicSheetCategories:[],startSortNum:null,projectMusicCategoryId:null,useProjectData:[],userIdDisable:!0,userIdData:[],globalAvailableType:null});X(()=>y(this,null,function*(){t.searchForm.keyword=null,t.searchForm.musicSheetType=null,t.searchForm.subjectId=null,t.searchForm.sourceType=null,t.searchForm.composer=null,t.searchForm.userId=null,t.searchForm.applicationId=null,t.loading=!0,t.subjectList=m.subjectList;try{const{data:s}=yield ge({applicationIds:m.appId});s&&s.length>0&&(t.musicSheetCategories=s[0].musicSheetCategories)}catch(s){}yield i(),yield F()}));const i=()=>y(this,null,function*(){try{const s=Object.keys(ae),{data:r}=yield he({page:1,rows:999}),u=r.rows||[];t.useProjectData=[],u.filter(C=>s.includes(C.appKey)).forEach(C=>{t.useProjectData.push(D(T({},C),{label:C.appName,value:C.id}))})}catch(s){}}),F=()=>y(this,null,function*(){try{t.loading=!0;const s=D(T({},t.searchForm),{userId:t.searchForm.sourceType&&t.searchForm.sourceType=="PERSON"?t.searchForm.userId:null,organizationRoleId:t.searchForm.sourceType&&t.searchForm.sourceType=="ORG"?t.searchForm.userId:null}),{data:r}=yield Se(D(T(T({},t.pagination),s),{addAppId:m.appId}));t.pagination.pageTotal=Number(r.total),t.dataList=r.rows||[]}catch(s){}t.loading=!1}),S=U(),d=()=>{var s;(s=S.value)==null||s.submit()},I=()=>{var s;(s=S.value)==null||s.reset()},M=()=>{t.pagination.page=1,F()},z=s=>y(this,null,function*(){if(!!t.searchForm.applicationId&&(t.userIdData=[],t.searchForm.userId=null,s&&s!=="PLATFORM")){const{data:r}=yield de({page:1,rows:9999,sourceType:s,applicationId:t.searchForm.applicationId});(r.rows||[]).forEach(n=>{t.userIdData.push(D(T({},n),{label:s==="PERSON"?n.userName:n.organizationRole,value:s==="PERSON"?n.userId:n.organizationRoleId}))})}}),K=()=>y(this,null,function*(){if(t.selectRowData.length==0){h.error("\u672A\u9009\u62E9\u66F2\u76EE");return}const s=[];for(let u=0;u<t.selectRowData.length;u++){const n=t.selectRowData[u];if(!n.availableType){h.error("\u53EF\u7528\u9014\u5F84\u4E0D\u80FD\u4E3A\u7A7A");return}if(!n.projectMusicCategoryId){h.error("\u66F2\u76EE\u5206\u7C7B\u4E0D\u80FD\u4E3A\u7A7A");return}if(n.sortNo===null||n.sortNo===void 0||n.sortNo===""){h.error("\u6392\u5E8F\u53F7\u4E0D\u80FD\u4E3A\u7A7A");return}s.push(D(T({},n),{musicSheetId:n.id,musicSheetCategoryId:n.projectMusicCategoryId,availableType:n.availableType,applicationId:m.appId,id:null}))}const r=yield xe(s);r&&r.code=="200"&&(h.success("\u6DFB\u52A0\u6210\u529F"),a("getList"),a("close"))}),O=[{type:"selection"},{title:"\u66F2\u76EE\u7F16\u53F7",key:"id"},{title:"\u5C01\u9762\u56FE",key:"titleImg",render(s){return e(ne,{width:40,height:40,src:s.musicCover},null)}},{title:"\u53EF\u7528\u58F0\u90E8",key:"subjectNames",render:s=>e(A,{content:s.subjectNames},null)},{title:"\u66F2\u76EE\u540D\u79F0",key:"name"},{title:"\u97F3\u4E50\u4EBA",key:"composer"},{title:"\u591A\u58F0\u8F68\u6E32\u67D3",key:"musicSheetType",render:s=>e("div",null,[N(s.musicSheetType,new Map(Object.entries(q)))])},{title:"\u66F2\u76EE\u6765\u6E90",key:"sourceType",render(s){return N(s.sourceType,new Map(Object.entries(H)))}},{title:"\u6240\u5C5E\u4EBA",key:"userName",render:s=>e(A,{content:me(s.musicSheetExtend,s.sourceType)},null)}],G=()=>O,l=()=>{const s=fe(O);return s.splice(0,1),s.push({title(r){return e(x,null,{default:()=>[b("\u53EF\u7528\u9014\u5F84"),e(g,{type:"primary",size:"small",text:!0,onClick:()=>{v.create({title:"\u8BF7\u9009\u62E9\u53EF\u7528\u9014\u5F84",showIcon:!1,content:()=>j("div",{class:"flex flex-col justify-center items-center text-14px"},[j(f,{onUpdateValue(u){t.globalAvailableType=u},clearable:!0,options:[{label:"\u5B66\u6821",value:"ORG"},{label:"\u5E73\u53F0",value:"PLATFORM"}]})]),positiveText:"\u786E\u5B9A",negativeText:"\u53D6\u6D88",onPositiveClick:()=>{for(let u=0;u<t.selectRowData.length;u++){const n=t.selectRowData[u];n.availableType=t.globalAvailableType}}})}},{default:()=>[e(B,{size:15,style:"padding-left: 5px;margin-top:4px"},{default:()=>[e("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32"},[e("path",{d:"M2 26h28v2H2z",fill:"currentColor"},null),e("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)])]})]})]})},key:"availableType",render:r=>e(f,{placeholder:"\u8BF7\u9009\u62E9\u53EF\u7528\u9014\u5F84",value:r.availableType,options:[{label:"\u5B66\u6821",value:"ORG"},{label:"\u5E73\u53F0",value:"PLATFORM"}],onUpdateValue:u=>{r.availableType=u},clearable:!0},null)}),s.push({title(r){return e(x,null,{default:()=>[b("\u66F2\u76EE\u5206\u7C7B"),e(g,{type:"primary",size:"small",text:!0,onClick:()=>{v.create({title:"\u8BF7\u9009\u62E9\u66F2\u76EE\u5206\u7C7B",showIcon:!1,content:()=>j("div",{class:"flex flex-col justify-center items-center text-14px"},[j(Z,{onUpdateValue(u){t.projectMusicCategoryId=u},valueField:"id",labelField:"name",childrenField:"children",placeholderField:"\u8BF7\u9009\u62E9\u66F2\u76EE\u5206\u7C7B",filterable:!0,options:t.musicSheetCategories})]),positiveText:"\u786E\u5B9A",negativeText:"\u53D6\u6D88",onPositiveClick:()=>{for(let u=0;u<t.selectRowData.length;u++){const n=t.selectRowData[u];n.projectMusicCategoryId=t.projectMusicCategoryId}}})}},{default:()=>[e(B,{size:15,style:"padding-left: 5px;margin-top:4px"},{default:()=>[e("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32"},[e("path",{d:"M2 26h28v2H2z",fill:"currentColor"},null),e("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)])]})]})]})},key:"projectMusicCategoryId",width:200,render:r=>e(Z,{valueField:"id",labelField:"name","children-field":"children",placeholder:"\u8BF7\u9009\u62E9\u66F2\u76EE\u5206\u7C7B",value:r.projectMusicCategoryId,options:t.musicSheetCategories,onUpdateValue:u=>{r.projectMusicCategoryId=u},filterable:!0,clearable:!0},null)}),s.push({title(r){return e(x,null,{default:()=>[b("\u6392\u5E8F"),e(g,{type:"primary",size:"small",text:!0,onClick:()=>{v.create({title:"\u8BF7\u8F93\u5165\u6392\u5E8F\u8D77\u59CB\u503C",showIcon:!1,content:()=>j("div",{class:"flex flex-col justify-center items-center text-14px"},[j(_,{onUpdateValue(u){t.startSortNum=u},min:0,max:9999})]),positiveText:"\u786E\u5B9A",negativeText:"\u53D6\u6D88",onPositiveClick:()=>{if(t.startSortNum)for(let u=0;u<t.selectRowData.length;u++){const n=t.selectRowData[u];n.sortNo=t.startSortNum+u}}})}},{default:()=>[e(B,{size:15,style:"padding-left: 5px;margin-top:4px"},{default:()=>[e("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32"},[e("path",{d:"M2 26h28v2H2z",fill:"currentColor"},null),e("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)])]})]})]})},key:"sortNo",width:150,render:r=>j(_,{value:r.sortNo,min:0,max:9999,onUpdateValue(u){r.sortNo=u}})}),s.push({title:"\u64CD\u4F5C",key:"operation",fixed:"right",render(r){return e(x,null,{default:()=>[e(g,{type:"primary",size:"small",text:!0,onClick:()=>{v.warning({title:"\u63D0\u793A",content:"\u662F\u5426\u5220\u9664\u8BE5\u6570\u636E\uFF1F",positiveText:"\u786E\u5B9A",negativeText:"\u53D6\u6D88",onPositiveClick:()=>y(this,null,function*(){try{const u=t.selectRowData.findIndex(C=>{if(C.id==r.id)return!0});u>-1&&t.selectRowData.splice(u,1),o.value.findIndex(C=>{if(C==r.id)return!0})>-1&&o.value.splice(u,1)}catch(u){}})})}},{default:()=>[b("\u79FB\u9664")]})]})}}),s},o=U([]),c=s=>{o.value=s,t.dataList.forEach(r=>{o.value.includes(r.id)&&(t.selectRowData.find(n=>n.id===r.id)||t.selectRowData.push(r))}),t.selectRowData=t.selectRowData.filter(r=>o.value.includes(r.id))};return()=>e("div",{class:"system-menu-container"},[e(x,{vertical:!0,size:"medium"},{default:()=>[e(Ie,{current:t.currentStep,style:"margin-bottom: 10px;margin-top: 10px"},{default:()=>[e(le,{title:"\u9009\u62E9\u66F2\u76EE",description:""},null),e(le,{title:"\u8BBE\u7F6E\u66F2\u76EE\u4FE1\u606F",description:""},null)]})]}),t.currentStep===1&&e("div",{class:"system-menu-container"},[e(ce,{ref:S,model:t.searchForm,onSubmit:M,onSetModel:s=>t.searchForm=s},{default:()=>[e(p,{label:"\u5173\u952E\u8BCD",path:"keyword"},{default:()=>[e(J,{value:t.searchForm.keyword,"onUpdate:value":s=>t.searchForm.keyword=s,placeholder:"\u8BF7\u8F93\u5165\u66F2\u76EE\u540D\u79F0/\u7F16\u53F7",clearable:!0},null)]}),e(p,{label:"\u591A\u58F0\u8F68\u6E32\u67D3",path:"musicSheetType"},{default:()=>[e(f,{placeholder:"\u8BF7\u9009\u62E9\u591A\u58F0\u8F68\u6E32\u67D3",value:t.searchForm.musicSheetType,"onUpdate:value":s=>t.searchForm.musicSheetType=s,options:E(q),clearable:!0},null)]}),e(p,{label:"\u53EF\u7528\u58F0\u90E8",path:"musicSubject"},{default:()=>[e(f,{placeholder:"\u8BF7\u9009\u62E9\u53EF\u7528\u58F0\u90E8",value:t.searchForm.subjectId,"onUpdate:value":s=>t.searchForm.subjectId=s,options:t.subjectList,clearable:!0},null)]}),e(p,{label:"\u97F3\u4E50\u4EBA",path:"composer"},{default:()=>[e(J,{placeholder:"\u8BF7\u9009\u62E9\u97F3\u4E50\u4EBA",value:t.searchForm.composer,"onUpdate:value":s=>t.searchForm.composer=s,clearable:!0},null)]}),e(p,{label:"\u66F2\u76EE\u6765\u6E90",path:"sourceType"},{default:()=>[e(f,{placeholder:"\u8BF7\u9009\u62E9\u66F2\u76EE\u6765\u6E90",value:t.searchForm.sourceType,"onUpdate:value":s=>t.searchForm.sourceType=s,options:E(H),onUpdateValue:s=>y(this,null,function*(){t.userIdData=[],t.searchForm.userId=null,s&&s!=="PLATFORM"?(yield z(s),t.userIdDisable=!1):t.userIdDisable=!0}),clearable:!0},null)]}),e(p,{label:"\u6240\u5C5E\u9879\u76EE",path:"applicationId"},{default:()=>[e(f,{placeholder:"\u8BF7\u9009\u62E9\u6240\u5C5E\u9879\u76EE",value:t.searchForm.applicationId,"onUpdate:value":s=>t.searchForm.applicationId=s,options:t.useProjectData,clearable:!0,onUpdateValue:s=>y(this,null,function*(){t.searchForm.applicationId=s,s?(yield z(t.searchForm.sourceType),t.userIdDisable=!(t.searchForm.sourceType&&t.searchForm.sourceType!=="PLATFORM")):(t.searchForm.userId=null,t.userIdDisable=!0,t.userIdData=[])})},null)]}),e(p,{label:"\u6240\u5C5E\u4EBA",path:"author"},{default:()=>[e(f,{filterable:!0,placeholder:"\u8BF7\u9009\u62E9\u6240\u5C5E\u4EBA",disabled:t.userIdDisable||!t.searchForm.applicationId&&!t.searchForm.sourceType,value:t.searchForm.userId,"onUpdate:value":s=>t.searchForm.userId=s,options:t.userIdData,clearable:!0},null)]}),e(p,null,{default:()=>[e(x,null,{default:()=>[e(g,{type:"primary",onClick:d},{default:()=>[b("\u641C\u7D22")]}),e(g,{type:"default",onClick:I},{default:()=>[b("\u91CD\u7F6E")]})]})]})]}),e("p",{style:{paddingBottom:"12px"}},[b("\u4F60\u9009\u62E9\u4E86"),e("span",{style:"color:red;padding:0 8px"},[t.selectRowData.length]),b("\u6761\u66F2\u76EE")]),e(Q,{loading:t.loading,columns:G(),data:t.dataList,rowKey:s=>s.id,onUpdateCheckedRowKeys:c},null),e(pe,{page:t.pagination.page,"onUpdate:page":s=>t.pagination.page=s,pageSize:t.pagination.rows,"onUpdate:pageSize":s=>t.pagination.rows=s,pageTotal:t.pagination.pageTotal,"onUpdate:pageTotal":s=>t.pagination.pageTotal=s,onList:F,sync:!0},null)]),t.currentStep===2&&e("div",{class:"system-menu-container",style:"margin-top: 15px;"},[e(Q,{loading:t.loading,columns:l(),data:t.selectRowData,rowKey:s=>s.id,maxHeight:500,scrollX:1800},null)]),e(x,{justify:"end",style:"margin-top:10px"},{default:()=>[e(g,{type:"default",onClick:()=>{t.currentStep>1?t.currentStep=t.currentStep-1:a("close")}},{default:()=>[t.currentStep===1?"\u53D6\u6D88":"\u4E0A\u4E00\u6B65"]}),e(g,{type:"primary",onClick:()=>{if(t.currentStep<2){if(t.selectRowData.length==0){h.warning("\u8BF7\u9009\u62E9\u66F2\u76EE");return}t.currentStep=t.currentStep+1}else K()}},{default:()=>[t.currentStep===2?"\u786E\u5B9A":"\u4E0B\u4E00\u6B65"]})]})])}}),rt=$({name:"project-music-cooleshow-edu-updateMusic",props:{appId:{type:String,required:!0},rowData:{type:Object,required:!0},musicSheetCategories:{type:Array,default:()=>[]}},emits:["close","getList"],setup(m,{slots:k,attrs:w,emit:a}){const v=ee(),h=U(!1),t=V({musicSheetCategoryId:null,sortNo:null,availableType:null}),i=U(),F=V({rowData:null,musicSheetCategories:[]});X(()=>y(this,null,function*(){F.rowData=m.rowData,F.musicSheetCategories=m.musicSheetCategories;const{data:d}=yield Ce({musicSheetId:F.rowData.id,applicationId:m.appId});if(!d){v.error("\u52A0\u8F7D\u5E94\u7528\u5931\u8D25");return}t.musicSheetCategoryId=d[0].musicSheetCategoryId,t.sortNo=d[0].sortNo,t.availableType=d[0].availableType}));const S=()=>y(this,null,function*(){i.value.validate(d=>y(this,null,function*(){if(d)return!1;h.value=!0;try{const I=yield De(D(T({},t),{musicSheetId:F.rowData.id,applicationId:m.appId}));I&&I.code===200&&(a("close"),a("getList"))}catch(I){}h.value=!1}))});return()=>e("div",{style:"background: #fff; padding-top: 12px"},[e(we,{ref:i,labelPlacement:"top",model:t,"label-placement":"left","label-width":"auto"},{default:()=>[e(p,{label:"\u66F2\u76EE\u5206\u7C7B",path:"musicSheetCategoryId",rule:[{required:!0,message:"\u8BF7\u9009\u62E9\u66F2\u76EE\u5206\u7C7B"}]},{default:()=>[e(Z,{valueField:"id",labelField:"name","children-field":"children",placeholder:"\u8BF7\u9009\u62E9\u66F2\u76EE\u5206\u7C7B",value:t.musicSheetCategoryId,options:F.musicSheetCategories,onUpdateValue:d=>{t.musicSheetCategoryId=d},clearable:!0},null)]}),e(p,{label:"\u53EF\u7528\u9014\u5F84",path:"availableType",rule:[{required:!0,message:"\u8BF7\u9009\u62E9\u53EF\u7528\u9014\u5F84"}]},{default:()=>[e(f,{placeholder:"\u8BF7\u9009\u62E9\u53EF\u7528\u9014\u5F84",options:[{label:"\u5B66\u6821",value:"ORG"},{label:"\u5E73\u53F0",value:"PLATFORM"}],value:t.availableType,"onUpdate:value":d=>t.availableType=d,clearable:!0},null)]}),e(p,{label:"\u6392\u5E8F\u503C",path:"sortNo",rule:[{required:!0,message:"\u8BF7\u8F93\u5165\u6392\u5E8F\u503C"}]},{default:()=>[e(_,{value:t.sortNo,"onUpdate:value":d=>t.sortNo=d,placeholder:"\u8BF7\u8F93\u5165\u6392\u5E8F\u503C",clearable:!0,min:0,max:9999,style:{width:"100%"}},null)]})]}),e(x,{justify:"end"},{default:()=>[e(g,{onClick:()=>a("close")},{default:()=>[b("\u53D6\u6D88")]}),e(g,{type:"primary",onClick:S,loading:h.value,disabled:h.value},{default:()=>[b("\u4FDD\u5B58")]})]})])}});function Oe(m){return typeof m=="function"||Object.prototype.toString.call(m)==="[object Object]"&&!be(m)}const ot=$({name:"project-music-sheet-gyt",props:{appKey:{type:String,default:"GYT"}},setup(m){const k=ie(),w=ee(),a=V({loading:!1,appId:null,pagination:{page:1,rows:10,pageTotal:0},searchForm:{keyword:null,musicSheetType:null,subjectId:null,subjectIds:null,musicCategoryIds:null,status:null,sourceType:null,paymentType:null,userId:null,musicCategoryId:null,times:null,audioType:null,exquisiteFlag:null,topFlag:null,availableType:null,appAuditFlag:null,detailFlag:null,applicationId:null,extendApplicationId:null},subjectList:[],dataList:[],musicSheetCategories:[],showAddDialog:!1,showEditDialog:!1,userIdDisable:!0,userIdData:[],updateRow:{},applicationId:null,musicPreview:!1,musicScore:null,useProjectData:[]});X(()=>y(this,null,function*(){a.loading=!0;try{const{data:l}=yield ye({page:1,rows:1,appKey:m.appKey}),o=l.rows||[];if(!o||o.length==0){a.loading=!1,w.error("\u52A0\u8F7D\u9879\u76EE\u4FE1\u606F\u5931\u8D25");return}a.appId=o[0].id,a.applicationId=o[0].id}catch(l){}try{const{data:l}=yield Pe({applicationId:a.applicationId}),o=l||[];o.forEach(c=>{c.label=c.subjectName,c.value=c.subjectId}),a.subjectList=o}catch(l){}try{const{data:l}=yield ge({applicationIds:a.appId});l&&l.length>0&&(a.musicSheetCategories=l[0].musicSheetCategories)}catch(l){}F(),M()}));const v=U(),h=()=>{var l;(l=v.value)==null||l.submit()},t=()=>{var l;(l=v.value)==null||l.reset()},i=()=>{a.pagination.page=1,M()},F=()=>y(this,null,function*(){try{const l=Object.keys(ae),{data:o}=yield ye({page:1,rows:999}),c=o.rows||[];a.useProjectData=[],c.filter(r=>l.includes(r.appKey)).forEach(r=>{a.useProjectData.push(D(T({},r),{label:r.appName,value:r.id}))})}catch(l){}}),S=l=>y(this,null,function*(){if(!!a.searchForm.extendApplicationId&&(a.userIdData=[],a.searchForm.userId=null,l&&l!=="PLATFORM")){const{data:o}=yield de({page:1,rows:9999,sourceType:l,applicationId:a.searchForm.extendApplicationId});(o.rows||[]).forEach(s=>{a.userIdData.push(D(T({},s),{label:l==="PERSON"?s.userName:s.organizationRole,value:l==="PERSON"?s.userId:s.organizationRoleId}))})}}),d=U([]),I=l=>{d.value=l},M=()=>y(this,null,function*(){try{a.loading=!0;const l=a.searchForm.sourceType,{data:o}=yield ke(D(T(D(T(T({},a.pagination),a.searchForm),{userId:l&&l==="PERSON"?a.searchForm.userId:null,organizationRoleId:l&&l==="ORG"?a.searchForm.userId:null}),Ee(a.searchForm.times,["startTime","endTime"])),{applicationId:a.applicationId}));a.pagination.pageTotal=Number(o.total),a.dataList=o.rows||[]}catch(l){}a.loading=!1}),z=l=>{const o=l.status?"\u505C\u7528":"\u542F\u7528";k.warning({title:"\u63D0\u793A",content:`\u662F\u5426${o}\uFF1F`,positiveText:"\u786E\u5B9A",negativeText:"\u53D6\u6D88",onPositiveClick:()=>y(this,null,function*(){try{yield ue({ids:l.applicationExtendId,status:!l.status}),M(),w.success(`${o}\u6210\u529F`)}catch(c){}})})},K=l=>{const o=d.value.length;o==0&&w.warning("\u672A\u9009\u62E9\u6570\u636E");const c=l?"\u542F\u7528":"\u505C\u7528";k.warning({title:"\u63D0\u793A",content:`\u662F\u5426${c}`+o+"\u6761\u6570\u636E\uFF1F",positiveText:"\u786E\u5B9A",negativeText:"\u53D6\u6D88",onPositiveClick:()=>y(this,null,function*(){try{yield ue({ids:d.value.join(","),status:l}),M(),w.success(`${c}\u6210\u529F`)}catch(s){}})})},O=l=>{k.warning({title:"\u63D0\u793A",content:"\u5220\u9664\u66F2\u76EE\uFF0C\u662F\u5426\u7EE7\u7EED\uFF1F",positiveText:"\u786E\u5B9A",negativeText:"\u53D6\u6D88",onPositiveClick:()=>y(this,null,function*(){try{yield je(l.applicationExtendId),M(),w.success("\u5220\u9664\u6210\u529F")}catch(o){}})})},G=()=>[{type:"selection"},{title:"\u66F2\u76EE\u540D\u79F0",key:"id",render:l=>e(se,null,[e(Y,{labelPlacement:"left",column:1},{default:()=>[e(R,{label:"\u66F2\u76EE\u540D\u79F0"},{default:()=>[e(A,{content:l.name},null)," "]}),e(R,{label:"\u66F2\u76EE\u7F16\u53F7"},{default:()=>[e("div",{onDblclick:()=>{Le(w,l.id)}},[e(A,{content:l.id},null)])]})]})])},{title:"\u5C01\u9762\u56FE",key:"musicCover",render(l){return e(ne,{width:60,height:60,src:l.musicCover},null)}},{title:"\u66F2\u76EE\u4FE1\u606F",key:"musicSheetCategoriesName",render:l=>{let o,c;return e(se,null,[e(Y,{labelPlacement:"left",column:1},{default:()=>[e(R,{label:"\u66F2\u76EE\u6765\u6E90"},Oe(o=N(l.sourceType,new Map(Object.entries(H))))?o:{default:()=>[o]}),e(R,{label:"\u591A\u58F0\u8F68\u6E32\u67D3"},Oe(c=N(l.musicSheetType,new Map(Object.entries(q))))?c:{default:()=>[c]}),e(R,{label:"\u6240\u5C5E\u4EBA"},{default:()=>[e(A,{content:me(l.musicSheetExtend,l.sourceType)},null)]}),e(R,{label:"\u53EF\u7528\u58F0\u90E8"},{default:()=>[e(A,{content:l.subjectNames},null)]})]})])}},{title:"\u4F34\u594F\u7C7B\u578B",key:"audioType",render:l=>e("div",null,[N(l.audioType,new Map(Object.entries(re)))])},{title:"\u66F2\u76EE\u5206\u7C7B",key:"musicSheetCategoryName"},{title:"\u4E0A\u4F20\u4EBA",minWidth:"150px",key:"composer",render(l){return e(Y,{labelPlacement:"left",column:1},{default:()=>[e(R,{label:"\u4E0A\u4F20\u4EBA"},{default:()=>[l.createByName]}),e(R,{label:"\u4E0A\u4F20\u65F6\u95F4"},{default:()=>[l.createTime]})]})}},{title:"\u72B6\u6001",key:"status",render(l){return e(Te,{type:l.status?"primary":"default"},{default:()=>[l.status?"\u542F\u7528":"\u505C\u7528"]})}},{title:"\u64CD\u4F5C",key:"operation",fixed:"right",render(l){return e(x,null,{default:()=>[e(g,{type:"primary",size:"small",text:!0,onClick:()=>{a.musicPreview=!0,a.musicScore=l}},{default:()=>[b("\u9884\u89C8")]}),L(e(g,{type:"primary",size:"small",text:!0,onClick:()=>z(l)},{default:()=>[l.status?"\u505C\u7528":"\u542F\u7528"]}),[[P("auth"),"musicSheetApplicationExtend/status1751235279221424130"]]),L(e(g,{type:"primary",size:"small",text:!0,onClick:()=>{a.showEditDialog=!0,a.updateRow=l}},{default:()=>[b("\u4FEE\u6539")]}),[[P("auth"),"musicSheetApplicationExtend/update1751235625503162370"]]),L(e(g,{type:"primary",size:"small",text:!0,disabled:!!l.status,onClick:()=>O(l)},{default:()=>[b("\u5220\u9664")]}),[[P("auth"),"musicSheetApplicationExtend/del1770708605081792513"]])]})}}];return()=>e("div",{class:"system-menu-container"},[e(ce,{ref:v,model:a.searchForm,onSubmit:i,saveKey:"music-sheet-gyt",onSetModel:l=>a.searchForm=l},{default:()=>[e(p,{label:"\u5173\u952E\u8BCD",path:"keyword"},{default:()=>[e(J,{placeholder:"\u8BF7\u8F93\u5165\u66F2\u76EE\u540D\u79F0/\u7F16\u53F7",value:a.searchForm.keyword,"onUpdate:value":l=>a.searchForm.keyword=l,clearable:!0},null)]}),e(p,{label:"\u66F2\u76EE\u6765\u6E90",path:"sourceType"},{default:()=>[e(f,{placeholder:"\u8BF7\u9009\u62E9\u66F2\u76EE\u6765\u6E90",value:a.searchForm.sourceType,"onUpdate:value":l=>a.searchForm.sourceType=l,options:E(H),onUpdateValue:l=>y(this,null,function*(){a.userIdData=[],a.searchForm.userId=null,l&&l!=="PLATFORM"?(yield S(l),a.userIdDisable=!a.searchForm.extendApplicationId):a.userIdDisable=!0}),clearable:!0},null)]}),e(p,{label:"\u6240\u5C5E\u9879\u76EE",path:"applicationId"},{default:()=>[e(f,{placeholder:"\u8BF7\u9009\u62E9\u6240\u5C5E\u9879\u76EE",value:a.searchForm.extendApplicationId,"onUpdate:value":l=>a.searchForm.extendApplicationId=l,options:a.useProjectData,clearable:!0,onUpdateValue:l=>y(this,null,function*(){a.searchForm.extendApplicationId=l,l?(yield S(a.searchForm.sourceType),a.userIdDisable=!(a.searchForm.sourceType&&a.searchForm.sourceType!=="PLATFORM")):(a.searchForm.userId=null,a.userIdDisable=!0,a.userIdData=[])})},null)]}),e(p,{label:"\u6240\u5C5E\u4EBA",path:"userId"},{default:()=>[e(f,{filterable:!0,placeholder:"\u8BF7\u9009\u62E9\u6240\u5C5E\u4EBA",disabled:a.userIdDisable,value:a.searchForm.userId,"onUpdate:value":l=>a.searchForm.userId=l,options:a.userIdData,clearable:!0},null)]}),e(p,{label:"\u591A\u58F0\u8F68\u6E32\u67D3",path:"subjectType"},{default:()=>[e(f,{placeholder:"\u8BF7\u9009\u591A\u58F0\u8F68\u6E32\u67D3",value:a.searchForm.musicSheetType,"onUpdate:value":l=>a.searchForm.musicSheetType=l,options:E(q),clearable:!0},null)]}),e(p,{label:"\u4F34\u594F\u7C7B\u578B",path:"audioType"},{default:()=>[e(f,{placeholder:"\u8BF7\u9009\u62E9\u4F34\u594F\u7C7B\u578B",value:a.searchForm.audioType,"onUpdate:value":l=>a.searchForm.audioType=l,options:E(re),clearable:!0},null)]}),e(p,{label:"\u53EF\u7528\u58F0\u90E8",path:"subjectId"},{default:()=>[e(f,{placeholder:"\u8BF7\u9009\u62E9\u53EF\u7528\u58F0\u90E8",value:a.searchForm.subjectId,"onUpdate:value":l=>a.searchForm.subjectId=l,options:a.subjectList,clearable:!0},null)]}),e(p,{label:"\u66F2\u76EE\u5206\u7C7B",path:"musicCategoryId"},{default:()=>[e(Z,{valueField:"id",labelField:"name","children-field":"children",placeholder:"\u8BF7\u9009\u62E9\u66F2\u76EE\u5206\u7C7B",value:a.searchForm.musicCategoryId,"onUpdate:value":l=>a.searchForm.musicCategoryId=l,options:a.musicSheetCategories,clearable:!0},null)]}),e(p,{label:"\u72B6\u6001",path:"status"},{default:()=>[e(f,{value:a.searchForm.status,"onUpdate:value":l=>a.searchForm.status=l,placeholder:"\u8BF7\u9009\u62E9\u72B6\u6001",options:[{label:"\u542F\u7528",value:!0},{label:"\u505C\u7528",value:!1}],clearable:!0},null)]}),e(p,{label:"\u4E0A\u4F20\u65F6\u95F4",path:"authorFrom"},{default:()=>[e(Fe,{value:a.searchForm.times,"onUpdate:value":l=>a.searchForm.times=l,type:"daterange",clearable:!0,"value-format":"yyyy.MM.dd",startPlaceholder:"\u5F00\u59CB\u65F6\u95F4",endPlaceholder:"\u7ED3\u675F\u65F6\u95F4"},null)]}),e(p,null,{default:()=>[e(x,null,{default:()=>[e(g,{type:"primary",onClick:h},{default:()=>[b("\u641C\u7D22")]}),e(g,{type:"default",onClick:t},{default:()=>[b("\u91CD\u7F6E")]})]})]})]}),e("div",{class:["section-container"]},[e(x,{style:{paddingBottom:"12px"}},{default:()=>[L(e(g,{type:"primary",onClick:()=>{a.showAddDialog=!0}},{default:()=>[b("\u6DFB\u52A0\u66F2\u76EE")]}),[[P("auth"),"musicSheetApplicationExtend/saveBatch1751234383880126466"]]),L(e(g,{disabled:d.value.length==0,onClick:()=>{K(!1)}},{default:()=>[b("\u6279\u91CF\u505C\u7528")]}),[[P("auth"),"musicSheetApplicationExtend/status1751235279221424130"]]),L(e(g,{disabled:d.value.length==0,onClick:()=>{K(!0)}},{default:()=>[b("\u6279\u91CF\u542F\u7528")]}),[[P("auth"),"musicSheetApplicationExtend/status1751235279221424130"]])]}),e(Q,{loading:a.loading,columns:G(),data:a.dataList,rowKey:l=>l.applicationExtendId,onUpdateCheckedRowKeys:I,scrollX:"1200"},null),e(pe,{page:a.pagination.page,"onUpdate:page":l=>a.pagination.page=l,pageSize:a.pagination.rows,"onUpdate:pageSize":l=>a.pagination.rows=l,pageTotal:a.pagination.pageTotal,"onUpdate:pageTotal":l=>a.pagination.pageTotal=l,onList:M,sync:!0,saveKey:"music-sheet-gyt"},null)]),e(W,{show:a.showAddDialog,"onUpdate:show":l=>a.showAddDialog=l,preset:"dialog",showIcon:!1,title:"\u6DFB\u52A0\u66F2\u76EE",style:{width:"1300px"}},{default:()=>[e(st,{onClose:()=>a.showAddDialog=!1,onGetList:()=>{a.pagination.page=1,M()},subjectList:a.subjectList,appId:a.appId,musicSheetCategories:a.musicSheetCategories},null)]}),e(W,{show:a.showEditDialog,"onUpdate:show":l=>a.showEditDialog=l,preset:"dialog",showIcon:!1,title:"\u4FEE\u6539\u66F2\u76EE",style:{width:"500px"}},{default:()=>[e(rt,{onClose:()=>a.showEditDialog=!1,onGetList:()=>{a.pagination.page=1,M()},rowData:a.updateRow,appId:a.appId,musicSheetCategories:a.musicSheetCategories},null)]}),e(W,{blockScroll:!0,show:a.musicPreview,"onUpdate:show":l=>a.musicPreview=l,preset:"dialog",showIcon:!1,title:"\u66F2\u76EE\u9884\u89C8",style:{width:"auto"}},{default:()=>[e(Re,{item:a.musicScore},null)]})])}}),ut=$({name:"klx-addMusic",props:{appId:{type:String,required:!0},subjectList:{type:Array,default:()=>[]},musicSheetTagList:{type:Array,default:()=>[]}},emits:["close","getList"],setup(m,{slots:k,attrs:w,emit:a}){const v=ie(),h=ee(),t=V({loading:!1,pagination:{page:1,rows:5,pageTotal:0},stepPagination:{page:1,rows:5,pageTotal:0},searchForm:{keyword:null,musicSheetType:null,subjectId:null,sourceType:null,composer:null,userId:null,applicationId:null},subjectList:[],showAdd:!1,currentStep:1,dataList:[],selectRowData:[],musicSheetCategories:[],musicSheetTagList:[],useProjectData:[],userIdDisable:!0,userIdData:[],globalMusicTagIds:[],globalPaymentType:null,globalMusicPrice:null,globalAvailableType:null,globalTopFlag:null,globalExquisiteFlag:null,globalStartSortNum:null});X(()=>y(this,null,function*(){t.searchForm.keyword=null,t.searchForm.musicSheetType=null,t.searchForm.subjectId=null,t.searchForm.sourceType=null,t.searchForm.composer=null,t.searchForm.userId=null,t.searchForm.applicationId=null,t.loading=!0,t.subjectList=m.subjectList;try{const{data:s}=yield Ve({applicationId:m.appId});s&&s.length>0&&s.forEach(r=>{t.musicSheetTagList.push(D(T({},r),{label:r.name,value:r.id}))})}catch(s){}yield i(),yield F()}));const i=()=>y(this,null,function*(){try{const s=Object.keys(ae),{data:r}=yield he({page:1,rows:999}),u=r.rows||[];t.useProjectData=[],u.filter(C=>s.includes(C.appKey)).forEach(C=>{t.useProjectData.push(D(T({},C),{label:C.appName,value:C.id}))})}catch(s){}}),F=()=>y(this,null,function*(){try{t.loading=!0;const s=D(T({},t.searchForm),{userId:t.searchForm.sourceType&&t.searchForm.sourceType=="PERSON"?t.searchForm.userId:null,organizationRoleId:t.searchForm.sourceType&&t.searchForm.sourceType=="ORG"?t.searchForm.userId:null}),{data:r}=yield Se(D(T(T({},t.pagination),s),{addAppId:m.appId}));t.pagination.pageTotal=Number(r.total),t.dataList=r.rows||[]}catch(s){}t.loading=!1}),S=U(),d=()=>{var s;(s=S.value)==null||s.submit()},I=()=>{var s;(s=S.value)==null||s.reset()},M=()=>{t.pagination.page=1,F()},z=s=>y(this,null,function*(){if(!!t.searchForm.applicationId&&(t.userIdData=[],t.searchForm.userId=null,s&&s!=="PLATFORM")){const{data:r}=yield de({page:1,rows:9999,sourceType:s,applicationId:t.searchForm.applicationId});(r.rows||[]).forEach(n=>{t.userIdData.push(D(T({},n),{label:s==="PERSON"?n.userName:n.organizationRole,value:s==="PERSON"?n.userId:n.organizationRoleId}))})}}),K=()=>y(this,null,function*(){if(t.selectRowData.length==0){h.error("\u672A\u9009\u62E9\u66F2\u76EE");return}const s=[];for(let u=0;u<t.selectRowData.length;u++){const n=t.selectRowData[u];if(!n.musicTagIds||n.musicTagIds.length==0){h.error("\u66F2\u76EE\u6807\u7B7E\u4E0D\u80FD\u4E3A\u7A7A");return}if(!n.paymentType){h.error("\u6536\u8D39\u65B9\u5F0F\u4E0D\u80FD\u4E3A\u7A7A");return}if(!n.paymentType.includes("CHARGE"))n.musicPrice=0;else if(n.musicPrice===null||n.musicPrice===void 0||n.musicPrice===""){h.error("\u66F2\u76EE\u4EF7\u683C\u4E0D\u80FD\u4E3A\u7A7A");return}if(!n.availableType){h.error("\u53EF\u7528\u9014\u5F84\u4E0D\u80FD\u4E3A\u7A7A");return}if(typeof n.topFlag!="boolean"){h.error("\u662F\u5426\u7F6E\u9876\u4E0D\u80FD\u4E3A\u7A7A");return}if(typeof n.exquisiteFlag!="boolean"){h.error("\u662F\u5426\u7CBE\u54C1\u4E0D\u80FD\u4E3A\u7A7A");return}if(n.sortNo===null||n.sortNo===void 0||n.sortNo===""){h.error("\u6392\u5E8F\u53F7\u4E0D\u80FD\u4E3A\u7A7A");return}s.push(D(T({},n),{musicSheetId:n.id,applicationId:m.appId,paymentType:n.paymentType.join(","),musicTagIds:n.musicTagIds.join(","),id:null}))}const r=yield xe(s);r&&r.code=="200"&&(h.success("\u6DFB\u52A0\u6210\u529F"),a("getList"),a("close"))}),O=[{type:"selection"},{title:"\u66F2\u76EE\u7F16\u53F7",key:"id"},{title:"\u5C01\u9762\u56FE",key:"titleImg",render(s){return e(ne,{width:40,height:40,src:s.musicCover},null)}},{title:"\u53EF\u7528\u58F0\u90E8",key:"subjectNames",render:s=>e(A,{content:s.subjectNames},null)},{title:"\u66F2\u76EE\u540D\u79F0",key:"name"},{title:"\u97F3\u4E50\u4EBA",key:"composer"},{title:"\u591A\u58F0\u8F68\u6E32\u67D3",key:"musicSheetType",render:s=>e("div",null,[N(s.musicSheetType,new Map(Object.entries(q)))])},{title:"\u66F2\u76EE\u6765\u6E90",key:"sourceType",render(s){return N(s.sourceType,new Map(Object.entries(H)))}},{title:"\u6240\u5C5E\u4EBA",key:"userName",render:s=>e(A,{content:me(s.musicSheetExtend,s.sourceType)},null)}],G=()=>O,l=()=>{const s=fe(O);return s.splice(0,1),s.push({title(r){return e(x,null,{default:()=>[b("\u66F2\u76EE\u6807\u7B7E"),e(g,{type:"primary",size:"small",text:!0,onClick:()=>{v.create({title:"\u8BF7\u9009\u62E9\u66F2\u76EE\u6807\u7B7E",showIcon:!1,content:()=>j("div",{class:"flex flex-col justify-center items-center text-14px"},[j(f,{onUpdateValue(u){t.globalMusicTagIds=u},multiple:!0,clearable:!0,filterable:!0,options:t.musicSheetTagList})]),positiveText:"\u786E\u5B9A",negativeText:"\u53D6\u6D88",onPositiveClick:()=>{for(let u=0;u<t.selectRowData.length;u++){const n=t.selectRowData[u];n.musicTagIds=t.globalMusicTagIds}}})}},{default:()=>[e(B,{size:15,style:"padding-left: 5px;margin-top:4px"},{default:()=>[e("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32"},[e("path",{d:"M2 26h28v2H2z",fill:"currentColor"},null),e("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)])]})]})]})},key:"musicTagIds",width:"180px",render:r=>e(f,{placeholder:"\u8BF7\u9009\u62E9\u66F2\u76EE\u6807\u7B7E",value:r.musicTagIds,options:t.musicSheetTagList,clearable:!0,filterable:!0,multiple:!0,maxTagCount:1,onUpdateValue:u=>{r.musicTagIds=u}},null)}),s.push({title(r){return e(x,null,{default:()=>[b("\u6536\u8D39\u65B9\u5F0F"),e(g,{type:"primary",size:"small",text:!0,onClick:()=>{v.create({title:"\u8BF7\u9009\u62E9\u6536\u8D39\u65B9\u5F0F",showIcon:!1,content:()=>j("div",{class:"flex flex-col justify-center items-center text-14px"},[j(f,{value:t.globalPaymentType,onUpdateValue(u){t.globalPaymentType=u;const n="FREE";if(t.globalPaymentType[t.globalPaymentType.length-1]==n){t.globalPaymentType=[n];return}t.globalPaymentType.length>1&&t.globalPaymentType.includes(n)&&t.globalPaymentType.splice(t.globalPaymentType.indexOf(n),1)},multiple:!0,clearable:!0,options:E(oe)})]),positiveText:"\u786E\u5B9A",negativeText:"\u53D6\u6D88",onPositiveClick:()=>{for(let u=0;u<t.selectRowData.length;u++){const n=t.selectRowData[u];n.paymentType=t.globalPaymentType,t.globalPaymentType.includes("CHARGE")||(n.musicPrice=0,n.musicPriceDisable=!0)}}})}},{default:()=>[e(B,{size:15,style:"padding-left: 5px;margin-top:4px"},{default:()=>[e("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32"},[e("path",{d:"M2 26h28v2H2z",fill:"currentColor"},null),e("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)])]})]})]})},key:"paymentType",width:"180px",render:r=>e(f,{placeholder:"\u8BF7\u9009\u62E9\u6536\u8D39\u65B9\u5F0F",value:r.paymentType,options:E(oe),clearable:!0,multiple:!0,maxTagCount:1,"onUpdate:value":u=>{r.paymentType=u;const n="FREE";r.paymentType[r.paymentType.length-1]==n?r.paymentType=[n]:r.paymentType.length>1&&r.paymentType.includes(n)&&r.paymentType.splice(r.paymentType.indexOf(n),1),r.paymentType.includes("CHARGE")||(r.musicPrice=0)}},null)}),s.push({title(r){return e(x,null,{default:()=>[b("\u66F2\u76EE\u4EF7\u683C"),e(g,{type:"primary",size:"small",text:!0,onClick:()=>{v.create({title:"\u8BF7\u8F93\u5165\u66F2\u76EE\u4EF7\u683C",showIcon:!1,content:()=>j("div",{class:"flex flex-col justify-center items-center text-14px"},[j(_,{onUpdateValue(u){t.globalMusicPrice=u},min:0,max:9999})]),positiveText:"\u786E\u5B9A",negativeText:"\u53D6\u6D88",onPositiveClick:()=>{if(t.globalMusicPrice)for(let u=0;u<t.selectRowData.length;u++){const n=t.selectRowData[u];n.paymentType.includes("CHARGE")&&(n.musicPrice=t.globalMusicPrice)}}})}},{default:()=>[e(B,{size:15,style:"padding-left: 5px;margin-top:4px"},{default:()=>[e("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32"},[e("path",{d:"M2 26h28v2H2z",fill:"currentColor"},null),e("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)])]})]})]})},key:"musicPrice",render:r=>{var u;return j(_,{value:r.musicPrice,min:0,max:9999,disabled:!((u=r.paymentType)!=null&&u.includes("CHARGE")),onUpdateValue(n){r.musicPrice=n}})}}),s.push({title(r){return e(x,null,{default:()=>[b("\u53EF\u7528\u9014\u5F84"),e(g,{type:"primary",size:"small",text:!0,onClick:()=>{v.create({title:"\u8BF7\u9009\u62E9\u53EF\u7528\u9014\u5F84",showIcon:!1,content:()=>j("div",{class:"flex flex-col justify-center items-center text-14px"},[j(f,{onUpdateValue(u){t.globalAvailableType=u},clearable:!0,options:E(ve)})]),positiveText:"\u786E\u5B9A",negativeText:"\u53D6\u6D88",onPositiveClick:()=>{for(let u=0;u<t.selectRowData.length;u++){const n=t.selectRowData[u];n.availableType=t.globalAvailableType}}})}},{default:()=>[e(B,{size:15,style:"padding-left: 5px;margin-top:4px"},{default:()=>[e("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32"},[e("path",{d:"M2 26h28v2H2z",fill:"currentColor"},null),e("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)])]})]})]})},key:"availableType",render:r=>e(f,{placeholder:"\u8BF7\u9009\u62E9\u53EF\u7528\u9014\u5F84",value:r.availableType,options:E(ve),onUpdateValue:u=>{r.availableType=u},clearable:!0},null)}),s.push({title(r){return e(x,null,{default:()=>[b("\u662F\u5426\u7F6E\u9876"),e(g,{type:"primary",size:"small",text:!0,onClick:()=>{v.create({title:"\u8BF7\u9009\u62E9\u662F\u5426\u7F6E\u9876",showIcon:!1,content:()=>j("div",{class:"flex flex-col justify-center items-center text-14px"},[j(f,{onUpdateValue(u){t.globalTopFlag=u},options:[{label:"\u662F",value:!0},{label:"\u5426",value:!1}]})]),positiveText:"\u786E\u5B9A",negativeText:"\u53D6\u6D88",onPositiveClick:()=>{for(let u=0;u<t.selectRowData.length;u++){const n=t.selectRowData[u];n.topFlag=t.globalTopFlag}}})}},{default:()=>[e(B,{size:15,style:"padding-left: 5px;margin-top:4px"},{default:()=>[e("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32"},[e("path",{d:"M2 26h28v2H2z",fill:"currentColor"},null),e("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)])]})]})]})},key:"topFlag",render:r=>e(f,{placeholder:"\u8BF7\u9009\u62E9\u662F\u5426\u7F6E\u9876",value:r.topFlag,options:[{label:"\u662F",value:!0},{label:"\u5426",value:!1}],clearable:!0,onUpdateValue:u=>{r.topFlag=u}},null)}),s.push({title(r){return e(x,null,{default:()=>[b("\u662F\u5426\u7CBE\u54C1"),e(g,{type:"primary",size:"small",text:!0,onClick:()=>{v.create({title:"\u8BF7\u9009\u62E9\u662F\u5426\u7CBE\u54C1",showIcon:!1,content:()=>j("div",{class:"flex flex-col justify-center items-center text-14px"},[j(f,{onUpdateValue(u){t.globalExquisiteFlag=u},options:[{label:"\u662F",value:!0},{label:"\u5426",value:!1}]})]),positiveText:"\u786E\u5B9A",negativeText:"\u53D6\u6D88",onPositiveClick:()=>{for(let u=0;u<t.selectRowData.length;u++){const n=t.selectRowData[u];n.exquisiteFlag=t.globalExquisiteFlag}}})}},{default:()=>[e(B,{size:15,style:"padding-left: 5px;margin-top:4px"},{default:()=>[e("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32"},[e("path",{d:"M2 26h28v2H2z",fill:"currentColor"},null),e("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)])]})]})]})},key:"exquisiteFlag",render:r=>e(f,{placeholder:"\u8BF7\u9009\u62E9\u662F\u5426\u7CBE\u54C1",value:r.exquisiteFlag,onUpdateValue:u=>{r.exquisiteFlag=u},options:[{label:"\u662F",value:!0},{label:"\u5426",value:!1}],clearable:!0},null)}),s.push({title(r){return e(x,null,{default:()=>[b("\u6392\u5E8F"),e(g,{type:"primary",size:"small",text:!0,onClick:()=>{v.create({title:"\u8BF7\u8F93\u5165\u6392\u5E8F\u8D77\u59CB\u503C",showIcon:!1,content:()=>j("div",{class:"flex flex-col justify-center items-center text-14px"},[j(_,{onUpdateValue(u){t.globalStartSortNum=u},min:0,max:9999})]),positiveText:"\u786E\u5B9A",negativeText:"\u53D6\u6D88",onPositiveClick:()=>{for(let u=0;u<t.selectRowData.length;u++){const n=t.selectRowData[u];n.sortNo=t.globalStartSortNum+u}}})}},{default:()=>[e(B,{size:15,style:"padding-left: 5px;margin-top:4px"},{default:()=>[e("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32"},[e("path",{d:"M2 26h28v2H2z",fill:"currentColor"},null),e("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)])]})]})]})},key:"sortNo",fixed:"right",width:150,render:r=>j(_,{value:r.sortNo,min:0,max:9999,onUpdateValue(u){r.sortNo=u}})}),s.push({title:"\u64CD\u4F5C",key:"operation",fixed:"right",render(r){return e(x,null,{default:()=>[e(g,{type:"primary",size:"small",text:!0,onClick:()=>{v.warning({title:"\u63D0\u793A",content:"\u662F\u5426\u5220\u9664\u8BE5\u6570\u636E\uFF1F",positiveText:"\u786E\u5B9A",negativeText:"\u53D6\u6D88",onPositiveClick:()=>y(this,null,function*(){try{const u=t.selectRowData.findIndex(C=>{if(C.id==r.id)return!0});u>-1&&t.selectRowData.splice(u,1),o.value.findIndex(C=>{if(C==r.id)return!0})>-1&&o.value.splice(u,1)}catch(u){}})})}},{default:()=>[b("\u79FB\u9664")]})]})}}),s},o=U([]),c=s=>{o.value=s,t.dataList.forEach(r=>{o.value.includes(r.id)&&(t.selectRowData.find(n=>n.id===r.id)||t.selectRowData.push(D(T({},r),{paymentType:[],musicPriceDisable:!1})))}),t.selectRowData=t.selectRowData.filter(r=>o.value.includes(r.id))};return()=>e("div",{class:"system-menu-container"},[e(x,{vertical:!0,size:"medium"},{default:()=>[e(Ie,{current:t.currentStep,style:"margin-bottom: 10px;margin-top: 10px"},{default:()=>[e(le,{title:"\u9009\u62E9\u66F2\u76EE",description:""},null),e(le,{title:"\u8BBE\u7F6E\u66F2\u76EE\u4FE1\u606F",description:""},null)]})]}),t.currentStep===1&&e("div",{class:"system-menu-container"},[e(ce,{ref:S,model:t.searchForm,onSubmit:M,saveKey:"klx-addMusic",onSetModel:s=>t.searchForm=s},{default:()=>[e(p,{label:"\u5173\u952E\u8BCD",path:"keyword"},{default:()=>[e(J,{value:t.searchForm.keyword,"onUpdate:value":s=>t.searchForm.keyword=s,placeholder:"\u8BF7\u8F93\u5165\u66F2\u76EE\u540D\u79F0/\u7F16\u53F7",clearable:!0},null)]}),e(p,{label:"\u591A\u58F0\u8F68\u6E32\u67D3",path:"musicSheetType"},{default:()=>[e(f,{placeholder:"\u8BF7\u9009\u62E9\u591A\u58F0\u8F68\u6E32\u67D3",value:t.searchForm.musicSheetType,"onUpdate:value":s=>t.searchForm.musicSheetType=s,options:E(q),clearable:!0},null)]}),e(p,{label:"\u53EF\u7528\u58F0\u90E8",path:"musicSubject"},{default:()=>[e(f,{placeholder:"\u8BF7\u9009\u62E9\u53EF\u7528\u58F0\u90E8",value:t.searchForm.subjectId,"onUpdate:value":s=>t.searchForm.subjectId=s,options:t.subjectList,clearable:!0},null)]}),e(p,{label:"\u97F3\u4E50\u4EBA",path:"composer"},{default:()=>[e(J,{placeholder:"\u8BF7\u9009\u62E9\u97F3\u4E50\u4EBA",value:t.searchForm.composer,"onUpdate:value":s=>t.searchForm.composer=s,clearable:!0},null)]}),e(p,{label:"\u66F2\u76EE\u6765\u6E90",path:"sourceType"},{default:()=>[e(f,{placeholder:"\u8BF7\u9009\u62E9\u66F2\u76EE\u6765\u6E90",value:t.searchForm.sourceType,"onUpdate:value":s=>t.searchForm.sourceType=s,options:E(H),onUpdateValue:s=>y(this,null,function*(){t.userIdData=[],t.searchForm.userId=null,s&&s!=="PLATFORM"?(yield z(s),t.userIdDisable=!1):t.userIdDisable=!0}),clearable:!0},null)]}),e(p,{label:"\u6240\u5C5E\u9879\u76EE",path:"applicationId"},{default:()=>[e(f,{placeholder:"\u8BF7\u9009\u62E9\u6240\u5C5E\u9879\u76EE",value:t.searchForm.applicationId,"onUpdate:value":s=>t.searchForm.applicationId=s,options:t.useProjectData,clearable:!0,onUpdateValue:s=>y(this,null,function*(){t.searchForm.applicationId=s,s?(yield z(t.searchForm.sourceType),t.userIdDisable=!(t.searchForm.sourceType&&t.searchForm.sourceType!=="PLATFORM")):(t.searchForm.userId=null,t.userIdDisable=!0,t.userIdData=[])})},null)]}),e(p,{label:"\u6240\u5C5E\u4EBA",path:"author"},{default:()=>[e(f,{filterable:!0,placeholder:"\u8BF7\u9009\u62E9\u6240\u5C5E\u4EBA",disabled:t.userIdDisable||!t.searchForm.applicationId&&!t.searchForm.sourceType,value:t.searchForm.userId,"onUpdate:value":s=>t.searchForm.userId=s,options:t.userIdData,clearable:!0},null)]}),e(p,null,{default:()=>[e(x,null,{default:()=>[e(g,{type:"primary",onClick:d},{default:()=>[b("\u641C\u7D22")]}),e(g,{type:"default",onClick:I},{default:()=>[b("\u91CD\u7F6E")]})]})]})]}),e("p",{style:{paddingBottom:"12px"}},[b("\u4F60\u9009\u62E9\u4E86"),e("span",{style:"color:red;padding:0 8px"},[t.selectRowData.length]),b("\u6761\u66F2\u76EE")]),e(Q,{loading:t.loading,columns:G(),data:t.dataList,rowKey:s=>s.id,onUpdateCheckedRowKeys:c},null),e(pe,{page:t.pagination.page,"onUpdate:page":s=>t.pagination.page=s,pageSize:t.pagination.rows,"onUpdate:pageSize":s=>t.pagination.rows=s,pageTotal:t.pagination.pageTotal,"onUpdate:pageTotal":s=>t.pagination.pageTotal=s,onList:F,sync:!0,saveKey:"klx-addMusic"},null)]),t.currentStep===2&&e("div",{class:"system-menu-container",style:"margin-top: 15px;"},[e(Q,{loading:t.loading,columns:l(),data:t.selectRowData,rowKey:s=>s.id,maxHeight:500,scrollX:2e3},null)]),e(x,{justify:"end",style:"margin-top:10px"},{default:()=>[e(g,{type:"default",onClick:()=>{t.currentStep>1?t.currentStep=t.currentStep-1:a("close")}},{default:()=>[t.currentStep===1?"\u53D6\u6D88":"\u4E0A\u4E00\u6B65"]}),e(g,{type:"primary",onClick:()=>{if(t.currentStep<2){if(t.selectRowData.length==0){h.warning("\u8BF7\u9009\u62E9\u66F2\u76EE");return}t.currentStep=t.currentStep+1}else K()}},{default:()=>[t.currentStep===2?"\u786E\u5B9A":"\u4E0B\u4E00\u6B65"]})]})])}}),it=$({name:"project-music-cooleshow-edu-updateMusic",props:{appId:{type:String,required:!0},rowData:{type:Object,required:!0},musicSheetTagList:{type:Array,default:()=>[]}},emits:["close","getList"],setup(m,{slots:k,attrs:w,emit:a}){const v=ee(),h=U(!1),t=V({musicTagIds:[],sortNo:null,paymentType:[],musicPrice:null,availableType:null,topFlag:null,exquisiteFlag:null}),i=U(),F=V({rowData:null,musicSheetTagList:[]});X(()=>y(this,null,function*(){var I,M;F.rowData=m.rowData,F.musicSheetTagList=m.musicSheetTagList;const{data:d}=yield Ce({musicSheetId:F.rowData.id,applicationId:m.appId});if(!d){v.error("\u52A0\u8F7D\u5E94\u7528\u5931\u8D25");return}t.musicTagIds=(I=d[0].musicTagIds)==null?void 0:I.split(","),t.sortNo=d[0].sortNo,t.paymentType=(M=d[0].paymentType)==null?void 0:M.split(","),t.musicPrice=d[0].musicPrice,t.availableType=d[0].availableType,t.topFlag=d[0].topFlag,t.exquisiteFlag=d[0].exquisiteFlag}));const S=()=>y(this,null,function*(){i.value.validate(d=>y(this,null,function*(){if(d)return!1;h.value=!0;try{const I=yield De(D(T({},t),{musicSheetId:F.rowData.id,musicTagIds:t.musicTagIds.join(","),paymentType:t.paymentType.join(","),applicationId:m.appId}));I&&I.code===200&&(a("close"),a("getList"))}catch(I){}h.value=!1}))});return()=>e("div",{style:"background: #fff; padding-top: 12px"},[e(we,{ref:i,labelPlacement:"top",model:t,"label-placement":"left","label-width":"auto"},{default:()=>[e(p,{label:"\u66F2\u76EE\u6807\u7B7E",path:"musicTagIds",rule:[{required:!0,message:"\u8BF7\u9009\u62E9\u66F2\u76EE\u6807\u7B7E"}]},{default:()=>[e(f,{multiple:!0,placeholder:"\u8BF7\u9009\u62E9\u66F2\u76EE\u6807\u7B7E",options:F.musicSheetTagList,value:t.musicTagIds,"onUpdate:value":d=>t.musicTagIds=d,clearable:!0},null)]}),e(p,{label:"\u6536\u8D39\u65B9\u5F0F",path:"paymentType",rule:[{required:!0,message:"\u8BF7\u9009\u62E9\u6536\u8D39\u65B9\u5F0F"}]},{default:()=>[e(f,{placeholder:"\u8BF7\u9009\u62E9\u6536\u8D39\u65B9\u5F0F",options:E(oe),value:t.paymentType,"onUpdate:value":[d=>t.paymentType=d,()=>{const d="FREE";t.paymentType[t.paymentType.length-1]==d?t.paymentType=[d]:t.paymentType.length>1&&t.paymentType.includes(d)&&t.paymentType.splice(t.paymentType.indexOf(d),1),t.paymentType.includes("CHARGE")||(t.musicPrice=0)}],multiple:!0,clearable:!0},null)]}),t.paymentType.includes("CHARGE")&&e(p,{label:"\u66F2\u76EE\u4EF7\u683C",path:"musicPrice",rule:[{required:!0,message:"\u8BF7\u8F93\u5165\u66F2\u76EE\u4EF7\u683C"}]},{default:()=>[e(_,{style:"width:100%",placeholder:"\u8BF7\u8F93\u5165\u66F2\u76EE\u4EF7\u683C",value:t.musicPrice,"onUpdate:value":d=>t.musicPrice=d,clearable:!0},null)]}),e(p,{label:"\u53EF\u7528\u9014\u5F84",path:"availableType",rule:[{required:!0,message:"\u8BF7\u9009\u62E9\u53EF\u7528\u9014\u5F84"}]},{default:()=>[e(f,{placeholder:"\u8BF7\u9009\u62E9\u53EF\u7528\u9014\u5F84",options:E(ve),value:t.availableType,"onUpdate:value":d=>t.availableType=d,clearable:!0},null)]}),e(p,{label:"\u662F\u5426\u7F6E\u9876",path:"topFlag",rule:[{required:!0,message:"\u8BF7\u9009\u62E9\u662F\u5426\u7F6E\u9876"}]},{default:()=>[e(f,{placeholder:"\u8BF7\u9009\u62E9\u662F\u5426\u7F6E\u9876",options:[{label:"\u662F",value:!0},{label:"\u5426",value:!1}],value:t.topFlag,"onUpdate:value":d=>t.topFlag=d,clearable:!0},null)]}),e(p,{label:"\u662F\u5426\u7CBE\u54C1",path:"exquisiteFlag",rule:[{required:!0,message:"\u8BF7\u9009\u62E9\u662F\u5426\u7CBE\u54C1"}]},{default:()=>[e(f,{placeholder:"\u8BF7\u9009\u62E9\u662F\u5426\u7CBE\u54C1",options:[{label:"\u662F",value:!0},{label:"\u5426",value:!1}],value:t.exquisiteFlag,"onUpdate:value":d=>t.exquisiteFlag=d,clearable:!0},null)]}),e(p,{label:"\u6392\u5E8F\u503C",path:"sortNo",rule:[{required:!0,message:"\u8BF7\u8F93\u5165\u6392\u5E8F\u503C"}]},{default:()=>[e(_,{value:t.sortNo,"onUpdate:value":d=>t.sortNo=d,placeholder:"\u8BF7\u8F93\u5165\u6392\u5E8F\u503C",clearable:!0,min:0,max:9999,style:{width:"100%"}},null)]})]}),e(x,{justify:"end"},{default:()=>[e(g,{onClick:()=>a("close")},{default:()=>[b("\u53D6\u6D88")]}),e(g,{type:"primary",onClick:S,loading:h.value,disabled:h.value},{default:()=>[b("\u4FDD\u5B58")]})]})])}});function Ke(m){return typeof m=="function"||Object.prototype.toString.call(m)==="[object Object]"&&!be(m)}const nt=$({name:"music-sheet-KLX",props:{appKey:{type:String,default:"KLX"}},setup(m){const k=ie(),w=ee(),a=V({loading:!1,appId:null,pagination:{page:1,rows:10,pageTotal:0},searchForm:{keyword:null,musicSheetType:null,subjectId:null,subjectIds:null,status:null,sourceType:null,paymentType:null,userId:null,musicCategoryId:null,times:null,audioType:null,exquisiteFlag:null,topFlag:null,availableType:null,appAuditFlag:null,detailFlag:null,musicTagIds:[],applicationId:null,extendApplicationId:null},subjectList:[],dataList:[],showAddDialog:!1,showEditDialog:!1,userIdDisable:!0,userIdData:[],updateRow:{},musicTagList:[],applicationId:null,musicPreview:!1,musicScore:null,useProjectData:[]});X(()=>y(this,null,function*(){a.loading=!0;try{const{data:o}=yield ye({page:1,rows:1,appKey:m.appKey}),c=o.rows||[];if(!c||c.length==0){a.loading=!1,w.error("\u52A0\u8F7D\u9879\u76EE\u4FE1\u606F\u5931\u8D25");return}a.appId=c[0].id,a.applicationId=c[0].id}catch(o){}try{const{data:o}=yield Pe({applicationId:a.applicationId}),c=o||[];c.forEach(s=>{s.label=s.subjectName,s.value=s.subjectId}),a.subjectList=c}catch(o){}try{const{data:o}=yield Ve({applicationId:a.appId});o&&o.length>0&&o.forEach(c=>{a.musicTagList.push(D(T({},c),{label:c.name,value:c.id}))})}catch(o){}F(),I()}));const v=U(),h=()=>{var o;(o=v.value)==null||o.submit()},t=()=>{var o;(o=v.value)==null||o.reset()},i=()=>{a.pagination.page=1,I()},F=()=>y(this,null,function*(){try{const o=Object.keys(ae),{data:c}=yield ye({page:1,rows:999}),s=c.rows||[];a.useProjectData=[],s.filter(u=>o.includes(u.appKey)).forEach(u=>{a.useProjectData.push(D(T({},u),{label:u.appName,value:u.id}))})}catch(o){}}),S=U([]),d=o=>{S.value=o},I=()=>y(this,null,function*(){var o;try{a.loading=!0;const c=a.searchForm.sourceType;let s=a.searchForm.userId,r=null;c&&c==="ORG"&&(r=fe(s),s=null);const{data:u}=yield ke(D(T(D(T(T({},a.pagination),a.searchForm),{userId:c&&c==="PERSON"?a.searchForm.userId:null,organizationRoleId:c&&c==="ORG"?a.searchForm.userId:null,musicTagIds:(o=a.searchForm.musicTagIds)==null?void 0:o.join(",")}),Ee(a.searchForm.times,["startTime","endTime"])),{applicationId:a.applicationId}));a.pagination.pageTotal=Number(u.total),a.dataList=u.rows||[]}catch(c){}a.loading=!1}),M=o=>{const c=o.status?"\u505C\u7528":"\u542F\u7528";k.warning({title:"\u63D0\u793A",content:`\u662F\u5426${c}\uFF1F`,positiveText:"\u786E\u5B9A",negativeText:"\u53D6\u6D88",onPositiveClick:()=>y(this,null,function*(){try{yield ue({ids:o.applicationExtendId,status:!o.status}),I(),w.success(`${c}\u6210\u529F`)}catch(s){}})})},z=o=>{const c=S.value.length;c==0&&w.warning("\u672A\u9009\u62E9\u6570\u636E");const s=o?"\u542F\u7528":"\u505C\u7528";k.warning({title:"\u63D0\u793A",content:`\u662F\u5426${s}`+c+"\u6761\u6570\u636E\uFF1F",positiveText:"\u786E\u5B9A",negativeText:"\u53D6\u6D88",onPositiveClick:()=>y(this,null,function*(){try{yield ue({ids:S.value.join(","),status:o}),I(),w.success(`${s}\u6210\u529F`)}catch(r){}})})},K=o=>{const c=[];if(o&&o.length>0)for(let s=0;s<o.length;s++){const r=N(o[s],new Map(Object.entries(oe)));c.push(r)}return c.join(",")},O=o=>y(this,null,function*(){if(!!a.searchForm.extendApplicationId&&(a.userIdData=[],a.searchForm.userId=null,o&&o!=="PLATFORM")){const{data:c}=yield de({page:1,rows:9999,sourceType:o,applicationId:a.searchForm.extendApplicationId});(c.rows||[]).forEach(r=>{a.userIdData.push(D(T({},r),{label:o==="PERSON"?r.userName:r.organizationRole,value:o==="PERSON"?r.userId:r.organizationRoleId}))})}}),G=o=>{k.warning({title:"\u63D0\u793A",content:"\u5220\u9664\u66F2\u76EE\uFF0C\u662F\u5426\u7EE7\u7EED\uFF1F",positiveText:"\u786E\u5B9A",negativeText:"\u53D6\u6D88",onPositiveClick:()=>y(this,null,function*(){try{yield je(o.applicationExtendId),I(),w.success("\u5220\u9664\u6210\u529F")}catch(c){}})})},l=()=>[{type:"selection"},{title:"\u66F2\u76EE\u540D\u79F0",key:"id",render:o=>e(se,null,[e(Y,{labelPlacement:"left",column:1},{default:()=>[e(R,{label:"\u66F2\u76EE\u540D\u79F0"},{default:()=>[e(A,{content:o.name},null)," "]}),e(R,{label:"\u66F2\u76EE\u7F16\u53F7"},{default:()=>[e("div",{onDblclick:()=>{Le(w,o.id)}},[e(A,{content:o.id},null)])]})]})])},{title:"\u5C01\u9762\u56FE",key:"musicCover",render(o){return e(ne,{width:60,height:60,src:o.musicCover},null)}},{title:"\u66F2\u76EE\u4FE1\u606F",key:"musicSheetCategoriesName",render:o=>{let c,s;return e(se,null,[e(Y,{labelPlacement:"left",column:1},{default:()=>[e(R,{label:"\u66F2\u76EE\u6765\u6E90"},Ke(c=N(o.sourceType,new Map(Object.entries(H))))?c:{default:()=>[c]}),e(R,{label:"\u591A\u58F0\u8F68\u6E32\u67D3"},Ke(s=N(o.musicSheetType,new Map(Object.entries(q))))?s:{default:()=>[s]}),e(R,{label:"\u6240\u5C5E\u4EBA"},{default:()=>[e(A,{content:me(o.musicSheetExtend,o.sourceType)},null)]}),e(R,{label:"\u53EF\u7528\u58F0\u90E8"},{default:()=>[e(A,{content:o.subjectNames},null)]})]})])}},{title:"\u4F34\u594F\u7C7B\u578B",key:"audioType",render:o=>e("div",null,[N(o.audioType,new Map(Object.entries(re)))])},{title:"\u66F2\u76EE\u6807\u7B7E",key:"musicTagNames"},{title:"\u53EF\u7528\u9014\u5F84",key:"applicationAvailableType",render:o=>e("div",null,[N(o.applicationAvailableType,new Map(Object.entries(ve)))])},{title:"\u662F\u5426\u7F6E\u9876",key:"topFlag",render:o=>e("div",null,[o.topFlag?"\u662F":"\u5426"])},{title:"\u662F\u5426\u7CBE\u54C1",key:"exquisiteFlag",render:o=>e("div",null,[o.topFlag?"\u662F":"\u5426"])},{title:"\u6536\u8D39\u65B9\u5F0F",key:"paymentType",render:o=>{var c;return e("div",null,[K((c=o.paymentType)==null?void 0:c.split(","))])}},{title:"\u66F2\u76EE\u4EF7\u683C",key:"musicPrice"},{title:"\u4E0A\u4F20\u4EBA",minWidth:"150px",key:"composer",render(o){return e(Y,{labelPlacement:"left",column:1},{default:()=>[e(R,{label:"\u4E0A\u4F20\u4EBA"},{default:()=>[o.createByName]}),e(R,{label:"\u4E0A\u4F20\u65F6\u95F4"},{default:()=>[o.createTime]})]})}},{title:"\u72B6\u6001",key:"status",render(o){return e(Te,{type:o.status?"primary":"default"},{default:()=>[o.status?"\u542F\u7528":"\u505C\u7528"]})}},{title:"\u64CD\u4F5C",key:"operation",fixed:"right",render(o){return e(x,null,{default:()=>[e(g,{type:"primary",size:"small",text:!0,onClick:()=>{a.musicPreview=!0,a.musicScore=o}},{default:()=>[b("\u9884\u89C8")]}),L(e(g,{type:"primary",size:"small",text:!0,onClick:()=>M(o)},{default:()=>[o.status?"\u505C\u7528":"\u542F\u7528"]}),[[P("auth"),"musicSheetApplicationExtend/status1751229794627878914"]]),L(e(g,{type:"primary",size:"small",text:!0,onClick:()=>{a.showEditDialog=!0,a.updateRow=o}},{default:()=>[b("\u4FEE\u6539")]}),[[P("auth"),"musicSheetApplicationExtend/update1751235573456044033"]]),L(e(g,{type:"primary",size:"small",text:!0,disabled:!!o.status,onClick:()=>G(o)},{default:()=>[b("\u5220\u9664")]}),[[P("auth"),"musicSheetApplicationExtend/del1770708473623916546"]])]})}}];return()=>e("div",{class:"system-menu-container"},[e(ce,{ref:v,model:a.searchForm,onSubmit:i,saveKey:"music-sheet-klx",onSetModel:o=>a.searchForm=o},{default:()=>[e(p,{label:"\u5173\u952E\u8BCD",path:"keyword"},{default:()=>[e(J,{placeholder:"\u8BF7\u8F93\u5165\u66F2\u76EE\u540D\u79F0/\u7F16\u53F7",value:a.searchForm.keyword,"onUpdate:value":o=>a.searchForm.keyword=o,clearable:!0},null)]}),e(p,{label:"\u66F2\u76EE\u6765\u6E90",path:"sourceType"},{default:()=>[e(f,{placeholder:"\u8BF7\u9009\u62E9\u66F2\u76EE\u6765\u6E90",value:a.searchForm.sourceType,"onUpdate:value":o=>a.searchForm.sourceType=o,options:E(H),onUpdateValue:o=>y(this,null,function*(){a.userIdData=[],a.searchForm.userId=null,o&&o!=="PLATFORM"?(yield O(o),a.userIdDisable=!a.searchForm.extendApplicationId):a.userIdDisable=!0}),clearable:!0},null)]}),e(p,{label:"\u6240\u5C5E\u9879\u76EE",path:"applicationId"},{default:()=>[e(f,{placeholder:"\u8BF7\u9009\u62E9\u6240\u5C5E\u9879\u76EE",value:a.searchForm.extendApplicationId,"onUpdate:value":o=>a.searchForm.extendApplicationId=o,options:a.useProjectData,clearable:!0,onUpdateValue:o=>y(this,null,function*(){a.searchForm.extendApplicationId=o,o?(yield O(a.searchForm.sourceType),a.userIdDisable=!(a.searchForm.sourceType&&a.searchForm.sourceType!=="PLATFORM")):(a.searchForm.userId=null,a.userIdDisable=!0,a.userIdData=[])})},null)]}),e(p,{label:"\u6240\u5C5E\u4EBA",path:"userId"},{default:()=>[e(f,{filterable:!0,placeholder:"\u8BF7\u9009\u62E9\u6240\u5C5E\u4EBA",disabled:a.userIdDisable,value:a.searchForm.userId,"onUpdate:value":o=>a.searchForm.userId=o,options:a.userIdData,clearable:!0},null)]}),e(p,{label:"\u591A\u58F0\u8F68\u6E32\u67D3",path:"subjectType"},{default:()=>[e(f,{placeholder:"\u8BF7\u9009\u62E9\u591A\u58F0\u8F68\u6E32\u67D3",value:a.searchForm.musicSheetType,"onUpdate:value":o=>a.searchForm.musicSheetType=o,options:E(q),clearable:!0},null)]}),e(p,{label:"\u4F34\u594F\u7C7B\u578B",path:"audioType"},{default:()=>[e(f,{placeholder:"\u8BF7\u9009\u62E9\u4F34\u594F\u7C7B\u578B",value:a.searchForm.audioType,"onUpdate:value":o=>a.searchForm.audioType=o,options:E(re),clearable:!0},null)]}),e(p,{label:"\u53EF\u7528\u58F0\u90E8",path:"subjectId"},{default:()=>[e(f,{placeholder:"\u8BF7\u9009\u62E9\u53EF\u7528\u58F0\u90E8",value:a.searchForm.subjectId,"onUpdate:value":o=>a.searchForm.subjectId=o,options:a.subjectList,clearable:!0},null)]}),e(p,{label:"\u66F2\u76EE\u6807\u7B7E",path:"musicTagIds"},{default:()=>[e(f,{placeholder:"\u8BF7\u9009\u62E9\u66F2\u76EE\u6807\u7B7E",value:a.searchForm.musicTagIds,"onUpdate:value":o=>a.searchForm.musicTagIds=o,options:a.musicTagList,multiple:!0,maxTagCount:2,clearable:!0},null)]}),e(p,{label:"\u6536\u8D39\u65B9\u5F0F",path:"paymentType"},{default:()=>[e(f,{placeholder:"\u8BF7\u9009\u62E9\u6536\u8D39\u65B9\u5F0F",value:a.searchForm.paymentType,"onUpdate:value":o=>a.searchForm.paymentType=o,options:E(oe),clearable:!0},null)]}),e(p,{label:"\u72B6\u6001",path:"status"},{default:()=>[e(f,{value:a.searchForm.status,"onUpdate:value":o=>a.searchForm.status=o,placeholder:"\u8BF7\u9009\u62E9\u72B6\u6001",options:[{label:"\u542F\u7528",value:!0},{label:"\u505C\u7528",value:!1}],clearable:!0},null)]}),e(p,{label:"\u4E0A\u4F20\u65F6\u95F4",path:"authorFrom"},{default:()=>[e(Fe,{value:a.searchForm.times,"onUpdate:value":o=>a.searchForm.times=o,type:"daterange",clearable:!0,"value-format":"yyyy.MM.dd",startPlaceholder:"\u5F00\u59CB\u65F6\u95F4",endPlaceholder:"\u7ED3\u675F\u65F6\u95F4"},null)]}),e(p,null,{default:()=>[e(x,null,{default:()=>[e(g,{type:"primary",onClick:h},{default:()=>[b("\u641C\u7D22")]}),e(g,{type:"default",onClick:t},{default:()=>[b("\u91CD\u7F6E")]})]})]})]}),e("div",{class:["section-container"]},[e(x,{style:{paddingBottom:"12px"}},{default:()=>[L(e(g,{type:"primary",onClick:()=>{a.showAddDialog=!0}},{default:()=>[b("\u6DFB\u52A0\u66F2\u76EE")]}),[[P("auth"),"musicSheetApplicationExtend/saveBatch1751227277370195969"]]),L(e(g,{disabled:S.value.length==0,onClick:()=>{z(!1)}},{default:()=>[b("\u6279\u91CF\u505C\u7528")]}),[[P("auth"),"musicSheetApplicationExtend/status1751229794627878914"]]),L(e(g,{disabled:S.value.length==0,onClick:()=>{z(!0)}},{default:()=>[b("\u6279\u91CF\u542F\u7528")]}),[[P("auth"),"musicSheetApplicationExtend/status1751229794627878914"]])]}),e(Q,{loading:a.loading,columns:l(),data:a.dataList,rowKey:o=>o.applicationExtendId,onUpdateCheckedRowKeys:d,scrollX:"2000"},null),e(pe,{page:a.pagination.page,"onUpdate:page":o=>a.pagination.page=o,pageSize:a.pagination.rows,"onUpdate:pageSize":o=>a.pagination.rows=o,pageTotal:a.pagination.pageTotal,"onUpdate:pageTotal":o=>a.pagination.pageTotal=o,onList:I,sync:!0,saveKey:"music-sheet-klx"},null)]),e(W,{show:a.showAddDialog,"onUpdate:show":o=>a.showAddDialog=o,preset:"dialog",showIcon:!1,title:"\u6DFB\u52A0\u66F2\u76EE",style:{width:"1300px"}},{default:()=>[e(ut,{onClose:()=>a.showAddDialog=!1,onGetList:i,subjectList:a.subjectList,appId:a.appId,musicSheetTagList:a.musicTagList},null)]}),e(W,{show:a.showEditDialog,"onUpdate:show":o=>a.showEditDialog=o,preset:"dialog",showIcon:!1,title:"\u4FEE\u6539\u66F2\u76EE",style:{width:"500px"}},{default:()=>[e(it,{onClose:()=>a.showEditDialog=!1,onGetList:()=>{a.pagination.page=1,I()},rowData:a.updateRow,appId:a.appId,musicSheetTagList:a.musicTagList},null)]}),e(W,{blockScroll:!0,show:a.musicPreview,"onUpdate:show":o=>a.musicPreview=o,preset:"dialog",showIcon:!1,title:"\u66F2\u76EE\u9884\u89C8",style:{width:"auto"}},{default:()=>[e(Re,{item:a.musicScore},null)]})])}});function ct(m){return typeof m=="function"||Object.prototype.toString.call(m)==="[object Object]"&&!be(m)}const Dt=$({name:"project-music-sheet",setup(){const m=V({tabName:"KT",appKeyList:[],appNameList:[]}),k=U();Ye(v=>{v.form.tabName&&(m.tabName=v.form.tabName,Ne(()=>{var h;return(h=k.value)==null?void 0:h.syncBarPosition()}))});const w=$e(),a=v=>{Je(v,"tabName",w)};return X(()=>y(this,null,function*(){const v=Object.keys(ae),{data:h}=yield he({page:1,rows:99,parentId:0});(h.rows||[]).forEach(i=>{v.includes(i.appKey)&&(m.appKeyList.push(i.appKey),m.appNameList.push(i.appName))}),Ne(()=>{var i;return(i=k.value)==null?void 0:i.syncBarPosition()})})),()=>{let v;return e("div",{class:"system-menu-container"},[e("div",{class:["section-container"],style:"padding-top: 0"},[e(Xe,{ref:k,type:"line",size:"large",value:m.tabName,"onUpdate:value":[h=>m.tabName=h,h=>a(h)]},ct(v=m.appKeyList.map((h,t)=>e(We,{name:h,tab:m.appNameList[t]},{default:()=>[h==="KT"&&L(e(et,{appKey:h},null),[[P("auth"),"musicSheet/pageByApplication1751225386909302786"]]),h==="GYM"&&L(e(lt,{appKey:h},null),[[P("auth"),"musicSheet/pageByApplication1751225314930851842"]]),h==="KLX"&&L(e(nt,{appKey:h},null),[[P("auth"),"musicSheet/pageByApplication1751225218734489601"]]),h==="GYT"&&L(e(ot,{appKey:h},null),[[P("auth"),"musicSheet/pageByApplication1751225483038556162"]])]})))?v:{default:()=>[v]})])])}}});export{Dt as default};