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