import{d as S,b as E,r as b,s as k,p as V,c as i,e as z,f as O,h as s,i as c,g as e,t as h,u as o,F as P,a as _,R as T,S as j,_ as I}from"./index.0308b213.js";import{g as U,a as L,b as N}from"./overview.5d57bd8b.js";const r=p=>(T("data-v-ca0eab63"),p=p(),j(),p),R=r(()=>e("div",{class:"header"},[e("div",{class:"tn-title--vertical-line title"}," \u987E\u5BA2\u6982\u62EC ")],-1)),$={class:"body"},q={class:"data"},G=r(()=>e("div",{class:"data-title"}," \u4ECA\u65E5\u65B0\u589E(\u4EBA) ",-1)),H={class:"data-value"},J={class:"data"},K=r(()=>e("div",{class:"data-title"}," \u6628\u65E5\u65B0\u589E(\u4EBA) ",-1)),Q={class:"data-value"},W={class:"data"},X=r(()=>e("div",{class:"data-title"}," \u672C\u6708\u65B0\u589E(\u4EBA) ",-1)),Z={class:"data-value"},tt={class:"data"},et=r(()=>e("div",{class:"data-title"}," \u603B\u987E\u5BA2(\u4EBA) ",-1)),at={class:"data-value"},ot=r(()=>e("div",{class:"header"},[e("div",{class:"tn-title--vertical-line title"}," \u8D8B\u52BF\u56FE(\u524D10) ")],-1)),st={class:"body"},nt={class:"filter"},ut={class:"echarts"},lt=r(()=>e("div",{style:{"margin-top":"30px","margin-bottom":"30px"}},null,-1)),rt={class:"data"},it={class:"table"},dt={class:"pagination"},ct=S({setup(p){const u=E({page:1,limit:10,time:[]}),m=E({list:[],count:1e3}),B=[{text:"\u4E00\u5468\u5185",value:()=>{const t=_();return[t.subtract(1,"week").toDate(),t.toDate()]}},{text:"\u4E24\u5468\u5185",value:()=>{const t=_();return[t.subtract(2,"week").toDate(),t.toDate()]}},{text:"\u4E00\u4E2A\u6708\u5185",value:()=>{const t=_();return[t.subtract(1,"month").toDate(),t.toDate()]}}],l=E({yesterday_num:0,today_num:0,month_num:0,total_num:0});(()=>{U().then(t=>{l.yesterday_num=t.yesterday_num,l.today_num=t.today_num,l.month_num=t.month_num,l.total_num=t.total_num})})();const d=b([]);(()=>{const t="YYYY-MM-DD",a=_().startOf("month").format(t),v=_().format(t);d.value=[a,v]})();let g=b([]);const A=b(),x=k(()=>({tooltip:{trigger:"axis",axisPointer:{type:"shadow"}},xAxis:{type:"category",boundaryGap:!1},yAxis:{type:"value"},grid:{left:"0%",right:"0%",bottom:"0%",containLabel:!0},series:[{data:g.value,type:"bar",smooth:!0,areaStyle:{color:"#D8E5FF"},lineStyle:{color:"#3D7EFF"}}]})),f=()=>{g.value=[],L(d.value[0]||"",d.value[1]||"").then(t=>{t.shuju.label.forEach(a=>{g.value.push([a,t.shuju.datasets.flow1[a]||0])})})};f();const C=()=>{f()},y=()=>{N(u).then(t=>{m.list=t.list,m.count=t.count})};return V(()=>u.time,t=>{t&&y()},{immediate:!0}),(t,a)=>{const v=i("el-card"),F=i("el-date-picker"),w=i("v-chart"),D=i("el-table-column"),Y=i("el-table"),M=i("el-pagination");return z(),O(P,null,[s(v,{class:"overview"},{header:c(()=>[R]),default:c(()=>[e("div",$,[e("div",q,[G,e("div",H,h(o(l).today_num),1)]),e("div",J,[K,e("div",Q,h(o(l).yesterday_num),1)]),e("div",W,[X,e("div",Z,h(o(l).month_num),1)]),e("div",tt,[et,e("div",at,h(o(l).total_num),1)])])]),_:1}),s(v,{class:"trend"},{header:c(()=>[ot]),default:c(()=>[e("div",st,[e("div",nt,[s(F,{modelValue:d.value,"onUpdate:modelValue":a[0]||(a[0]=n=>d.value=n),type:"daterange","range-separator":"\u81F3","start-placeholder":"\u5F00\u59CB\u65F6\u95F4","end-placeholder":"\u7ED3\u675F\u65F6\u95F4",format:"YYYY-MM-DD","value-format":"YYYY-MM-DD",shortcuts:B,onChange:C},null,8,["modelValue"])]),e("div",ut,[s(w,{ref_key:"trendEcharts",ref:A,class:"chart",option:o(x)},null,8,["option"])])])]),_:1}),lt,s(F,{modelValue:o(u).time,"onUpdate:modelValue":a[1]||(a[1]=n=>o(u).time=n),type:"daterange","range-separator":"\u81F3","start-placeholder":"\u5F00\u59CB\u65E5\u671F","end-placeholder":"\u7ED3\u675F\u65E5\u671F"},null,8,["modelValue"]),e("div",rt,[e("div",it,[s(Y,{data:o(m).list},{default:c(()=>[s(D,{label:"\u4EE3\u7406id",prop:"id"}),s(D,{label:"\u6240\u5C5E\u57CE\u5E02",prop:"title"}),s(D,{label:"\u5F53\u524D\u7D2F\u8BA1\u7528\u6237\u91CF",prop:"num"})]),_:1},8,["data"])])]),e("div",dt,[s(M,{currentPage:o(u).page,"onUpdate:currentPage":a[2]||(a[2]=n=>o(u).page=n),"page-size":o(u).limit,"onUpdate:page-size":a[3]||(a[3]=n=>o(u).limit=n),"page-sizes":[10,20,30,40],layout:"total, sizes, prev, pager, next, jumper",total:o(m).count,onSizeChange:a[4]||(a[4]=n=>y()),onCurrentChange:a[5]||(a[5]=n=>y())},null,8,["currentPage","page-size","total"])])],64)}}});const ht=I(ct,[["__scopeId","data-v-ca0eab63"]]);export{ht as default};
