|
- import{p as B}from"./flowConfiguration-e3261cd3.js";import{z as N,G as R,E as F,r,o as S,b as p,c as v,d as D,f as d,h as l,F as I,H as j,L as A,e as t,t as n,i as E,k as G}from"./index-dd5fae99.js";import{i as O}from"./index-b861e656.js";const z=f=>N.get("/api/v1/process/statistics/detail",{params:f}),H=f=>N.get("/api/v1/process/statistics/list",{params:f}),M={class:"flex justify-between text-center mt-24"},U={class:"text-primary text-32 font-bold",style:{"font-family":"DIN"}},q={class:"text-primary text-36 font-bold",style:{"font-family":"DIN"}},J={class:"text-primary text-32 font-bold",style:{"font-family":"DIN"}},K={class:"text-primary text-32 font-bold",style:{"font-family":"DIN"}},P={class:"text-primary text-32 font-bold",style:{"font-family":"DIN"}},Q={class:"text-primary text-32 font-bold",style:{"font-family":"DIN"}},W=G({name:"processStatistics"}),$=Object.assign(W,{setup(f){const T=R(F.userStore).userInfo,x=r([]),i=r({}),C=async()=>{const s=await B({regionCode:T.value.regionCode*1});x.value=s.data.records,i.value.process=s.data.records[0].processType,g()},_=r();let c;const h=()=>{var e,u;c||(c=O(_.value));const s={tooltip:{show:!0,trigger:"axis",valueFormatter:o=>o+"天"},xAxis:{type:"category",boundaryGap:!1,data:(e=y.value)==null?void 0:e.map(o=>o.instTypeName)},yAxis:{name:"完成耗时(天)",type:"value"},series:[{data:(u=y.value)==null?void 0:u.map(o=>o.avgTime),type:"line"}]};c.setOption(s)},a=r({}),g=async()=>{const s=await z({instType:i.value.process});a.value=s.data},y=r([]),k=async()=>{const s=await H();y.value=s.data||[],h()};return S(async()=>{C(),k()}),(s,e)=>{const u=p("el-option"),o=p("el-select"),w=p("el-form-item"),V=p("el-form"),b=p("el-card");return v(),D(I,null,[d(b,{class:"mb-16"},{default:l(()=>[d(V,{ref:"formRef",model:i.value},{default:l(()=>[d(w,null,{default:l(()=>[d(o,{modelValue:i.value.process,"onUpdate:modelValue":e[0]||(e[0]=m=>i.value.process=m),onChange:g},{default:l(()=>[(v(!0),D(I,null,j(x.value,(m,L)=>(v(),A(u,{key:L,value:m.processType,label:m.formName},null,8,["value","label"]))),128))]),_:1},8,["modelValue"])]),_:1})]),_:1},8,["model"]),t("div",M,[t("div",null,[t("p",U,n(a.value.totalInst||0),1),e[1]||(e[1]=t("p",{class:"text-info text-14"},"流程实例总数",-1))]),t("div",null,[t("p",q,n(a.value.finishedInst||0),1),e[2]||(e[2]=t("p",{class:"text-info text-14"},"已完成",-1))]),t("div",null,[t("p",J,n(a.value.pendingInst||0),1),e[3]||(e[3]=t("p",{class:"text-info text-14"},"处理中",-1))]),t("div",null,[t("p",K,n(a.value.avgTime||0)+"天",1),e[4]||(e[4]=t("p",{class:"text-info text-14"},"平均完成耗时",-1))]),t("div",null,[t("p",P,n(a.value.maxTime||0)+"天",1),e[5]||(e[5]=t("p",{class:"text-info text-14"},"最长完成耗时",-1))]),t("div",null,[t("p",Q,n(a.value.minTime||0)+"天",1),e[6]||(e[6]=t("p",{class:"text-info text-14"},"最短完成耗时",-1))])])]),_:1}),d(b,null,{header:l(()=>e[7]||(e[7]=[E("各流程平均处理时长")])),default:l(()=>[t("div",{ref_key:"chartRef",ref:_,style:{height:"400px"}},null,512)]),_:1})],64)}}});export{$ as default};
|