Nevar pievienot vairāk kā 25 tēmas Tēmai ir jāsākas ar burtu vai ciparu, tā var saturēt domu zīmes ('-') un var būt līdz 35 simboliem gara.

2 rindas
3.4KB

  1. import{f as $}from"./evaluationPlan.5df8a1a6.js";import{d as L,B as P,b as U,r as i,J as E,c as o,a2 as J,e as K,G as R,i as m,g as N,h as r,j as V,k as z,w as G,Z as w}from"./index.766d5891.js";const Y={class:"max-h-[500px] overflow-y-auto"},q={class:"dialog-footer"},W=L({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 $({...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=()=>{_()},Z=()=>{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"),H=o("el-row"),M=o("el-form"),h=o("el-tab-pane"),S=o("el-tabs"),B=o("table-list"),A=o("el-dialog"),F=J("loading");return K(),R(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",q,[r(g,{onClick:e[3]||(e[3]=p=>f("close"))},{default:m(()=>e[7]||(e[7]=[V("\u5173\u95ED")])),_:1}),r(g,{type:"primary",onClick:O},{default:m(()=>e[8]||(e[8]=[V(" \u786E\u5B9A ")])),_:1})])]),default:m(()=>[z("",!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",Y,[G(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};