You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

2 lines
8.0KB

  1. import{L as w,i as u}from"./index-b861e656.js";import{z as K,r as f,o as Q,b as v,c as X,d as Z,f as i,h as n,e as a,t as h,F as $,k as tt}from"./index-dd5fae99.js";const et=R=>K.get("/api/v1/statistics/project",{params:R}),at={class:"flex justify-between text-center mt-24"},ot={class:"flex-1"},rt={class:"text-primary text-32 font-bold",style:{"font-family":"DIN"}},st={class:"flex-1"},lt={class:"text-primary text-32 font-bold",style:{"font-family":"DIN"}},it={class:"flex-1"},nt={class:"text-primary text-32 font-bold",style:{"font-family":"DIN"}},pt={class:"flex-1"},ct={class:"text-primary text-32 font-bold",style:{"font-family":"DIN"}},mt={class:"flex-1"},ft={class:"text-primary text-32 font-bold",style:{"font-family":"DIN"}},ut=tt({name:"projectStatistics"}),xt=Object.assign(ut,{setup(R){const y=f({}),k=f(),Y=f(),O=f(),F=f(),j=f(),L=f(),E=f();let _,g,b,A,C,T,D;const x=new w(0,0,1,1,[{offset:0,color:"#20DEEF"},{offset:1,color:"#007FED"}]),W=async()=>{B(),M(),S(),z(),G(),U(),q()},B=()=>{var e,r,s,l;_||(_=u(k.value));const p={tooltip:{show:!0,trigger:"axis",valueFormatter:t=>t},grid:{bottom:20,top:10,right:30},xAxis:{type:"category",data:((r=(e=o.value)==null?void 0:e.progresses)==null?void 0:r.map(t=>t.name))||["计划","申报","立项","建设","验收","运维","绩效","注销"],axisLabel:{align:"center",interval:0}},yAxis:{name:"",type:"value"},color:x,series:[{name:"项目数量",data:((l=(s=o.value)==null?void 0:s.progresses)==null?void 0:l.map(t=>t.num))||[5,2,47,73,61,243,0,0],type:"bar",barWidth:20}]};_.setOption(p)},M=()=>{var r,s,l,t,c,d;g||(g=u(Y.value));const p=[new w(0,0,1,1,[{offset:0,color:"rgba(32, 183, 96, 1)"},{offset:1,color:"rgba(32, 183, 96, 0.5)"}]),new w(0,0,1,1,[{offset:0,color:"#20DEEF"},{offset:1,color:"#007FED"}])],e={tooltip:{show:!0,trigger:"axis",valueFormatter:m=>m},grid:{bottom:42,top:10,right:30},xAxis:{type:"category",data:((s=(r=o.value)==null?void 0:r.threeYearsApprovalCycleAvg)==null?void 0:s.map(m=>m.name))||["2021","2022","2023"],axisLabel:{interval:0,hideOverlap:!1}},yAxis:{name:"",type:"value"},color:p,series:[{name:"批复时间",data:((t=(l=o.value)==null?void 0:l.threeYearsApprovalCycleAvg)==null?void 0:t.map(m=>m.num))||[11,12.4,12],type:"line"},{name:"建设时间",data:((d=(c=o.value)==null?void 0:c.threeYearsConstructionCycleAvg)==null?void 0:d.map(m=>m.num))||[11,12,11.4],type:"line"}]};g.setOption(e)},S=()=>{var e,r,s,l;b||(b=u(O.value));const p={tooltip:{show:!0,trigger:"item"},grid:{bottom:20,top:10,right:30},radar:{indicator:((r=(e=o.value)==null?void 0:e.projectTypeDistribution)==null?void 0:r.map(t=>{var c;return{...t,max:Math.max((c=o.value)==null?void 0:c.projectTypeDistribution.map(d=>d.num))}}))||[{name:"首次建设",max:385},{name:"结转建设",max:385},{name:"迭代升级",max:385},{name:"新运维",max:385},{name:"续运维",max:385}]},series:[{name:"星级分布",type:"radar",data:[{value:((l=(s=o.value)==null?void 0:s.projectTypeDistribution)==null?void 0:l.map(t=>t.num))||[385,49,51,0,0]}]}]};b.setOption(p)},z=()=>{var e,r,s,l;A||(A=u(F.value));const p={tooltip:{show:!0,trigger:"axis",valueFormatter:t=>t},grid:{bottom:20,top:10,right:30},xAxis:{type:"category",data:((r=(e=o.value)==null?void 0:e.amountChangeTop10)==null?void 0:r.map(t=>t.name))||["水利局","发改委","组织部","公安局","电力局","林业局","医保局","大数据局","社保局"],axisLabel:{align:"center",interval:0}},yAxis:{name:"",type:"value"},color:x,series:[{name:"变更金额",data:((l=(s=o.value)==null?void 0:s.amountChangeTop10)==null?void 0:l.map(t=>t.amount))||[0,0,0,0,0,0,0,0,0],type:"bar",barWidth:20}]};A.setOption(p)},G=()=>{var e,r,s,l;C||(C=u(j.value));const p={tooltip:{show:!0,trigger:"axis",valueFormatter:t=>t},grid:{bottom:20,top:10,right:30},xAxis:{type:"category",data:((r=(e=o.value)==null?void 0:e.revokeTop10)==null?void 0:r.map(t=>t.name))||["水利局","发改委","组织部","公安局","电力局","林业局","医保局","大数据局","社保局"],axisLabel:{align:"center",interval:0}},yAxis:{name:"",type:"value"},color:x,series:[{name:"撤销数",data:((l=(s=o.value)==null?void 0:s.revokeTop10)==null?void 0:l.map(t=>t.num))||[0,0,0,0,0,0,0,0,0],type:"bar",barWidth:20}]};C.setOption(p)},U=()=>{var e,r,s,l;T||(T=u(L.value));const p={tooltip:{show:!0,trigger:"axis",valueFormatter:t=>t},grid:{bottom:20,top:10,right:30},xAxis:{type:"category",data:((r=(e=o.value)==null?void 0:e.terminationTop10)==null?void 0:r.map(t=>t.name))||["水利局","发改委","组织部","公安局","电力局","林业局","医保局","大数据局","社保局"],axisLabel:{align:"center",interval:0}},yAxis:{name:"",type:"value"},color:x,series:[{name:"终止数",data:((l=(s=o.value)==null?void 0:s.terminationTop10)==null?void 0:l.map(t=>t.num))||[0,0,0,0,0,0,0,0,0],type:"bar",barWidth:20}]};T.setOption(p)},q=()=>{var e,r,s,l;D||(D=u(E.value));const p={tooltip:{show:!0,trigger:"axis",valueFormatter:t=>t},grid:{bottom:20,top:10,right:30},xAxis:{type:"category",data:((r=(e=o.value)==null?void 0:e.delayTop10)==null?void 0:r.map(t=>t.name))||["水利局","发改委","组织部","公安局","电力局","林业局","医保局","大数据局","社保局"],axisLabel:{align:"center",interval:0}},yAxis:{name:"",type:"value"},color:x,series:[{name:"延期数",data:((l=(s=o.value)==null?void 0:s.delayTop10)==null?void 0:l.map(t=>t.num))||[0,0,0,0,0,0,0,0,0],type:"bar",barWidth:20}]};D.setOption(p)},o=f(),H=async()=>{const p=await et({year:y.value.projectYear});o.value=p.data,W()};return Q(async()=>{H()}),(p,e)=>{const r=v("el-date-picker"),s=v("el-form-item"),l=v("el-form"),t=v("el-card"),c=v("el-col"),d=v("el-row");return X(),Z($,null,[i(t,{class:"mb-16"},{default:n(()=>{var m,N,I,P,V;return[i(l,{ref:"formRef",model:y.value},{default:n(()=>[i(s,{label:"年度"},{default:n(()=>[i(r,{modelValue:y.value.projectYear,"onUpdate:modelValue":e[0]||(e[0]=J=>y.value.projectYear=J),type:"year",placeholder:"全部",format:"YYYY","value-format":"YYYY",style:{width:"200px"}},null,8,["modelValue"])]),_:1})]),_:1},8,["model"]),a("div",at,[a("div",ot,[a("p",rt,h(((m=o.value)==null?void 0:m.planTotal)||0),1),e[1]||(e[1]=a("p",{class:"text-info text-14"},"项目计划数",-1))]),a("div",st,[a("p",lt,h(((N=o.value)==null?void 0:N.approvedTotal)||0),1),e[2]||(e[2]=a("p",{class:"text-info text-14"},"批复项目数",-1))]),a("div",it,[a("p",nt,h(((I=o.value)==null?void 0:I.constructionTotal)||0),1),e[3]||(e[3]=a("p",{class:"text-info text-14"},"在建项目数",-1))]),a("div",pt,[a("p",ct,h(((P=o.value)==null?void 0:P.approvalCycleAvg)||0),1),e[4]||(e[4]=a("p",{class:"text-info text-14"},"平均批复周期(月)",-1))]),a("div",mt,[a("p",ft,h(((V=o.value)==null?void 0:V.constructionCycleAvg)||0),1),e[5]||(e[5]=a("p",{class:"text-info text-14"},"平均建设周期(月)",-1))])])]}),_:1}),i(d,{gutter:16},{default:n(()=>[i(c,{span:12,class:"mb-16"},{default:n(()=>[i(t,{header:"各阶段项目统计"},{default:n(()=>[a("div",{ref_key:"chart1Ref",ref:k,class:"h-[230px]"},null,512)]),_:1})]),_:1}),i(c,{span:12,class:"mb-16"},{default:n(()=>[i(t,{header:"近三年平均批复/建设周期(月)"},{default:n(()=>[a("div",{ref_key:"chart2Ref",ref:Y,class:"h-[230px]"},null,512)]),_:1})]),_:1}),i(c,{span:12,class:"mb-16"},{default:n(()=>[i(t,{header:"项目分布类型"},{default:n(()=>[a("div",{ref_key:"chart3Ref",ref:O,class:"h-[230px]"},null,512)]),_:1})]),_:1}),i(c,{span:12,class:"mb-16"},{default:n(()=>[i(t,{header:"金额变更数额情况统计TOP10"},{default:n(()=>[a("div",{ref_key:"chart4Ref",ref:F,class:"h-[230px]"},null,512)]),_:1})]),_:1}),i(c,{span:12,class:"mb-16"},{default:n(()=>[i(t,{header:"项目撤销情况统计TOP10"},{default:n(()=>[a("div",{ref_key:"chart5Ref",ref:j,class:"h-[230px]"},null,512)]),_:1})]),_:1}),i(c,{span:12,class:"mb-16"},{default:n(()=>[i(t,{header:"终止情况统计TOP10"},{default:n(()=>[a("div",{ref_key:"chart6Ref",ref:L,class:"h-[230px]"},null,512)]),_:1})]),_:1}),i(c,{span:12,class:"mb-16"},{default:n(()=>[i(t,{header:"延期情况统计TOP10"},{default:n(()=>[a("div",{ref_key:"chart7Ref",ref:E,class:"h-[230px]"},null,512)]),_:1})]),_:1})]),_:1})],64)}}});export{xt as default};