import{aa as f,d as w,a6 as x,b as M,r as h,s as Y,c as p,e as C,f as O,h as _,i as m,g as e,t as v,u as r,F as S,a as d,R as k,S as T,_ as j}from"./index.0308b213.js";import{c as P,d as V}from"./overview.5d57bd8b.js";const I=()=>f({url:"agent/statcenter.member/index"}),N=(n,l)=>f({url:"agent/statcenter.member/index",method:"POST",data:{start:n,end:l}}),u=n=>(k("data-v-5a5377f2"),n=n(),T(),n),R=u(()=>e("div",{class:"header"},[e("div",{class:"tn-title--vertical-line title"}," \u987E\u5BA2\u6982\u62EC ")],-1)),q={class:"body"},G={class:"data"},L=u(()=>e("div",{class:"data-title"}," \u4ECA\u65E5\u65B0\u589E(\u4EBA) ",-1)),U={class:"data-value"},z={class:"data"},H=u(()=>e("div",{class:"data-title"}," \u6628\u65E5\u65B0\u589E(\u4EBA) ",-1)),J={class:"data-value"},K={class:"data"},Q=u(()=>e("div",{class:"data-title"}," \u672C\u6708\u65B0\u589E(\u4EBA) ",-1)),W={class:"data-value"},X={class:"data"},Z=u(()=>e("div",{class:"data-title"}," \u603B\u987E\u5BA2(\u4EBA) ",-1)),$={class:"data-value"},tt=u(()=>e("div",{class:"header"},[e("div",{class:"tn-title--vertical-line title"}," \u8D8B\u52BF\u56FE ")],-1)),et={class:"body"},at={class:"filter"},st={class:"echarts"},ot=w({setup(n){const{OpPlatform:l}=x(),g=[{text:"\u4E00\u5468\u5185",value:()=>{const t=d();return[t.subtract(1,"week").toDate(),t.toDate()]}},{text:"\u4E24\u5468\u5185",value:()=>{const t=d();return[t.subtract(2,"week").toDate(),t.toDate()]}},{text:"\u4E00\u4E2A\u6708\u5185",value:()=>{const t=d();return[t.subtract(1,"month").toDate(),t.toDate()]}}],a=M({yesterday_num:0,today_num:0,month_num:0,total_num:0});(()=>{l.value==="agent"?I().then(t=>{a.yesterday_num=t.yesterday_num,a.today_num=t.today_num,a.month_num=t.month_num,a.total_num=t.total_num}):P().then(t=>{a.yesterday_num=t.yesterday_num,a.today_num=t.today_num,a.month_num=t.month_num,a.total_num=t.total_num})})();const o=h([]);(()=>{const t="YYYY-MM-DD",s=d().startOf("month").format(t),i=d().format(t);o.value=[s,i]})();let c=h([]);const D=h(),E=Y(()=>({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:c.value,type:"line",smooth:!0,areaStyle:{color:"#D8E5FF"},lineStyle:{color:"#3D7EFF"}}]})),y=()=>{c.value=[],l.value==="agent"?N(o.value[0]||"",o.value[1]||"").then(t=>{t.shuju.label.forEach(s=>{c.value.push([s,t.shuju.datasets.flow1[s]||0])})}):V(o.value[0]||"",o.value[1]||"").then(t=>{t.shuju.label.forEach(s=>{c.value.push([s,t.shuju.datasets.flow1[s]||0])})})};y();const b=()=>{y()};return(t,s)=>{const i=p("el-card"),A=p("el-date-picker"),B=p("v-chart");return C(),O(S,null,[_(i,{class:"overview"},{header:m(()=>[R]),default:m(()=>[e("div",q,[e("div",G,[L,e("div",U,v(r(a).today_num),1)]),e("div",z,[H,e("div",J,v(r(a).yesterday_num),1)]),e("div",K,[Q,e("div",W,v(r(a).month_num),1)]),e("div",X,[Z,e("div",$,v(r(a).total_num),1)])])]),_:1}),_(i,{class:"trend"},{header:m(()=>[tt]),default:m(()=>[e("div",et,[e("div",at,[_(A,{modelValue:o.value,"onUpdate:modelValue":s[0]||(s[0]=F=>o.value=F),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:g,onChange:b},null,8,["modelValue"])]),e("div",st,[_(B,{ref_key:"trendEcharts",ref:D,class:"chart",option:r(E)},null,8,["option"])])])]),_:1})],64)}}});const lt=j(ot,[["__scopeId","data-v-5a5377f2"]]);export{lt as default};
