Files
qhmes/deploy-qhmes/frontend/js/TenantPackUserModal-DhfJRBX1.js
2026-05-15 11:34:12 +08:00

2 lines
4.7 KiB
Java

var g=(t,o,r)=>new Promise((d,u)=>{var b=a=>{try{i(r.next(a))}catch(s){u(s)}},l=a=>{try{i(r.throw(a))}catch(s){u(s)}},i=a=>a.done?d(a.value):Promise.resolve(a.value).then(b,l);i((r=r.apply(t,o)).next())});import{d as F,e as O,f as $,r as v,ah as c,aC as D,as as T,aF as m,k,G as I,ar as C,ag as U,F as B,av as N}from"./vue-vendor-C7Zq48Yl.js";import{B as L}from"./index-Du0A3ksf.js";import"./index-BgJbdjPf.js";import{useListPage as V}from"./useListPage-BWia52we.js";import{b as q}from"./tenant.data-CcUGQyvz.js";import{h as z,j as E,q as G}from"./tenant.api-7xr32mep.js";import J from"./TenantUserSelectModal-CMM8xtp0.js";import{ak as K,al as H,u as Q,d as W}from"./index-BI6CMai0.js";import{J as X}from"./componentMap-BBZeqR-K.js";import Y from"./BasicTable-DfLkrEeh.js";import"./BasicModal-0sAdFEk_.js";import"./ModalHeader-keHdAHWH.js";import"./antd-vue-vendor-BPnV8VqP.js";import"./useTimeout-DDl4l82I.js";import"./vxe-table-vendor-B88kchpX.js";import"./index-DeEq83Ov.js";import"./useWindowSizeFn-PRZSD86C.js";import"./index-pxs5MULf.js";import"./index-BgYCgfME.js";import"./index-f8O7TghW.js";import"./useIntersectionObserver-BMxdTqP3.js";import"./useMethods-DVip17X8.js";import"./index-Di-j2gt4.js";import"./BasicForm-BJnSRkIE.js";import"./useForm-BZtHZyx2.js";import"./JAreaLinkage-BeRUFHSB.js";import"./areaDataUtil-CbYCy3Ig.js";import"./JSelectUser-B71zikzw.js";import"./props-DAezUTeZ.js";import"./JSelectBiz-CnEaVMUF.js";import"./JSelectDept-DRDVeruW.js";import"./index-CUdllngZ.js";import"./bem-EhXRi4nW.js";import"./props-D4vdsy3J.js";import"./useContextMenu-Cwx1lIOK.js";import"./TreeIcon-DE4jdeZV.js";import"./JCodeEditor-CLVZA7Uj.js";import"./useFormItem-BdW6EoZe.js";import"./htmlmixed-NhwyF9-q.js";import"./vue-CgbRSACy.js";/* empty css */import"./JAddInput-D6qcyZjQ.js";import"./index-CNkz_PUv.js";import"./depart.api-DeMNV8zW.js";import"./JPopup-Bva6u6tk.js";import"./usePopBiz-CG0vVpgI.js";import"./index-Dg4HCEvo.js";import"./EasyCronInput-7xfJ3nBh.js";import"./JEllipsis-DqRFTSm0.js";import"./download-UE0L9Rfp.js";import"./base64Conver-24EVOS6V.js";import"./index-CIBZG4nR.js";import"./index-BhQEwnQQ.js";import"./useCountdown-DqnNWBp6.js";import"./useFormItemSingle-BbRhswfn.js";import"./JUpload-Cz9HN61B.js";import"./index-MGIrEF-A.js";import"./index-MREkPhsT.js";import"./injectionKey-DPVn4AgL.js";import"./renderUtils-BumghUlZ.js";import"./validator-D5SvXAAX.js";import"./user.api-C1eRtqao.js";const Z=F({name:"TenantPackUserModal",components:{BasicModal:L,BasicTable:Y,TableAction:X,TenantUserSelectModal:J},setup(){const t=O(()=>o.tenantId),o=v({}),[r,{setModalProps:d,closeModal:u}]=K(e=>g(null,null,function*(){d({confirmLoading:!1,showCancelBtn:!0,showOkBtn:!1}),Object.assign(o,e.record),yield p()})),{createMessage:b}=Q(),l=$("用户"),{tableContext:i}=V({tableProps:{api:G,immediate:!1,columns:q,canResize:!1,useSearchForm:!1,beforeFetch:e=>(e.tenantId=o.tenantId,e.packId=o.id,e.status=1,e),actionColumn:{width:120,fixed:"right"}}}),[a,{openModal:s,closeModal:M}]=H(),[n,{reload:p},{rowSelection:_,selectedRowKeys:ee}]=i;function y(e){return e.join(",")}function S(e){return[{label:"移除",popConfirm:{title:"是否确认移除",confirm:P.bind(null,e)}}]}function P(e){return g(this,null,function*(){let f={packId:e.packId,packName:e.packName,tenantId:o.tenantId,userId:e.id,realname:e.realname};yield z(f),yield p()})}function R(){s(!0,{list:[]})}function j(e){return g(this,null,function*(){if(e&&e.length>0){let f=[],h=[];for(let w of e)f.push(w.realname),h.push(w.id);let A={packId:o.id,packName:o.packName,tenantId:o.tenantId,userId:h.join(","),realname:f.join(",")};yield E(A),yield p()}M()})}return{title:l,registerModal:r,registerTable:n,rowSelection:_,getName:y,getTableAction:S,registerUserModal:a,addUser:R,onSelected:j,getTenantId:t}}});function x(t,o,r,d,u,b){const l=c("a-button"),i=c("TableAction"),a=c("BasicTable"),s=c("tenant-user-select-modal"),M=c("BasicModal");return T(),D(M,{onRegister:t.registerModal,destroyOnClose:"",title:t.title,width:1e3,footer:null},{default:m(()=>[k(a,{onRegister:t.registerTable,rowSelection:t.rowSelection},{departNames:m(({text:n,record:p})=>[n&&n.length>0?(T(),C(B,{key:0},[I(N(t.getName(n)),1)],64)):U("",!0)]),positionNames:m(({text:n,record:p})=>[n&&n.length>0?(T(),C(B,{key:0},[I(N(t.getName(n)),1)],64)):U("",!0)]),tableTitle:m(()=>[k(l,{preIcon:"ant-design:usergroup-add-outlined",type:"primary",onClick:t.addUser},{default:m(()=>[...o[0]||(o[0]=[I("邀请成员",-1)])]),_:1},8,["onClick"])]),action:m(({record:n})=>[k(i,{actions:t.getTableAction(n)},null,8,["actions"])]),_:1},8,["onRegister","rowSelection"]),k(s,{multi:!0,onRegister:t.registerUserModal,onOnSelect:t.onSelected,tenantId:t.getTenantId},null,8,["onRegister","onOnSelect","tenantId"])]),_:1},8,["onRegister","title"])}const pt=W(Z,[["render",x]]);export{pt as default};