2 lines
5.5 KiB
Java
2 lines
5.5 KiB
Java
var G=Object.defineProperty,L=Object.defineProperties;var V=Object.getOwnPropertyDescriptors;var x=Object.getOwnPropertySymbols;var E=Object.prototype.hasOwnProperty,J=Object.prototype.propertyIsEnumerable;var D=(r,o,e)=>o in r?G(r,o,{enumerable:!0,configurable:!0,writable:!0,value:e}):r[o]=e,U=(r,o)=>{for(var e in o||(o={}))E.call(o,e)&&D(r,e,o[e]);if(x)for(var e of x(o))J.call(o,e)&&D(r,e,o[e]);return r},R=(r,o)=>L(r,V(o));var C=(r,o,e)=>new Promise((f,s)=>{var l=a=>{try{c(e.next(a))}catch(u){s(u)}},g=a=>{try{c(e.throw(a))}catch(u){s(u)}},c=a=>a.done?f(a.value):Promise.resolve(a.value).then(l,g);c((e=e.apply(r,o)).next())});import{d as H,c as Q,w as W,ah as X,ar as Y,as as Z,k as p,u as m,aF as y,e as k,G as _,f as $,F as tt}from"./vue-vendor-C7Zq48Yl.js";import"./index-BgJbdjPf.js";import"./index-Du0A3ksf.js";import{a as P}from"./index-CjmLh_1m.js";import{useListPage as et}from"./useListPage-BWia52we.js";import ot from"./UserDrawer-Dh0tEU0P.js";import{U as rt}from"./JSelectUser-B71zikzw.js";import{j as it}from"./depart.api-DeMNV8zW.js";import{a as at}from"./depart.data-Bu7djTpv.js";import{l as st}from"./depart.user.api-Bund-856.js";import nt from"./BasicTable-DfLkrEeh.js";import{J as lt}from"./componentMap-BBZeqR-K.js";import{al as pt}from"./index-BI6CMai0.js";import"./antd-vue-vendor-BPnV8VqP.js";import"./BasicModal-0sAdFEk_.js";import"./ModalHeader-keHdAHWH.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"./JSelectDept-DRDVeruW.js";import"./props-DAezUTeZ.js";import"./index-CUdllngZ.js";import"./bem-EhXRi4nW.js";import"./props-D4vdsy3J.js";import"./useContextMenu-Cwx1lIOK.js";import"./TreeIcon-DE4jdeZV.js";import"./JSelectBiz-CnEaVMUF.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"./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"./user.data-CkfG18fs.js";import"./user.api-C1eRtqao.js";import"./validator-D5SvXAAX.js";import"./sysPasswordRules-C_oGkupc.js";import"./check.rule.api-Cg4DCH78.js";import"./renderUtils-BumghUlZ.js";import"./useAdaptiveWidth-CBQHITbA.js";const he=H({__name:"DepartUserList",props:{data:{require:!0,type:Object}},setup(r){const o=Q("prefixCls"),e=r,f=$(null),s=k(()=>{var t;return(t=e.data)==null?void 0:t.orgCode}),l=k(()=>{var t;return(t=e.data)==null?void 0:t.id}),g={xs:24,sm:24,md:24,lg:12,xl:12,xxl:8},{tableContext:c,createMessage:a}=et({tableProps:{api:it,columns:at,canResize:!1,rowKey:"id",formConfig:{baseColProps:g,labelAlign:"left",labelCol:{xs:24,sm:24,md:24,lg:9,xl:7,xxl:5},actionColOptions:R(U({},g),{style:{textAlign:"left"}})},tableSetting:{cacheKey:"depart_user_userInfo"},beforeFetch(t){return Object.assign(t,{orgCode:s.value})},immediate:!!s.value}}),[u,{reload:b,setProps:mt,setLoading:S,updateTableDataRecord:h},{rowSelection:M,selectedRowKeys:I}]=c;W(()=>e.data,()=>b());const[A,{openDrawer:w,setDrawerProps:ct}]=P(),[ut,dt]=P(),[O,F]=pt();function ft(){I.value=[]}function K(){return C(this,null,function*(){var t,i,d;if(!l.value)a.warning("请先选择一个部门");else{let n="",v=l.value;((t=e.data)==null?void 0:t.orgCategory)==="3"&&(n=l.value,v=e.data.parentId),w(!0,{isUpdate:!1,nextDepartOptions:{value:(i=e.data)==null?void 0:i.key,label:(d=e.data)==null?void 0:d.title},record:{mainDepPostId:n,activitiSync:1,userIdentity:1,selecteddeparts:v}})}})}function T(t){t.activitiSync=t.activitiSync?Number(t.activitiSync):1,w(!0,{record:t,isUpdate:!0,showFooter:!1})}function j(t){t.activitiSync=t.activitiSync?Number(t.activitiSync):1,w(!0,{isUpdate:!0,record:t,departDisabled:!0,departPostDisabled:!0})}function B(){f.value.rowSelection.selectedRowKeys=[],F.openModal()}function N(t,i){return C(this,null,function*(){if(i.length>0)try{S(!0),yield st(l.value,i),b()}finally{S(!1)}})}function q({isUpdate:t,values:i}){t?h(i.id,i):b()}function z(t){return[{label:"编辑",onClick:j.bind(null,t)},{label:"详情",onClick:T.bind(null,t)}]}return(t,i)=>{const d=X("a-button");return Z(),Y(tt,null,[p(m(nt),{onRegister:m(u),rowSelection:m(M)},{tableTitle:y(()=>{var n;return[p(d,{type:"primary",preIcon:"ant-design:plus-outlined",onClick:K,disabled:!s.value},{default:y(()=>[...i[0]||(i[0]=[_("新建用户",-1)])]),_:1},8,["disabled"]),p(d,{type:"primary",preIcon:"ant-design:plus-outlined",onClick:B,disabled:!s.value||((n=e.data)==null?void 0:n.orgCategory)==="3"},{default:y(()=>[...i[1]||(i[1]=[_("添加已有用户",-1)])]),_:1},8,["disabled"])]}),action:y(({record:n})=>[p(m(lt),{actions:z(n)},null,8,["actions"])]),_:1},8,["onRegister","rowSelection"]),p(ot,{onRegister:m(A),onSuccess:q},null,8,["onRegister"]),p(rt,{ref_key:"userSelectModalRef",ref:f,rowKey:"id",onRegister:m(O),onGetSelectResult:N},null,8,["onRegister"])],64)}}});export{he as default};
|