No puede seleccionar más de 25 temas Los temas deben comenzar con una letra o número, pueden incluir guiones ('-') y pueden tener hasta 35 caracteres de largo.

5 líneas
5.3KB

  1. import{L as b,i as u}from"./index.f55de596.js";import{y as P,d as W,r as c,o as q,c as d,e as z,f as H,h as s,i as o,k as J,g as t,t as w,j as S,F as K}from"./index.5bb861d3.js";const Q=C=>P.get("/api/v1/statistics/expert",{params:C}),Z={class:"flex justify-center text-center mt-24"},ee={class:"flex-1"},te={class:"text-primary text-32 font-bold",style:{"font-family":"DIN"}},ae=t("p",{class:"text-info text-14"},"\u5165\u9A7B\u4E13\u5BB6",-1),oe={class:"flex-1"},le={class:"text-primary text-32 font-bold",style:{"font-family":"DIN"}},se=t("p",{class:"text-info text-14"},"\u8FD1\u4E00\u5E74\u65B0\u589E\u4E13\u5BB6",-1),re={class:"flex-1"},ne={class:"text-primary text-32 font-bold",style:{"font-family":"DIN"}},ie=t("p",{class:"text-info text-14"},"\u6D3B\u8DC3\u4E13\u5BB6",-1),ce={class:"flex items-center justify-between"},de=t("p",null,"\u4E13\u5BB6\u7C7B\u578B\u5206\u5E03-\u64C5\u957F\u65B9\u5411",-1),fe=W({name:"expertStatistics"}),he=Object.assign(fe,{setup(C){const j=c({}),D=c(),k=c(),R=c(),Y=c(),V=c();let h,v,y,x,g;const B=new b(0,0,1,1,[{offset:0,color:"#20DEEF"},{offset:1,color:"#007FED"}]),A=async()=>{L(),I(),E(),$(),T()},L=()=>{var a,l;h||(h=u(D.value));const r={tooltip:{show:!0,trigger:"axis",valueFormatter:e=>e},grid:{bottom:25,top:10,right:30},xAxis:{type:"category",data:(a=i.value)==null?void 0:a.regionExpert.map(e=>e.name),axisLabel:{align:"center",interval:0,rotate:20}},yAxis:{name:"",type:"value"},color:B,series:[{name:"\u5165\u9A7B\u4E13\u5BB6\u6570",data:(l=i.value)==null?void 0:l.regionExpert.map(e=>e.num),type:"bar",barWidth:20}]};h.setOption(r)},I=()=>{var a,l,e,f;v||(v=u(k.value));const r={tooltip:{show:!0,trigger:"axis",valueFormatter:n=>n},grid:{bottom:20,top:10,right:30},xAxis:{type:"category",data:(l=(a=i.value)==null?void 0:a.threeYearsAdded)==null?void 0:l.map(n=>n.name),axisLabel:{align:"center",interval:0}},yAxis:{name:"",type:"value"},color:B,series:[{name:"\u65B0\u589E\u4E13\u5BB6\u6570",data:(f=(e=i.value)==null?void 0:e.threeYearsAdded)==null?void 0:f.map(n=>n.num),type:"line"}]};v.setOption(r)},p=c("\u7701\u7EF4\u5EA6"),X=r=>{p.value=r,E()},E=()=>{var a,l;y||(y=u(R.value));const r={legend:{show:!1},tooltip:{show:!0,trigger:"item"},series:[{data:(l=(a=i.value)==null?void 0:a.typeDistribution[p.value])==null?void 0:l.map(e=>({name:e.name,value:e.num})),radius:["45%","80%"],type:"pie",itemStyle:{borderRadius:4},label:{formatter:function(e){return e.name+`
  2. `+e.value+`${e.name==="\u8D22\u52A1\u4E13\u5BB6"?"+2":""}`},color:"#333333"},emphasis:{itemStyle:{shadowBlur:10,shadowOffsetX:0,shadowColor:"rgba(0, 0, 0, 0.5)"}}}]};y.setOption(r)},$=()=>{var l,e;x||(x=u(Y.value));const r=[new b(0,0,1,1,[{offset:0,color:"rgba(32, 183, 96, 1)"},{offset:1,color:"rgba(32, 183, 96, 0.5)"}]),new b(0,0,1,1,[{offset:0,color:"#20DEEF"},{offset:1,color:"#007FED"}])],a={tooltip:{show:!0,trigger:"item"},color:r,series:[{radius:["45%","80%"],data:(e=(l=i.value)==null?void 0:l.types)==null?void 0:e.map(f=>({name:f.name,value:f.num})),type:"pie",itemStyle:{borderRadius:4},label:{formatter:`{b}
  3. {c}`,color:"#333333"},emphasis:{itemStyle:{shadowBlur:10,shadowOffsetX:0,shadowColor:"rgba(0, 0, 0, 0.5)"}}}]};x.setOption(a)},T=()=>{var a,l;g||(g=u(V.value));const r={legend:{show:!1},tooltip:{show:!0,trigger:"item"},series:[{data:(l=(a=i.value)==null?void 0:a.levels)==null?void 0:l.map(e=>({name:e.name,value:e.num})),type:"pie",itemStyle:{borderRadius:4},label:{formatter:`{b}
  4. {c}`,color:"#333333"},emphasis:{itemStyle:{shadowBlur:10,shadowOffsetX:0,shadowColor:"rgba(0, 0, 0, 0.5)"}}}]};g.setOption(r)},i=c(),U=async()=>{const r=await Q({year:j.value.projectYear});i.value=r.data,A()};return q(async()=>{U()}),(r,a)=>{const l=d("el-date-picker"),e=d("el-form-item"),f=d("el-form"),n=d("el-card"),m=d("el-col"),N=d("el-radio-button"),G=d("el-radio-group"),M=d("el-row");return z(),H(K,null,[s(n,{class:"mb-16"},{default:o(()=>{var _,O,F;return[J("",!0),t("div",Z,[t("div",ee,[t("p",te,w(((_=i.value)==null?void 0:_.total)||0),1),ae]),t("div",oe,[t("p",le,w(((O=i.value)==null?void 0:O.thisYearAdded)||0),1),se]),t("div",re,[t("p",ne,w(((F=i.value)==null?void 0:F.active)||0),1),ie])])]}),_:1}),s(M,{gutter:16},{default:o(()=>[s(m,{span:12,class:"mb-16"},{default:o(()=>[s(n,{header:"\u5404\u533A\u53BF\u4E13\u5BB6\u6570\u91CF"},{default:o(()=>[t("div",{ref_key:"chart1Ref",ref:D,class:"h-[230px]"},null,512)]),_:1})]),_:1}),s(m,{span:12,class:"mb-16"},{default:o(()=>[s(n,{header:"\u8FD1\u4E09\u5E74\u65B0\u589E\u4E13\u5BB6\u6570"},{default:o(()=>[t("div",{ref_key:"chart2Ref",ref:k,class:"h-[230px]"},null,512)]),_:1})]),_:1}),s(m,{span:12,class:"mb-16"},{default:o(()=>[s(n,null,{header:o(()=>[t("div",ce,[de,s(G,{modelValue:p.value,"onUpdate:modelValue":a[1]||(a[1]=_=>p.value=_),onChange:X},{default:o(()=>[s(N,{label:"\u7701\u7EF4\u5EA6"},{default:o(()=>[S("\u7701\u7EF4\u5EA6")]),_:1}),s(N,{label:"\u5E02\u7EF4\u5EA6"},{default:o(()=>[S("\u5E02\u7EF4\u5EA6")]),_:1})]),_:1},8,["modelValue"])])]),default:o(()=>[t("div",{ref_key:"chart3Ref",ref:R,class:"h-[230px]"},null,512)]),_:1})]),_:1}),s(m,{span:12,class:"mb-16"},{default:o(()=>[s(n,{header:"\u4E13\u5BB6\u7C7B\u578B"},{default:o(()=>[t("div",{ref_key:"chart4Ref",ref:Y,class:"h-[230px]"},null,512)]),_:1})]),_:1}),s(m,{span:12,class:"mb-16"},{default:o(()=>[s(n,{header:"\u4E13\u5BB6\u7B49\u7EA7"},{default:o(()=>[t("div",{ref_key:"chart5Ref",ref:V,class:"h-[230px]"},null,512)]),_:1})]),_:1})]),_:1})],64)}}});export{he as default};