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
5.2KB

  1. import{L as P,i as w}from"./index-b861e656.js";import{z as U,r as x,o as q,b as c,c as H,d as J,f as n,h as r,e as a,t as y,F as K,k as Q}from"./index-dd5fae99.js";const X=k=>U.get("/api/v1/statistics/fund",{params:k}),Z={class:"flex justify-between text-center mt-24"},$={class:"flex-1"},tt={class:"text-primary text-32 font-bold",style:{"font-family":"DIN"}},et={class:"flex-1"},at={class:"text-primary text-32 font-bold",style:{"font-family":"DIN"}},ot={class:"flex-1"},lt={class:"text-primary text-32 font-bold",style:{"font-family":"DIN"}},nt={class:"flex-1"},st={class:"text-primary text-32 font-bold",style:{"font-family":"DIN"}},rt={class:"flex-1"},it={class:"text-primary text-32 font-bold",style:{"font-family":"DIN"}},dt=Q({name:"projectFundStatistics"}),ut=Object.assign(dt,{setup(k){const h=x({}),C=x(),F=x(),T=x();let D,Y,A;const N=new P(0,0,1,1,[{offset:0,color:"#20DEEF"},{offset:1,color:"#007FED"}]),e=x(),R=async()=>{const i=await X({year:h.value.projectYear});e.value=i.data,B(),S(),G()},B=()=>{var t,s;D||(D=w(C.value));const i={tooltip:{show:!0,trigger:"axis",valueFormatter:l=>l},grid:{left:60,bottom:30,top:10,right:30},xAxis:{type:"category",data:(t=e.value)==null?void 0:t.departmentTop10.map(l=>l.name),axisLabel:{align:"center",interval:0,rotate:20}},yAxis:{name:"",type:"value"},color:N,series:[{name:"核减资金",data:(s=e.value)==null?void 0:s.departmentTop10.map(l=>l.amount),type:"bar",barWidth:20}]};D.setOption(i)},S=()=>{var t,s,l,d;Y||(Y=w(F.value));const i={tooltip:{show:!0,trigger:"axis",valueFormatter:o=>o},grid:{bottom:42,top:10,right:30},xAxis:{type:"category",data:(s=(t=e.value)==null?void 0:t.threeYearsDeduction)==null?void 0:s.map(o=>o.name),axisLabel:{interval:0,hideOverlap:!1}},yAxis:{name:"",type:"value"},color:N,series:[{name:"核减资金",data:(d=(l=e.value)==null?void 0:l.threeYearsDeduction)==null?void 0:d.map(o=>o.amount),type:"line",areaStyle:{}}]};Y.setOption(i)},G=()=>{var d,o,p,b,u,f,m,v,_,g,j,I,M,O,L,V,E,W;A||(A=w(T.value));const i=[((o=(d=e.value)==null?void 0:d.planDeduction)==null?void 0:o.approve)||0,((b=(p=e.value)==null?void 0:p.approvalDeduction)==null?void 0:b.approve)||0,((f=(u=e.value)==null?void 0:u.contractDeduction)==null?void 0:f.approve)||0],t=[((v=(m=e.value)==null?void 0:m.planDeduction)==null?void 0:v.approval)||0,((g=(_=e.value)==null?void 0:_.approvalDeduction)==null?void 0:g.approval)||0,((I=(j=e.value)==null?void 0:j.contractDeduction)==null?void 0:I.approval)||0],s=[((O=(M=e.value)==null?void 0:M.planDeduction)==null?void 0:O.diff)||0,((V=(L=e.value)==null?void 0:L.approvalDeduction)==null?void 0:V.diff)||0,((W=(E=e.value)==null?void 0:E.contractDeduction)==null?void 0:W.diff)||0],l={tooltip:{show:!0,trigger:"axis",valueFormatter:z=>z},grid:{bottom:20,top:10,right:50},xAxis:{type:"category",data:["计划","批复","合同"],axisLabel:{align:"center",interval:0}},yAxis:[{name:"",type:"value"},{name:"差额",type:"value"}],series:[{name:"申请",data:i,type:"bar",barGap:0,barWidth:30},{name:"批复",data:t,type:"bar",barWidth:30},{name:"差额",data:s,type:"bar",barWidth:30},{name:"差额",yAxisIndex:1,data:s,type:"line"}]};A.setOption(l)};return q(async()=>{R()}),(i,t)=>{const s=c("el-date-picker"),l=c("el-form-item"),d=c("el-form"),o=c("el-card"),p=c("el-col"),b=c("el-row");return H(),J(K,null,[n(o,{class:"mb-16"},{default:r(()=>{var u,f,m,v,_;return[n(d,{ref:"formRef",model:h.value},{default:r(()=>[n(l,{label:"年度"},{default:r(()=>[n(s,{modelValue:h.value.projectYear,"onUpdate:modelValue":t[0]||(t[0]=g=>h.value.projectYear=g),type:"year",placeholder:"全部",format:"YYYY","value-format":"YYYY",style:{width:"200px"},onChange:R},null,8,["modelValue"])]),_:1})]),_:1},8,["model"]),a("div",Z,[a("div",$,[a("p",tt,y(Math.round(((u=e.value)==null?void 0:u.accumulatedDeductionTotalAmount)/1e4*100)/100||0),1),t[1]||(t[1]=a("p",{class:"text-info text-14"},"累计核减资金总数(亿元)",-1))]),a("div",et,[a("p",at,y(Math.round(((f=e.value)==null?void 0:f.declaredTotalAmount)/1e4*100)/100||0),1),t[2]||(t[2]=a("p",{class:"text-info text-14"},"申请金额(亿元)",-1))]),a("div",ot,[a("p",lt,y(Math.round(((m=e.value)==null?void 0:m.approvalTotalAmount)/1e4*100)/100||0),1),t[3]||(t[3]=a("p",{class:"text-info text-14"},"批复金额(亿元)",-1))]),a("div",nt,[a("p",st,y(Math.round(((v=e.value)==null?void 0:v.contractTotalAmount)/1e4*100)/100||0),1),t[4]||(t[4]=a("p",{class:"text-info text-14"},"合同金额(亿元)",-1))]),a("div",rt,[a("p",it,y(Math.round(((_=e.value)==null?void 0:_.threeYearsDeductionTotalAmount)/1e4*100)/100||0),1),t[5]||(t[5]=a("p",{class:"text-info text-14"},"近3年核减总数(亿元)",-1))])])]}),_:1}),n(b,{gutter:16},{default:r(()=>[n(p,{span:12,class:"mb-16"},{default:r(()=>[n(o,{header:"近3年核减总数(万元)"},{default:r(()=>[a("div",{ref_key:"chart2Ref",ref:F,class:"h-[230px]"},null,512)]),_:1})]),_:1}),n(p,{span:12,class:"mb-16"},{default:r(()=>[n(o,{header:"各阶段核减情况(万元)"},{default:r(()=>[a("div",{ref_key:"chart3Ref",ref:T,class:"h-[230px]"},null,512)]),_:1})]),_:1}),n(p,{span:12,class:"mb-16"},{default:r(()=>[n(o,{header:"各部门核减情况TOP10(万元)"},{default:r(()=>[a("div",{ref_key:"chart1Ref",ref:C,class:"h-[230px]"},null,512)]),_:1})]),_:1})]),_:1})],64)}}});export{ut as default};