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