|
- import{f as L}from"./evaluationPlan.30d181aa.js";import{d as $,D as P,b as U,r as i,L as E,c as o,a4 as K,e as R,I as z,i as m,g as N,h as r,j as V,k as J,w as Y,a0 as w}from"./index.ce13ff81.js";const q={class:"max-h-[500px] overflow-y-auto"},G={class:"dialog-footer"},W=$({name:"projectListDialog"}),te=Object.assign(W,{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(v,{emit:C}){const{projectTypeOptions:k}=P.dictStore.globalDicts||{},c=v,f=C,s=U({projectName:void 0,buildOrg:void 0,projectKind:"1"}),u=i(),y=i(0),T=[{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:t=>w("span",k[t.projectType]||"-"),width:80},{label:"\u6A21\u677F\u7C7B\u578B",key:"templateType",prop:"templateType",render:t=>{var e,a;return w("span",((a=(e=c.templateTypeListData)==null?void 0:e.find(l=>l.id===t.templateType))==null?void 0:a.name)||"-")}}],d=i([]),b=i(!1),_=async()=>{b.value=!0;const t=await L({...s,...c.params});y.value=t.data.total,d.value=t.data||[];const e=JSON.parse(JSON.stringify(n.value))||[];e!=null&&e.length&&d.value&&d.value.forEach(a=>{e.map(j=>j.projectId).includes(a.projectId)&&u.value.toggleRowSelect(a,!0)}),b.value=!1},x=t=>!(t.selfAppraisalScoreTime&&t.selfAppraisalTotalScore),D=()=>{_()},H=()=>{s.projectName=void 0,s.buildOrg=void 0,u.value.pageParams.pageNumber=1,u.value.pageParams.pageSize=10,_()},n=i([]),I=t=>{const e=t.map(a=>a.projectId);d.value.forEach(a=>{e.includes(a.projectId)?n.value.push(a):n.value=n.value.filter(l=>l.projectId!==a.projectId)})},O=async()=>{const t={},e=n.value.reduce((a,l)=>(t[l.projectId]||(t[l.projectId]=a.push(l)),a),[]);f("getProjectData",e)};return E(()=>c.visible,async t=>{var e;t&&((e=c.data)!=null&&e.length?n.value=c.data.map(a=>({...a})):n.value=[],_())}),(t,e)=>{const a=o("el-input"),l=o("el-form-item"),j=o("el-col"),g=o("el-button"),M=o("el-row"),Q=o("el-form"),h=o("el-tab-pane"),S=o("el-tabs"),B=o("table-list"),A=o("el-dialog"),F=K("loading");return R(),z(A,{"model-value":v.visible,title:"\u6DFB\u52A0\u9879\u76EE",width:"70%","destroy-on-close":"",onClose:e[4]||(e[4]=p=>f("close"))},{footer:m(()=>[N("span",G,[r(g,{onClick:e[3]||(e[3]=p=>f("close"))},{default:m(()=>[V("\u5173\u95ED")]),_:1}),r(g,{type:"primary",onClick:O},{default:m(()=>[V(" \u786E\u5B9A ")]),_:1})])]),default:m(()=>[J("",!0),r(S,{modelValue:s.projectKind,"onUpdate:modelValue":e[2]||(e[2]=p=>s.projectKind=p),onTabChange:D},{default:m(()=>[r(h,{label:"\u7533\u62A5\u9879\u76EE",name:"1"}),r(h,{label:"\u5386\u53F2\u5F52\u96C6\u9879\u76EE",name:"2"}),r(h,{label:"\u8FD0\u7EF4\u9879\u76EE",name:"3"})]),_:1},8,["modelValue"]),N("div",q,[Y(r(B,{ref_key:"tableListRef",ref:u,column:T,data:d.value,total:y.value,selectable:x,"row-key":"projectId",pagination:!1,onSelectionChange:I,onGetTableData:_},null,8,["data","total"]),[[F,b.value]])])]),_:1},8,["model-value"])}}});export{te as default};
|