const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["js/BasicTable-C6eG0bgK.js","js/BasicTable.vue_vue_type_style_index_0_lang-B9DxrWas.js","js/vue-vendor-DNhG1Cve.js","js/BasicForm-ClUSoD_-.js","js/helper-DcLcf4v6.js","js/index-X7Y8jykP.js","js/emoji-mart-vue-fast-R0uJEDq-.js","assets/index-GuhSw_Yp.css","js/index-BzChaRPg.js","assets/index-DTCEk8S9.css","js/useAppInject-DPZGPcR3.js","js/BasicForm.vue_vue_type_style_index_0_lang-B29PWQy0.js","js/index-DO7ZhK45.js","js/index-ByCwbQDV.js","js/index-Upeu4GGa.js","js/index-C4wWpZeQ.js","js/useTimeout-D5AmIBZw.js","js/index-M9QP6cvf.js","js/Skeleton-CimgOdM7.js","js/useScrollTo-0FPEw5-K.js","js/useIntersectionObserver-BGOgyKyu.js","assets/index-zj-Vfn3Q.css","assets/BasicForm-BKgjVE-6.css","js/index-saD4h7VJ.js","js/useBreakpoint-DXhPW7nV.js","js/useEventListener-BRXjwk7A.js","js/breakpointEnum-BhAg6bcX.js","js/uniqBy--vsL0WVB.js","js/index-BDvqZ5j4.js","js/BasicModal-xH56XuRZ.js","js/ModalHeader-Sr8KwhJJ.js","assets/ModalHeader-CLCbovMP.css","js/useWindowSizeFn-C-0M9_Ul.js","js/index-CuWaQdlK.js","assets/BasicModal-ByeTDAzn.css","assets/index-CUOTvden.css","js/useForm-D61zovon.js","js/injectionKey-DPVn4AgL.js","js/index-DSsDi_fL.js","js/Group-UHkub2tu.js","js/Checkbox-Dbxs4we4.js","js/index-BuONesFs.js","js/FormOutlined-Y84itqS0.js","js/useTableContext-CncNVXgp.js","js/index-DTjkSGYl.js","js/eagerComputed-BTlOruLW.js","js/fromPairs-Dx9PT-t0.js","js/useMaxLevel-DE205ncc.js","js/index-CfNJyBRj.js","js/dropdown-jkliuVyN.js","js/index-DfHu-LAS.js","js/Group-DBzJABA_.js","js/RadioButton-DRBix2Fq.js","js/index-C7ckZv9Z.js","js/DirectoryTree-nk_YTTIy.js","js/FolderOpenOutlined-SzIPA7z0.js","js/index-Cl-8Hzo4.js","js/scrollTo-D49dA-9c.js","js/operationUnit-vCu2co3e.js","js/index-C69VKHba.js","js/index-DklMb9Qc.js","js/UpOutlined-B1UMbtrP.js","js/index-DsixALRt.js","js/dayjs-jnKD3YGS.js","js/index-aCD42OrZ.js","js/quarterOfYear-BU2sPnff.js","js/index-J2mOtM3w.js","js/dayjs-ALi1pEeb.js","js/clickOutside-DHfwTU6R.js","js/onMountedOrActivated-DhSdLlqP.js","js/throttle-De_jAmBh.js","js/uuid-CODpppBC.js","js/sortable.esm-DJNoJSdJ.js","js/RedoOutlined-Cq2g4Slp.js","js/index-CeNCCWzL.js","assets/BasicTable-Wa_ugCm0.css"])))=>i.map(i=>d[i]); var E=Object.defineProperty,J=Object.defineProperties;var K=Object.getOwnPropertyDescriptors;var A=Object.getOwnPropertySymbols;var W=Object.prototype.hasOwnProperty,Q=Object.prototype.propertyIsEnumerable;var B=(e,o,a)=>o in e?E(e,o,{enumerable:!0,configurable:!0,writable:!0,value:a}):e[o]=a,m=(e,o)=>{for(var a in o||(o={}))W.call(o,a)&&B(e,a,o[a]);if(A)for(var a of A(o))Q.call(o,a)&&B(e,a,o[a]);return e},T=(e,o)=>J(e,K(o));import{p as G,cC as x,_ as q,aO as X,cD as Y,aQ as Z,au as ee}from"./index-X7Y8jykP.js";import{B as te}from"./index-BDvqZ5j4.js";import{u as oe}from"./useSelectBiz-C58pZLPQ.js";import{s as ae}from"./props-BWd0f6uH.js";import{a as ne}from"./useModal-DaJ3Bflg.js";import{e as se,u as O,r as f,h as le,c as ie,C as re,z as ce,f as s,A as r,B as b,K as S,Q as ue}from"./vue-vendor-DNhG1Cve.js";import{O as de}from"./index-CuWaQdlK.js";import{A as me}from"./index-DO7ZhK45.js";const fe=se({name:"UserSelectModal",components:{BasicModal:te,BasicTable:G(()=>q(()=>import("./BasicTable-C6eG0bgK.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75])),{loading:!0})},props:T(m({},ae),{modalTitle:{type:String,default:"选择用户"},excludeUserIdList:{type:Array,default:[]},modalWrapClassName:{type:String,default:"j-user-select-modal"},customListApi:{type:Function},customApiJInput:{type:Boolean,default:!0},customFormConfig:{type:Object},customTableColumns:{type:Array}}),emits:["register","getSelectResult","close"],setup(e,{emit:o,refs:a}){var v;const c=f({x:!1}),l=f(),p=f(600),i=ie(()=>typeof e.customListApi=="function"),[u,{closeModal:h}]=ne(()=>{window.innerWidth<900?c.value={x:900}:c.value={x:!1},setTimeout(()=>{let t=H.value;Y(t)&&(t=Z(t)),l.value&&l.value.setSelectedRowKeys(t||[])},800)}),g=X(),C={canResize:!1,bordered:!0,size:"small"},d=Object.assign({},O(e),O(g),C),[{rowSelection:w,visibleChange:F,selectValues:H,indexColumnProps:z,getSelectResult:_,handleDeleteSelected:L,selectRows:P}]=oe(x,d,o),k=f(e.params);le(w.selectedRowKeys,t=>{l.value&&l.value.setSelectedRowKeys(t)});const V=m({baseColProps:{xs:24,sm:8,md:6,lg:8,xl:6,xxl:6},actionColOptions:{xs:24,sm:8,md:8,lg:8,xl:8,xxl:8},schemas:[{label:"账号",field:"username",component:i.value&&!e.customApiJInput?"Input":"JInput"},{label:"姓名",field:"realname",component:i.value&&!e.customApiJInput?"Input":"JInput"}],autoSubmitOnEnter:!0},e.customFormConfig),M=(v=e.customTableColumns)!=null&&v.length?e.customTableColumns:[{title:"用户账号",dataIndex:"username",width:120,align:"left"},{title:"用户姓名",dataIndex:"realname",width:120},{title:"性别",dataIndex:"sex_dictText",width:50},{title:"手机号码",dataIndex:"phone",width:120,customRender:({record:t,text:n})=>t.izHideContact&&t.izHideContact==="1"?"/":n},{title:"邮箱",dataIndex:"email",customRender:({record:t,text:n})=>t.izHideContact&&t.izHideContact==="1"?n?"/":"":n},{title:"状态",dataIndex:"status_dictText",width:80}],U={pagination:!1,showIndexColumn:!1,scroll:{y:390},size:"small",canResize:!1,bordered:!0,rowKey:"id",columns:[{title:"用户姓名",dataIndex:"realname",width:40},{title:"操作",dataIndex:"action",align:"center",width:40,slots:{customRender:"action"}}]};function D(){_((t,n)=>{o("getSelectResult",t,n),h()})}function N(t){let n=e.excludeUserIdList;if(!n)return t;let y=[];if(n.length>0&&t&&t.length>0){for(let R of t)n.indexOf(R.id)<0&&y.push(m({},R));return y}return t}const $=()=>{o("close")},I=document.documentElement.clientHeight*200;p.value=I>600?600:I;function j(t){return Object.assign({column:"createTime",order:"desc"},t)}return{handleOk:D,searchInfo:k,register:u,indexColumnProps:z,visibleChange:F,getBindValue:d,getUserList:x,formConfig:V,columns:M,rowSelection:w,selectRows:P,selectedTable:U,handleDeleteSelected:L,tableScroll:c,tableRef:l,afterFetch:N,handleCancel:$,maxHeight:p,beforeFetch:j,hasCustomApi:i}}}),pe=["onClick"];function he(e,o,a,c,l,p){const i=S("BasicTable"),u=me,h=S("Icon"),g=de,C=S("BasicModal");return ce(),re("div",null,[s(C,b(e.$attrs,{onRegister:e.register,title:e.modalTitle,width:e.showSelected?"1200px":"900px",wrapClassName:e.modalWrapClassName,onOk:e.handleOk,onCancel:e.handleCancel,maxHeight:e.maxHeight,centered:!0,destroyOnClose:"",onVisibleChange:e.visibleChange}),{default:r(()=>[s(g,null,{default:r(()=>[s(u,{span:e.showSelected?18:24},{default:r(()=>[s(i,b({ref:"tableRef",columns:e.columns,scroll:e.tableScroll},e.getBindValue,{useSearchForm:!0,formConfig:e.formConfig,api:e.hasCustomApi?e.customListApi:e.getUserList,searchInfo:e.searchInfo,rowSelection:e.rowSelection,indexColumnProps:e.indexColumnProps,afterFetch:e.afterFetch,beforeFetch:e.beforeFetch,defSort:{column:"",order:""}}),{tableTitle:r(()=>[...o[0]||(o[0]=[])]),_:1},16,["columns","scroll","formConfig","api","searchInfo","rowSelection","indexColumnProps","afterFetch","beforeFetch"])]),_:1},8,["span"]),s(u,{span:e.showSelected?6:0},{default:r(()=>[s(i,b(e.selectedTable,{dataSource:e.selectRows,useSearchForm:!0,formConfig:{showActionButtonGroup:!1,baseRowStyle:{minHeight:"40px"}}}),{action:r(({record:d})=>[ue("a",{href:"javascript:void(0)",onClick:w=>e.handleDeleteSelected(d)},[s(h,{icon:"ant-design:delete-outlined"})],8,pe)]),_:1},16,["dataSource"])]),_:1},8,["span"])]),_:1})]),_:1},16,["onRegister","title","width","wrapClassName","onOk","onCancel","maxHeight","onVisibleChange"])])}const Ae=ee(fe,[["render",he]]);export{Ae as U};