| 1 |
- var Y=Object.defineProperty,Z=Object.defineProperties;var tt=Object.getOwnPropertyDescriptors;var P=Object.getOwnPropertySymbols;var et=Object.prototype.hasOwnProperty,ot=Object.prototype.propertyIsEnumerable;var _=(a,o,e)=>o in a?Y(a,o,{enumerable:!0,configurable:!0,writable:!0,value:e}):a[o]=e,A=(a,o)=>{for(var e in o||(o={}))et.call(o,e)&&_(a,e,o[e]);if(P)for(var e of P(o))ot.call(o,e)&&_(a,e,o[e]);return a},v=(a,o)=>Z(a,tt(o));var s=(a,o,e)=>new Promise((u,f)=>{var g=r=>{try{k(e.next(r))}catch(d){f(d)}},l=r=>{try{k(e.throw(r))}catch(d){f(d)}},k=r=>r.done?u(r.value):Promise.resolve(r.value).then(g,l);k((e=e.apply(a,o)).next())});import{d as F,f as I,r as nt,ag as at,aq as it,ar as x,k as m,aD as c,u as n,aB as R,ah as S,G as C,aE as rt,F as st}from"./vue-vendor-Be68asQ6.js";import{B as lt}from"./index-CETWS1o0.js";import{p as pt,d as mt}from"./tenant.data-zFObjxyE.js";import{k as B,m as ct,p as ut}from"./tenant.api-BUOMVerp.js";import{useListPage as dt}from"./useListPage-aOfrd-Tw.js";import"./index-D2G57Sln.js";import ft from"./TenantPackMenuModal-dyKKFg_y.js";import{M as D}from"./antd-vue-vendor-DcqS7Wvq.js";import kt from"./TenantPackUserModal-DHerdRpl.js";import{ad as O,ac as gt,u as yt}from"./index-BFfnEkVs.js";import ht from"./BasicTable-CuSLkXEu.js";import{Q as wt}from"./componentMap-BUTAcOmo.js";import"./BasicModal-D4gc2R81.js";import"./useTimeout-Ca5eqGu-.js";import"./vxe-table-vendor-DHF2TRpV.js";import"./useWindowSizeFn-BTSGGcie.js";import"./index-BZ_MXCtW.js";import"./index-BIPzXG41.js";import"./index-CXEQnmRq.js";import"./useIntersectionObserver-Bl62RIZ4.js";import"./renderUtils-DPF_SrxE.js";import"./index-BOEzG86y.js";import"./validator-BLa7ZpAW.js";import"./user.api-BMRcwGEd.js";import"./index-D68l__AG.js";import"./BasicForm-Cv-dsB-e.js";import"./useForm-kcRIHoe0.js";import"./JAreaLinkage-BNOKwn5l.js";import"./areaDataUtil-Cik-Rc_P.js";import"./JSelectUser-DCwPqRxp.js";import"./props-BPxWJPuD.js";import"./JSelectBiz-Be8KsC5j.js";import"./JSelectDept-DT6g7V5M.js";import"./index-BNFwynfr.js";import"./bem-BvvqSl-N.js";import"./props-Cw7AfxGV.js";import"./useContextMenu-BDwmjIwb.js";import"./JCodeEditor-CSivhUhT.js";import"./useFormItem-CtGMPcLp.js";import"./htmlmixed-DNSd26j0.js";import"./vue-DbzutmLn.js";/* empty css */import"./JAddInput-BBXQvvpq.js";import"./depart.api-CDwTvdwQ.js";import"./JPopup-DKJW27Yk.js";import"./EasyCronInput-wCv2YMHn.js";import"./JEllipsis-C04xKxcI.js";import"./download-CjoX0_mR.js";import"./base64Conver-24EVOS6V.js";import"./index-D1703ozz.js";import"./index-Bi7PIj53.js";import"./useCountdown-B7iR27pS.js";import"./useFormItemSingle-nLM0QlcI.js";import"./JUpload-cB_Qj2H2.js";import"./index-iuayQczx.js";import"./index-DJQB4_Pr.js";import"./injectionKey-DPVn4AgL.js";import"./TenantUserSelectModal-DZHGVSm5.js";const xt=F({name:"tenant-pack-modal"}),ve=F(v(A({},xt),{emits:["register","success"],setup(a,{emit:o}){const[e,{openModal:u}]=O(),[f,{openModal:g}]=O(),l=I(0),{prefixCls:k,tableContext:r}=dt({designScope:"tenant-template",tableProps:{api:ut,columns:mt,immediate:!1,formConfig:{schemas:pt,labelCol:{xxl:8},actionColOptions:{xs:24,sm:8,md:8,lg:8,xl:8,xxl:8}},beforeFetch:t=>Object.assign(t,{tenantId:n(l),packType:"custom"})}}),[d,{reload:U},{rowSelection:E,selectedRowKeys:y,selectedRows:N}]=r,Ct=o,h=I(!1),[V,{setModalProps:bt,closeModal:j}]=gt(t=>s(null,null,function*(){l.value=t.tenantId,h.value=t.showPackAddAndEdit,p()})),K="租户个性化套餐包";function L(t){return s(this,null,function*(){j()})}function $(t){return[{label:"用户",onClick:J.bind(null,t)},{label:"编辑",onClick:q.bind(null,t),ifShow:()=>h.value}]}function p(){(y.value=[])&&U()}function q(t){return s(this,null,function*(){u(!0,{isUpdate:!0,record:t,tenantId:n(l),packType:"custom",showFooter:!0})})}const b=nt(["superAdmin","accountAdmin","appAdmin"]),{createMessage:M}=yt();function G(t){return s(this,null,function*(){if(b.indexOf(t.packCode)!=-1){M.warning("默认系统套餐包不允许删除");return}yield B({ids:t.id},p)})}function Q(){return s(this,null,function*(){let t=N.value;if(t&&t.length>0){for(let i=0;i<t.length;i++)if(b.indexOf(t[i].packCode)!=-1){M.warning("默认系统套餐包不允许删除");return}}D.confirm({title:"删除租户套餐包",content:"是否删除租户套餐包",okText:"确认",cancelText:"取消",onOk:()=>s(null,null,function*(){yield B({ids:y.value.join(",")},p)})})})}function z(){return s(this,null,function*(){D.confirm({title:"初始化默认套餐包",content:"是否初始化默认套餐包",okText:"确认",cancelText:"取消",onOk:()=>s(null,null,function*(){yield ct({tenantId:n(l)},p)})})})}function H(){u(!0,{isUpdate:!1,tenantId:n(l),packType:"custom",showFooter:!0})}function J(t){g(!0,{record:t})}function W(t){return[{label:"详情",onClick:X.bind(null,t)},{label:"删除",popConfirm:{title:"是否确认删除租户套餐包",confirm:G.bind(null,t)}}]}function X(t){u(!0,{isUpdate:!0,record:t,tenantId:n(l),packType:"custom",showFooter:!1})}return(t,i)=>{const w=at("a-button");return x(),it(st,null,[m(n(lt),rt(t.$attrs,{onRegister:n(V),title:K,onOk:L,width:"800px",showCancelBtn:!1,showOkBtn:!1}),{default:c(()=>[m(n(ht),{onRegister:n(d),rowSelection:n(E)},{tableTitle:c(()=>[h.value?(x(),R(w,{key:0,preIcon:"ant-design:plus-outlined",type:"primary",onClick:H,style:{"margin-right":"5px"}},{default:c(()=>i[0]||(i[0]=[C("新增 ")])),_:1})):S("",!0),n(y).length>0?(x(),R(w,{key:1,preIcon:"ant-design:delete-outlined",type:"primary",onClick:Q,style:{"margin-right":"5px"}},{default:c(()=>i[1]||(i[1]=[C("批量删除 ")])),_:1})):S("",!0),m(w,{preIcon:"ant-design:sync-outlined",type:"primary",onClick:z,style:{"margin-right":"5px"}},{default:c(()=>i[2]||(i[2]=[C("初始化默认套餐 ")])),_:1})]),action:c(({record:T})=>[m(n(wt),{actions:$(T),dropDownActions:W(T)},null,8,["actions","dropDownActions"])]),_:1},8,["onRegister","rowSelection"])]),_:1},16,["onRegister"]),m(ft,{onRegister:n(e),onSuccess:p},null,8,["onRegister"]),m(kt,{onRegister:n(f),onSuccess:p},null,8,["onRegister"])],64)}}}));export{ve as default};
|