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-LwlFn7Y4.js";import"./index-D2AmS0aU.js";import{u as Q,j as $}from"./tenant.api-CpQl223K.js";import{b as q,c as z}from"./tenant.data-jovtG_GO.js";import{a9 as f,ab as D,b_ as H,u as W}from"./index-B_2CoVdl.js";import{useListPage as X}from"./useListPage-BEtybUiF.js";import Y from"./TenantInviteUserModal-qxrOw_F6.js";import Z from"./TenantUserList-CTs4iLQ7.js";import tt from"./TenantPackList-Dvdef06s.js";import{Q as ot}from"./componentMap-CzCGDP7x.js";import et from"./BasicTable-Clbg3fHx.js";import"./antd-vue-vendor-CDWW6V_M.js";import"./BasicModal-D3g2CFhF.js";import"./ModalHeader-C-C0dUi_.js";import"./useTimeout-CB9F1PLu.js";import"./vxe-table-vendor-B5h3MVdD.js";import"./index-DAURrYyA.js";import"./useWindowSizeFn-C3WExEpc.js";import"./index-Dz2zbQB_.js";import"./index-exs4VcBw.js";import"./index-ByLO0zSl.js";import"./useIntersectionObserver-FVRzwlSd.js";import"./renderUtils-Cbe4E0PZ.js";import"./index-CkL00Q0a.js";import"./validator-jM63P_3m.js";import"./user.api-BLHI3_6c.js";import"./index-ARbUvvsq.js";import"./useForm-CcjrODHR.js";import"./JAreaLinkage-CSgDAlrn.js";import"./areaDataUtil-DFHnz1wu.js";import"./china-area-data-vendor-D0sJ9kfX.js";import"./JSelectUser-BQIJUcBR.js";import"./props-BCVPj-bG.js";import"./JSelectBiz-CJyWq5s2.js";import"./JSelectDept-wKz_Qtmc.js";import"./index-BKs2x_To.js";import"./bem-C6eT35UB.js";import"./props-BLY2qIO5.js";import"./useContextMenu-CSt5a1-F.js";import"./JCodeEditor-esTLnfS3.js";import"./useFormItem-CWa0w7fA.js";import"./htmlmixed-DRe7JlAp.js";import"./vue-B0b3nX1K.js";/* empty css             */import"./JAddInput-YFlAniYT.js";import"./depart.api-0qTriT9h.js";import"./JPopup-BJBYqoWe.js";import"./EasyCronInput-DclSHT47.js";import"./JEllipsis-Cn7GCKHR.js";import"./JDictSelectTag-CxpDdimB.js";import"./download-2tYEzlDW.js";import"./base64Conver-24EVOS6V.js";import"./index-Cgt544dC.js";import"./index-BZ9ST2iq.js";import"./useCountdown-ImUE7YaG.js";import"./useFormItemSingle-DM34aWgK.js";import"./JUpload-DzM-D4DX.js";import"./index-khU3p_On.js";import"./index-DPEnuI0R.js";import"./index-Cnb8BkwG.js";import"./injectionKey-DPVn4AgL.js";import"./TenantPackMenuModal-BuAmXefp.js";import"./TenantPackUserModal-Bhxi9KjN.js";import"./TenantUserSelectModal-CadNCd_G.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};
