import{g as f,M as y}from"./membersPopupForm-CrvdDTvM.js";import{d as h,b as _,T as k,a as v}from"./index-CgMrKa77.js";import w from"./popupForm-CpZuWHfu.js";import{x as I,a7 as q}from"./index-fNs72j9w.js";import{B as z,b as n,I as E,C as b,D as F,u as l,O as P,W as L,H as u,au as T}from"./vue-DweYBrEc.js";import"./index-DMA3A9_B.js";import"./validate-CEOscgyN.js";import"./index-BlEwok4a.js";const V={class:"default-main ba-table-box"},A=z({name:"user/user",__name:"index",setup(x){const{t:e}=I.useI18n(),i=n(!1),d=n(null),m=n(null),c=n(null);let p=0;const g=[{render:"tipButton",name:"customAction",title:"Members Promotion",text:"",type:"primary",icon:"el-icon-Wallet",class:"table-row-custom",disabledTip:!1,loading:r=>c.value===r.id,click:async r=>{var o;const t=++p;c.value=r.id;try{const s=await f(r.id);if(t!==p)return;d.value={...r},m.value=((o=s.data)==null?void 0:o.row)??s.data??{},i.value=!0}finally{t===p&&(c.value=null)}}},...h(["edit","delete"])],a=new _(new q("/admin/user.User/"),{column:[{type:"selection",align:"center",operator:!1},{label:e("Id"),prop:"id",align:"center",operator:"=",operatorPlaceholder:e("Id"),width:70},{label:e("user.user.User name"),prop:"jk_username",align:"center",operator:"LIKE",operatorPlaceholder:e("Fuzzy query")},{label:e("user.user.nickname"),prop:"nickname",align:"center",operator:"LIKE",operatorPlaceholder:e("Fuzzy query")},{label:e("user.user.jk user id"),prop:"jk_user_id",align:"center",operator:"LIKE",operatorPlaceholder:e("Fuzzy query")},{label:e("user.user.referrer code"),prop:"referrer_code",align:"center",operator:"LIKE",operatorPlaceholder:e("Fuzzy query"),width:120},{label:e("user.user.group"),prop:"userGroup.name",align:"center",operator:"LIKE",operatorPlaceholder:e("Fuzzy query"),render:"tag"},{label:e("user.user.avatar"),prop:"avatar",align:"center",render:"image",operator:!1},{label:e("user.user.Gender"),prop:"gender",align:"center",render:"tag",custom:{0:"info",1:"",2:"success"},replaceValue:{0:e("Unknown"),1:e("user.user.male"),2:e("user.user.female")}},{label:e("user.user.mobile"),prop:"mobile",align:"center",operator:"LIKE",operatorPlaceholder:e("Fuzzy query")},{label:e("user.user.Last login IP"),prop:"last_login_ip",align:"center",operator:"LIKE",operatorPlaceholder:e("Fuzzy query"),render:"tag"},{label:e("user.user.Last login"),prop:"last_login_time",align:"center",render:"datetime",sortable:"custom",operator:"RANGE",width:160},{label:e("Create time"),prop:"create_time",align:"center",render:"datetime",sortable:"custom",operator:"RANGE",width:160},{label:e("State"),prop:"status",align:"center",render:"tag",custom:{disable:"danger",enable:"success"},replaceValue:{disable:e("Disable"),enable:e("Enable")}},{label:e("Operate"),align:"center",width:"160",render:"buttons",buttons:g,operator:!1}],dblClickNotEditColumn:[void 0]},{defaultItems:{gender:0,money:"0",score:"0",status:"enable"}});return a.mount(),a.getData(),T("baTable",a),(r,t)=>{const o=E("el-alert");return b(),F("div",V,[l(a).table.remark?(b(),P(o,{key:0,class:"ba-table-alert",title:l(a).table.remark,type:"info","show-icon":""},null,8,["title"])):L("",!0),u(k,{buttons:["refresh","add","edit","delete","comSearch","quickSearch","columnDisplay"],"quick-search-placeholder":l(e)("Quick search placeholder",{fields:l(e)("user.user.User name")+"/"+l(e)("user.user.nickname")})},null,8,["quick-search-placeholder"]),u(v),u(w),u(y,{modelValue:i.value,"onUpdate:modelValue":t[0]||(t[0]=s=>i.value=s),row:d.value,"wallet-data":m.value},null,8,["modelValue","row","wallet-data"])])}}});export{A as default};
