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.
1 lines
26 KiB
1 lines
26 KiB
"use strict";(self.webpackChunkant_design_pro=self.webpackChunkant_design_pro||[]).push([[7071],{12086:function(G,E,a){var D=a(93264),S=a(79685),b=a(62415),N=a(64507),j=function(y,v){return S.createElement(N.Z,(0,D.Z)((0,D.Z)({},y),{},{ref:v,icon:b.Z}))};j.displayName="EllipsisOutlined",E.Z=S.forwardRef(j)},63243:function(G,E,a){var D=a(93264),S=a(79685),b=a(92933),N=a(64507),j=function(y,v){return S.createElement(N.Z,(0,D.Z)((0,D.Z)({},y),{},{ref:v,icon:b.Z}))};j.displayName="InfoCircleOutlined",E.Z=S.forwardRef(j)},99758:function(G,E,a){var D=a(79685),S=a(81383),b=function(){return b=Object.assign||function(j){for(var P,y=1,v=arguments.length;y<v;y++){P=arguments[y];for(var h in P)Object.prototype.hasOwnProperty.call(P,h)&&(j[h]=P[h])}return j},b.apply(this,arguments)},N=function(j){return D.createElement(S.P,b({},j,{chartType:"Area"}))};E.Z=N},79586:function(G,E,a){a.d(E,{f:function(){return F}});var D=a(6346),S=a(89543),b=a(68591),N=a.n(b),j=a(79685),P=a(34435),y=a(93264),v=a(33298),h=function(m){return(0,D.Z)({},m.componentCls,{width:"100%","&-wide":{maxWidth:1152,margin:"0 auto"}})};function le(k){return(0,v.Xj)("ProLayoutGridContent",function(m){var A=(0,y.Z)((0,y.Z)({},m),{},{componentCls:".".concat(k)});return[h(A)]})}var x=a(63342),F=function(m){var A=(0,j.useContext)(P.X),se=m.children,K=m.contentWidth,w=m.className,oe=m.style,de=(0,j.useContext)(S.ZP.ConfigContext),O=de.getPrefixCls,Y=m.prefixCls||O("pro"),C=K||A.contentWidth,B="".concat(Y,"-grid-content"),J=le(B),L=J.wrapSSR,Q=J.hashId,ce=C==="Fixed"&&A.layout==="top";return L((0,x.jsx)("div",{className:N()(B,Q,w,(0,D.Z)({},"".concat(B,"-wide"),ce)),style:oe,children:(0,x.jsx)("div",{className:"".concat(Y,"-grid-content-children ").concat(Q).trim(),children:se})}))}},34435:function(G,E,a){a.d(E,{X:function(){return S}});var D=a(79685),S=(0,D.createContext)({})},38356:function(G,E,a){a.r(E),a.d(E,{default:function(){return et}});var D=a(97380),S=a.n(D),b=a(12086),N=a(79586),j=a(8025),P=a(37741),y=a(61728),v=a(43241),h=a(79685),le=a(42329),x=a.n(le),F=a(63243),k=a(99758),m=a(81383),A=function(){return A=Object.assign||function(r){for(var e,t=1,i=arguments.length;t<i;t++){e=arguments[t];for(var l in e)Object.prototype.hasOwnProperty.call(e,l)&&(r[l]=e[l])}return r},A.apply(this,arguments)},se=function(r){return h.createElement(m.P,A({},r,{chartType:"Column"}))},K=se,w=a(58898),oe=a(40701),de=a(88178),O=a.n(de),Y=a(37482),C=a.n(Y),B=a(24507),J=(0,B.kc)(function(r){var e,t=r.token;return{iconGroup:{"span.anticon":{marginLeft:"16px",color:t.colorTextSecondary,cursor:"pointer",transition:"color 0.32s","&:hover":{color:t.colorText}}},rankingList:C()({margin:"25px 0 0",padding:"0",listStyle:"none",li:{display:"flex",alignItems:"center",marginTop:"16px",zoom:"1","&::before, &::after":{display:"table",content:"' '"},"&::after":{clear:"both",height:"0",fontSize:"0",visibility:"hidden"}}},"@media screen and (max-width: ".concat(t.screenLG,"px)"),{li:{"span:first-child":{marginRight:"8px"}}}),rankingItemNumber:{display:"inline-block",width:"20px",height:"20px",marginTop:"1.5px",marginRight:"16px",fontWeight:"600",fontSize:"12px",lineHeight:"20px",textAlign:"center",borderRadius:"20px",backgroundColor:t.colorBgContainerDisabled},rankingItemTitle:{flex:"1",marginRight:"8px",overflow:"hidden",whiteSpace:"nowrap",textOverflow:"ellipsis"},rankingItemNumberActive:{display:"inline-block",width:"20px",height:"20px",marginTop:"1.5px",marginRight:"16px",fontWeight:"600",fontSize:"12px",lineHeight:"20px",textAlign:"center",borderRadius:"20px",color:"#fff",backgroundColor:t.colorBgSpotlight},salesExtra:C()({display:"inline-block",marginRight:"24px",a:{marginLeft:"24px",color:t.colorText,"&:hover":{color:t.colorPrimary}}},"@media screen and (max-width: ".concat(t.screenLG,"px)"),{display:"none"}),currentDate:{color:t.colorPrimary},salesBar:C()({padding:"0 0 32px 32px"},"@media screen and (max-width: ".concat(t.screenMD,"px)"),{padding:"16px"}),salesRank:{padding:"0 32px 32px 72px"},salesCard:(e={".ant-tabs-bar, .ant-tabs-nav-wrap":{paddingLeft:"16px",".ant-tabs-nav .ant-tabs-tab":{paddingTop:"16px",paddingBottom:"14px",lineHeight:"24px"}},".ant-tabs-extra-content":{paddingRight:"24px",lineHeight:"55px"},".ant-card-head":{position:"relative"},".ant-card-head-title":{alignItems:"normal"}},C()(e,"@media screen and (max-width: ".concat(t.screenMD,"px)"),{padding:"16px"}),C()(e,"@media screen and (max-width: ".concat(t.screenSM,"px)"),{".ant-tabs-content":{paddingTop:"30px"}}),e),salesCardExtra:{height:"inherit"},salesTypeRadio:{position:"absolute",right:"54px",bottom:"12px"},offlineCard:{".ant-tabs-ink-bar":{bottom:"auto"},".ant-tabs-bar":{borderBottom:"none"},".ant-tabs-nav-container-scrolling":{paddingRight:"40px",paddingLeft:"40px"},".ant-tabs-tab-prev-icon::before":{position:"relative",left:"6px"},".ant-tabs-tab-next-icon::before":{position:"relative",right:"6px"},".ant-tabs-tab-active h4":{color:t.colorPrimary}},trendText:{marginLeft:"8px",color:t.colorTextHeading},rankingTitle:C()({},"@media screen and (max-width: ".concat(t.screenMD,"px)"),{marginTop:"16px"}),salesExtraWrap:C()({},"@media screen and (max-width: ".concat(t.screenSM,"px)"),{display:"none"})}}),L=J,Q=a(26285),ce=a.n(Q),Me=a(85873),ke=a.n(Me),He=a(94473),Pe=a.n(He),ze=a(34006),We=a.n(ze),Ge=a(45288),Ke=a.n(Ge),Ue=a(77128),q=a.n(Ue),Ve=a(80445),$e=a.n(Ve),U=a(18283),Xe=a(68591),_=a.n(Xe),Ye=(0,B.kc)(function(r){var e=r.token;return{chartCard:{position:"relative"},chartTop:{position:"relative",width:"100%",overflow:"hidden"},chartTopMargin:{marginBottom:"12px"},chartTopHasMargin:{marginBottom:"20px"},metaWrap:{float:"left"},avatar:{position:"relative",top:"4px",float:"left",marginRight:"20px",img:{borderRadius:"100%"}},meta:{height:"22px",color:e.colorTextSecondary,fontSize:e.fontSize,lineHeight:"22px"},action:{position:"absolute",top:"4px",right:"0",lineHeight:"1",cursor:"pointer"},total:{height:"38px",marginTop:"4px",marginBottom:"0",overflow:"hidden",color:e.colorTextHeading,fontSize:"30px",lineHeight:"38px",whiteSpace:"nowrap",textOverflow:"ellipsis",wordBreak:"break-all"},content:{position:"relative",width:"100%",marginBottom:"12px"},contentFixed:{position:"absolute",bottom:"0",left:"0",width:"100%"},footer:{marginTop:"8px",paddingTop:"9px",borderTop:"1px solid ".concat(e.colorSplit),"& > *":{position:"relative"}},footerMargin:{marginTop:"20px"}}}),Je=Ye,n=a(63342),Qe=["loading","contentHeight","title","avatar","action","total","footer","children"],qe=function(e){var t=Je(),i=t.styles,l=function(s){if(!s&&s!==0)return null;var M;switch($e()(s)){case"undefined":M=null;break;case"function":M=(0,n.jsx)("div",{className:i.total,children:s()});break;default:M=(0,n.jsx)("div",{className:i.total,children:s})}return M},d=function(){var s=e.contentHeight,M=e.title,De=e.avatar,Ee=e.action,X=e.total,z=e.footer,W=e.children,be=e.loading;return be?!1:(0,n.jsxs)("div",{className:i.chartCard,children:[(0,n.jsxs)("div",{className:_()(i.chartTop,C()({},i.chartTopMargin,!W&&!z)),children:[(0,n.jsx)("div",{className:i.avatar,children:De}),(0,n.jsxs)("div",{className:i.metaWrap,children:[(0,n.jsxs)("div",{className:i.meta,children:[(0,n.jsx)("span",{children:M}),(0,n.jsx)("span",{className:i.action,children:Ee})]}),l(X)]})]}),W&&(0,n.jsx)("div",{className:i.content,style:{height:s||"auto"},children:(0,n.jsx)("div",{className:s&&i.contentFixed,children:W})}),z&&(0,n.jsx)("div",{className:_()(i.footer,C()({},i.footerMargin,!W)),children:z})]})},u=e.loading,g=u===void 0?!1:u,f=e.contentHeight,o=e.title,c=e.avatar,p=e.action,T=e.total,I=e.footer,Se=e.children,re=q()(e,Qe);return(0,n.jsx)(U.Z,x()(x()({loading:g,bodyStyle:{padding:"20px 24px 8px 24px"}},re),{},{children:d()}))},V=qe,_e=(0,B.kc)(function(r){var e=r.token;return{field:{margin:"0",overflow:"hidden",whiteSpace:"nowrap",textOverflow:"ellipsis"},label:{fontSize:e.fontSize,lineHeight:"22px"},number:{marginLeft:"8px",color:e.colorTextHeading}}}),en=_e,nn=["label","value"],tn=function(e){var t=e.label,i=e.value,l=q()(e,nn),d=en(),u=d.styles;return(0,n.jsxs)("div",x()(x()({className:u.field},l),{},{children:[(0,n.jsx)("span",{className:u.label,children:t}),(0,n.jsx)("span",{className:u.number,children:i})]}))},ee=tn,Ze=function(e){return"\xA5 ".concat(O()(e).format("0,0"))},tt={yuan:Ze,ChartCard:V,Field:ee},an=function(r){We()(t,r);var e=Ke()(t);function t(){var i;ce()(this,t);for(var l=arguments.length,d=new Array(l),u=0;u<l;u++)d[u]=arguments[u];return i=e.call.apply(e,[this].concat(d)),C()(Pe()(i),"main",null),C()(Pe()(i),"renderToHtml",function(){var g=i.props.children;i.main&&(i.main.innerHTML=Ze(g))}),i}return ke()(t,[{key:"componentDidMount",value:function(){this.renderToHtml()}},{key:"componentDidUpdate",value:function(){this.renderToHtml()}},{key:"render",value:function(){var l=this;return(0,n.jsx)("span",{ref:function(u){l.main=u}})}}]),t}(h.Component),ne=a(93264),rn=a(83888),Ne=a(64507),Be=function(e,t){return h.createElement(Ne.Z,(0,ne.Z)((0,ne.Z)({},e),{},{ref:t,icon:rn.Z}))};Be.displayName="CaretUpOutlined";var Ie=h.forwardRef(Be),ln=a(56841),Re=function(e,t){return h.createElement(Ne.Z,(0,ne.Z)((0,ne.Z)({},e),{},{ref:t,icon:ln.Z}))};Re.displayName="CaretDownOutlined";for(var Fe=h.forwardRef(Re),sn=(0,B.kc)(function(r){var e=r.token;return{trendItem:{display:"inline-block",fontSize:e.fontSize,lineHeight:"22px"},up:{color:e["red-6"]},down:{top:"-1px",color:e["green-6"]},trendItemGrey:{up:{color:e.colorText},down:{color:e.colorText}},reverseColor:{up:{color:e["green-6"]},down:{color:e["red-6"]}}}}),on=sn,dn=["colorful","reverseColor","flag","children","className"],cn=function(e){var t,i=e.colorful,l=i===void 0?!0:i,d=e.reverseColor,u=d===void 0?!1:d,g=e.flag,f=e.children,o=e.className,c=q()(e,dn),p=on(),T=p.styles,I=_()(T.trendItem,(t={},C()(t,T.trendItemGrey,!l),C()(t,T.reverseColor,u&&l),t),o);return(0,n.jsxs)("div",x()(x()({},c),{},{className:I,title:typeof f=="string"?f:"",children:[(0,n.jsx)("span",{children:f}),g&&(0,n.jsx)("span",{className:T[g],children:g==="up"?(0,n.jsx)(Ie,{}):(0,n.jsx)(Fe,{})})]}))},$=cn,te={xs:24,sm:12,md:12,lg:12,xl:6,style:{marginBottom:24}},un=function(e){var t=e.loading,i=e.visitData,l=L(),d=l.styles;return(0,n.jsxs)(y.Z,{gutter:24,children:[(0,n.jsx)(v.Z,x()(x()({},te),{},{children:(0,n.jsxs)(V,{bordered:!1,title:"\u603B\u9500\u552E\u989D",action:(0,n.jsx)(w.Z,{title:"\u6307\u6807\u8BF4\u660E",children:(0,n.jsx)(F.Z,{})}),loading:t,total:function(){return(0,n.jsx)(an,{children:"126560"})},footer:(0,n.jsx)(ee,{label:"\u65E5\u9500\u552E\u989D",value:"\uFFE5".concat(O()(12423).format("0,0"))}),contentHeight:46,children:[(0,n.jsxs)($,{flag:"up",style:{marginRight:16},children:["\u5468\u540C\u6BD4",(0,n.jsx)("span",{className:d.trendText,children:"12%"})]}),(0,n.jsxs)($,{flag:"down",children:["\u65E5\u540C\u6BD4",(0,n.jsx)("span",{className:d.trendText,children:"11%"})]})]})})),(0,n.jsx)(v.Z,x()(x()({},te),{},{children:(0,n.jsx)(V,{bordered:!1,loading:t,title:"\u8BBF\u95EE\u91CF",action:(0,n.jsx)(w.Z,{title:"\u6307\u6807\u8BF4\u660E",children:(0,n.jsx)(F.Z,{})}),total:O()(8846).format("0,0"),footer:(0,n.jsx)(ee,{label:"\u65E5\u8BBF\u95EE\u91CF",value:O()(1234).format("0,0")}),contentHeight:46,children:(0,n.jsx)(k.Z,{xField:"x",yField:"y",shapeField:"smooth",height:46,axis:!1,style:{fill:"linear-gradient(-90deg, white 0%, #975FE4 100%)",fillOpacity:.6,width:"100%"},padding:-20,data:i})})})),(0,n.jsx)(v.Z,x()(x()({},te),{},{children:(0,n.jsx)(V,{bordered:!1,loading:t,title:"\u652F\u4ED8\u7B14\u6570",action:(0,n.jsx)(w.Z,{title:"\u6307\u6807\u8BF4\u660E",children:(0,n.jsx)(F.Z,{})}),total:O()(6560).format("0,0"),footer:(0,n.jsx)(ee,{label:"\u8F6C\u5316\u7387",value:"60%"}),contentHeight:46,children:(0,n.jsx)(K,{xField:"x",yField:"y",padding:-20,axis:!1,height:46,data:i,scale:{x:{paddingInner:.4}}})})})),(0,n.jsx)(v.Z,x()(x()({},te),{},{children:(0,n.jsx)(V,{loading:t,bordered:!1,title:"\u8FD0\u8425\u6D3B\u52A8\u6548\u679C",action:(0,n.jsx)(w.Z,{title:"\u6307\u6807\u8BF4\u660E",children:(0,n.jsx)(F.Z,{})}),total:"78%",footer:(0,n.jsxs)("div",{style:{whiteSpace:"nowrap",overflow:"hidden"},children:[(0,n.jsxs)($,{flag:"up",style:{marginRight:16},children:["\u5468\u540C\u6BD4",(0,n.jsx)("span",{className:d.trendText,children:"12%"})]}),(0,n.jsxs)($,{flag:"down",children:["\u65E5\u540C\u6BD4",(0,n.jsx)("span",{className:d.trendText,children:"11%"})]})]}),contentHeight:46,children:(0,n.jsx)(oe.Z,{percent:78,strokeColor:{from:"#108ee9",to:"#87d068"},status:"active"})})}))]})},hn=un,ue=function(){return ue=Object.assign||function(r){for(var e,t=1,i=arguments.length;t<i;t++){e=arguments[t];for(var l in e)Object.prototype.hasOwnProperty.call(e,l)&&(r[l]=e[l])}return r},ue.apply(this,arguments)},gn=function(r){return h.createElement(m.P,ue({},r,{chartType:"TinyLine"}))},vn=gn,he=function(){return he=Object.assign||function(r){for(var e,t=1,i=arguments.length;t<i;t++){e=arguments[t];for(var l in e)Object.prototype.hasOwnProperty.call(e,l)&&(r[l]=e[l])}return r},he.apply(this,arguments)},fn=function(r){return h.createElement(m.P,he({},r,{chartType:"TinyArea"}))},xn=fn,ge=function(){return ge=Object.assign||function(r){for(var e,t=1,i=arguments.length;t<i;t++){e=arguments[t];for(var l in e)Object.prototype.hasOwnProperty.call(e,l)&&(r[l]=e[l])}return r},ge.apply(this,arguments)},mn=function(r){return h.createElement(m.P,ge({},r,{chartType:"TinyColumn"}))},pn=mn,ve=function(){return ve=Object.assign||function(r){for(var e,t=1,i=arguments.length;t<i;t++){e=arguments[t];for(var l in e)Object.prototype.hasOwnProperty.call(e,l)&&(r[l]=e[l])}return r},ve.apply(this,arguments)},yn=function(r){return h.createElement(m.P,ve({},r,{chartType:"TinyProgress"}))},jn=yn,fe=function(){return fe=Object.assign||function(r){for(var e,t=1,i=arguments.length;t<i;t++){e=arguments[t];for(var l in e)Object.prototype.hasOwnProperty.call(e,l)&&(r[l]=e[l])}return r},fe.apply(this,arguments)},Cn=function(r){return h.createElement(m.P,fe({},r,{chartType:"TinyRing"}))},Tn=Cn,Sn={Line:vn,Area:xn,Column:pn,Progress:jn,Ring:Tn},xe=function(){return xe=Object.assign||function(r){for(var e,t=1,i=arguments.length;t<i;t++){e=arguments[t];for(var l in e)Object.prototype.hasOwnProperty.call(e,l)&&(r[l]=e[l])}return r},xe.apply(this,arguments)},Dn=function(r){return h.createElement(m.P,xe({},r,{chartType:"Line"}))},En=Dn,Ae=a(55095),bn=(0,B.kc)(function(r){var e=r.token;return{suffix:{marginLeft:"4px",color:e.colorText,fontSize:"16px",fontStyle:"normal"},numberInfoTitle:{marginBottom:"16px",color:e.colorText,fontSize:e["font-size-lg"],transition:"all 0.3s"},numberInfoSubTitle:{height:"22px",overflow:"hidden",color:e.colorTextSecondary,fontSize:e.fontSize,lineHeight:"22px",whiteSpace:"nowrap",textOverflow:"ellipsis",wordBreak:"break-all"},numberInfoValue:{marginTop:"4px",overflow:"hidden",fontSize:"0",whiteSpace:"nowrap",textOverflow:"ellipsis",wordBreak:"break-all","& > span":{color:e.colorText}},subTotal:{marginRight:"0",color:e.colorTextSecondary,fontSize:e["font-size-lg"],verticalAlign:"top"},anticon:{marginLeft:"4px",fontSize:"12px",transform:"scale(0.82)"},"anticon-caret-up":{color:e["red-6"]},"anticon-caret-down":{color:e["green-6"]}}}),On=bn,Pn=["theme","title","subTitle","total","subTotal","status","suffix","gap"],Zn=function(e){var t=e.theme,i=e.title,l=e.subTitle,d=e.total,u=e.subTotal,g=e.status,f=e.suffix,o=e.gap,c=q()(e,Pn),p=On(),T=p.styles;return(0,n.jsxs)("div",x()(x()({className:_()(T.numberInfo,C()({},T["numberInfo".concat(t)],t))},c),{},{children:[i&&(0,n.jsx)("div",{className:T.numberInfoTitle,title:typeof i=="string"?i:"",children:i}),l&&(0,n.jsx)("div",{className:T.numberInfoSubTitle,title:typeof l=="string"?l:"",children:l}),(0,n.jsxs)("div",{className:T.numberInfoValue,style:o?{marginTop:o}:{},children:[(0,n.jsxs)("span",{children:[d,f&&(0,n.jsx)("em",{className:T.suffix,children:f})]}),(g||u)&&(0,n.jsxs)("span",{className:T.subTotal,children:[u,g&&g==="up"?(0,n.jsx)(Ie,{}):(0,n.jsx)(Fe,{})]})]})]}))},me=Zn,Nn=function(e){var t=e.data,i=e.currentTabKey;return(0,n.jsxs)(y.Z,{gutter:8,style:{width:138,margin:"8px 0"},children:[(0,n.jsx)(v.Z,{span:12,children:(0,n.jsx)(me,{title:t.name,subTitle:"\u8F6C\u5316\u7387",gap:2,total:"".concat(t.cvr*100,"%"),theme:i!==t.name?"light":void 0})}),(0,n.jsx)(v.Z,{span:12,style:{paddingTop:36},children:(0,n.jsx)(Sn.Ring,{height:60,width:60,percent:t.cvr,color:["#E8EEF4","#5FABF4"]})})]})},Bn=function(e){var t=e.activeKey,i=e.loading,l=e.offlineData,d=e.offlineChartData,u=e.handleTabChange,g=L(),f=g.styles;return(0,n.jsx)(U.Z,{loading:i,className:f.offlineCard,bordered:!1,style:{marginTop:32},children:(0,n.jsx)(Ae.Z,{activeKey:t,onChange:u,items:l.map(function(o){return{key:o.name,label:(0,n.jsx)(Nn,{data:o,currentTabKey:t}),children:(0,n.jsx)("div",{style:{padding:"0 24px"},children:(0,n.jsx)(En,{height:400,data:d,xField:"date",yField:"value",colorField:"type",slider:{x:!0},axis:{x:{title:!1},y:{title:!1,gridLineDash:null,gridStroke:"#ccc",gridStrokeOpacity:1}},legend:{color:{layout:{justifyContent:"center"}}}})})}})})})},In=Bn,Rn=a(2219),Fn=function(){return(0,n.jsx)("div",{style:{paddingTop:100,textAlign:"center"},children:(0,n.jsx)(Rn.Z,{size:"large"})})},pe=function(){return pe=Object.assign||function(r){for(var e,t=1,i=arguments.length;t<i;t++){e=arguments[t];for(var l in e)Object.prototype.hasOwnProperty.call(e,l)&&(r[l]=e[l])}return r},pe.apply(this,arguments)},An=function(r){return h.createElement(m.P,pe({},r,{chartType:"Pie"}))},wn=An,Ln=a(25480),ae=a(48829),Mn=Ln.Z.Text,kn=function(e){var t=e.dropdownGroup,i=e.salesType,l=e.loading,d=e.salesPieData,u=e.handleChangeSalesType,g=L(),f=g.styles;return(0,n.jsx)(U.Z,{loading:l,className:f.salesCard,bordered:!1,title:"\u9500\u552E\u989D\u7C7B\u522B\u5360\u6BD4",style:{height:"100%"},extra:(0,n.jsxs)("div",{className:f.salesCardExtra,children:[t,(0,n.jsx)("div",{className:f.salesTypeRadio,children:(0,n.jsxs)(ae.ZP.Group,{value:i,onChange:u,children:[(0,n.jsx)(ae.ZP.Button,{value:"all",children:"\u5168\u90E8\u6E20\u9053"}),(0,n.jsx)(ae.ZP.Button,{value:"online",children:"\u7EBF\u4E0A"}),(0,n.jsx)(ae.ZP.Button,{value:"stores",children:"\u95E8\u5E97"})]})})]}),children:(0,n.jsxs)("div",{children:[(0,n.jsx)(Mn,{children:"\u9500\u552E\u989D"}),(0,n.jsx)(wn,{height:340,radius:.8,innerRadius:.5,angleField:"y",colorField:"x",data:d,legend:!1,label:{position:"spider",text:function(c){return"".concat(c.x,": ").concat(O()(c.y).format("0,0"))}}})]})})},Hn=kn,zn=a(57564),Wn=zn.default.RangePicker,ye=[],je=0;je<7;je+=1)ye.push({title:"\u5DE5\u4E13\u8DEF ".concat(je," \u53F7\u5E97"),total:323234});var Gn=function(e){var t=e.rangePickerValue,i=e.salesData,l=e.isActive,d=e.handleRangePickerChange,u=e.loading,g=e.selectDate,f=L(),o=f.styles;return(0,n.jsx)(U.Z,{loading:u,bordered:!1,bodyStyle:{padding:0},children:(0,n.jsx)("div",{className:o.salesCard,children:(0,n.jsx)(Ae.Z,{tabBarExtraContent:(0,n.jsxs)("div",{className:o.salesExtraWrap,children:[(0,n.jsxs)("div",{className:o.salesExtra,children:[(0,n.jsx)("a",{className:l("today"),onClick:function(){return g("today")},children:"\u4ECA\u65E5"}),(0,n.jsx)("a",{className:l("week"),onClick:function(){return g("week")},children:"\u672C\u5468"}),(0,n.jsx)("a",{className:l("month"),onClick:function(){return g("month")},children:"\u672C\u6708"}),(0,n.jsx)("a",{className:l("year"),onClick:function(){return g("year")},children:"\u672C\u5E74"})]}),(0,n.jsx)(Wn,{value:t,onChange:d,style:{width:256}})]}),size:"large",tabBarStyle:{marginBottom:24},items:[{key:"sales",label:"\u9500\u552E\u989D",children:(0,n.jsxs)(y.Z,{children:[(0,n.jsx)(v.Z,{xl:16,lg:12,md:12,sm:24,xs:24,children:(0,n.jsx)("div",{className:o.salesBar,children:(0,n.jsx)(K,{height:300,data:i,xField:"x",yField:"y",paddingBottom:12,axis:{x:{title:!1},y:{title:!1,gridLineDash:null,gridStroke:"#ccc"}},scale:{x:{paddingInner:.4}},tooltip:{name:"\u9500\u552E\u91CF",channel:"y"}})})}),(0,n.jsx)(v.Z,{xl:8,lg:12,md:12,sm:24,xs:24,children:(0,n.jsxs)("div",{className:o.salesRank,children:[(0,n.jsx)("h4",{className:o.rankingTitle,children:"\u95E8\u5E97\u9500\u552E\u989D\u6392\u540D"}),(0,n.jsx)("ul",{className:o.rankingList,children:ye.map(function(c,p){return(0,n.jsxs)("li",{children:[(0,n.jsx)("span",{className:"".concat(o.rankingItemNumber," ").concat(p<3?o.rankingItemNumberActive:""),children:p+1}),(0,n.jsx)("span",{className:o.rankingItemTitle,title:c.title,children:c.title}),(0,n.jsx)("span",{children:O()(c.total).format("0,0")})]},c.title)})})]})})]})},{key:"views",label:"\u8BBF\u95EE\u91CF",children:(0,n.jsxs)(y.Z,{children:[(0,n.jsx)(v.Z,{xl:16,lg:12,md:12,sm:24,xs:24,children:(0,n.jsx)("div",{className:o.salesBar,children:(0,n.jsx)(K,{height:300,data:i,xField:"x",yField:"y",paddingBottom:12,axis:{x:{title:!1},y:{title:!1}},scale:{x:{paddingInner:.4}},tooltip:{name:"\u8BBF\u95EE\u91CF",channel:"y"}})})}),(0,n.jsx)(v.Z,{xl:8,lg:12,md:12,sm:24,xs:24,children:(0,n.jsxs)("div",{className:o.salesRank,children:[(0,n.jsx)("h4",{className:o.rankingTitle,children:"\u95E8\u5E97\u8BBF\u95EE\u91CF\u6392\u540D"}),(0,n.jsx)("ul",{className:o.rankingList,children:ye.map(function(c,p){return(0,n.jsxs)("li",{children:[(0,n.jsx)("span",{className:"".concat(p<3?o.rankingItemNumberActive:o.rankingItemNumber),children:p+1}),(0,n.jsx)("span",{className:o.rankingItemTitle,title:c.title,children:c.title}),(0,n.jsx)("span",{children:O()(c.total).format("0,0")})]},c.title)})})]})})]})}]})})})},Kn=Gn,Un=a(73198),Vn=function(e){var t=e.loading,i=e.visitData2,l=e.searchData,d=e.dropdownGroup,u=L(),g=u.styles,f=[{title:"\u6392\u540D",dataIndex:"index",key:"index"},{title:"\u641C\u7D22\u5173\u952E\u8BCD",dataIndex:"keyword",key:"keyword",render:function(c){return(0,n.jsx)("a",{href:"/",children:c})}},{title:"\u7528\u6237\u6570",dataIndex:"count",key:"count",sorter:function(c,p){return c.count-p.count}},{title:"\u5468\u6DA8\u5E45",dataIndex:"range",key:"range",sorter:function(c,p){return c.range-p.range},render:function(c,p){return(0,n.jsx)($,{flag:p.status===1?"down":"up",children:(0,n.jsxs)("span",{style:{marginRight:4},children:[c,"%"]})})}}];return(0,n.jsxs)(U.Z,{loading:t,bordered:!1,title:"\u7EBF\u4E0A\u70ED\u95E8\u641C\u7D22",extra:d,style:{height:"100%"},children:[(0,n.jsxs)(y.Z,{gutter:68,children:[(0,n.jsxs)(v.Z,{sm:12,xs:24,style:{marginBottom:24},children:[(0,n.jsx)(me,{subTitle:(0,n.jsxs)("span",{children:["\u641C\u7D22\u7528\u6237\u6570",(0,n.jsx)(w.Z,{title:"\u6307\u6807\u8BF4\u660E",children:(0,n.jsx)(F.Z,{style:{marginLeft:8}})})]}),gap:8,total:O()(12321).format("0,0"),status:"up",subTotal:17.1}),(0,n.jsx)(k.Z,{xField:"x",yField:"y",shapeField:"smooth",height:45,axis:!1,padding:-12,style:{fill:"linear-gradient(-90deg, white 0%, #6294FA 100%)",fillOpacity:.4},data:i})]}),(0,n.jsxs)(v.Z,{sm:12,xs:24,style:{marginBottom:24},children:[(0,n.jsx)(me,{subTitle:(0,n.jsxs)("span",{children:["\u4EBA\u5747\u641C\u7D22\u6B21\u6570",(0,n.jsx)(w.Z,{title:"\u6307\u6807\u8BF4\u660E",children:(0,n.jsx)(F.Z,{style:{marginLeft:8}})})]}),total:2.7,status:"down",subTotal:26.2,gap:8}),(0,n.jsx)(k.Z,{xField:"x",yField:"y",shapeField:"smooth",height:45,padding:-12,style:{fill:"linear-gradient(-90deg, white 0%, #6294FA 100%)",fillOpacity:.4},data:i,axis:!1})]})]}),(0,n.jsx)(Un.Z,{rowKey:function(c){return c.index},size:"small",columns:f,dataSource:l,pagination:{style:{marginBottom:0},pageSize:5}})]})},$n=Vn,Xn=a(29195),we=a.n(Xn),Yn=a(56717),Jn=a.n(Yn);function Qn(){return Ce.apply(this,arguments)}function Ce(){return Ce=Jn()(we()().mark(function r(){return we()().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",(0,j.request)("/api/fake_analysis_chart_data"));case 1:case"end":return t.stop()}},r)})),Ce.apply(this,arguments)}var qn=a(50510),Z=a.n(qn);function Le(r){return r*1<10?"0".concat(r):r}function Te(r){var e=new Date,t=1e3*60*60*24;if(r==="today")return e.setHours(0),e.setMinutes(0),e.setSeconds(0),[Z()(e),Z()(e.getTime()+(t-1e3))];if(r==="week"){var i=e.getDay();e.setHours(0),e.setMinutes(0),e.setSeconds(0),i===0?i=6:i-=1;var l=e.getTime()-i*t;return[Z()(l),Z()(l+(7*t-1e3))]}var d=e.getFullYear();if(r==="month"){var u=e.getMonth(),g=Z()(e).add(1,"months"),f=g.year(),o=g.month();return[Z()("".concat(d,"-").concat(Le(u+1),"-01 00:00:00")),Z()(Z()("".concat(f,"-").concat(Le(o+1),"-01 00:00:00")).valueOf()-1e3)]}return[Z()("".concat(d,"-01-01 00:00:00")),Z()("".concat(d,"-12-31 23:59:59"))]}var _n=function(){var e=L(),t=e.styles,i=(0,h.useState)("all"),l=S()(i,2),d=l[0],u=l[1],g=(0,h.useState)(""),f=S()(g,2),o=f[0],c=f[1],p=(0,h.useState)(Te("year")),T=S()(p,2),I=T[0],Se=T[1],re=(0,j.useRequest)(Qn),H=re.loading,s=re.data,M=function(R){Se(Te(R))},De=function(R){Se(R)},Ee=function(R){if(!I)return"";var Oe=Te(R);return!Oe||!I[0]||!I[1]?"":I[0].isSame(Oe[0],"day")&&I[1].isSame(Oe[1],"day")?t.currentDate:""},X;d==="all"?X=s==null?void 0:s.salesTypeData:X=d==="online"?s==null?void 0:s.salesTypeDataOnline:s==null?void 0:s.salesTypeDataOffline;var z=(0,n.jsx)("span",{className:t.iconGroup,children:(0,n.jsx)(P.Z,{menu:{items:[{key:"1",label:"\u64CD\u4F5C\u4E00"},{key:"2",label:"\u64CD\u4F5C\u4E8C"}]},placement:"bottomRight",children:(0,n.jsx)(b.Z,{})})}),W=function(R){u(R.target.value)},be=function(R){c(R)},nt=o||(s==null?void 0:s.offlineData[0])&&(s==null?void 0:s.offlineData[0].name)||"";return(0,n.jsx)(N.f,{children:(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(h.Suspense,{fallback:(0,n.jsx)(Fn,{}),children:(0,n.jsx)(hn,{loading:H,visitData:(s==null?void 0:s.visitData)||[]})}),(0,n.jsx)(h.Suspense,{fallback:null,children:(0,n.jsx)(Kn,{rangePickerValue:I,salesData:(s==null?void 0:s.salesData)||[],isActive:Ee,handleRangePickerChange:De,loading:H,selectDate:M})}),(0,n.jsxs)(y.Z,{gutter:24,style:{marginTop:24},children:[(0,n.jsx)(v.Z,{xl:12,lg:24,md:24,sm:24,xs:24,children:(0,n.jsx)(h.Suspense,{fallback:null,children:(0,n.jsx)($n,{loading:H,visitData2:(s==null?void 0:s.visitData2)||[],searchData:(s==null?void 0:s.searchData)||[],dropdownGroup:z})})}),(0,n.jsx)(v.Z,{xl:12,lg:24,md:24,sm:24,xs:24,children:(0,n.jsx)(h.Suspense,{fallback:null,children:(0,n.jsx)(Hn,{dropdownGroup:z,salesType:d,loading:H,salesPieData:X||[],handleChangeSalesType:W})})})]}),(0,n.jsx)(h.Suspense,{fallback:null,children:(0,n.jsx)(In,{activeKey:nt,loading:H,offlineData:(s==null?void 0:s.offlineData)||[],offlineChartData:(s==null?void 0:s.offlineChartData)||[],handleTabChange:be})})]})})},et=_n}}]);
|
|
|