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