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