var E=Object.defineProperty;var x=Object.getOwnPropertySymbols;var K=Object.prototype.hasOwnProperty,J=Object.prototype.propertyIsEnumerable;var T=(n,l,t)=>l in n?E(n,l,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[l]=t,g=(n,l)=>{for(var t in l||(l={}))K.call(l,t)&&T(n,t,l[t]);if(x)for(var t of x(l))J.call(l,t)&&T(n,t,l[t]);return n};var N=(n,l,t)=>new Promise((p,_)=>{var d=c=>{try{b(t.next(c))}catch(s){_(s)}},f=c=>{try{b(t.throw(c))}catch(s){_(s)}},b=c=>c.done?p(c.value):Promise.resolve(c.value).then(d,f);b((t=t.apply(n,l)).next())});import{_ as R,d as z,H as Y,b as q,r as h,N as G,f as r,a8 as H,g as M,K as W,m as j,i as D,l as u,p as I,j as Q,w as X,a5 as O}from"./index.9fabe127.js";import{f as Z}from"./evaluationPlan.fa509821.js";const ee={class:"max-h-[500px] overflow-y-auto"},te={class:"dialog-footer"},ae=z({name:"projectListDialog"}),oe=Object.assign(ae,{props:{visible:{type:Boolean,default:!1,required:!0},data:{type:Array,default:void 0},params:{type:Object,default:()=>({})},templateTypeListData:{type:Array,default:void 0}},emits:["close","getProjectData"],setup(n,{emit:l}){const{projectTypeOptions:t}=Y.dictStore.globalDicts||{},p=n,_=l,d=q({projectName:void 0,buildOrg:void 0,projectKind:"1"}),f=h(),b=h(0),c=[{type:"selection",reserveSelection:!0,width:"55"},{label:"\u9879\u76EE\u540D\u79F0",key:"projectName",prop:"projectName",minWidth:"200",showOverflowTooltip:!0},{label:"\u9884\u7B97\u5E74\u5EA6",key:"projectYear",prop:"projectYear",width:80},{label:"\u9879\u76EE\u91D1\u989D",key:"declareAmount",prop:"declareAmount"},{label:"\u7533\u62A5\u5355\u4F4D",key:"buildOrgName",prop:"buildOrgName"},{label:"\u9879\u76EE\u7C7B\u578B",key:"projectType",prop:"projectType",render:a=>O("span",t[a.projectType]||"-"),width:80},{label:"\u6A21\u677F\u7C7B\u578B",key:"templateType",prop:"templateType",render:a=>{var e,o;return O("span",((o=(e=p.templateTypeListData)==null?void 0:e.find(i=>i.id===a.templateType))==null?void 0:o.name)||"-")}}],s=h([]),V=h(!1),y=()=>N(this,null,function*(){V.value=!0;const a=yield Z(g(g({},d),p.params));b.value=a.data.total,s.value=a.data||[];const e=JSON.parse(JSON.stringify(m.value))||[];e!=null&&e.length&&s.value&&s.value.forEach(o=>{e.map(C=>C.projectId).includes(o.projectId)&&f.value.toggleRowSelect(o,!0)}),V.value=!1}),S=a=>!(a.selfAppraisalScoreTime&&a.selfAppraisalTotalScore),P=()=>{y()},le=()=>{d.projectName=void 0,d.buildOrg=void 0,f.value.pageParams.pageNumber=1,f.value.pageParams.pageSize=10,y()},m=h([]),B=a=>{const e=a.map(o=>o.projectId);s.value.forEach(o=>{e.includes(o.projectId)?m.value.push(o):m.value=m.value.filter(i=>i.projectId!==o.projectId)})},L=()=>N(this,null,function*(){const a={},e=m.value.reduce((o,i)=>(a[i.projectId]||(a[i.projectId]=o.push(i)),o),[]);_("getProjectData",e)});return G(()=>p.visible,a=>N(this,null,function*(){var e;a&&((e=p.data)!=null&&e.length?m.value=p.data.map(o=>g({},o)):m.value=[],y())})),(a,e)=>{const o=r("el-input"),i=r("el-form-item"),C=r("el-col"),k=r("el-button"),ne=r("el-row"),re=r("el-form"),w=r("el-tab-pane"),A=r("el-tabs"),F=r("table-list"),U=r("el-dialog"),$=H("loading");return M(),W(U,{"model-value":n.visible,title:"\u6DFB\u52A0\u9879\u76EE",width:"70%","destroy-on-close":"",onClose:e[4]||(e[4]=v=>_("close"))},{footer:j(()=>[D("span",te,[u(k,{onClick:e[3]||(e[3]=v=>_("close"))},{default:j(()=>[I("\u5173\u95ED")]),_:1}),u(k,{type:"primary",onClick:L},{default:j(()=>[I(" \u786E\u5B9A ")]),_:1})])]),default:j(()=>[Q("v-if",!0),u(A,{modelValue:d.projectKind,"onUpdate:modelValue":e[2]||(e[2]=v=>d.projectKind=v),onTabChange:P},{default:j(()=>[u(w,{label:"\u7533\u62A5\u9879\u76EE",name:"1"}),u(w,{label:"\u5386\u53F2\u5F52\u96C6\u9879\u76EE",name:"2"}),u(w,{label:"\u8FD0\u7EF4\u9879\u76EE",name:"3"})]),_:1},8,["modelValue"]),D("div",ee,[X(u(F,{ref_key:"tableListRef",ref:f,column:c,data:s.value,total:b.value,selectable:S,"row-key":"projectId",pagination:!1,onSelectionChange:B,onGetTableData:y},null,8,["data","total"]),[[$,V.value]])])]),_:1},8,["model-value"])}}}),de=R(oe,[["__file","/Users/chenlixin/Documents/work/NDKJ/MyProject/ls-project-v2.0/src/pages/performanceEvaluation/evaluationPlan/components/projectListDialog.vue"]]);export{de as default};
