import{u as M}from"./useTable-34acff72-1782572373740v=1.0.0.js";import{b as U,u as j,a as G,F as J,_ as O}from"./index-f6f689f9-1782572373740v=1.0.0.js";import{r as b,y as $,c as q,h as K,m as Q,al as s,z as W,I as X,J as l,R as u,u as a,B as h,P as Y,O as v,k as ee,n as ae}from"./vendor-866bb149-1782572373740v=1.0.0.js";import{u as te}from"./useSelection-ba27a2e2-1782572373740v=1.0.0.js";import"./notData-cef8761e-1782572373740v=1.0.0.js";import"./eleVendor-48a7d3b8-1782572373740v=1.0.0.js";const le=p=>{U();const m=b([{prop:"keyword",label:"\u540D\u79F0",search:{el:"input",placeholder:"\u8BF7\u8F93\u5165\u59D3\u540D\u3001\u5B66\u5DE5\u53F7"}}]),n=b([{prop:"checkbox",label:"\u9009\u62E9",type:"selection",width:50,fixed:"left"},{type:"index",label:"\u5E8F\u53F7",width:70,fixed:"left"},{label:"\u540D\u79F0",prop:"name"},{label:"\u5B66\u5DE5\u53F7",prop:"tsNo"},{label:"\u7528\u6237\u7C7B\u578B",prop:"userManagerTypeCn"},{label:"\u5B66\u9662",prop:"collegeName"},{label:"\u4E13\u4E1A",prop:"majorName"},{label:"\u73ED\u7EA7",prop:"className"},{label:"\u521B\u5EFA\u65F6\u95F4",prop:"createTime"}]);return{columns:m,tableColumns:n,dataCallBack:o=>(p&&p(o.listData),o),paramCallBack:o=>o}},oe=le,ne={class:"selected-list"},se={class:"left"},ue=$({__name:"AddAdminSelectDialog",props:{visible:{type:Boolean,default:!1},title:{default:"\u9009\u62E9\u9ED1\u540D\u5355"},loading:{type:Boolean,default:!1},eventGroupInfo:{default:()=>({})},value:{default:()=>({})}},emits:["update:visible","update:value","submit","update:loading"],setup(p,{emit:m}){const n=p,c=m,r=q({get:()=>n.visible,set:t=>{c("update:visible",t)}}),o=b(null);K(r,async t=>{t&&await P()});const B=()=>{ae(()=>{_.value.forEach(t=>{n.value.unitForm.personnelIds.includes(t.personnelId)&&o.value.element.toggleRowSelection(t,!0)})})};j(),G();const{tableColumns:S,columns:D,dataCallBack:F,paramCallBack:k}=oe(B),{isSelected:re,selectedList:f,selectedListIds:ie,selectionChange:y}=te("personnelId"),{tableData:_,pageable:i,baseParam:A,searchParam:E,totalParam:de,pageParam:pe,handleSizeChange:x,handleCurrentChange:z,getTableList:P,search:w,reset:I,loading:T}=M(J,F,k),g=()=>{c("update:visible",!1)},H=()=>{let t=f.value.map(e=>({personnelId:e.personnelId,name:e.name}));c("submit",t),g()};return Q(()=>{A.value={tsManageTypeList:["biz","school"]}}),(t,e)=>{const N=s("HZSearchForm"),R=s("HZProTable"),V=s("el-pagination"),L=s("HZPageLayout"),C=s("el-button"),Z=s("el-dialog");return W(),X(Z,{modelValue:a(r),"onUpdate:modelValue":e[2]||(e[2]=d=>ee(r)?r.value=d:null),width:"1000px",title:n.title,"before-close":g},{default:l(()=>[u(L,{isCard:!1},{searchForm:l(()=>[u(N,{"search-param":a(E),columns:a(D),search:a(w),reset:a(I),searchCol:3},null,8,["search-param","columns","search","reset"])]),pagination:l(()=>[h("div",ne,[h("div",se,"\u5DF2\u9009\u62E9\uFF1A"+Y(a(f).length)+"\u6761",1),u(V,{"current-page":a(i).page,"onUpdate:currentPage":e[0]||(e[0]=d=>a(i).page=d),"page-size":a(i).size,"onUpdate:pageSize":e[1]||(e[1]=d=>a(i).size=d),"page-sizes":[10,20,50,100],background:"",layout:"total, sizes, prev, pager, next",total:a(i).count,onSizeChange:a(x),onCurrentChange:a(z)},null,8,["current-page","page-size","total","onSizeChange","onCurrentChange"])])]),default:l(()=>[u(R,{columns:a(S),data:a(_),isFlex:!1,loading:a(T),showColSet:!1,"row-key":"personnelId",ref_key:"tableRef",ref:o,onSelectionChange:a(y)},{tableHeader:l(()=>e[3]||(e[3]=[])),toolButton:l(()=>e[4]||(e[4]=[])),_:1},8,["columns","data","loading","onSelectionChange"])]),_:1})]),footer:l(()=>[u(C,{onClick:g},{default:l(()=>e[5]||(e[5]=[v("\u53D6\u6D88",-1)])),_:1,__:[5]}),u(C,{type:"primary",onClick:H,loading:n.loading},{default:l(()=>e[6]||(e[6]=[v("\u786E\u5B9A",-1)])),_:1,__:[6]},8,["loading"])]),_:1},8,["modelValue","title"])}}});const Ce=O(ue,[["__scopeId","data-v-39252cdb"]]);export{Ce as default};
