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-KOQNKxnC.js";import"./index-XZKTTfG1.js";import{p as $,k as S}from"./tenant.api-BupkcWMH.js";import{p as q,d as z}from"./tenant.data-Byz3LKFo.js";import H from"./TenantPackMenuModal-BldcJMhY.js";import{a9 as T,ab as J,u as W}from"./index-CLZzJyTP.js";import{useListPage as X}from"./useListPage-CevWQ3ci.js";import{M as Y}from"./antd-vue-vendor-CahNzUUa.js";import{Q as Z}from"./componentMap-DpsJvoqz.js";import tt from"./BasicTable-DUJWN3yz.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";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};
