var B=Object.defineProperty,E=Object.defineProperties;var F=Object.getOwnPropertyDescriptors;var _=Object.getOwnPropertySymbols;var K=Object.prototype.hasOwnProperty,L=Object.prototype.propertyIsEnumerable;var y=(e,t,o)=>t in e?B(e,t,{enumerable:!0,configurable:!0,writable:!0,value:o}):e[t]=o,S=(e,t)=>{for(var o in t||(t={}))K.call(t,o)&&y(e,o,t[o]);if(_)for(var o of _(t))L.call(t,o)&&y(e,o,t[o]);return e},k=(e,t)=>E(e,F(t));var c=(e,t,o)=>new Promise((b,l)=>{var g=i=>{try{p(o.next(i))}catch(m){l(m)}},M=i=>{try{p(o.throw(i))}catch(m){l(m)}},p=i=>i.done?b(i.value):Promise.resolve(i.value).then(g,M);p((o=o.apply(e,t)).next())});import{d as U,o as N,U as V,a2 as G,a3 as J,k as a,af as u,u as r,G as w}from"./vue-vendor-CxLCUzY4.js";import"./index-BN5Ac_IG.js";import"./index-CF_FJn6P.js";import{u as Q,j as $}from"./tenant.api-SLCAStJX.js";import{b as q,c as z}from"./tenant.data-C1uGOW6B.js";import{a9 as f,ab as D,b_ as H,u as W}from"./index-CYriLmQo.js";import{useListPage as X}from"./useListPage-i3Wl0_Fg.js";import Y from"./TenantInviteUserModal-DyXoMhO6.js";import Z from"./TenantUserList-DD0WAX_o.js";import tt from"./TenantPackList-lUqsgLmH.js";import{Q as ot}from"./componentMap-7D1QIeNI.js";import et from"./BasicTable-DAfCfXmD.js";import"./antd-vue-vendor-CDWW6V_M.js";import"./BasicModal-BBgVjypv.js";import"./ModalHeader-jGKMr-DQ.js";import"./useTimeout-DC8132dd.js";import"./vxe-table-vendor-B5h3MVdD.js";import"./index-CxQILSKV.js";import"./useWindowSizeFn-BxrEMPtP.js";import"./index-BRTtls-l.js";import"./index-DOuVMe-q.js";import"./index-ByLO0zSl.js";import"./useIntersectionObserver-FVRzwlSd.js";import"./renderUtils-CGtepdOw.js";import"./index-BTSd5ebC.js";import"./validator-0TDlyteC.js";import"./user.api-BUwWVSBN.js";import"./index-BkgeZpOO.js";import"./useForm-8o5KRzWo.js";import"./JAreaLinkage-DFTeDmm8.js";import"./areaDataUtil-DFHnz1wu.js";import"./china-area-data-vendor-D0sJ9kfX.js";import"./JSelectUser-nVFm3ao2.js";import"./props-DoGpHXAD.js";import"./JSelectBiz-BW6f3e--.js";import"./JSelectDept-DorRVguN.js";import"./index-BTAl55Kt.js";import"./bem-2ra1afoV.js";import"./props-BLY2qIO5.js";import"./useContextMenu-DYyhcDf7.js";import"./JCodeEditor-_KZ8XnNK.js";import"./useFormItem-CWa0w7fA.js";import"./htmlmixed-DRe7JlAp.js";import"./vue-B0b3nX1K.js";/* empty css             */import"./JAddInput-CXT54-j9.js";import"./depart.api-C9T5xfw6.js";import"./JPopup-KP1kIsae.js";import"./EasyCronInput-XK54XB3r.js";import"./JEllipsis-287cEHxd.js";import"./JDictSelectTag-Jqy9TBcS.js";import"./download-CkbK5et1.js";import"./base64Conver-24EVOS6V.js";import"./index-QMJkXEyl.js";import"./index-Bb_NRLur.js";import"./useCountdown-C3-PRPLY.js";import"./useFormItemSingle-DM34aWgK.js";import"./JUpload-pyrTRFCz.js";import"./index-Bx9Mnn3N.js";import"./index-B1-pj6uh.js";import"./index-isxCPgHp.js";import"./injectionKey-DPVn4AgL.js";import"./TenantPackMenuModal-BiKWGYJi.js";import"./TenantPackUserModal-DRQBJwLb.js";import"./TenantUserSelectModal-BZdKFZlB.js";const rt=U({name:"tenant-my-tenant-list"}),So=U(k(S({},rt),{setup(e){const{createMessage:t}=W(),[o,{openModal:b}]=f(),[l,{openModal:g}]=f(),[M,{openModal:p}]=f(),[i,{openModal:m}]=f(),it=D(),{prefixCls:nt,tableContext:C}=X({designScope:"tenant-template",tableProps:{title:"租户列表",api:Q,columns:z,formConfig:{schemas:q},actionColumn:{width:150,fixed:"right"},rowSelection:{type:"radio"},beforeFetch:n=>Object.assign(n,{userTenantStatus:"1,3,4"})}}),[R,{reload:v},{rowSelection:x,selectedRowKeys:s,selectedRows:at}]=C;function I(n){return[{label:"用户",onClick:O.bind(null,n.id)}]}function T(){g(!0,{})}function P(n){return c(this,null,function*(){n&&(yield $({ids:s.value.join(","),phone:n}))})}function O(n){return c(this,null,function*(){p(!0,{id:n})})}function j(){return c(this,null,function*(){if(r(s).length>1){t.warn("请选择一个");return}m(!0,{tenantId:r(s.value.join(",")),showPackAddAndEdit:!1})})}function st(){(s.value=[])&&v()}return N(()=>{H("我的租户")}),(n,d)=>{const h=V("a-button");return G(),J("div",null,[a(r(et),{onRegister:r(R),rowSelection:r(x)},{tableTitle:u(()=>[a(h,{preIcon:"ant-design:user-add-outlined",type:"primary",onClick:T,style:{"margin-right":"5px"},disabled:r(s).length===0},{default:u(()=>d[0]||(d[0]=[w("邀请用户加入")])),_:1},8,["disabled"]),a(h,{preIcon:"ant-design:plus-outlined",type:"primary",onClick:j,style:{"margin-right":"5px"},disabled:r(s).length===0},{default:u(()=>d[1]||(d[1]=[w("套餐")])),_:1},8,["disabled"])]),action:u(({record:A})=>[a(r(ot),{actions:I(A)},null,8,["actions"])]),_:1},8,["onRegister","rowSelection"]),a(Y,{onRegister:r(l),onInviteOk:P},null,8,["onRegister"]),a(Z,{onRegister:r(M)},null,8,["onRegister"]),a(tt,{onRegister:r(i)},null,8,["onRegister"])])}}}));export{So as default};
