platform-modal.118c44.js 2.7 KB

1
  1. import{aT as q,ac as I,_ as N,d as P,aU as w,bs as b,w as f,X as M,z as O,r as n,aC as j,o as y,G as S,C as s,H,c as L,j as l,h as X,l as E,M as Y,aq as G,aN as $}from"./index.js";const{VITE_PROXY_DOMAIN_REAL:le,VITE_PROXY_USER_REAL:J}=I(),K=J+"/admin/",Q=d=>q.request("post",`${K}channellist`,{data:d}),W={class:"flex flex-col"},Z={class:"flex justify-between mt-[10px]"},ee=P({__name:"platform-modal",props:{visible:{type:Boolean,required:!0},pay_list:{type:Array,required:!0}},setup(d){const u=d,g={channel_name:"",page:1,size:15},m=w(!1),v=b(u,"pay_list"),r=b(u,"visible"),C=f([]),i=f([]),h=w(0),z=M(),t=f({...g});async function p(){m.value=!0;const{code:o,message:e,data:c}=await Q(t.value);m.value=!1,z({code:o,message:e,handler:()=>{C.value=c.list,h.value=c.count}})}function V(){const o=v.value.map(({id:e})=>e);return i.value.filter(({id:e})=>!o.includes(e))}function x(){if(i.value.length===0){$.warning("\u8BF7\u81F3\u5C11\u9009\u62E9\u4E00\u4E2A\u5E73\u53F0");return}const o=V();v.value=[...v.value,...o],r.value=!1}function D(){t.value={...g},i.value=[]}return O(()=>u.visible,()=>{!u.visible||p()},{immediate:!0}),(o,e)=>{const c=n("ElInput"),T=n("ElCol"),R=n("ElRow"),_=n("ElTableColumn"),A=n("ElTable"),B=n("el-pagination"),F=n("ElButton"),U=n("ElDialog"),k=j("loading");return y(),S(U,{modelValue:E(r),"onUpdate:modelValue":e[4]||(e[4]=a=>G(r)?r.value=a:null),title:"\u9009\u62E9\u5E73\u53F0",center:"",onClose:D},{default:s(()=>[H((y(),L("div",W,[l(R,{class:"mb-[10px]"},{default:s(()=>[l(T,{span:4},{default:s(()=>[l(c,{size:"small",placeholder:"\u6E20\u9053\u540D\u79F0",modelValue:t.value.channel_name,"onUpdate:modelValue":e[0]||(e[0]=a=>t.value.channel_name=a),onChange:p},null,8,["modelValue"])]),_:1})]),_:1}),l(A,{border:"",size:"small",data:C.value,onSelectionChange:e[1]||(e[1]=a=>i.value=a)},{default:s(()=>[l(_,{type:"selection",width:"45"}),l(_,{label:"\u6E20\u9053\u540D\u79F0",prop:"channel_name",showOverflowTooltip:""}),l(_,{label:"\u4E1A\u52A1\u516C\u53F8\u540D\u79F0",prop:"companyName",showOverflowTooltip:""})]),_:1},8,["data"]),X("div",Z,[l(B,{"current-page":t.value.page,"onUpdate:currentPage":e[2]||(e[2]=a=>t.value.page=a),"page-size":t.value.size,"onUpdate:pageSize":e[3]||(e[3]=a=>t.value.size=a),"page-sizes":[15,50,100],small:!0,background:!0,layout:"total, sizes, prev, pager, next, jumper",total:E(h),onSizeChange:p,onCurrentChange:p},null,8,["current-page","page-size","total"]),l(F,{type:"primary",size:"small",onClick:x},{default:s(()=>[Y("\u4FDD\u5B58")]),_:1})])])),[[k,E(m)]])]),_:1},8,["modelValue"])}}});var te=N(ee,[["__file","C:/Users/Administrator/Desktop/projects/purchase-vue3/src/views/serviceParam/terrace/components/platform-modal.vue"]]);export{te as default};