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-gyz1IdHU.js";import"./index-zKZnG1QC.js";import{p as $,k as S}from"./tenant.api-C9mls3Ap.js";import{p as q,d as z}from"./tenant.data-BTTBgNSE.js";import H from"./TenantPackMenuModal-D6MAnlDm.js";import{a9 as T,ab as J,u as W}from"./index-Cy4uayzW.js";import{useListPage as X}from"./useListPage-TMORxSEa.js";import{M as Y}from"./antd-vue-vendor-CahNzUUa.js";import{Q as Z}from"./componentMap-0iK4HQBq.js";import tt from"./BasicTable-CgafrQwz.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";const ot=P({name:"tenant-default-pack"}),uo=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{uo as default};
