Files
GDstarmotion-admin/dist/src__pages__home__index.ba109281.async.js
PC-202306242200\Administrator 2081393a33 1
2024-09-19 18:28:02 +08:00

11 lines
16 KiB
JavaScript

"use strict";(self.webpackChunkant_design_pro=self.webpackChunkant_design_pro||[]).push([[7951],{35415:function(ge,L,o){o.r(L),o.d(L,{default:function(){return D}});var f=o(48305),H=o.n(f),p=o(50959),G=o(40676),P=o(14417),C=o(87980),E=o(23885),V=o(53725),U=o(11493),se=o(82187),w=o.n(se),c=o(76144),j=o(39910),Y=m=>{const{value:e,formatter:a,precision:t,decimalSeparator:n,groupSeparator:i="",prefixCls:r}=m;let d;if(typeof a=="function")d=a(e);else{const u=String(e),g=u.match(/^(-?)(\d*)(\.(\d+))?$/);if(!g||u==="-")d=u;else{const $=g[1];let v=g[2]||"0",h=g[4]||"";v=v.replace(/\B(?=(\d{3})+(?!\d))/g,i),typeof t=="number"&&(h=h.padEnd(t,"0").slice(0,t>0?t:0)),h&&(h=`${n}${h}`),d=[p.createElement("span",{key:"int",className:`${r}-content-value-int`},$,v),h&&p.createElement("span",{key:"decimal",className:`${r}-content-value-decimal`},h)]}}return p.createElement("span",{className:`${r}-content-value`},d)},J=o(54531),Q=o(79349),q=o(56352);const k=m=>{const{componentCls:e,marginXXS:a,padding:t,colorTextDescription:n,titleFontSize:i,colorTextHeading:r,contentFontSize:d,fontFamily:u}=m;return{[`${e}`]:Object.assign(Object.assign({},(0,J.Wf)(m)),{[`${e}-title`]:{marginBottom:a,color:n,fontSize:i},[`${e}-skeleton`]:{paddingTop:t},[`${e}-content`]:{color:r,fontSize:d,fontFamily:u,[`${e}-content-value`]:{display:"inline-block",direction:"ltr"},[`${e}-content-prefix, ${e}-content-suffix`]:{display:"inline-block"},[`${e}-content-prefix`]:{marginInlineEnd:a},[`${e}-content-suffix`]:{marginInlineStart:a}}})}},_=m=>{const{fontSizeHeading3:e,fontSize:a}=m;return{titleFontSize:a,contentFontSize:e}};var ee=(0,Q.I$)("Statistic",m=>{const e=(0,q.TS)(m,{});return[k(e)]},_),R=m=>{const{prefixCls:e,className:a,rootClassName:t,style:n,valueStyle:i,value:r=0,title:d,valueRender:u,prefix:g,suffix:$,loading:v=!1,onMouseEnter:h,onMouseLeave:x,decimalSeparator:s=".",groupSeparator:I=","}=m,{getPrefixCls:N,direction:z,statistic:y}=p.useContext(c.E_),S=N("statistic",e),[K,X,Z]=ee(S),M=p.createElement(Y,Object.assign({decimalSeparator:s,groupSeparator:I,prefixCls:S},m,{value:r})),oe=w()(S,{[`${S}-rtl`]:z==="rtl"},y==null?void 0:y.className,a,t,X,Z);return K(p.createElement("div",{className:oe,style:Object.assign(Object.assign({},y==null?void 0:y.style),n),onMouseEnter:h,onMouseLeave:x},d&&p.createElement("div",{className:`${S}-title`},d),p.createElement(j.Z,{paragraph:!1,loading:v,className:`${S}-skeleton`},p.createElement("div",{style:i,className:`${S}-content`},g&&p.createElement("span",{className:`${S}-content-prefix`},g),u?u(M):M,$&&p.createElement("span",{className:`${S}-content-suffix`},$)))))};const te=[["Y",1e3*60*60*24*365],["M",1e3*60*60*24*30],["D",1e3*60*60*24],["H",1e3*60*60],["m",1e3*60],["s",1e3],["S",1]];function ne(m,e){let a=m;const t=/\[[^\]]*]/g,n=(e.match(t)||[]).map(u=>u.slice(1,-1)),i=e.replace(t,"[]"),r=te.reduce((u,g)=>{let[$,v]=g;if(u.includes($)){const h=Math.floor(a/v);return a-=h*v,u.replace(new RegExp(`${$}+`,"g"),x=>{const s=x.length;return h.toString().padStart(s,"0")})}return u},i);let d=0;return r.replace(t,()=>{const u=n[d];return d+=1,u})}function W(m,e){const{format:a=""}=e,t=new Date(m).getTime(),n=Date.now(),i=Math.max(t-n,0);return ne(i,a)}const ae=1e3/30;function de(m){return new Date(m).getTime()}const ie=m=>{const{value:e,format:a="HH:mm:ss",onChange:t,onFinish:n}=m,i=(0,V.Z)(),r=p.useRef(null),d=()=>{n==null||n(),r.current&&(clearInterval(r.current),r.current=null)},u=()=>{const v=de(e);v>=Date.now()&&(r.current=setInterval(()=>{i(),t==null||t(v-Date.now()),v<Date.now()&&d()},ae))};p.useEffect(()=>(u(),()=>{r.current&&(clearInterval(r.current),r.current=null)}),[e]);const g=(v,h)=>W(v,Object.assign(Object.assign({},h),{format:a})),$=v=>(0,U.Tm)(v,{title:void 0});return p.createElement(R,Object.assign({},m,{valueRender:$,formatter:g}))};var re=p.memo(ie);R.Countdown=re;var O=R,l=o(11527),D=function(){var m,e,a,t,n,i,r,d,u=(0,p.useState)([]),g=H()(u,2),$=g[0],v=g[1],h=(0,p.useState)([]),x=H()(h,2),s=x[0],I=x[1],N=(0,p.useState)([]),z=H()(N,2),y=z[0],S=z[1],K={data:$,xField:"name",yField:"value",seriesField:"category",xAxis:{type:"time"},yAxis:{label:{formatter:function(Z){return"".concat(Z).replace(/\d{1,3}(?=(\d{3})+$)/g,function(M){return"".concat(M,",")})}}}};return(0,p.useEffect)(function(){},[]),(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(G.Z,{children:"\u5145\u7535\u6869"}),(0,l.jsxs)(P.Z,{gutter:10,children:[(0,l.jsx)(C.Z,{span:6,children:(0,l.jsx)(E.Z,{children:(0,l.jsx)(O,{title:"\u4ECA\u65E5\u5145\u7535",value:s==null||(m=s.device_count)===null||m===void 0?void 0:m.today,precision:2,prefix:"\uFFE5"})})}),(0,l.jsx)(C.Z,{span:6,children:(0,l.jsx)(E.Z,{children:(0,l.jsx)(O,{title:"\u6628\u65E5\u5145\u7535",value:s==null||(e=s.device_count)===null||e===void 0?void 0:e.yesterday,precision:2,prefix:"\uFFE5"})})}),(0,l.jsx)(C.Z,{span:6,children:(0,l.jsx)(E.Z,{children:(0,l.jsx)(O,{title:"\u4E0A\u5468\u5145\u7535",value:s==null||(a=s.device_count)===null||a===void 0?void 0:a.week,precision:2,prefix:"\uFFE5"})})}),(0,l.jsx)(C.Z,{span:6,children:(0,l.jsx)(E.Z,{children:(0,l.jsx)(O,{title:"\u4E0A\u6708\u5145\u7535",value:s==null||(t=s.device_count)===null||t===void 0?void 0:t.month,precision:2,prefix:"\uFFE5"})})})]}),(0,l.jsx)(G.Z,{children:"\u5546\u57CE"}),(0,l.jsxs)(P.Z,{gutter:10,children:[(0,l.jsx)(C.Z,{span:6,children:(0,l.jsx)(E.Z,{children:(0,l.jsx)(O,{title:"\u4ECA\u5929\u6210\u4EA4",value:s==null||(n=s.shop_count)===null||n===void 0?void 0:n.today,precision:2,prefix:"\uFFE5"})})}),(0,l.jsx)(C.Z,{span:6,children:(0,l.jsx)(E.Z,{children:(0,l.jsx)(O,{title:"\u6628\u5929\u6210\u4EA4",value:s==null||(i=s.shop_count)===null||i===void 0?void 0:i.yesterday,precision:2,prefix:"\uFFE5"})})}),(0,l.jsx)(C.Z,{span:6,children:(0,l.jsx)(E.Z,{children:(0,l.jsx)(O,{title:"\u4E0A\u5468\u6210\u4EA4",value:s==null||(r=s.shop_count)===null||r===void 0?void 0:r.week,precision:2,prefix:"\uFFE5"})})}),(0,l.jsx)(C.Z,{span:6,children:(0,l.jsx)(E.Z,{children:(0,l.jsx)(O,{title:"\u4E0A\u6708\u6210\u4EA4",value:s==null||(d=s.shop_count)===null||d===void 0?void 0:d.month,precision:2,prefix:"\uFFE5"})})})]})]})}},23885:function(ge,L,o){o.d(L,{Z:function(){return m}});var f=o(50959),H=o(82187),p=o.n(H),G=o(8146),P=o(76144),C=o(15676),E=o(39910),V=o(70939),U=function(e,a){var t={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&a.indexOf(n)<0&&(t[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,n=Object.getOwnPropertySymbols(e);i<n.length;i++)a.indexOf(n[i])<0&&Object.prototype.propertyIsEnumerable.call(e,n[i])&&(t[n[i]]=e[n[i]]);return t},w=e=>{var{prefixCls:a,className:t,hoverable:n=!0}=e,i=U(e,["prefixCls","className","hoverable"]);const{getPrefixCls:r}=f.useContext(P.E_),d=r("card",a),u=p()(`${d}-grid`,t,{[`${d}-grid-hoverable`]:n});return f.createElement("div",Object.assign({},i,{className:u}))},c=o(601),j=o(54531),le=o(79349),Y=o(56352);const J=e=>{const{antCls:a,componentCls:t,headerHeight:n,cardPaddingBase:i,tabsMarginBottom:r}=e;return Object.assign(Object.assign({display:"flex",justifyContent:"center",flexDirection:"column",minHeight:n,marginBottom:-1,padding:`0 ${(0,c.bf)(i)}`,color:e.colorTextHeading,fontWeight:e.fontWeightStrong,fontSize:e.headerFontSize,background:e.headerBg,borderBottom:`${(0,c.bf)(e.lineWidth)} ${e.lineType} ${e.colorBorderSecondary}`,borderRadius:`${(0,c.bf)(e.borderRadiusLG)} ${(0,c.bf)(e.borderRadiusLG)} 0 0`},(0,j.dF)()),{"&-wrapper":{width:"100%",display:"flex",alignItems:"center"},"&-title":Object.assign(Object.assign({display:"inline-block",flex:1},j.vS),{[`
> ${t}-typography,
> ${t}-typography-edit-content
`]:{insetInlineStart:0,marginTop:0,marginBottom:0}}),[`${a}-tabs-top`]:{clear:"both",marginBottom:r,color:e.colorText,fontWeight:"normal",fontSize:e.fontSize,"&-bar":{borderBottom:`${(0,c.bf)(e.lineWidth)} ${e.lineType} ${e.colorBorderSecondary}`}}})},Q=e=>{const{cardPaddingBase:a,colorBorderSecondary:t,cardShadow:n,lineWidth:i}=e;return{width:"33.33%",padding:a,border:0,borderRadius:0,boxShadow:`
${(0,c.bf)(i)} 0 0 0 ${t},
0 ${(0,c.bf)(i)} 0 0 ${t},
${(0,c.bf)(i)} ${(0,c.bf)(i)} 0 0 ${t},
${(0,c.bf)(i)} 0 0 0 ${t} inset,
0 ${(0,c.bf)(i)} 0 0 ${t} inset;
`,transition:`all ${e.motionDurationMid}`,"&-hoverable:hover":{position:"relative",zIndex:1,boxShadow:n}}},q=e=>{const{componentCls:a,iconCls:t,actionsLiMargin:n,cardActionsIconSize:i,colorBorderSecondary:r,actionsBg:d}=e;return Object.assign(Object.assign({margin:0,padding:0,listStyle:"none",background:d,borderTop:`${(0,c.bf)(e.lineWidth)} ${e.lineType} ${r}`,display:"flex",borderRadius:`0 0 ${(0,c.bf)(e.borderRadiusLG)} ${(0,c.bf)(e.borderRadiusLG)}`},(0,j.dF)()),{"& > li":{margin:n,color:e.colorTextDescription,textAlign:"center","> span":{position:"relative",display:"block",minWidth:e.calc(e.cardActionsIconSize).mul(2).equal(),fontSize:e.fontSize,lineHeight:e.lineHeight,cursor:"pointer","&:hover":{color:e.colorPrimary,transition:`color ${e.motionDurationMid}`},[`a:not(${a}-btn), > ${t}`]:{display:"inline-block",width:"100%",color:e.colorTextDescription,lineHeight:(0,c.bf)(e.fontHeight),transition:`color ${e.motionDurationMid}`,"&:hover":{color:e.colorPrimary}},[`> ${t}`]:{fontSize:i,lineHeight:(0,c.bf)(e.calc(i).mul(e.lineHeight).equal())}},"&:not(:last-child)":{borderInlineEnd:`${(0,c.bf)(e.lineWidth)} ${e.lineType} ${r}`}}})},k=e=>Object.assign(Object.assign({margin:`${(0,c.bf)(e.calc(e.marginXXS).mul(-1).equal())} 0`,display:"flex"},(0,j.dF)()),{"&-avatar":{paddingInlineEnd:e.padding},"&-detail":{overflow:"hidden",flex:1,"> div:not(:last-child)":{marginBottom:e.marginXS}},"&-title":Object.assign({color:e.colorTextHeading,fontWeight:e.fontWeightStrong,fontSize:e.fontSizeLG},j.vS),"&-description":{color:e.colorTextDescription}}),_=e=>{const{componentCls:a,cardPaddingBase:t,colorFillAlter:n}=e;return{[`${a}-head`]:{padding:`0 ${(0,c.bf)(t)}`,background:n,"&-title":{fontSize:e.fontSize}},[`${a}-body`]:{padding:`${(0,c.bf)(e.padding)} ${(0,c.bf)(t)}`}}},ee=e=>{const{componentCls:a}=e;return{overflow:"hidden",[`${a}-body`]:{userSelect:"none"}}},ce=e=>{const{antCls:a,componentCls:t,cardShadow:n,cardHeadPadding:i,colorBorderSecondary:r,boxShadowTertiary:d,cardPaddingBase:u,extraColor:g}=e;return{[t]:Object.assign(Object.assign({},(0,j.Wf)(e)),{position:"relative",background:e.colorBgContainer,borderRadius:e.borderRadiusLG,[`&:not(${t}-bordered)`]:{boxShadow:d},[`${t}-head`]:J(e),[`${t}-extra`]:{marginInlineStart:"auto",color:g,fontWeight:"normal",fontSize:e.fontSize},[`${t}-body`]:Object.assign({padding:u,borderRadius:` 0 0 ${(0,c.bf)(e.borderRadiusLG)} ${(0,c.bf)(e.borderRadiusLG)}`},(0,j.dF)()),[`${t}-grid`]:Q(e),[`${t}-cover`]:{"> *":{display:"block",width:"100%"},[`img, img + ${a}-image-mask`]:{borderRadius:`${(0,c.bf)(e.borderRadiusLG)} ${(0,c.bf)(e.borderRadiusLG)} 0 0`}},[`${t}-actions`]:q(e),[`${t}-meta`]:k(e)}),[`${t}-bordered`]:{border:`${(0,c.bf)(e.lineWidth)} ${e.lineType} ${r}`,[`${t}-cover`]:{marginTop:-1,marginInlineStart:-1,marginInlineEnd:-1}},[`${t}-hoverable`]:{cursor:"pointer",transition:`box-shadow ${e.motionDurationMid}, border-color ${e.motionDurationMid}`,"&:hover":{borderColor:"transparent",boxShadow:n}},[`${t}-contain-grid`]:{borderRadius:`${(0,c.bf)(e.borderRadiusLG)} ${(0,c.bf)(e.borderRadiusLG)} 0 0 `,[`${t}-body`]:{display:"flex",flexWrap:"wrap"},[`&:not(${t}-loading) ${t}-body`]:{marginBlockStart:e.calc(e.lineWidth).mul(-1).equal(),marginInlineStart:e.calc(e.lineWidth).mul(-1).equal(),padding:0}},[`${t}-contain-tabs`]:{[`> ${t}-head`]:{minHeight:0,[`${t}-head-title, ${t}-extra`]:{paddingTop:i}}},[`${t}-type-inner`]:_(e),[`${t}-loading`]:ee(e),[`${t}-rtl`]:{direction:"rtl"}}},R=e=>{const{componentCls:a,cardPaddingSM:t,headerHeightSM:n,headerFontSizeSM:i}=e;return{[`${a}-small`]:{[`> ${a}-head`]:{minHeight:n,padding:`0 ${(0,c.bf)(t)}`,fontSize:i,[`> ${a}-head-wrapper`]:{[`> ${a}-extra`]:{fontSize:e.fontSize}}},[`> ${a}-body`]:{padding:t}},[`${a}-small${a}-contain-tabs`]:{[`> ${a}-head`]:{[`${a}-head-title, ${a}-extra`]:{paddingTop:0,display:"flex",alignItems:"center"}}}}},te=e=>({headerBg:"transparent",headerFontSize:e.fontSizeLG,headerFontSizeSM:e.fontSize,headerHeight:e.fontSizeLG*e.lineHeightLG+e.padding*2,headerHeightSM:e.fontSize*e.lineHeight+e.paddingXS*2,actionsBg:e.colorBgContainer,actionsLiMargin:`${e.paddingSM}px 0`,tabsMarginBottom:-e.padding-e.lineWidth,extraColor:e.colorText});var ne=(0,le.I$)("Card",e=>{const a=(0,Y.TS)(e,{cardShadow:e.boxShadowCard,cardHeadPadding:e.padding,cardPaddingBase:e.paddingLG,cardActionsIconSize:e.fontSize,cardPaddingSM:12});return[ce(a),R(a)]},te),W=function(e,a){var t={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&a.indexOf(n)<0&&(t[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,n=Object.getOwnPropertySymbols(e);i<n.length;i++)a.indexOf(n[i])<0&&Object.prototype.propertyIsEnumerable.call(e,n[i])&&(t[n[i]]=e[n[i]]);return t};const ae=e=>{const{prefixCls:a,actions:t=[]}=e;return f.createElement("ul",{className:`${a}-actions`},t.map((n,i)=>{const r=`action-${i}`;return f.createElement("li",{style:{width:`${100/t.length}%`},key:r},f.createElement("span",null,n))}))};var ie=f.forwardRef((e,a)=>{const{prefixCls:t,className:n,rootClassName:i,style:r,extra:d,headStyle:u={},bodyStyle:g={},title:$,loading:v,bordered:h=!0,size:x,type:s,cover:I,actions:N,tabList:z,children:y,activeTabKey:S,defaultActiveTabKey:K,tabBarExtraContent:X,hoverable:Z,tabProps:M={}}=e,oe=W(e,["prefixCls","className","rootClassName","style","extra","headStyle","bodyStyle","title","loading","bordered","size","type","cover","actions","tabList","children","activeTabKey","defaultActiveTabKey","tabBarExtraContent","hoverable","tabProps"]),{getPrefixCls:pe,direction:ve,card:B}=f.useContext(P.E_),he=F=>{var T;(T=e.onTabChange)===null||T===void 0||T.call(e,F)},be=f.useMemo(()=>{let F=!1;return f.Children.forEach(y,T=>{T&&T.type&&T.type===w&&(F=!0)}),F},[y]),b=pe("card",t),[$e,Se,ye]=ne(b),xe=f.createElement(E.Z,{loading:!0,active:!0,paragraph:{rows:4},title:!1},y),ue=S!==void 0,Ce=Object.assign(Object.assign({},M),{[ue?"activeKey":"defaultActiveKey"]:ue?S:K,tabBarExtraContent:X});let fe;const A=(0,C.Z)(x),Ee=!A||A==="default"?"large":A,me=z?f.createElement(V.Z,Object.assign({size:Ee},Ce,{className:`${b}-head-tabs`,onChange:he,items:z.map(F=>{var{tab:T}=F,Pe=W(F,["tab"]);return Object.assign({label:T},Pe)})})):null;($||d||me)&&(fe=f.createElement("div",{className:`${b}-head`,style:u},f.createElement("div",{className:`${b}-head-wrapper`},$&&f.createElement("div",{className:`${b}-head-title`},$),d&&f.createElement("div",{className:`${b}-extra`},d)),me));const je=I?f.createElement("div",{className:`${b}-cover`},I):null,Oe=f.createElement("div",{className:`${b}-body`,style:g},v?xe:y),ze=N&&N.length?f.createElement(ae,{prefixCls:b,actions:N}):null,Te=(0,G.Z)(oe,["onTabChange"]),Ne=p()(b,B==null?void 0:B.className,{[`${b}-loading`]:v,[`${b}-bordered`]:h,[`${b}-hoverable`]:Z,[`${b}-contain-grid`]:be,[`${b}-contain-tabs`]:z&&z.length,[`${b}-${A}`]:A,[`${b}-type-${s}`]:!!s,[`${b}-rtl`]:ve==="rtl"},n,i,Se,ye),Fe=Object.assign(Object.assign({},B==null?void 0:B.style),r);return $e(f.createElement("div",Object.assign({ref:a},Te,{className:Ne,style:Fe}),fe,je,Oe,ze))}),re=function(e,a){var t={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&a.indexOf(n)<0&&(t[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,n=Object.getOwnPropertySymbols(e);i<n.length;i++)a.indexOf(n[i])<0&&Object.prototype.propertyIsEnumerable.call(e,n[i])&&(t[n[i]]=e[n[i]]);return t},l=e=>{const{prefixCls:a,className:t,avatar:n,title:i,description:r}=e,d=re(e,["prefixCls","className","avatar","title","description"]),{getPrefixCls:u}=f.useContext(P.E_),g=u("card",a),$=p()(`${g}-meta`,t),v=n?f.createElement("div",{className:`${g}-meta-avatar`},n):null,h=i?f.createElement("div",{className:`${g}-meta-title`},i):null,x=r?f.createElement("div",{className:`${g}-meta-description`},r):null,s=h||x?f.createElement("div",{className:`${g}-meta-detail`},h,x):null;return f.createElement("div",Object.assign({},d,{className:$}),v,s)};const D=ie;D.Grid=w,D.Meta=l;var m=D}}]);