var j=Object.defineProperty,z=Object.defineProperties;var B=Object.getOwnPropertyDescriptors;var S=Object.getOwnPropertySymbols;var J=Object.prototype.hasOwnProperty,L=Object.prototype.propertyIsEnumerable;var U=(o,l,e)=>l in o?j(o,l,{enumerable:!0,configurable:!0,writable:!0,value:e}):o[l]=e,C=(o,l)=>{for(var e in l||(l={}))J.call(l,e)&&U(o,e,l[e]);if(S)for(var e of S(l))L.call(l,e)&&U(o,e,l[e]);return o},x=(o,l)=>z(o,B(l));var D=(o,l,e)=>new Promise((g,u)=>{var p=n=>{try{v(e.next(n))}catch(b){u(b)}},N=n=>{try{v(e.throw(n))}catch(b){u(b)}},v=n=>n.done?g(n.value):Promise.resolve(n.value).then(p,N);v((e=e.apply(o,l)).next())});import{_ as A,d as G,b as K,r as I,I as $,H as q,N as F,f as m,g as H,K as Q,m as s,l as t,p as w,i as W,a4 as X}from"./index.9fabe127.js";const Y={class:"search mb-16"},Z=G({name:"addUserDialog"}),ee=Object.assign(Z,{props:{visible:{type:Boolean,default:!1,required:!0},data:{type:Array,default:void 0}},emits:["close","getUserData"],setup(o,{emit:l}){const e=o,g=l,u=K({name:void 0,phoneNo:void 0}),p=I(),N=I(0),v=[{type:"selection",reserveSelection:!0,width:"55"},{label:"\u59D3\u540D",key:"name",prop:"name"},{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"},{label:"\u8054\u7CFB\u65B9\u5F0F",key:"phoneNo",prop:"phoneNo",width:"150"}],n=I([]),b=$(q.userStore).userInfo||{},y=(...r)=>D(this,[...r],function*(i=(a=>(a=p.value)==null?void 0:a.pageParams)()){const d=yield X(x(C(C({},i),u),{regionId:b.value.regionCode,roleCode:"MEETING_SUPERVISTOR"}));N.value=d.data.total,n.value=d.data.records||[];const c=JSON.parse(JSON.stringify(_.value));c!=null&&c.length&&n.value&&n.value.forEach(f=>{c.map(k=>k.userId*1).includes(f.userId)&&p.value.toggleRowSelect(f,!0)})}),T=()=>{y()},R=()=>{u.name=void 0,u.phoneNo=void 0,p.value.pageParams.pageNumber=1,p.value.pageParams.pageSize=10,y()},_=I([]),E=i=>{const a=i.map(r=>r.userId);n.value.forEach(r=>{a.includes(r.userId)?_.value.push(r):_.value=_.value.filter(d=>d.userId!==r.userId)})},M=()=>{const i={},a=_.value.reduce((r,d)=>(i[d.userId]||(i[d.userId]=r.push(d)),r),[]);g("getUserData",a)};return F(()=>e.visible,i=>D(this,null,function*(){var a;i&&(_.value=(a=e.data)!=null&&a.length?e.data.map(r=>r):[],y())})),(i,a)=>{const r=m("el-input"),d=m("el-form-item"),c=m("el-col"),f=m("el-button"),V=m("el-row"),k=m("el-form"),O=m("table-list"),P=m("el-dialog");return H(),Q(P,{"model-value":o.visible,title:"\u9009\u62E9\u4EBA\u5458",width:"840px","destroy-on-close":"",onClose:a[3]||(a[3]=h=>g("close"))},{footer:s(()=>[t(f,{type:"primary",size:"small",onClick:M},{default:s(()=>[w(" \u786E\u5B9A ")]),_:1}),t(f,{size:"small",onClick:a[2]||(a[2]=h=>g("close"))},{default:s(()=>[w(" \u5173\u95ED ")]),_:1})]),default:s(()=>[W("div",Y,[t(k,{"label-suffix":":",model:u,size:"small"},{default:s(()=>[t(V,{gutter:16,class:"mb-16"},{default:s(()=>[t(c,{span:8},{default:s(()=>[t(d,{label:"\u6284\u9001\u4EBA\u59D3\u540D"},{default:s(()=>[t(r,{modelValue:u.name,"onUpdate:modelValue":a[0]||(a[0]=h=>u.name=h),placeholder:"\u8BF7\u8F93\u5165"},null,8,["modelValue"])]),_:1})]),_:1}),t(c,{span:8},{default:s(()=>[t(d,{label:"\u6284\u9001\u4EBA\u8054\u7CFB\u65B9\u5F0F"},{default:s(()=>[t(r,{modelValue:u.phoneNo,"onUpdate:modelValue":a[1]||(a[1]=h=>u.phoneNo=h),maxlength:"11",placeholder:"\u8BF7\u8F93\u5165"},null,8,["modelValue"])]),_:1})]),_:1}),t(c,{span:8},{default:s(()=>[t(d,{class:"btn"},{default:s(()=>[t(f,{type:"primary",onClick:T},{default:s(()=>[w("\u67E5\u8BE2")]),_:1}),t(f,{onClick:R},{default:s(()=>[w("\u91CD\u7F6E")]),_:1})]),_:1})]),_:1})]),_:1})]),_:1},8,["model"])]),t(O,{ref_key:"tableListRef",ref:p,column:v,data:n.value,total:N.value,"row-key":"userId",onSelectionChange:E,onGetTableData:y},null,8,["data","total"])]),_:1},8,["model-value"])}}}),te=A(ee,[["__file","/Users/chenlixin/Documents/work/NDKJ/MyProject/ls-project-v2.0/src/pages/expertManage/reviewMeeting/addMeeting/components/addUserDialog.vue"]]);export{te as default};
