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.

5 lines
5.1KB

  1. import{L as b,i as u}from"./index-b861e656.js";import{z as M,r as d,o as P,b as c,c as W,d as q,f as r,h as o,j as H,e as a,t as w,i as S,F as J,k as K}from"./index-dd5fae99.js";const Q=C=>M.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={class:"flex-1"},oe={class:"text-primary text-32 font-bold",style:{"font-family":"DIN"}},le={class:"flex-1"},re={class:"text-primary text-32 font-bold",style:{"font-family":"DIN"}},se={class:"flex items-center justify-between"},ne=K({name:"expertStatistics"}),me=Object.assign(ne,{setup(C){const j=d({}),D=d(),k=d(),R=d(),Y=d(),V=d();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 e,l;h||(h=u(D.value));const s={tooltip:{show:!0,trigger:"axis",valueFormatter:t=>t},grid:{bottom:25,top:10,right:30},xAxis:{type:"category",data:(e=i.value)==null?void 0:e.regionExpert.map(t=>t.name),axisLabel:{align:"center",interval:0,rotate:20}},yAxis:{name:"",type:"value"},color:B,series:[{name:"入驻专家数",data:(l=i.value)==null?void 0:l.regionExpert.map(t=>t.num),type:"bar",barWidth:20}]};h.setOption(s)},I=()=>{var e,l,t,f;v||(v=u(k.value));const s={tooltip:{show:!0,trigger:"axis",valueFormatter:n=>n},grid:{bottom:20,top:10,right:30},xAxis:{type:"category",data:(l=(e=i.value)==null?void 0:e.threeYearsAdded)==null?void 0:l.map(n=>n.name),axisLabel:{align:"center",interval:0}},yAxis:{name:"",type:"value"},color:B,series:[{name:"新增专家数",data:(f=(t=i.value)==null?void 0:t.threeYearsAdded)==null?void 0:f.map(n=>n.num),type:"line"}]};v.setOption(s)},p=d("省维度"),X=s=>{p.value=s,E()},E=()=>{var e,l;y||(y=u(R.value));const s={legend:{show:!1},tooltip:{show:!0,trigger:"item"},series:[{data:(l=(e=i.value)==null?void 0:e.typeDistribution[p.value])==null?void 0:l.map(t=>({name:t.name,value:t.num})),radius:["45%","80%"],type:"pie",itemStyle:{borderRadius:4},label:{formatter:function(t){return t.name+`
  2. `+t.value+`${t.name==="财务专家"?"+2":""}`},color:"#333333"},emphasis:{itemStyle:{shadowBlur:10,shadowOffsetX:0,shadowColor:"rgba(0, 0, 0, 0.5)"}}}]};y.setOption(s)},$=()=>{var l,t;x||(x=u(Y.value));const s=[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"}])],e={tooltip:{show:!0,trigger:"item"},color:s,series:[{radius:["45%","80%"],data:(t=(l=i.value)==null?void 0:l.types)==null?void 0:t.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(e)},T=()=>{var e,l;g||(g=u(V.value));const s={legend:{show:!1},tooltip:{show:!0,trigger:"item"},series:[{data:(l=(e=i.value)==null?void 0:e.levels)==null?void 0:l.map(t=>({name:t.name,value:t.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(s)},i=d(),U=async()=>{const s=await Q({year:j.value.projectYear});i.value=s.data,A()};return P(async()=>{U()}),(s,e)=>{const l=c("el-date-picker"),t=c("el-form-item"),f=c("el-form"),n=c("el-card"),m=c("el-col"),N=c("el-radio-button"),z=c("el-radio-group"),G=c("el-row");return W(),q(J,null,[r(n,{class:"mb-16"},{default:o(()=>{var _,O,F;return[H("",!0),a("div",Z,[a("div",ee,[a("p",te,w(((_=i.value)==null?void 0:_.total)||0),1),e[2]||(e[2]=a("p",{class:"text-info text-14"},"入驻专家",-1))]),a("div",ae,[a("p",oe,w(((O=i.value)==null?void 0:O.thisYearAdded)||0),1),e[3]||(e[3]=a("p",{class:"text-info text-14"},"近一年新增专家",-1))]),a("div",le,[a("p",re,w(((F=i.value)==null?void 0:F.active)||0),1),e[4]||(e[4]=a("p",{class:"text-info text-14"},"活跃专家",-1))])])]}),_:1}),r(G,{gutter:16},{default:o(()=>[r(m,{span:12,class:"mb-16"},{default:o(()=>[r(n,{header:"各区县专家数量"},{default:o(()=>[a("div",{ref_key:"chart1Ref",ref:D,class:"h-[230px]"},null,512)]),_:1})]),_:1}),r(m,{span:12,class:"mb-16"},{default:o(()=>[r(n,{header:"近三年新增专家数"},{default:o(()=>[a("div",{ref_key:"chart2Ref",ref:k,class:"h-[230px]"},null,512)]),_:1})]),_:1}),r(m,{span:12,class:"mb-16"},{default:o(()=>[r(n,null,{header:o(()=>[a("div",se,[e[7]||(e[7]=a("p",null,"专家类型分布-擅长方向",-1)),r(z,{modelValue:p.value,"onUpdate:modelValue":e[1]||(e[1]=_=>p.value=_),onChange:X},{default:o(()=>[r(N,{label:"省维度"},{default:o(()=>e[5]||(e[5]=[S("省维度")])),_:1}),r(N,{label:"市维度"},{default:o(()=>e[6]||(e[6]=[S("市维度")])),_:1})]),_:1},8,["modelValue"])])]),default:o(()=>[a("div",{ref_key:"chart3Ref",ref:R,class:"h-[230px]"},null,512)]),_:1})]),_:1}),r(m,{span:12,class:"mb-16"},{default:o(()=>[r(n,{header:"专家类型"},{default:o(()=>[a("div",{ref_key:"chart4Ref",ref:Y,class:"h-[230px]"},null,512)]),_:1})]),_:1}),r(m,{span:12,class:"mb-16"},{default:o(()=>[r(n,{header:"专家等级"},{default:o(()=>[a("div",{ref_key:"chart5Ref",ref:V,class:"h-[230px]"},null,512)]),_:1})]),_:1})]),_:1})],64)}}});export{me as default};