您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符

4 行
5.2KB

  1. import{L as x,i as m}from"./index.f55de596.js";import{s as M,d as X,r as i,o as T,c as f,e as U,f as q,h as o,i as s,g as l,t as b,k as z,F as H}from"./index.e8b71da7.js";const J=w=>M.get("/api/v1/statistics/early-warning",{params:w}),K={class:"flex justify-between text-center mt-24"},P={class:"flex-1"},Q={class:"text-primary text-32 font-bold",style:{"font-family":"DIN"}},Z={class:"flex-1"},$={class:"text-primary text-32 font-bold",style:{"font-family":"DIN"}},ee={class:"flex-1"},te={class:"text-primary text-32 font-bold",style:{"font-family":"DIN"}};const ae=X({name:"earlyWarningStatistics"}),re=Object.assign(ae,{setup(w){const p=i({}),C=i(),k=i(),R=i(),F=i(),Y=i();let u,h,_,y,v;const g=new x(0,0,1,1,[{offset:0,color:"#20DEEF"},{offset:1,color:"#007FED"}]),O=async()=>{V(),S(),j(),L(),E()},V=()=>{var e,a;u||(u=m(C.value));const n={tooltip:{show:!0,trigger:"axis",valueFormatter:t=>t},grid:{bottom:20,top:10,right:30},xAxis:{type:"category",data:(e=r.value)==null?void 0:e.threeYearsAlarms.map(t=>t.name),axisLabel:{align:"center",interval:0}},yAxis:{name:"",type:"value"},color:g,series:[{name:"\u7D2F\u8BA1\u62A5\u8B66\u6570",data:(a=r.value)==null?void 0:a.threeYearsAlarms.map(t=>t.num),type:"bar",barWidth:50}]};u.setOption(n)},S=()=>{var e,a;h||(h=m(k.value));const n={tooltip:{show:!0,trigger:"axis",valueFormatter:t=>t},grid:{bottom:45,top:10,right:10,left:70},xAxis:{type:"category",data:(e=r.value)==null?void 0:e.alarmsFlowsNow.map(t=>t.name),axisLabel:{interval:0,hideOverlap:!1,rotate:20}},yAxis:{name:"",type:"value"},color:g,series:[{name:"\u62A5\u8B66\u6570\u91CF",data:(a=r.value)==null?void 0:a.alarmsFlowsNow.map(t=>t.num),type:"line"}]};h.setOption(n)},j=()=>{var e,a;_||(_=m(R.value));const n={tooltip:{show:!0,trigger:"axis",valueFormatter:t=>t},grid:{bottom:20,top:10,right:30,left:80},xAxis:{type:"value"},yAxis:{type:"category",data:(e=r.value)==null?void 0:e.alarmsFillingNow.map(t=>t.name)},color:g,series:[{name:"\u9884\u8B66\u6570\u91CF",data:(a=r.value)==null?void 0:a.alarmsFillingNow.map(t=>t.num),type:"bar",barWidth:20}]};_.setOption(n)},L=()=>{var a;const n=[new x(0,0,1,1,[{offset:0,color:"#C59400"},{offset:1,color:"rgba(142, 120, 36, 0.50)"}]),new x(0,0,1,1,[{offset:0,color:"rgba(197, 90, 70, 1)"},{offset:1,color:"rgba(197, 90, 70, 0.5)"}])];y||(y=m(F.value));const e={legend:{show:!1},tooltip:{show:!0,trigger:"item"},color:n,series:[{data:(a=r.value)==null?void 0:a.constructionAlarms.map(t=>({...t,value:t.num})),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)"}}}]};y.setOption(e)},E=()=>{var e;v||(v=m(Y.value));const n={legend:{show:!1},tooltip:{show:!0,trigger:"item"},series:[{data:(e=r.value)==null?void 0:e.safetyMonitoring.map(a=>({...a,value:a.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)"}}}]};v.setOption(n)},r=i(),A=async()=>{const n=await J({year:p.value.projectYear});r.value=n.data,O()};return T(async()=>{A()}),(n,e)=>{const a=f("el-date-picker"),t=f("el-form-item"),W=f("el-form"),c=f("el-card"),d=f("el-col"),I=f("el-row");return U(),q(H,null,[o(c,{class:"mb-16"},{default:s(()=>{var N,D,B;return[o(W,{ref:"formRef",model:p.value},{default:s(()=>[o(t,{label:"\u5E74\u5EA6"},{default:s(()=>[o(a,{modelValue:p.value.projectYear,"onUpdate:modelValue":e[0]||(e[0]=G=>p.value.projectYear=G),type:"year",placeholder:"\u5168\u90E8",format:"YYYY","value-format":"YYYY",style:{width:"200px"},onChange:A},null,8,["modelValue"])]),_:1})]),_:1},8,["model"]),l("div",K,[l("div",P,[l("p",Q,b(((N=r.value)==null?void 0:N.accumulatedAlarmsTotal)||0),1),e[1]||(e[1]=l("p",{class:"text-info text-14"},"\u7D2F\u8BA1\u62A5\u8B66\u6570\u91CF",-1))]),l("div",Z,[l("p",$,b(((D=r.value)==null?void 0:D.accumulatedAlarmsFlow)||0),1),e[2]||(e[2]=l("p",{class:"text-info text-14"},"\u6D41\u7A0B\u9884\u8B66\u7D2F\u8BA1\u62A5\u8B66\u6570\u91CF",-1))]),l("div",ee,[l("p",te,b(((B=r.value)==null?void 0:B.accumulatedAlarmsFilling)||0),1),e[3]||(e[3]=l("p",{class:"text-info text-14"},"\u586B\u62A5\u9884\u8B66\u62A5\u8B66\u6570\u91CF",-1))])])]}),_:1}),o(I,{gutter:16},{default:s(()=>[o(d,{span:12,class:"mb-16"},{default:s(()=>[o(c,{header:"\u8FD1\u4E09\u5E74\u7D2F\u8BA1\u62A5\u8B66\u6570\u91CF"},{default:s(()=>[l("div",{ref_key:"chart1Ref",ref:C,class:"h-[230px]"},null,512)]),_:1})]),_:1}),o(d,{span:12,class:"mb-16"},{default:s(()=>[o(c,{header:"\u5F53\u524D\u5404\u6D41\u7A0B\u62A5\u8B66\u60C5\u51B5"},{default:s(()=>[l("div",{ref_key:"chart2Ref",ref:k,class:"h-[230px]"},null,512)]),_:1})]),_:1}),o(d,{span:12,class:"mb-16"},{default:s(()=>[o(c,{header:"\u5F53\u524D\u5404\u586B\u62A5\u62A5\u8B66\u60C5\u51B5"},{default:s(()=>[l("div",{ref_key:"chart3Ref",ref:R,class:"h-[230px]"},null,512)]),_:1})]),_:1}),z("",!0),o(d,{span:12,class:"mb-16"},{default:s(()=>[o(c,{header:"\u5EFA\u8BBE\u5468\u671F\u9884\u8B66\u76D1\u6D4B"},{default:s(()=>[l("div",{ref_key:"chart5Ref",ref:F,class:"h-[230px]"},null,512)]),_:1})]),_:1}),o(d,{span:12,class:"mb-16"},{default:s(()=>[o(c,{header:"\u5B89\u5168\u76D1\u6D4B"},{default:s(()=>[l("div",{ref_key:"chart6Ref",ref:Y,class:"h-[230px]"},null,512)]),_:1})]),_:1})]),_:1})],64)}}});export{re as default};