var g=(h,s,e)=>new Promise((m,r)=>{var c=t=>{try{i(e.next(t))}catch(a){r(a)}},d=t=>{try{i(e.throw(t))}catch(a){r(a)}},i=t=>t.done?m(t.value):Promise.resolve(t.value).then(c,d);i((e=e.apply(h,s)).next())});import{d as I,p as y,f as _,U as w,a2 as v,ad as k,af as n,k as l,a4 as N,u as x,G as S,a5 as T,a6 as P}from"./vue-vendor-CxLCUzY4.js";import{C as R}from"./index-B_2CoVdl.js";import{l as z,p as B,_ as V}from"./DepartLeftTree-DcB8bRY8.js";import"./index-LwlFn7Y4.js";import{useListPage as j}from"./useListPage-BEtybUiF.js";import D from"./BasicTable-Clbg3fHx.js";import"./antd-vue-vendor-CDWW6V_M.js";import"./vxe-table-vendor-B5h3MVdD.js";import"./depart.user.api-aVbBcQcJ.js";import"./componentMap-CzCGDP7x.js";import"./useFormItem-CWa0w7fA.js";import"./index-D2AmS0aU.js";import"./BasicModal-D3g2CFhF.js";import"./ModalHeader-C-C0dUi_.js";import"./useTimeout-CB9F1PLu.js";import"./index-DAURrYyA.js";import"./useWindowSizeFn-C3WExEpc.js";import"./index-Dz2zbQB_.js";import"./index-exs4VcBw.js";import"./index-ByLO0zSl.js";import"./useIntersectionObserver-FVRzwlSd.js";import"./download-2tYEzlDW.js";import"./base64Conver-24EVOS6V.js";import"./index-Cgt544dC.js";import"./index-BZ9ST2iq.js";import"./useCountdown-ImUE7YaG.js";import"./useFormItemSingle-DM34aWgK.js";import"./JSelectUser-BQIJUcBR.js";import"./props-BCVPj-bG.js";import"./JSelectBiz-CJyWq5s2.js";import"./JAddInput-YFlAniYT.js";import"./areaDataUtil-DFHnz1wu.js";import"./china-area-data-vendor-D0sJ9kfX.js";import"./index-CkL00Q0a.js";import"./index-BKs2x_To.js";import"./bem-C6eT35UB.js";import"./props-BLY2qIO5.js";import"./useContextMenu-CSt5a1-F.js";import"./depart.api-0qTriT9h.js";import"./JDictSelectTag-CxpDdimB.js";import"./JSelectDept-wKz_Qtmc.js";import"./JPopup-BJBYqoWe.js";import"./JEllipsis-Cn7GCKHR.js";import"./JUpload-DzM-D4DX.js";import"./index-khU3p_On.js";import"./index-DPEnuI0R.js";import"./index-Cnb8BkwG.js";import"./index-ARbUvvsq.js";import"./useForm-CcjrODHR.js";import"./JAreaLinkage-CSgDAlrn.js";import"./JCodeEditor-esTLnfS3.js";import"./htmlmixed-DRe7JlAp.js";import"./vue-B0b3nX1K.js";/* empty css             */import"./EasyCronInput-DclSHT47.js";import"./injectionKey-DPVn4AgL.js";const F=[{title:"姓名",dataIndex:"realname",width:150},{title:"工号",dataIndex:"workNo",width:100},{title:"部门",dataIndex:"departName",width:200},{title:"职务",dataIndex:"post",width:150,slots:{customRender:"post"}},{title:"手机",width:150,dataIndex:"telephone"},{title:"邮箱",width:150,dataIndex:"email"}],K=[{label:"姓名",field:"realname",component:"Input",colProps:{span:6}},{label:"工号",field:"workNo",component:"Input",colProps:{span:6}}],L={style:{height:"100%"},class:"address-book"},Gt=I({__name:"index",setup(h){const{prefixCls:s}=R("address-list");y("prefixCls",s);const e=_(),m=_(""),r=_({}),{tableContext:c}=j({tableProps:{api:z,columns:F,rowKey:"userId",showIndexColumn:!0,formConfig:{schemas:K},canResize:!1,actionColumn:null,showTableSetting:!1,beforeFetch(o){o.orgCode=m.value}}}),[d,{reload:i}]=c;function t(o){m.value=o.orgCode,i()}function a(){return g(this,null,function*(){const o=yield B({pageSize:99999});if(o){let f={};o.records.forEach(p=>{f[p.id]=p.name}),r.value=f}})}return a(),(o,f)=>{const p=w("a-col"),C=w("a-row");return v(),k(C,{class:P(["p-4",`${x(s)}--box`]),type:"flex",gutter:10,style:{"max-height":"800px"}},{default:n(()=>[l(p,{xl:6,lg:24,md:24,style:{"margin-bottom":"10px"}},{default:n(()=>[l(V,{ref_key:"leftTree",ref:e,onSelect:t},null,512)]),_:1}),l(p,{xl:18,lg:24,md:24,style:{"margin-bottom":"10px"}},{default:n(()=>[N("div",L,[l(x(D),{onRegister:x(d)},{post:n(({text:b})=>[S(T((b||"").split(",").map(u=>r.value[u]?r.value[u]:u).join(",")),1)]),_:1},8,["onRegister"])])]),_:1})]),_:1},8,["class"])}}});export{Gt as default};
