|
- var A=Object.defineProperty,P=Object.defineProperties;var L=Object.getOwnPropertyDescriptors;var D=Object.getOwnPropertySymbols;var M=Object.prototype.hasOwnProperty,I=Object.prototype.propertyIsEnumerable;var N=(o,t,e)=>t in o?A(o,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):o[t]=e,_=(o,t)=>{for(var e in t||(t={}))M.call(t,e)&&N(o,e,t[e]);if(D)for(var e of D(t))I.call(t,e)&&N(o,e,t[e]);return o},O=(o,t)=>P(o,L(t));var h=(o,t,e)=>new Promise((d,p)=>{var g=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(g,v);y((e=e.apply(o,t)).next())});import{_ as B,d as J,D as R,r as j,b as z,L as E,e as w,f as V,I as W,l as b,k as T,m as k,t as Y,j as $,N as q}from"./index.11dc4694.js";import{v as G,g as K}from"./reviewMeeting.73a1a7a7.js";const U=J({name:"driverDialog"}),F=Object.assign(U,{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,g=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=g.value)==null?void 0:i.pageParams)()){var f;let a;d.meetingType==="6"?(a=yield G(_({},s)),v.value=((f=a.data)==null?void 0:f.length)||0,l.value=a.data.map(n=>O(_({},n),{id:n.projectId,buildOrg:n.buildOrgName,declaredAmount:n.declareAmount}))||[]):(a=yield K(_({meetingType:d.meetingType},s)),v.value=a.data.total,l.value=a.data.records||[]),yield q();const m=JSON.parse(JSON.stringify(c.value))||[];m!=null&&m.length&&l.value&&l.value.forEach(n=>{m.map(S=>S.id*1).includes(n.id)&&g.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 V(),W(m,{"model-value":o.visible,title:"\u6DFB\u52A0\u9879\u76EE",width:"840px","destroy-on-close":"",onClose:i[1]||(i[1]=f=>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]=f=>p("close"))},{default:b(()=>[k(" \u5173\u95ED ")]),_:1})]),default:b(()=>[T(r,{ref_key:"tableListRef",ref:g,column:y,data:l.value,total:v.value,"row-key":"id",pagination:d.meetingType!=="6",onSelectionChange:x,onGetTableData:u},{projectTypeName:b(({scope:f})=>{var n;return[k(Y($(e)[(n=f.row)==null?void 0:n.projectType]),1)]}),_:1},8,["column","data","total","pagination"])]),_:1},8,["model-value"])}}}),ee=B(F,[["__file","/Users/chenlixin/Documents/work/NDKJ/MyProject/ls-project-v2.0/src/pages/expertManage/reviewMeeting/addMeeting/components/addProjectDialog.vue"]]);export{ee as default};
|