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