var S=Object.defineProperty,A=Object.defineProperties;var M=Object.getOwnPropertyDescriptors;var D=Object.getOwnPropertySymbols;var L=Object.prototype.hasOwnProperty,B=Object.prototype.propertyIsEnumerable;var N=(o,t,e)=>t in o?S(o,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):o[t]=e,_=(o,t)=>{for(var e in t||(t={}))L.call(t,e)&&N(o,e,t[e]);if(D)for(var e of D(t))B.call(t,e)&&N(o,e,t[e]);return o},O=(o,t)=>A(o,M(t));var h=(o,t,e)=>new Promise((d,p)=>{var f=l=>{try{y(e.next(l))}catch(u){p(u)}},v=l=>{try{y(e.throw(l))}catch(u){p(u)}},y=l=>l.done?d(l.value):Promise.resolve(l.value).then(f,v);y((e=e.apply(o,t)).next())});import{_ as I,d as J,H as R,r as j,b as z,N as E,f as w,g as K,K as V,m as b,l as T,p as k,t as W,k as Y,P as $}from"./index.9fabe127.js";import{v as q,g as G}from"./reviewMeeting.54003a85.js";const H=J({name:"driverDialog"}),U=Object.assign(H,{props:{visible:{type:Boolean,default:!1,required:!0},data:{type:Array,default:void 0},meetingType:{type:String,default:"1"}},emits:["close","getProjectData"],setup(o,{emit:t}){const{projectTypeOptions:e}=R.dictStore.globalDicts||{},d=o,p=t,f=j(),v=j(0),y=z([{type:"selection",width:"50"},{label:"\u9879\u76EE\u540D\u79F0",key:"projectName",prop:"projectName",minWidth:"150",showOverflowTooltip:!0},{label:"\u7533\u62A5\u5355\u4F4D",key:"buildOrg",prop:"buildOrg",minWidth:"120",showOverflowTooltip:!0},{label:"\u9879\u76EE\u7C7B\u578B",slot:"projectTypeName",prop:"projectTypeName",width:"100"},{label:"\u7533\u62A5\u91D1\u989D",key:"declaredAmount",prop:"declaredAmount",width:"100"},{label:"\u9884\u7B97\u5E74\u5EA6",key:"projectYear",prop:"projectYear",width:"80"}]),l=j([]),u=(...r)=>h(this,[...r],function*(s=(i=>(i=f.value)==null?void 0:i.pageParams)()){var g;let a;d.meetingType==="6"?(a=yield q(_({},s)),v.value=((g=a.data)==null?void 0:g.length)||0,l.value=a.data.map(n=>O(_({},n),{id:n.projectId,buildOrg:n.buildOrgName,declaredAmount:n.declareAmount}))||[]):(a=yield G(_({meetingType:d.meetingType},s)),v.value=a.data.total,l.value=a.data.records||[]),yield $();const m=JSON.parse(JSON.stringify(c.value))||[];m!=null&&m.length&&l.value&&l.value.forEach(n=>{m.map(P=>P.id*1).includes(n.id)&&f.value.toggleRowSelect(n,!0)})}),c=j([]),x=s=>{const i=s.map(r=>r.id);l.value.forEach(r=>{i.includes(r.id)?c.value.push(r):c.value=c.value.filter(a=>a.id!==r.id)})},C=()=>{const s={},i=c.value.reduce((r,a)=>(s[a.id]||(s[a.id]=r.push(a)),r),[]);p("getProjectData",i)};return E(()=>d.visible,s=>h(this,null,function*(){var i;s&&((i=d.data)!=null&&i.length?c.value=d.data.map(r=>r):c.value=[],u())})),(s,i)=>{const r=w("table-list"),a=w("el-button"),m=w("el-dialog");return K(),V(m,{"model-value":o.visible,title:"\u6DFB\u52A0\u9879\u76EE",width:"840px","destroy-on-close":"",onClose:i[1]||(i[1]=g=>p("close"))},{footer:b(()=>[T(a,{type:"primary",size:"small",onClick:C},{default:b(()=>[k(" \u786E\u5B9A ")]),_:1}),T(a,{size:"small",onClick:i[0]||(i[0]=g=>p("close"))},{default:b(()=>[k(" \u5173\u95ED ")]),_:1})]),default:b(()=>[T(r,{ref_key:"tableListRef",ref:f,column:y,data:l.value,total:v.value,"row-key":"id",pagination:d.meetingType!=="6",onSelectionChange:x,onGetTableData:u},{projectTypeName:b(({scope:g})=>{var n;return[k(W(Y(e)[(n=g.row)==null?void 0:n.projectType]),1)]}),_:1},8,["column","data","total","pagination"])]),_:1},8,["model-value"])}}}),ee=I(U,[["__file","/Users/chenlixin/Documents/work/NDKJ/MyProject/ls-project-v2.0/src/pages/expertManage/reviewMeeting/addMeeting/components/addProjectDialog.vue"]]);export{ee as default};
