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-KOQNKxnC.js";import"./index-XZKTTfG1.js";import{u as Q,j as $}from"./tenant.api-BupkcWMH.js";import{b as q,c as z}from"./tenant.data-Byz3LKFo.js";import{a9 as f,ab as D,b_ as H,u as W}from"./index-CLZzJyTP.js";import{useListPage as X}from"./useListPage-CevWQ3ci.js";import Y from"./TenantInviteUserModal-Dcsxg4bt.js";import Z from"./TenantUserList-h9RADj73.js";import tt from"./TenantPackList-BhARfPVn.js";import{Q as ot}from"./componentMap-DpsJvoqz.js";import et from"./BasicTable-DUJWN3yz.js";import"./antd-vue-vendor-CahNzUUa.js";import"./BasicModal-B8XmAOm7.js";import"./ModalHeader-DIFQSP_0.js";import"./useTimeout-KpZCXEcl.js";import"./vxe-table-vendor-Cdi8WfTx.js";import"./index-DvqyyN77.js";import"./useWindowSizeFn-D9PllI8g.js";import"./index-DS3utcig.js";import"./index-BZbg0EjM.js";import"./index-CrdW4fN1.js";import"./useIntersectionObserver-FVRzwlSd.js";import"./renderUtils-BgFeePLc.js";import"./index-C7yPiS0L.js";import"./validator-Dx9kcZ5e.js";import"./user.api-DAu0nuTv.js";import"./index-ByX9XNkE.js";import"./useForm-Dx3lJ3DG.js";import"./JAreaLinkage-M9TGy8nY.js";import"./areaDataUtil-Dk3xkGfK.js";import"./china-area-data-vendor-ByvEpbzN.js";import"./JSelectUser-CfAGgHjD.js";import"./props-BtZrRNiI.js";import"./JSelectBiz-CLnJTMe2.js";import"./JSelectDept-CaEHrQp6.js";import"./index-44tRnyoF.js";import"./bem-DT3DdmOs.js";import"./props-CG-jAkbI.js";import"./useContextMenu-BGU2vdqV.js";import"./JCodeEditor-CR57XeIe.js";import"./useFormItem-IOFWTdED.js";import"./htmlmixed-DoVLO6sG.js";import"./vue-DY75b9GC.js";/* empty css             */import"./JAddInput-B36c3B5x.js";import"./depart.api-DHG2p2Yd.js";import"./JPopup-BvqhHpPl.js";import"./EasyCronInput-CWOTSpxK.js";import"./JEllipsis-C_gT_vEQ.js";import"./JDictSelectTag-CfF54ALX.js";import"./JImageUpload-BFwNYdm5.js";import"./download-DopMSmFN.js";import"./base64Conver-24EVOS6V.js";import"./index-CDa2_aYE.js";import"./index-D0jTtUNS.js";import"./useCountdown-BpP55PQ2.js";import"./useFormItemSingle-BEyrYQqf.js";import"./JUpload-DgDEmizw.js";import"./index-Bn2zmO2L.js";import"./index-CEznvAVZ.js";import"./index-CfAukas3.js";import"./injectionKey-DPVn4AgL.js";import"./TenantPackMenuModal-BldcJMhY.js";import"./TenantPackUserModal-CLcnFNJW.js";import"./TenantUserSelectModal-CbQrlSlZ.js";const rt=U({name:"tenant-my-tenant-list"}),ko=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{ko as default};
