You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

p__Home__index.425111da.async.js 7.2KB

1
  1. "use strict";(self.webpackChunk=self.webpackChunk||[]).push([[371],{86587:function(Ae,S,a){a.r(S);var V=a(15009),x=a.n(V),J=a(99289),w=a.n(J),G=a(5574),u=a.n(G),i=a(62435),v=a(71230),f=a(15746),g=a(42075),r=a(86250),H=a(75081),h=a(78045),N=a(22144),Y=a(73403),$=a(87547),Q=a(88641),X=a(99180),q=a(48869),ee=a(64389),_=a(39680),e=a(86074),te=function(){var P=(0,i.useRef)(null),ae=(0,i.useState)(0),p=u()(ae,2),ne=p[0],se=p[1],ie=(0,i.useState)(0),A=u()(ie,2),le=A[0],re=A[1],oe=(0,i.useState)(0),T=u()(oe,2),ue=T[0],de=T[1],_e=(0,i.useState)(0),b=u()(_e,2),ce=b[0],he=b[1],fe=(0,i.useState)(0),M=u()(fe,2),m=M[0],ge=M[1],ve=(0,i.useState)(null),O=u()(ve,2),d=O[0],c=O[1],me=(0,i.useState)([]),Z=u()(me,2),be=Z[0],Me=Z[1];(0,i.useEffect)(function(){(0,_.m_v)().then(function(s){se(s.data.total?s.data.total:0)}),(0,_.k1T)().then(function(s){re(s.data.total?s.data.total:0)}),(0,_.kaC)().then(function(s){de(s.data.total?s.data.total:0)}),(0,_.oJ8)().then(function(s){he(s.data.total?s.data.total:0)})},[]);var Ee=(0,i.useState)(!1),B=u()(Ee,2),je=B[0],C=B[1],De=(0,i.useState)(0),R=u()(De,2),E=R[0],W=R[1],ye=(0,i.useState)(0),I=u()(ye,2),j=I[0],L=I[1],Se=(0,i.useState)(0),K=u()(Se,2),D=K[0],U=K[1],xe=(0,i.useState)(0),F=u()(xe,2),y=F[0],z=F[1];(0,i.useEffect)(function(){Pe()},[d]);var Pe=function(){C(!0);var n=d?{start_date:d[0],end_date:d[1]}:{};m==5?n=d?{start_date:d[0],end_date:d[1]}:{}:n=d?{start_date:k(d[0]),end_date:k(d[1])}:{},Promise.all([(0,_.m_v)(n).then(function(t){return W(t.data.total?t.data.total:0)}),(0,_.k1T)(n).then(function(t){return L(t.data.total?t.data.total:0)}),(0,_.kaC)(n).then(function(t){return U(t.data.total?t.data.total:0)}),(0,_.oJ8)(n).then(function(t){return z(t.data.total?t.data.total:0)})]).finally(function(){C(!1)})},pe=function(n){ge(n.target.value);var t=new Date,l,o;switch(n.target.value){case 0:c(null);break;case 1:l=new Date(t),l.setDate(t.getDate()-3),o=t,c([l,o]);break;case 2:l=new Date(t),l.setDate(t.getDate()-7),o=t,c([l,o]);break;case 3:l=new Date(t),l.setDate(t.getDate()-15),o=t,c([l,o]);break;case 4:l=new Date(t),l.setDate(t.getDate()-30),o=t,c([l,o]);break;case 5:c(null);break;default:c(null)}},k=function(n){var t=n.getFullYear(),l=String(n.getMonth()+1).padStart(2,"0"),o=String(n.getDate()).padStart(2,"0");return"".concat(t,"-").concat(l,"-").concat(o)};return(0,i.useEffect)(function(){var s=P.current,n=ee.S1(s),t={tooltip:{trigger:"axis"},legend:{show:!0},xAxis:{type:"category",data:["\u4F01\u4E1A\u6570","\u6C42\u804C\u8005","\u804C\u4F4D\u6570","\u4F01\u4E1AVIP"]},yAxis:{type:"value"},series:[{type:"bar",barWidth:"60%",data:[{name:"\u4F01\u4E1A\u6570",label:{show:!0,verticalAlign:"middle",position:"insideBottom",distance:15,formatter:E,fontSize:16,rich:{name:{}}},value:E,itemStyle:{color:"#BF7FF1"}},{name:"\u6C42\u804C\u8005",label:{show:!0,verticalAlign:"middle",position:"insideBottom",distance:15,formatter:j,fontSize:16,rich:{name:{}}},value:j,itemStyle:{color:"#3FAAF6"}},{name:"\u804C\u4F4D\u6570",value:D,label:{show:!0,verticalAlign:"middle",position:"insideBottom",distance:15,formatter:D,fontSize:16,rich:{name:{}}},itemStyle:{color:"#EA667B"}},{name:"\u4F01\u4E1AVIP",value:y,label:{show:!0,verticalAlign:"middle",position:"insideBottom",distance:15,formatter:y,fontSize:16,rich:{name:{}}},itemStyle:{color:"#19be6e"}}]}]};return n.setOption(t),function(){n.dispose()}},[E,j,D,y]),(0,e.jsx)(e.Fragment,{children:(0,e.jsx)(v.Z,{gutter:[20,20],children:(0,e.jsx)(f.Z,{span:18,children:(0,e.jsxs)(g.Z,{direction:"vertical",size:30,style:{width:"100%"},children:[(0,e.jsxs)(r.Z,{vertical:!0,children:[(0,e.jsx)("h3",{children:"\u6570\u636E\u6982\u89C8"}),(0,e.jsxs)(v.Z,{gutter:[20,20],children:[(0,e.jsx)(f.Z,{span:6,children:(0,e.jsxs)(r.Z,{justify:"space-around",align:"center",style:{background:"linear-gradient(to right, #5470FF,#BF7FF1)",height:100,borderRadius:10},children:[(0,e.jsxs)(r.Z,{vertical:!0,justify:"space-around",align:"stretch",style:{height:80,color:"#ffffff"},children:[(0,e.jsx)("div",{style:{fontSize:20},children:"\u4F01\u4E1A\u6570"}),(0,e.jsx)("div",{style:{fontWeight:"bold",fontSize:32},children:ne})]}),(0,e.jsx)(r.Z,{vertical:!0,justify:"space-between",children:(0,e.jsx)(Y.Z,{style:{fontSize:48,color:"rgb(225,202,252)"}})})]})}),(0,e.jsx)(f.Z,{span:6,children:(0,e.jsxs)(r.Z,{justify:"space-around",align:"center",style:{background:"linear-gradient(to right, #3FAAF6,#767BFA)",height:100,borderRadius:10},children:[(0,e.jsxs)(r.Z,{vertical:!0,justify:"space-around",align:"stretch",style:{height:80,color:"#ffffff"},children:[(0,e.jsx)("div",{style:{fontSize:20},children:"\u6C42\u804C\u8005"}),(0,e.jsx)("div",{style:{fontWeight:"bold",fontSize:32},children:le})]}),(0,e.jsx)(r.Z,{vertical:!0,justify:"space-between",children:(0,e.jsx)($.Z,{style:{fontSize:48,color:"rgb(225,202,252)"}})})]})}),(0,e.jsx)(f.Z,{span:6,children:(0,e.jsxs)(r.Z,{justify:"space-around",align:"center",style:{background:"linear-gradient(to right, #EA667B,#F4A060)",height:100,borderRadius:10},children:[(0,e.jsxs)(r.Z,{vertical:!0,justify:"space-around",align:"stretch",style:{height:80,color:"#ffffff"},children:[(0,e.jsx)("div",{style:{fontSize:20},children:"\u804C\u4F4D\u6570"}),(0,e.jsx)("div",{style:{fontWeight:"bold",fontSize:32},children:ue})]}),(0,e.jsx)(r.Z,{vertical:!0,justify:"space-between",children:(0,e.jsx)(Q.Z,{style:{fontSize:48,color:"rgb(225,202,252)"}})})]})}),(0,e.jsx)(f.Z,{span:6,children:(0,e.jsxs)(r.Z,{justify:"space-around",align:"center",style:{background:"linear-gradient(to right,#A4E164,#19be6e)",height:100,borderRadius:10},children:[(0,e.jsxs)(r.Z,{vertical:!0,justify:"space-around",align:"stretch",style:{height:80,color:"#ffffff"},children:[(0,e.jsx)("div",{style:{fontSize:20},children:"\u4F01\u4E1AVIP"}),(0,e.jsx)("div",{style:{fontWeight:"bold",fontSize:32},children:ce})]}),(0,e.jsx)(r.Z,{vertical:!0,justify:"space-between",children:(0,e.jsx)(X.Z,{style:{fontSize:48,color:"rgb(225,202,252)"}})})]})})]})]}),(0,e.jsx)(v.Z,{children:(0,e.jsx)(f.Z,{span:12,children:(0,e.jsx)(H.Z,{spinning:je,children:(0,e.jsxs)(g.Z,{direction:"vertical",style:{width:"100%",background:"#ffffff",padding:"20px",borderRadius:10},children:[(0,e.jsxs)(r.Z,{justify:"space-between",align:"center",children:[(0,e.jsxs)(g.Z,{style:{fontSize:16,fontWeight:"bold"},children:[(0,e.jsx)(q.Z,{}),"\u4F7F\u7528\u60C5\u51B5"]}),(0,e.jsxs)(g.Z,{direction:"vertical",children:[(0,e.jsxs)(h.ZP.Group,{value:m,defaultValue:0,size:"small",onChange:function(){var s=w()(x()().mark(function n(t){return x()().wrap(function(o){for(;;)switch(o.prev=o.next){case 0:pe(t);case 1:case"end":return o.stop()}},n)}));return function(n){return s.apply(this,arguments)}}(),children:[(0,e.jsx)(h.ZP.Button,{value:0,children:"\u5168\u90E8"}),(0,e.jsx)(h.ZP.Button,{value:1,children:"3\u5929"}),(0,e.jsx)(h.ZP.Button,{value:2,children:"7\u5929"}),(0,e.jsx)(h.ZP.Button,{value:3,children:"15\u5929"}),(0,e.jsx)(h.ZP.Button,{value:4,children:"30\u5929"}),(0,e.jsx)(h.ZP.Button,{value:5,children:"\u81EA\u5B9A\u4E49"})]}),m==5?(0,e.jsx)(g.Z,{direction:"vertical",align:"end",style:{width:"100%"},children:(0,e.jsx)(N.default.RangePicker,{size:"small",onChange:function(n,t){W(0),L(0),U(0),z(0),c([t[0],t[1]])}})}):""]})]}),(0,e.jsx)("div",{className:"echarts-container",children:(0,e.jsx)("div",{ref:P,style:{height:"400px",width:"100%"}})})]})})})})]})})})})};S.default=te}}]);