|
- import{g as N}from"./reviewMeeting.30cec38b.js";import{d as D,B as O,r as c,b as C,J as S,c as f,e as L,G as x,i as s,h as y,j as v,t as A,u as B,L as P}from"./index.1cbb0c88.js";const J=D({name:"driverDialog"}),E=Object.assign(J,{props:{visible:{type:Boolean,default:!1,required:!0},data:{type:Array,default:void 0},meetingType:{type:String,default:"1"},dictionaryList:{type:Array,default:void 0}},emits:["close","getProjectData"],setup(g,{emit:w}){const{projectTypeOptions:T}=O.dictStore.globalDicts||{},r=g,u=w,m=c(),b=c(0),h=C([{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"}]),i=c([]),j=async(o=(e=>(e=m.value)==null?void 0:e.pageParams)())=>{const t=await N({meetingType:r.meetingType,...o});b.value=t.data.total,i.value=t.data.records||[],await P();const a=JSON.parse(JSON.stringify(l.value))||[];a!=null&&a.length&&i.value&&i.value.forEach(n=>{a.map(p=>p.id*1).includes(n.id)&&m.value.toggleRowSelect(n,!0)})},l=c([]),_=o=>{const e=o.map(t=>t.id);i.value.forEach(t=>{e.includes(t.id)?l.value.push(t):l.value=l.value.filter(a=>a.id!==t.id)})},k=()=>{const o={},e=l.value.reduce((t,a)=>(o[a.id]||(o[a.id]=t.push(a)),t),[]);u("getProjectData",e)};return S(()=>r.visible,async o=>{var e;o&&((e=r.data)!=null&&e.length&&(l.value=r.data.map(t=>t)),j())}),(o,e)=>{const t=f("table-list"),a=f("el-button"),n=f("el-dialog");return L(),x(n,{"model-value":g.visible,title:"\u6DFB\u52A0\u9879\u76EE",width:"840px","destroy-on-close":"",onClose:e[1]||(e[1]=d=>u("close"))},{footer:s(()=>[y(a,{type:"primary",size:"small",onClick:k},{default:s(()=>e[2]||(e[2]=[v(" \u786E\u5B9A ")])),_:1}),y(a,{size:"small",onClick:e[0]||(e[0]=d=>u("close"))},{default:s(()=>e[3]||(e[3]=[v(" \u5173\u95ED ")])),_:1})]),default:s(()=>[y(t,{ref_key:"tableListRef",ref:m,column:h,data:i.value,total:b.value,"row-key":"id",onSelectionChange:_,onGetTableData:j},{projectTypeName:s(({scope:d})=>{var p;return[v(A(B(T)[(p=d.row)==null?void 0:p.projectType]),1)]}),_:1},8,["column","data","total"])]),_:1},8,["model-value"])}}});export{E as default};
|