import{d as A,r as c,b as F,e as h,o as K,f as L,w as i,g as a,T as $,h as r,I as B}from"./index-17740f03-1778929502341v=1.0.0.js";import{u as D}from"./useProjectList-1324487d-1778929502341v=1.0.0.js";import{g as M}from"./statisticalReport-e71a6851-1778929502341v=1.0.0.js";import{a as O}from"./project-d8b2e0b3-1778929502341v=1.0.0.js";const z=A({__name:"index",setup(E){const u=c({}),o=c([]),_=c(!1),p=c(null),{fileterData:v,expandKeys:j,defaultValue:d,getCompanyArea:w}=D(!0,{with_up:0}),x=c({}),m=async()=>{_.value=!0;const{data:e}=await M({...x.value,company_area_id:p.value}),{annex_count:n,preliminary_design_count:t,bidding_phase_count:s,start_work_count:g,foundation_completed_count:f,body_completed_count:y,check_put_count:b,plan_project_count:k,complete_project_count:S,building_project_count:V}=e;e.type_data?(o.value=Object.keys(u.value).map(l=>e.type_data[l]?(e.type_data[l].type_name=u.value[l],e.type_data[l]):{type_name:u.value[l],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}),o.value.push({type_name:"\u5408\u8BA1",annex_count:n,preliminary_design_count:t,bidding_phase_count:s,start_work_count:g,foundation_completed_count:f,body_completed_count:y,check_put_count:b}),o.value.push({type_name:`\u8BA1\u5212\u9879\u76EE${k}`,preliminary_design_count:`\u5728\u5EFA\u9879\u76EE${V}`,bidding_phase_count:`\u5EFA\u6210\u9879\u76EE${S}`,annex_count:n,start_work_count:g,foundation_completed_count:f,body_completed_count:y,check_put_count:b})):o.value=[],_.value=!1},C=async()=>{const{data:e}=await O({});e.forEach(n=>{u.value[n.type_id]=n.name})},P=({rowIndex:e,columnIndex:n})=>{if(e==o.value.length-2)return n==0?[2,1]:[1,1];if(e==o.value.length-1)switch(n){case 0:return[1,2];case 1:return[1,4];case 2:return[1,1];default:return[0,0]}};c(!0);const T=e=>{p.value=e,m()};return F(async()=>{await w(),p.value=d.value,await C(),m()}),(e,n)=>{const t=h("el-table-column"),s=h("el-table");return K(),L(B,{filterWidth:280},{treeCard:i(()=>[a($,{ref:"TreeFilterRef",title:"\u533A\u57DF",data:r(v),defaultValue:r(d),expandKeys:r(j),onChange:T},null,8,["data","defaultValue","expandKeys"])]),default:i(()=>[a(s,{data:r(o),loading:r(_),"span-method":P,border:"",style:{width:"100%"}},{default:i(()=>[a(t,{prop:"type_name",label:"\u9879\u76EE\u7C7B\u578B",align:"center"}),a(t,{prop:"preliminary_design_count",label:"\u524D\u671F\u8BBE\u8BA1",align:"center"}),a(t,{prop:"bidding_phase_count",label:"\u62DB\u6807\u9636\u6BB5",align:"center"}),a(t,{prop:"start_work_count",label:"\u5DF2\u5F00\u5DE5",align:"center"}),a(t,{prop:"foundation_completed_count",label:"\u5730\u57FA\u5B8C\u6210",align:"center"}),a(t,{prop:"body_completed_count",label:"\u4E3B\u4F53\u5B8C\u6210",align:"center"}),a(t,{prop:"annex_count",label:"\u9644\u5C5E\u5EFA\u7B51\u5EFA\u8BBE\u9636\u6BB5",align:"center"}),a(t,{prop:"check_put_count",label:"\u5EFA\u6210\u5E76\u6295\u5165\u4F7F\u7528",align:"center"})]),_:1},8,["data","loading"])]),_:1})}}});export{z as default};
