var E=Object.defineProperty;var j=Object.getOwnPropertySymbols;var J=Object.prototype.hasOwnProperty,R=Object.prototype.propertyIsEnumerable;var P=(o,t,e)=>t in o?E(o,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):o[t]=e,y=(o,t)=>{for(var e in t||(t={}))J.call(t,e)&&P(o,e,t[e]);if(j)for(var e of j(t))R.call(t,e)&&P(o,e,t[e]);return o};var D=(o,t,e)=>new Promise((g,d)=>{var c=l=>{try{b(e.next(l))}catch(p){d(p)}},h=l=>{try{b(e.throw(l))}catch(p){d(p)}},b=l=>l.done?g(l.value):Promise.resolve(l.value).then(c,h);b((e=e.apply(o,t)).next())});import{_ as U,d as z,b as G,r as N,N as K,f as m,g as $,K as q,m as n,i as L,l as r,p as k,a4 as A}from"./index.9fabe127.js";const F={class:"search mb-16"},M={class:"dialog-footer"},H=z({name:"userListDialog"}),Q=Object.assign(H,{props:{visible:{type:Boolean,default:!1,required:!0},data:{type:Array,default:void 0},params:{type:Object,default:()=>({})}},emits:["close","getProjectData"],setup(o,{emit:t}){const e=o,g=t,d=G({name:void 0}),c=N(),h=N(0),b=[{type:"selection",reserveSelection:!0,width:"55"},{label:"\u59D3\u540D",key:"name",prop:"name"},{label:"\u624B\u673A\u53F7\u7801",key:"phoneNo",prop:"phoneNo",width:"150"},{label:"\u6240\u5C5E\u5355\u4F4D\uFF08\u4E3B\u804C\uFF09",key:"orgName",prop:"orgName",showOverflowTooltip:!0,width:250},{label:"\u6240\u5C5E\u533A\u57DF",key:"regionName",prop:"regionName",width:"150"}],l=N([]),p=(...s)=>D(this,[...s],function*(i=(a=>(a=c.value)==null?void 0:a.pageParams)()){const u=yield A(y(y(y({},i),d),e.params));h.value=u.data.total,l.value=u.data.records||[];const _=JSON.parse(JSON.stringify(f.value))||[];_!=null&&_.length&&l.value&&l.value.forEach(v=>{_.map(w=>w.userId).includes(v.userId)&&c.value.toggleRowSelect(v,!0)})}),S=()=>{c.value.pageParams.pageNumber=1,p()},V=()=>{d.name=void 0,c.value.pageParams.pageNumber=1,c.value.pageParams.pageSize=10,p()},f=N([]),x=i=>{const a=i.map(s=>s.userId);l.value.forEach(s=>{a.includes(s.userId)?f.value.push(s):f.value=f.value.filter(u=>u.userId!==s.userId)})},O=()=>{const i={},a=f.value.reduce((s,u)=>(i[u.userId]||(i[u.userId]=s.push(u)),s),[]);g("getProjectData",a)};return K(()=>e.visible,i=>D(this,null,function*(){var a;i&&((a=e.data)!=null&&a.length?f.value=e.data.map(s=>s):f.value=[],p())})),(i,a)=>{const s=m("el-input"),u=m("el-form-item"),_=m("el-col"),v=m("el-button"),C=m("el-row"),w=m("el-form"),B=m("table-list"),T=m("el-dialog");return $(),q(T,{"model-value":o.visible,title:"\u6DFB\u52A0\u4EBA\u5458",width:"70%","destroy-on-close":"",onClose:a[2]||(a[2]=I=>g("close"))},{footer:n(()=>[L("span",M,[r(v,{onClick:a[1]||(a[1]=I=>g("close"))},{default:n(()=>[k("\u5173\u95ED")]),_:1}),r(v,{type:"primary",onClick:O},{default:n(()=>[k(" \u786E\u5B9A ")]),_:1})])]),default:n(()=>[L("div",F,[r(w,{"label-suffix":":",model:d,size:"small"},{default:n(()=>[r(C,{gutter:16},{default:n(()=>[r(_,{span:8},{default:n(()=>[r(u,{label:"\u7528\u6237\u59D3\u540D"},{default:n(()=>[r(s,{modelValue:d.name,"onUpdate:modelValue":a[0]||(a[0]=I=>d.name=I),placeholder:"\u8BF7\u8F93\u5165"},null,8,["modelValue"])]),_:1})]),_:1}),r(_,{span:16},{default:n(()=>[r(u,{class:"btn"},{default:n(()=>[r(v,{type:"primary",onClick:S},{default:n(()=>[k("\u67E5\u8BE2")]),_:1}),r(v,{onClick:V},{default:n(()=>[k("\u91CD\u7F6E")]),_:1})]),_:1})]),_:1})]),_:1})]),_:1},8,["model"])]),r(B,{ref_key:"tableListRef",ref:c,column:b,data:l.value,total:h.value,"row-key":"userId",onSelectionChange:x,onGetTableData:p},null,8,["data","total"])]),_:1},8,["model-value"])}}}),Y=U(Q,[["__file","/Users/chenlixin/Documents/work/NDKJ/MyProject/ls-project-v2.0/src/pages/performanceEvaluation/evaluationPlan/projectGroup/components/userListDialog.vue"]]);export{Y as default};
