var N=Object.defineProperty,A=Object.defineProperties;var E=Object.getOwnPropertyDescriptors;var b=Object.getOwnPropertySymbols;var K=Object.prototype.hasOwnProperty,L=Object.prototype.propertyIsEnumerable;var h=(e,t,o)=>t in e?N(e,t,{enumerable:!0,configurable:!0,writable:!0,value:o}):e[t]=o,C=(e,t)=>{for(var o in t||(t={}))K.call(t,o)&&h(e,o,t[o]);if(b)for(var o of b(t))L.call(t,o)&&h(e,o,t[o]);return e},w=(e,t)=>A(e,E(t));var s=(e,t,o)=>new Promise((g,l)=>{var a=r=>{try{c(o.next(r))}catch(p){l(p)}},y=r=>{try{c(o.throw(r))}catch(p){l(p)}},c=r=>r.done?g(r.value):Promise.resolve(r.value).then(a,y);c((o=o.apply(e,t)).next())});import{d as P,U as O,a2 as M,a3 as D,k as d,af as f,u as n,G as x,ad as G,V as Q}from"./vue-vendor-CxLCUzY4.js";import"./index-BN5Ac_IG.js";import"./index-CF_FJn6P.js";import{p as $,k as S}from"./tenant.api-SLCAStJX.js";import{p as q,d as z}from"./tenant.data-C1uGOW6B.js";import H from"./TenantPackMenuModal-BiKWGYJi.js";import{a9 as T,ab as J,u as W}from"./index-CYriLmQo.js";import{useListPage as X}from"./useListPage-i3Wl0_Fg.js";import{M as Y}from"./antd-vue-vendor-CDWW6V_M.js";import{Q as Z}from"./componentMap-7D1QIeNI.js";import tt from"./BasicTable-DAfCfXmD.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";const ot=P({name:"tenant-default-pack"}),co=P(w(C({},ot),{setup(e){const{createMessage:t}=W(),[o,{openModal:g}]=T(),[l,{openModal:a}]=T(),y=J(),{prefixCls:c,tableContext:r}=X({designScope:"tenant-template",tableProps:{api:$,columns:z,formConfig:{schemas:q},beforeFetch:i=>Object.assign(i,{packType:"default"})}}),[p,{reload:R},{rowSelection:v,selectedRowKeys:m,selectedRows:et}]=r;function B(i){return[{label:"编辑",onClick:V.bind(null,i)},{label:"删除",popConfirm:{title:"是否确认删除租户产品包",confirm:U.bind(null,i.id)}}]}function F(){a(!0,{isUpdate:!1,packType:"default",showFooter:!0})}function U(i){return s(this,null,function*(){yield S({ids:i},k)})}function V(i){a(!0,{isUpdate:!0,record:i,packType:"default",showFooter:!0})}function rt(){return s(this,null,function*(){if(n(m).length>1){t.warn("请选择一个");return}a(!0,{tenantId:n(m.value.join(","))})})}function k(){(m.value=[])&&R()}function j(){return s(this,null,function*(){Y.confirm({title:"删除租户产品包",content:"是否删除租户产品包",okText:"确认",cancelText:"取消",onOk:()=>s(this,null,function*(){yield S({ids:m.value.join(",")},k)})})})}return(i,u)=>{const _=O("a-button");return M(),D("div",null,[d(n(tt),{onRegister:n(p),rowSelection:n(v)},{tableTitle:f(()=>[d(_,{preIcon:"ant-design:user-add-outlined",type:"primary",onClick:F},{default:f(()=>u[0]||(u[0]=[x("新增")])),_:1}),n(m).length>0?(M(),G(_,{key:0,preIcon:"ant-design:delete-outlined",type:"primary",onClick:j,style:{"margin-right":"5px"}},{default:f(()=>u[1]||(u[1]=[x("批量删除 ")])),_:1})):Q("",!0)]),action:f(({record:I})=>[d(n(Z),{actions:B(I)},null,8,["actions"])]),_:1},8,["onRegister","rowSelection"]),d(H,{onRegister:n(l),onSuccess:k},null,8,["onRegister"])])}}}));export{co as default};
