index.02b1c61a.js 80 KB

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