import{I as e}from"./IndexPagePro-44077094-1780912037814v=1.0.0.js";import{T as t}from"./index-36f2bfb8-1780912037814v=1.0.0.js";import{u as a}from"./useProjectList-9c7ce52c-1780912037814v=1.0.0.js";import{g as n}from"./statisticalReport-421abc5e-1780912037814v=1.0.0.js";import{b as o}from"./project-4a4cab5b-1780912037814v=1.0.0.js";import{d as c,r as u,o as _,a as l,b as r,c as p,w as d,e as i,f as s}from"./index-d052b22f-1780912037814v=1.0.0.js";import"./common-0c693521-1780912037814v=1.0.0.js";const m=c({__name:"index",setup(c){const m=u({}),b=u([]),y=u(!1),f=u(null),{fileterData:g,expandKeys:v,defaultValue:h,getCompanyArea:j}=a(!0,{with_up:0}),x=u({}),w=async()=>{y.value=!0;const{data:e}=await n({...x.value,company_area_id:f.value}),{annex_count:t,preliminary_design_count:a,bidding_phase_count:o,start_work_count:c,foundation_completed_count:u,body_completed_count:_,check_put_count:l,plan_project_count:r,complete_project_count:p,building_project_count:d}=e;e.type_data?(b.value=Object.keys(m.value).map((t=>e.type_data[t]?(e.type_data[t].type_name=m.value[t],e.type_data[t]):{type_name:m.value[t],annex_count:0,preliminary_design_count:0,bidding_phase_count:0,start_work_count:0,foundation_completed_count:0,body_completed_count:0,check_put_count:0,plan_project_count:0,complete_project_count:0,building_project_count:0})),b.value.push({type_name:"合计",annex_count:t,preliminary_design_count:a,bidding_phase_count:o,start_work_count:c,foundation_completed_count:u,body_completed_count:_,check_put_count:l}),b.value.push({type_name:`计划项目${r}`,preliminary_design_count:`在建项目${d}`,bidding_phase_count:`建成项目${p}`,annex_count:t,start_work_count:c,foundation_completed_count:u,body_completed_count:_,check_put_count:l})):b.value=[],y.value=!1},k=({rowIndex:e,columnIndex:t})=>{if(e==b.value.length-2)return 0==t?[2,1]:[1,1];if(e==b.value.length-1)switch(t){case 0:return[1,2];case 1:return[1,4];case 2:return[1,1];default:return[0,0]}};u(!0);const I=e=>{f.value=e,w()};return _((async()=>{await j(),f.value=h.value,await(async()=>{const{data:e}=await o({});e.forEach((e=>{m.value[e.type_id]=e.name}))})(),w()})),(a,n)=>{const o=l("el-table-column"),c=l("el-table");return r(),p(e,{filterWidth:280},{treeCard:d((()=>[i(t,{ref:"TreeFilterRef",title:"区域",data:s(g),defaultValue:s(h),expandKeys:s(v),onChange:I},null,8,["data","defaultValue","expandKeys"])])),default:d((()=>[i(c,{data:s(b),loading:s(y),"span-method":k,border:"",style:{width:"100%"}},{default:d((()=>[i(o,{prop:"type_name",label:"项目类型",align:"center"}),i(o,{prop:"preliminary_design_count",label:"前期设计",align:"center"}),i(o,{prop:"bidding_phase_count",label:"招标阶段",align:"center"}),i(o,{prop:"start_work_count",label:"已开工",align:"center"}),i(o,{prop:"foundation_completed_count",label:"地基完成",align:"center"}),i(o,{prop:"body_completed_count",label:"主体完成",align:"center"}),i(o,{prop:"annex_count",label:"附属建筑建设阶段",align:"center"}),i(o,{prop:"check_put_count",label:"建成并投入使用",align:"center"})])),_:1},8,["data","loading"])])),_:1})}}});export{m as default};
