import{X as j,c as w,r as X,af as z,Q as n,al as R,M as V}from"./vendor-6ae0c374-1783405707921v=1.0.0.js";import{a as h,e as S}from"./index-71d7b18c-1783405707921v=1.0.0.js";import{E as U}from"./eleVendor-d42abce8-1783405707921v=1.0.0.js";const Z="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAFAAAAAzCAMAAAA3r39rAAABEVBMVEUAAADb29va2trY2Njj4+PX19fZ2dng4ODf39/X19fj4+Py8vLk5OTt7e3V1dX09PT29vbZ2dn39/fY2Nj29vbb29v29vb29vb19fX29vbV1dX39/f29vb29vb19fXc3NzZ2dnd3d3e3t7h4eH19fX19fXZ2dn19fX39/fb29vb29vW1tb19fXT09P29vbf39/29vb19fXU1NTn5+fc3NzR0dH29vb19fX19fX29vbT09P39/f19fX39/ff39/39/fX19f19fXr6+vo6OjZ2dnn5+fb29vj4+Pd3d319fXm5ubm5ubj4+PY2Nja2tr39/fk5OT6+vr09PTm5ub39/f8/Pzx8fHi4uLp6enr6+vt7e37h5dsAAAAUXRSTlMAQpJ0ChanzshV+g7jBMAS47ONcNMd++jew4heMx7LwJ5HI/j387y3rKx3XFNPSeSabWswKyjt2b2ikYWBc108mZZsaT339evZsKycgX5QGL+U+rOeAAAC3UlEQVRYw+WV13qiQBiGiaIbJaAgFgTsvZds7DG9l3UEBnP/F7IIDyYmgDB7uO8R4Mc7/8z8I5gdhabfgfMC5pHfvnrOZ0uu7vvt0TfN9vNHtuSvqLQnYzxNneNOAfy8ko679xEv2QHpHCGvqRfCrQ8fZF/xg6FGZYC79DUpN9MJvFJNd8a3is9VUxR8lZCb3BGdc7mBhRydP5waBulTzCWn9frw4KhB+ghzzQ0dLBxowAs6hHngjc7FERraHtK5IyKx7BWBeYK4zjYitg14TW9/9Gj001e4XfkVXwDzTGBKN0nL+kIU5W+3Qyb5uMNa53exdjtGUSHcaqSLu+7xr0+Og7Zdmw/uBbt3FwErYbD4AZQdQIH1U7t+hspXPopBa2EYyKsdsqx0G9bCxokif02CsLPQzEnw2Vr4vNYD7oUm8Im07IYndbWHa6FasVzEYXYjowmV7rR9c/SNm/a0CxAqNIzFh+MfPBSVFYLQVP5EKw9ZaDaH81NnIQK2wlwRrNCExZyVkEjfowrv04SFEI+doApPYriNUP7PhAN04cBKGPGjCy2+bYTQz4ZRdzn8py8Qe7bOrMaNbteowvXtiKvNOqZT5BmuDCSwRheq2utljuHF7V4se1Gg8Q9CRRdqRHtLHGtx2pUhhIqMJoSa0JBwLWycMHQS+EAUyhuo6AKNxBjT52s4obqSNfSUcfU5gH4jf8N4Iq0hkCRgEMUuk6ZQ2kBVAZ5RVLjRfEaNyUtsyET1SW9vVQjXnoFwY7oTUWaonRC+miztRvMuVLcLuKWUrPL6icHFDsMm9EkDFCT9vQTLdETzSJPikp/X2JKESImtzfmlSO7/NwitBTOpZlJl4IFyKlOdMIuWEMGsIN+FVn/Wq1W5DJuKJs/KpcRnU5kkSuWzZDTFZrhqrTfrt4R3EnOAxAkiIgodfjFnepPHcSbDjlJb+VaSGrFsZvw4uWTmC74jiBGCwL/b/gIpvWL/TS00iAAAAABJRU5ErkJggg==",Q=(u,l,o,f=!0)=>{h();const a=j({tableData:[],pageable:{page:1,size:10,count:0},totalParam:{},searchParam:{},baseParam:{},loading:!1}),g=w({get:()=>({page:a.pageable.page,size:a.pageable.size}),set:e=>{}}),r=async e=>{try{a.loading=!0;let t=Object.assign({},a.baseParam,a.searchParam,f?g.value:{});t=S(t),o&&typeof o=="function"&&(t=o(t)),typeof e=="function"&&(t=e(t)),a.totalParam=t;let P=await u({...t}),{data:s,code:b,msg:E}=P;b!==0&&b!==200&&(U.warning(E),a.loading=!1),l&&(s=l(s)),a.tableData=f?Array.isArray(s)?s:s.listData||s.list:s,a.tableData;let{page:i,size:c,total:T}=s;return i=Number(i),c=Number(c),f&&A({count:T||s.count}),a.loading=!1,s}catch(t){a.loading=!1}finally{a.loading=!1}},A=e=>{Object.assign(a.pageable,e)},d=async(e,t)=>{a.pageable.page=1,typeof e=="function"?await r(e):await r(),t&&typeof t=="function"&&t(a.totalParam)},p=async(e,t)=>{a.pageable.page=1,a.searchParam=t||{},await r(),e&&typeof e=="function"&&e(a.totalParam)},m=e=>{a.pageable.page=1,a.pageable.size=e,r()},v=e=>{a.pageable.page=e,r()},N=()=>n("div",{class:"table-empty"},[n(R("slot"),{name:"empty"},{default:()=>[n("img",{src:Z,alt:"notData"},null),n("div",null,[V("\u6682\u65E0\u6570\u636E")])]})]),y=X(null);return{...z(a),proTableRef:y,handleSizeChange:m,handleCurrentChange:v,getTableList:r,search:d,reset:p,renderEmpty:N,pageParam:g}};export{Q as u};
