Du kan inte välja fler än 25 ämnen Ämnen måste starta med en bokstav eller siffra, kan innehålla bindestreck ('-') och vara max 35 tecken långa.

4 lines
6.0KB

  1. var P=Object.defineProperty,T=Object.defineProperties;var q=Object.getOwnPropertyDescriptors;var S=Object.getOwnPropertySymbols;var z=Object.prototype.hasOwnProperty,H=Object.prototype.propertyIsEnumerable;var L=(n,t,a)=>t in n?P(n,t,{enumerable:!0,configurable:!0,writable:!0,value:a}):n[t]=a,F=(n,t)=>{for(var a in t||(t={}))z.call(t,a)&&L(n,a,t[a]);if(S)for(var a of S(t))H.call(t,a)&&L(n,a,t[a]);return n},N=(n,t)=>T(n,q(t));var C=(n,t,a)=>new Promise((g,y)=>{var b=d=>{try{m(a.next(d))}catch(p){y(p)}},w=d=>{try{m(a.throw(d))}catch(p){y(p)}},m=d=>d.done?g(d.value):Promise.resolve(d.value).then(b,w);m((a=a.apply(n,t)).next())});import{y as Q,_ as Z,d as $,r as u,o as ee,c as h,e as te,f as ae,i as l,j as i,g as r,t as Y,h as oe,F as se}from"./index.47f2a3eb.js";import{L as D,i as x}from"./index.682be1ab.js";const le=n=>Q.get("/api/v1/statistics/early-warning",{params:n}),re={class:"flex justify-between text-center mt-24"},ne={class:"flex-1"},ie={class:"text-primary text-32 font-bold",style:{"font-family":"DIN"}},ce=r("p",{class:"text-info text-14"},"\u7D2F\u8BA1\u62A5\u8B66\u6570\u91CF",-1),fe={class:"flex-1"},de={class:"text-primary text-32 font-bold",style:{"font-family":"DIN"}},me=r("p",{class:"text-info text-14"},"\u6D41\u7A0B\u9884\u8B66\u7D2F\u8BA1\u62A5\u8B66\u6570\u91CF",-1),pe={class:"flex-1"},ue={class:"text-primary text-32 font-bold",style:{"font-family":"DIN"}},_e=r("p",{class:"text-info text-14"},"\u586B\u62A5\u9884\u8B66\u62A5\u8B66\u6570\u91CF",-1);const he=$({name:"earlyWarningStatistics"}),ye=Object.assign(he,{setup(n){const t=u({}),a=u(),g=u(),y=u(),b=u(),w=u();let m,d,p,k,R;const A=new D(0,0,1,1,[{offset:0,color:"#20DEEF"},{offset:1,color:"#007FED"}]),W=()=>C(this,null,function*(){E(),I(),M(),U(),X()}),E=()=>{var o,s;m||(m=x(a.value));const f={tooltip:{show:!0,trigger:"axis",valueFormatter:e=>e},grid:{bottom:20,top:10,right:30},xAxis:{type:"category",data:(o=c.value)==null?void 0:o.threeYearsAlarms.map(e=>e.name),axisLabel:{align:"center",interval:0}},yAxis:{name:"",type:"value"},color:A,series:[{name:"\u7D2F\u8BA1\u62A5\u8B66\u6570",data:(s=c.value)==null?void 0:s.threeYearsAlarms.map(e=>e.num),type:"bar",barWidth:50}]};m.setOption(f)},I=()=>{var o,s;d||(d=x(g.value));const f={tooltip:{show:!0,trigger:"axis",valueFormatter:e=>e},grid:{bottom:45,top:10,right:10,left:70},xAxis:{type:"category",data:(o=c.value)==null?void 0:o.alarmsFlowsNow.map(e=>e.name),axisLabel:{interval:0,hideOverlap:!1,rotate:20}},yAxis:{name:"",type:"value"},color:A,series:[{name:"\u62A5\u8B66\u6570\u91CF",data:(s=c.value)==null?void 0:s.alarmsFlowsNow.map(e=>e.num),type:"line"}]};d.setOption(f)},M=()=>{var o,s;p||(p=x(y.value));const f={tooltip:{show:!0,trigger:"axis",valueFormatter:e=>e},grid:{bottom:20,top:10,right:30,left:80},xAxis:{type:"value"},yAxis:{type:"category",data:(o=c.value)==null?void 0:o.alarmsFillingNow.map(e=>e.name)},color:A,series:[{name:"\u9884\u8B66\u6570\u91CF",data:(s=c.value)==null?void 0:s.alarmsFillingNow.map(e=>e.num),type:"bar",barWidth:20}]};p.setOption(f)},U=()=>{var s;const f=[new D(0,0,1,1,[{offset:0,color:"#C59400"},{offset:1,color:"rgba(142, 120, 36, 0.50)"}]),new D(0,0,1,1,[{offset:0,color:"rgba(197, 90, 70, 1)"},{offset:1,color:"rgba(197, 90, 70, 0.5)"}])];k||(k=x(b.value));const o={legend:{show:!1},tooltip:{show:!0,trigger:"item"},color:f,series:[{data:(s=c.value)==null?void 0:s.constructionAlarms.map(e=>N(F({},e),{value:e.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)"}}}]};k.setOption(o)},X=()=>{var o;R||(R=x(w.value));const f={legend:{show:!1},tooltip:{show:!0,trigger:"item"},series:[{data:(o=c.value)==null?void 0:o.safetyMonitoring.map(s=>N(F({},s),{value:s.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)"}}}]};R.setOption(f)},c=u(),B=()=>C(this,null,function*(){const f=yield le({year:t.value.projectYear});c.value=f.data,W()});return ee(()=>C(this,null,function*(){B()})),(f,o)=>{const s=h("el-date-picker"),e=h("el-form-item"),G=h("el-form"),_=h("el-card"),v=h("el-col"),J=h("el-row");return te(),ae(se,null,[l(_,{class:"mb-16"},{default:i(()=>{var O,j,V;return[l(G,{ref:"formRef",model:t.value},{default:i(()=>[l(e,{label:"\u5E74\u5EA6"},{default:i(()=>[l(s,{modelValue:t.value.projectYear,"onUpdate:modelValue":o[0]||(o[0]=K=>t.value.projectYear=K),type:"year",placeholder:"\u5168\u90E8",format:"YYYY","value-format":"YYYY",style:{width:"200px"},onChange:B},null,8,["modelValue"])]),_:1})]),_:1},8,["model"]),r("div",re,[r("div",ne,[r("p",ie,Y(((O=c.value)==null?void 0:O.accumulatedAlarmsTotal)||0),1),ce]),r("div",fe,[r("p",de,Y(((j=c.value)==null?void 0:j.accumulatedAlarmsFlow)||0),1),me]),r("div",pe,[r("p",ue,Y(((V=c.value)==null?void 0:V.accumulatedAlarmsFilling)||0),1),_e])])]}),_:1}),l(J,{gutter:16},{default:i(()=>[l(v,{span:12,class:"mb-16"},{default:i(()=>[l(_,{header:"\u8FD1\u4E09\u5E74\u7D2F\u8BA1\u62A5\u8B66\u6570\u91CF"},{default:i(()=>[r("div",{ref_key:"chart1Ref",ref:a,class:"h-[230px]"},null,512)]),_:1})]),_:1}),l(v,{span:12,class:"mb-16"},{default:i(()=>[l(_,{header:"\u5F53\u524D\u5404\u6D41\u7A0B\u62A5\u8B66\u60C5\u51B5"},{default:i(()=>[r("div",{ref_key:"chart2Ref",ref:g,class:"h-[230px]"},null,512)]),_:1})]),_:1}),l(v,{span:12,class:"mb-16"},{default:i(()=>[l(_,{header:"\u5F53\u524D\u5404\u586B\u62A5\u62A5\u8B66\u60C5\u51B5"},{default:i(()=>[r("div",{ref_key:"chart3Ref",ref:y,class:"h-[230px]"},null,512)]),_:1})]),_:1}),oe("v-if",!0),l(v,{span:12,class:"mb-16"},{default:i(()=>[l(_,{header:"\u5EFA\u8BBE\u5468\u671F\u9884\u8B66\u76D1\u6D4B"},{default:i(()=>[r("div",{ref_key:"chart5Ref",ref:b,class:"h-[230px]"},null,512)]),_:1})]),_:1}),l(v,{span:12,class:"mb-16"},{default:i(()=>[l(_,{header:"\u5B89\u5168\u76D1\u6D4B"},{default:i(()=>[r("div",{ref_key:"chart6Ref",ref:w,class:"h-[230px]"},null,512)]),_:1})]),_:1})]),_:1})],64)}}}),we=Z(ye,[["__file","/Users/chenlixin/Documents/work/NDKJ/MyProject/ls-project-v2.0/src/pages/statisticAnalysis/earlyWarningStatistics/index.vue"]]);export{we as default};