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.

3 lines
3.5KB

  1. import{L as u,i as h}from"./index.f55de596.js";import{y as B,d as E,r as i,o as N,c,e as O,f as S,h as l,i as n,k as L,g as t,t as D,F as I}from"./index.8d65dd27.js";const P=v=>B.get("/api/v1/statistics/project-cost",{params:v}),$={class:"flex justify-center text-center mt-24"},G={class:"flex-1"},M={class:"text-primary text-32 font-bold",style:{"font-family":"DIN"}},U=t("p",{class:"text-info text-14"},"\u7D2F\u8BA1\u4E13\u5BB6\u8BC4\u5BA1\u8D39\uFF08\u4E07\u5143\uFF09",-1),X={class:"flex-1"},q={class:"text-primary text-32 font-bold",style:{"font-family":"DIN"}},z=t("p",{class:"text-info text-14"},"\u7D2F\u8BA1\u4EBA\u5DE5\u6838\u4EF7\u8D39\uFF08\u4E07\u5143\uFF09",-1),H=E({name:"projectFundStatistics"}),Z=Object.assign(H,{setup(v){const k=i({}),y=i(),x=i(),g=i();let m,p,d;const w=new u(0,0,1,1,[{offset:0,color:"#20DEEF"},{offset:1,color:"#007FED"}]),C=async()=>{R(),F(),j()},R=()=>{var a;m||(m=h(y.value));const s=[new u(0,0,1,1,[{offset:0,color:"rgba(32, 183, 96, 1)"},{offset:1,color:"rgba(32, 183, 96, 0.5)"}]),new u(0,0,1,1,[{offset:0,color:"#20DEEF"},{offset:1,color:"#007FED"}])],r={legend:{show:!1},tooltip:{show:!0,trigger:"item"},color:s,series:[{data:(a=o.value)==null?void 0:a.twoYearsAvg.map(e=>({...e,value:e.amount})),type:"pie",itemStyle:{borderRadius:4},label:{formatter:`{b}
  2. {c}`,color:"#333333"},emphasis:{itemStyle:{shadowBlur:10,shadowOffsetX:0,shadowColor:"rgba(0, 0, 0, 0.5)"}}}]};m.setOption(r)},F=()=>{var r,a;p||(p=h(x.value));const s={tooltip:{show:!0,trigger:"axis",valueFormatter:e=>e},grid:{bottom:42,top:10,right:30},xAxis:{type:"category",data:(r=o.value)==null?void 0:r.twoYearsPricing.map(e=>e.name),axisLabel:{interval:0,hideOverlap:!1}},yAxis:{name:"",type:"value"},color:w,series:[{data:(a=o.value)==null?void 0:a.twoYearsPricing.map(e=>e.amount),type:"line",name:"\u6838\u4EF7\u8D39",areaStyle:{}}]};p.setOption(s)},j=()=>{var r,a;d||(d=h(g.value));const s={tooltip:{show:!0,trigger:"axis",valueFormatter:e=>e},grid:{bottom:42,top:10,right:30},xAxis:{type:"category",data:(r=o.value)==null?void 0:r.twoYearsReviews.map(e=>e.name),axisLabel:{interval:0,hideOverlap:!1}},yAxis:{name:"",type:"value"},color:w,series:[{name:"\u8BC4\u5BA1\u8D39",data:(a=o.value)==null?void 0:a.twoYearsReviews.map(e=>e.amount),type:"line",areaStyle:{}}]};d.setOption(s)},o=i(),V=async()=>{const s=await P({year:k.value.projectYear});o.value=s.data,C()};return N(async()=>{V()}),(s,r)=>{const a=c("el-date-picker"),e=c("el-form-item"),J=c("el-form"),f=c("el-card"),_=c("el-col"),A=c("el-row");return O(),S(I,null,[l(f,{class:"mb-16"},{default:n(()=>{var b,Y;return[L("",!0),t("div",$,[t("div",G,[t("p",M,D(((b=o.value)==null?void 0:b.reviewAmount)||0),1),U]),t("div",X,[t("p",q,D(((Y=o.value)==null?void 0:Y.pricingAmount)||0),1),z])])]}),_:1}),l(A,{gutter:16},{default:n(()=>[l(_,{span:12,class:"mb-16"},{default:n(()=>[l(f,{header:"\u5E02\u672C\u7EA7\u8FD1\u4E24\u5E74\u4EBA\u5DE5\u6838\u4EF7\u8D39\uFF08\u4E07\u5143\uFF09"},{default:n(()=>[t("div",{ref_key:"chart2Ref",ref:x,class:"h-[230px]"},null,512)]),_:1})]),_:1}),l(_,{span:12,class:"mb-16"},{default:n(()=>[l(f,{header:"\u5E02\u672C\u7EA7\u8FD1\u4E24\u5E74\u4E13\u5BB6\u8BC4\u5BA1\u8D39\uFF08\u4E07\u5143\uFF09"},{default:n(()=>[t("div",{ref_key:"chart3Ref",ref:g,class:"h-[230px]"},null,512)]),_:1})]),_:1}),l(_,{span:12,class:"mb-16"},{default:n(()=>[l(f,{header:"\u5E02\u672C\u7EA7\u8FD1\u4E24\u5E74\u5E73\u5747\u4E13\u5BB6\u8BC4\u5BA1/\u6838\u4EF7\u8D39\uFF08\u4E07\u5143\uFF09"},{default:n(()=>[t("div",{ref_key:"chart1Ref",ref:y,class:"h-[230px]"},null,512)]),_:1})]),_:1})]),_:1})],64)}}});export{Z as default};