import{S as V,L as j,w as z}from"./element-plus.78e68aed.js";import{f as $,g as G}from"./workbench.91eb2d4c.js";import{h as M}from"./moment.40bc58bf.js";import{B as h}from"./vue-echarts.01ad0ec2.js";import{d as N,Z as _,r as x,i as I,o as P,c as R,U as n,L as g,a as e,S as a,u as s,j as U,R as Z}from"./@vue.18505fe0.js";import"./lodash-es.f52bd8b1.js";import"./async-validator.fb49d0f5.js";import"./@vueuse.fbc6a400.js";import"./@element-plus.edbd5a83.js";import"./dayjs.8ae0c638.js";import"./axios.2b8d80bd.js";import"./@ctrl.b082b0c1.js";import"./normalize-wheel-es.8aeb3683.js";import"./@popperjs.36402333.js";import"./index.2b30fcbd.js";import"./lodash.60201f64.js";import"./vue-router.101084e3.js";import"./pinia.a969beab.js";import"./css-color-function.b82a2ce7.js";import"./color.b905eb26.js";import"./clone.e1fb2883.js";import"./color-convert.755d189f.js";import"./color-name.e7a4e1d3.js";import"./color-string.e356f5de.js";import"./balanced-match.d2a36341.js";import"./ms.564e106c.js";import"./nprogress.495afef3.js";import"./vue-clipboard3.cb649e18.js";import"./clipboard.4592e390.js";import"./echarts.5016c48c.js";import"./zrender.58d022a1.js";import"./tslib.60310f1a.js";import"./highlight.js.31cd7941.js";import"./@highlightjs.b0c09b66.js";import"./resize-detector.4e96b72b.js";const q={class:"workbench"},H={class:"flex"},K={class:"flex-1 h-[270px]"},Q=e("div",{class:"text-2xl"},"\u4ECA\u65E5\u8BA2\u5355\u91D1\u989D",-1),W=e("span",{class:"text-[12px]"},"\xA5",-1),X={class:"text-2xl"},tt=e("div",{class:"w-[1px] bg-[#ccc] mr-4"},null,-1),et={class:"flex-1 flex"},st={class:"flex-1"},ot={class:"text-1xl"},at={class:"text-[12px]"},it={class:"text-info"},nt=e("span",{class:"text-info ml-2"},"\u65E5\u73AF\u6BD4",-1),lt={class:"text-success"},rt={class:"text-1xl"},ct={class:"text-[12px]"},ut={class:"text-info"},pt=e("span",{class:"text-info ml-2"},"\u65E5\u73AF\u6BD4",-1),dt={class:"text-success"},mt={class:"flex-1"},ht={class:"text-1xl"},_t={class:"text-[12px]"},xt={class:"text-info"},ft=e("span",{class:"text-info ml-2"},"\u65E5\u73AF\u6BD4",-1),yt={class:"text-success"},gt={class:"text-1xl"},vt={class:"text-[12px]"},Et={class:"text-info"},wt=e("span",{class:"text-info ml-2"},"\u65E5\u73AF\u6BD4",-1),bt={class:"text-success"},Dt={class:"mb-6 flex justify-between items-center"},At=e("span",{class:"text-2xl"},"\u7528\u6237\u6982\u51B5",-1),Bt={class:"flex items-center text-sm"},Ft=e("span",{class:"mr-4"},"\u65F6\u95F4\u7B5B\u9009: ",-1),Ct=N({name:"statistics_user"}),pe=N({...Ct,setup(St){const Y=[{text:"\u8FD1\u4E00\u5468",value:()=>{const i=new Date,t=new Date;return t.setDate(t.getDate()-7),[t,i]}},{text:"\u8FD1\u4E00\u6708",value:()=>{const i=new Date,t=new Date;return t.setMonth(t.getMonth()-1),[t,i]}},{text:"\u8FD1\u4E09\u6708",value:()=>{const i=new Date,t=new Date;return t.setMonth(t.getMonth()-3),[t,i]}}],u=_({xAxis:{type:"category",data:[0],axisLabel:{rotate:45,color:"#333"}},yAxis:{type:"value",name:"\u6570\u91CF",position:"left",axisLabel:{formatter:"{value}"}},grid:{left:"3%",right:"4%",bottom:"3%",containLabel:!0},legend:{data:["\u8BBF\u95EE\u91CF"]},itemStyle:{color:"red"},tooltip:{trigger:"axis"},series:[{name:"\u8BBF\u95EE\u91CF",data:[0],type:"line",smooth:!0}]}),f={tooltip:{trigger:"axis",axisPointer:{type:"cross"},formatter:i=>{let t=`

${i[0].name}\u70B9

`;return i.forEach(o=>{t+=`

${o.seriesName}: ${o.value}

`}),t}},grid:{left:"3%",right:"4%",bottom:"3%",containLabel:!0},legend:{data:["\u6628\u5929","\u4ECA\u5929"],left:"3%",top:"3%"},xAxis:[{type:"category",boundaryGap:!1,data:["03","04","05","06","07","08","09","10","11","12","13","14","15","16","17","18","19","20","21","22","23","00","01","02"],axisLabel:{show:!1},axisTick:{show:!1},axisLine:{show:!1},grid:{show:!1}}],yAxis:[{type:"value",show:!1,spliteLine:{show:!1},axisLabel:{show:!1},axisTick:{show:!1},axisLine:{show:!1},grid:{show:!1}}],series:[{name:"\u6628\u5929",type:"line",data:[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,6,0,0,0,0,0],smooth:!0,symbol:"none",itemStyle:{color:"#ccc"},areaStyle:{color:{type:"linear",x:0,y:0,x2:0,y2:1,colorStops:[{offset:0,color:"#ccc"},{offset:.6,color:"#fff"}],global:!1}}},{name:"\u4ECA\u5929",type:"line",data:[0,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,0,0,0],smooth:!0,symbol:"none",areaStyle:{color:{type:"linear",x:0,y:0,x2:0,y2:1,colorStops:[{offset:0,color:"#5B8FF9"},{offset:.6,color:"#fff"}],global:!1}}}]},v=x({money:0,series:[]}),y=_(JSON.parse(JSON.stringify(f))),l=x([]),p=_(JSON.parse(JSON.stringify(f))),r=x([]),d=_(JSON.parse(JSON.stringify(f))),c=x(["",""]),E=()=>{let i="";c.value[0]&&c.value[1]&&(i=M(c.value[0]).format("YYYY/MM/DD")+"-"+M(c.value[1]).format("YYYY/MM/DD")),$({}).then(t=>{v.value={money:t.left.series[0].money,name:t.left.name},y.series[0].data=t.left.series[1].value,y.series[1].data=t.left.series[0].value,l.value=t.right.today.series,r.value=t.right.month,p.xAxis.data=t.right.today.x.map(o=>o),p.series[0].name=t.right.today.series[0].name,p.series[0].data=t.right.today.series[0].value,p.series[1].name=t.right.today.series[1].name,p.series[1].data=t.right.today.series[1].value,d.xAxis.data=Object.keys(t.right.month[0].value).map(o=>o),d.series[0].name=t.right.month[0].name,d.series[0].data=Object.values(t.right.month[0].value).map(o=>o),d.series[1].name=t.right.month[1].name,d.series[1].data=Object.values(t.right.month[1].value).map(o=>o)}),G({date:i}).then(t=>{u.xAxis.data=[],u.series=[],u.legend.data=t.series.map(o=>o.name),u.xAxis.data=t.xAxis,u.series=t.series.map(o=>({type:"line",smooth:!0,data:o.value,name:o.name}))})};return I(()=>{E()}),(i,t)=>{const o=j,T=V,J=z;return P(),R("div",q,[n(o,{shadow:"never",class:"!border-none"},{default:g(()=>{var m,w,b,D,A,B,F,C,S,k,O,L;return[e("div",H,[e("div",K,[Q,e("div",null,[W,e("span",X,a(s(v).money||"0.00"),1)]),n(s(h),{style:{height:"200px"},option:s(y),autoresize:!0},null,8,["option"])]),tt,e("div",et,[e("div",st,[e("div",ot,a((m=s(l)[0])==null?void 0:m.name),1),e("div",at,[e("span",it,"\u4ECA\u65E5: "+a((w=s(l)[0])==null?void 0:w.now_money),1),nt,e("span",lt,a((b=s(l)[0])==null?void 0:b.rate)+"%",1)]),n(s(h),{style:{height:"180px"},option:s(p),autoresize:!0},null,8,["option"]),e("div",rt,a((D=s(l)[1])==null?void 0:D.name),1),e("div",ct,[e("span",ut,"\u4ECA\u65E5: "+a((A=s(l)[1])==null?void 0:A.now_money),1),pt,e("span",dt,a((B=s(l)[1])==null?void 0:B.rate)+"%",1)])]),e("div",mt,[e("div",ht,a((F=s(r)[0])==null?void 0:F.name),1),e("div",_t,[e("span",xt,"\u4ECA\u65E5: "+a((C=s(r)[0])==null?void 0:C.now_money),1),ft,e("span",yt,a((S=s(r)[0])==null?void 0:S.rate)+"%",1)]),n(s(h),{style:{height:"180px"},option:s(d),autoresize:!0},null,8,["option"]),e("div",gt,a((k=s(r)[1])==null?void 0:k.name),1),e("div",vt,[e("span",Et,"\u4ECA\u65E5: "+a((O=s(r)[1])==null?void 0:O.now_money),1),wt,e("span",bt,a((L=s(r)[1])==null?void 0:L.rate)+"%",1)])])])])]}),_:1}),n(o,{shadow:"never",class:"mt-4 !border-none"},{default:g(()=>[e("div",Dt,[At,e("div",Bt,[Ft,n(T,{modelValue:s(c),"onUpdate:modelValue":t[0]||(t[0]=m=>U(c)?c.value=m:null),type:"daterange","range-separator":"\u81F3","start-placeholder":"\u5F00\u59CB\u65E5\u671F","end-placeholder":"\u7ED3\u675F\u65E5\u671F","unlink-panels":"",shortcuts:Y},null,8,["modelValue"]),n(J,{type:"primary",class:"ml-4",onClick:E},{default:g(()=>[Z("\u67E5\u8BE2")]),_:1})])]),e("div",null,[n(s(h),{style:{height:"400px"},option:s(u),autoresize:!0},null,8,["option"])])]),_:1})])}}});export{pe as default};