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-gyz1IdHU.js";import"./index-zKZnG1QC.js";import{u as Q,j as $}from"./tenant.api-C9mls3Ap.js";import{b as q,c as z}from"./tenant.data-BTTBgNSE.js";import{a9 as f,ab as D,b_ as H,u as W}from"./index-Cy4uayzW.js";import{useListPage as X}from"./useListPage-TMORxSEa.js";import Y from"./TenantInviteUserModal-BOe6Ep0V.js";import Z from"./TenantUserList-CAlIdtI3.js";import tt from"./TenantPackList-8EQaLSZx.js";import{Q as ot}from"./componentMap-0iK4HQBq.js";import et from"./BasicTable-CgafrQwz.js";import"./antd-vue-vendor-CahNzUUa.js";import"./BasicModal-sKcs_9Ir.js";import"./ModalHeader-ByCVDoqO.js";import"./useTimeout-gJpgadD6.js";import"./vxe-table-vendor-Cdi8WfTx.js";import"./index-Bdn0r8CG.js";import"./useWindowSizeFn-DDyhhqyw.js";import"./index-CYoRlduV.js";import"./index-DYB8Ashr.js";import"./index-CrdW4fN1.js";import"./useIntersectionObserver-FVRzwlSd.js";import"./renderUtils-BcsccCoe.js";import"./index-tDBMxW9-.js";import"./validator-CyHCj96y.js";import"./user.api-CoaMxYm2.js";import"./index-BN26Feep.js";import"./useForm-DfoT2G6J.js";import"./JAreaLinkage-CTMEfTuh.js";import"./areaDataUtil-Dk3xkGfK.js";import"./china-area-data-vendor-ByvEpbzN.js";import"./JSelectUser-B98pRPrS.js";import"./props-CtlWAg-s.js";import"./JSelectBiz-vYDBA0SK.js";import"./JSelectDept-D-TUaHvK.js";import"./index-CNQBnF3P.js";import"./bem-IZKqD41e.js";import"./props-CG-jAkbI.js";import"./useContextMenu-Q6J5bB_u.js";import"./JCodeEditor-U9QIstNN.js";import"./useFormItem-IOFWTdED.js";import"./htmlmixed-DoVLO6sG.js";import"./vue-DY75b9GC.js";/* empty css             */import"./JAddInput-DP4caUmw.js";import"./depart.api-B8q8MC-j.js";import"./JPopup-CVHkQZFq.js";import"./EasyCronInput-CZdChTcP.js";import"./JEllipsis-TuDc52fh.js";import"./JDictSelectTag-CalJXNVe.js";import"./JImageUpload-C5OCTlCG.js";import"./download-Bn4f3tzD.js";import"./base64Conver-24EVOS6V.js";import"./index-D6H6KsT6.js";import"./index-CLxBW_h0.js";import"./useCountdown-2P9HvnfJ.js";import"./useFormItemSingle-BEyrYQqf.js";import"./JUpload-DSWoDwh2.js";import"./index-B4vNk56t.js";import"./index-Dc7Jr5-j.js";import"./index-Dm1rPBfc.js";import"./injectionKey-DPVn4AgL.js";import"./TenantPackMenuModal-D6MAnlDm.js";import"./TenantPackUserModal-sgqXuEb4.js";import"./TenantUserSelectModal-CmTwf42g.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};
