2 lines
5.7 KiB
Java
2 lines
5.7 KiB
Java
var g=(e,o,a)=>new Promise((d,u)=>{var b=r=>{try{n(a.next(r))}catch(m){u(m)}},p=r=>{try{n(a.throw(r))}catch(m){u(m)}},n=r=>r.done?d(r.value):Promise.resolve(r.value).then(b,p);n((a=a.apply(e,o)).next())});import{B as j}from"./index-BDvqZ5j4.js";import F from"./BasicTable-C6eG0bgK.js";import $ from"./TableAction-BiXnWkvt.js";import"./TableImg.vue_vue_type_style_index_0_lang-65ZOQtFn.js";import{s as D,au as L}from"./index-X7Y8jykP.js";import{u as V}from"./useListPage-CK9oQ-1O.js";import{d as q}from"./tenant.data-DaXPsI2H.js";import{f as v,h as z,q as E}from"./tenant.api-CINwvO59.js";import K from"./TenantUserSelectModal-Ckw4dgs7.js";import{a as G,u as H}from"./useModal-DaJ3Bflg.js";import{e as J,c as Q,r as W,b as X,y as Y,z as T,A as s,K as c,f as k,E as I,C,H as U,F as y,G as B}from"./vue-vendor-DNhG1Cve.js";import"./BasicModal-xH56XuRZ.js";import"./ModalHeader-Sr8KwhJJ.js";import"./useTimeout-D5AmIBZw.js";import"./emoji-mart-vue-fast-R0uJEDq-.js";import"./index-BzChaRPg.js";import"./useWindowSizeFn-C-0M9_Ul.js";import"./index-ByCwbQDV.js";import"./index-Upeu4GGa.js";import"./index-C4wWpZeQ.js";import"./index-M9QP6cvf.js";import"./Skeleton-CimgOdM7.js";import"./useScrollTo-0FPEw5-K.js";import"./useIntersectionObserver-BGOgyKyu.js";import"./useAppInject-DPZGPcR3.js";import"./index-CuWaQdlK.js";import"./index-DO7ZhK45.js";import"./BasicTable.vue_vue_type_style_index_0_lang-B9DxrWas.js";import"./BasicForm-ClUSoD_-.js";import"./helper-DcLcf4v6.js";import"./BasicForm.vue_vue_type_style_index_0_lang-B29PWQy0.js";import"./index-saD4h7VJ.js";import"./useBreakpoint-DXhPW7nV.js";import"./useEventListener-BRXjwk7A.js";import"./breakpointEnum-BhAg6bcX.js";import"./uniqBy--vsL0WVB.js";import"./useForm-D61zovon.js";import"./injectionKey-DPVn4AgL.js";import"./index-DSsDi_fL.js";import"./Group-UHkub2tu.js";import"./Checkbox-Dbxs4we4.js";import"./index-BuONesFs.js";import"./FormOutlined-Y84itqS0.js";import"./useTableContext-CncNVXgp.js";import"./index-DTjkSGYl.js";import"./eagerComputed-BTlOruLW.js";import"./fromPairs-Dx9PT-t0.js";import"./useMaxLevel-DE205ncc.js";import"./index-CfNJyBRj.js";import"./dropdown-jkliuVyN.js";import"./index-DfHu-LAS.js";import"./Group-DBzJABA_.js";import"./RadioButton-DRBix2Fq.js";import"./index-C7ckZv9Z.js";import"./DirectoryTree-nk_YTTIy.js";import"./FolderOpenOutlined-SzIPA7z0.js";import"./index-Cl-8Hzo4.js";import"./scrollTo-D49dA-9c.js";import"./operationUnit-vCu2co3e.js";import"./index-C69VKHba.js";import"./index-DklMb9Qc.js";import"./UpOutlined-B1UMbtrP.js";import"./index-DsixALRt.js";import"./dayjs-jnKD3YGS.js";import"./index-aCD42OrZ.js";import"./quarterOfYear-BU2sPnff.js";import"./index-J2mOtM3w.js";import"./dayjs-ALi1pEeb.js";import"./clickOutside-DHfwTU6R.js";import"./onMountedOrActivated-DhSdLlqP.js";import"./throttle-De_jAmBh.js";import"./uuid-CODpppBC.js";import"./sortable.esm-DJNoJSdJ.js";import"./RedoOutlined-Cq2g4Slp.js";import"./index-CeNCCWzL.js";import"./TableAction.vue_vue_type_style_index_0_lang-BIWZ0bGo.js";import"./index-fAAIzD3j.js";import"./index-DfX9t4DO.js";import"./isNumeric-DjvBa-1E.js";import"./useTable-DbHE4FHE.js";import"./useMethods-D3efiSSd.js";import"./useApprovalSelection-D4wlWO_T.js";import"./renderUtils-BiIzV8ua.js";import"./index-Cmtq_YLa.js";import"./Editor-DbH9VuAv.js";import"./index-Cq6YxX27.js";import"./JDictSelectUtil-DwVTEDM5.js";import"./index-B4gPlWQt.js";import"./validator-CQGbnGwd.js";import"./user.api-M95RuX7p.js";const Z=J({name:"TenantPackUserModal",components:{BasicModal:j,BasicTable:F,TableAction:$,TenantUserSelectModal:K},setup(){const e=Q(()=>o.tenantId),o=X({}),[a,{setModalProps:d,closeModal:u}]=G(t=>g(null,null,function*(){d({confirmLoading:!1,showCancelBtn:!0,showOkBtn:!1}),Object.assign(o,t.record),yield l()})),{createMessage:b}=D(),p=W("用户"),{tableContext:n}=V({tableProps:{api:E,immediate:!1,columns:q,canResize:!1,useSearchForm:!1,beforeFetch:t=>(t.tenantId=o.tenantId,t.packId=o.id,t.status=1,t),actionColumn:{width:120,fixed:"right"}}}),[r,{openModal:m,closeModal:M}]=H(),[i,{reload:l},{rowSelection:N,selectedRowKeys:tt}]=n;function _(t){return t.join(",")}function S(t){return[{label:"移除",popConfirm:{title:"是否确认移除",confirm:P.bind(null,t)}}]}function P(t){return g(this,null,function*(){let f={packId:t.packId,packName:t.packName,tenantId:o.tenantId,userId:t.id,realname:t.realname};yield v(f),yield l()})}function R(){m(!0,{list:[]})}function A(t){return g(this,null,function*(){if(t&&t.length>0){let f=[],w=[];for(let h of t)f.push(h.realname),w.push(h.id);let O={packId:o.id,packName:o.packName,tenantId:o.tenantId,userId:w.join(","),realname:f.join(",")};yield z(O),yield l()}M()})}return{title:p,registerModal:a,registerTable:i,rowSelection:N,getName:_,getTableAction:S,registerUserModal:r,addUser:R,onSelected:A,getTenantId:e}}});function x(e,o,a,d,u,b){const p=c("a-button"),n=c("TableAction"),r=c("BasicTable"),m=c("tenant-user-select-modal"),M=c("BasicModal");return T(),Y(M,{onRegister:e.registerModal,destroyOnClose:"",title:e.title,width:1e3,footer:null},{default:s(()=>[k(r,{onRegister:e.registerTable,rowSelection:e.rowSelection},{departNames:s(({text:i,record:l})=>[i&&i.length>0?(T(),C(y,{key:0},[I(B(e.getName(i)),1)],64)):U("",!0)]),positionNames:s(({text:i,record:l})=>[i&&i.length>0?(T(),C(y,{key:0},[I(B(e.getName(i)),1)],64)):U("",!0)]),tableTitle:s(()=>[k(p,{preIcon:"ant-design:usergroup-add-outlined",type:"primary",onClick:e.addUser},{default:s(()=>[...o[0]||(o[0]=[I("邀请成员",-1)])]),_:1},8,["onClick"])]),action:s(({record:i})=>[k(n,{actions:e.getTableAction(i)},null,8,["actions"])]),_:1},8,["onRegister","rowSelection"]),k(m,{multi:!0,onRegister:e.registerUserModal,onOnSelect:e.onSelected,tenantId:e.getTenantId},null,8,["onRegister","onOnSelect","tenantId"])]),_:1},8,["onRegister","title"])}const Le=L(Z,[["render",x]]);export{Le as default};
|