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.
2 lines
20 KiB
2 lines
20 KiB
(("undefined"!=typeof globalThis?globalThis:self)["makoChunk_ant-design-pro"]=("undefined"!=typeof globalThis?globalThis:self)["makoChunk_ant-design-pro"]||[]).push([["8b39a838"],{ee11e197:function(e,t,a){a.d(t,"__esModule",{value:!0}),a.e(t,{default:function(){return ew;}});var l=a("777fffbe"),i=a("852bbaa9"),n=a("dac8af92"),s=a("d77caa33"),r=l._(s),d=a("0c1cbdee"),o=a("c7d71c0a"),c=a("78a22024"),x=l._(c),p=a("61d82ba1"),h=l._(p),u=a("adf76174"),f=l._(u),g=a("609f48be"),m=i._(g),j=a("e104212d"),b=l._(j),y=a("597fad75"),v=a("bfbbdf71"),T=l._(v),k=a("7376d2b3"),w=l._(k),S=a("de4cb180"),N=l._(S),C=a("98213865");let D=(0,C.createStyles)(({token:e})=>({iconGroup:{"span.anticon":{marginLeft:"16px",color:e.colorTextSecondary,cursor:"pointer",transition:"color 0.32s","&:hover":{color:e.colorText}}},rankingList:{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: ${e.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:e.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:e.colorBgSpotlight},salesExtra:{display:"inline-block",marginRight:"24px",a:{marginLeft:"24px",color:e.colorText,"&:hover":{color:e.colorPrimary}},[`@media screen and (max-width: ${e.screenLG}px)`]:{display:"none"}},currentDate:{color:e.colorPrimary,fontWeight:"bold"},salesBar:{padding:"0 0 32px 32px",[`@media screen and (max-width: ${e.screenMD}px)`]:{padding:"16px"}},salesRank:{padding:"0 32px 32px 72px"},salesCard:{".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"},[`@media screen and (max-width: ${e.screenMD}px)`]:{padding:"16px"},[`@media screen and (max-width: ${e.screenSM}px)`]:{".ant-tabs-content":{paddingTop:"30px"}}},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:e.colorPrimary}},trendText:{marginLeft:"8px",color:e.colorTextHeading},rankingTitle:{[`@media screen and (max-width: ${e.screenMD}px)`]:{marginTop:"16px"}},salesExtraWrap:{[`@media screen and (max-width: ${e.screenSM}px)`]:{display:"none"}}}));var F=a("084468f6"),I=l._(F),_=a("064ecd09"),z=l._(_),B=a("e7d75c90"),H=l._(B);let R=(0,C.createStyles)(({token:e})=>({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 ${e.colorSplit}`,"& > *":{position:"relative"}},footerMargin:{marginTop:"20px"}})),$=e=>{let{styles:t}=R(),a=e=>{if(!e&&0!==e)return null;let a=null;switch(typeof e){case"undefined":a=null;break;case"function":a=(0,n.jsx)("div",{className:t.total,children:e()});break;default:a=(0,n.jsx)("div",{className:t.total,children:e});}return a;},{loading:l=!1,...i}=e,s=(0,H.default)(i,["total","contentHeight","action"]);return(0,n.jsx)(I.default,{loading:l,styles:{body:{padding:"20px 24px 8px 24px"}},...s,children:(()=>{let{contentHeight:l,title:i,avatar:s,action:r,total:d,footer:o,children:c,loading:x}=e;return!x&&(0,n.jsxs)("div",{className:t.chartCard,children:[(0,n.jsxs)("div",{className:(0,z.default)(t.chartTop,{[t.chartTopMargin]:!c&&!o}),children:[(0,n.jsx)("div",{className:t.avatar,children:s}),(0,n.jsxs)("div",{className:t.metaWrap,children:[(0,n.jsxs)("div",{className:t.meta,children:[(0,n.jsx)("span",{children:i}),(0,n.jsx)("span",{className:t.action,children:r})]}),a(d)]})]}),c&&(0,n.jsx)("div",{className:t.content,style:{height:l||"auto"},children:(0,n.jsx)("div",{className:l?t.contentFixed:void 0,children:c})}),o&&(0,n.jsx)("div",{className:(0,z.default)(t.footer,{[t.footerMargin]:!c}),children:o})]});})()});},L=(0,C.createStyles)(({token:e})=>({field:{margin:"0",overflow:"hidden",whiteSpace:"nowrap",textOverflow:"ellipsis"},label:{fontSize:e.fontSize,lineHeight:"22px"},number:{marginLeft:"8px",color:e.colorTextHeading}})),M=({label:e,value:t,...a})=>{let{styles:l}=L();return(0,n.jsxs)("div",{className:l.field,...a,children:[(0,n.jsx)("span",{className:l.label,children:e}),(0,n.jsx)("span",{className:l.number,children:t})]});},A=e=>`\xa5 ${(0,N.default)(e).format("0,0")}`;class O extends m.default.Component{main=null;componentDidMount(){this.renderToHtml();}componentDidUpdate(){this.renderToHtml();}renderToHtml=()=>{let{children:e}=this.props;this.main&&(this.main.innerHTML=A(e));};render(){return(0,n.jsx)("span",{ref:e=>{this.main=e;}});}}var E=a("dad3ccb8"),G=l._(E),P=a("90b221a1"),W=l._(P);let K=(0,C.createStyles)(({token:e})=>({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"]}}})),V=({colorful:e=!0,reverseColor:t=!1,flag:a,children:l,className:i,...s})=>{let{styles:r}=K(),d=(0,z.default)(r.trendItem,{[r.trendItemGrey]:!e,[r.reverseColor]:t&&e},i);return(0,n.jsxs)("div",{...s,className:d,title:"string"==typeof l?l:"",children:[(0,n.jsx)("span",{children:l}),a&&(0,n.jsx)("span",{className:r[a],children:"up"===a?(0,n.jsx)(W.default,{}):(0,n.jsx)(G.default,{})})]});},q={xs:24,sm:12,md:12,lg:12,xl:6,style:{marginBottom:24}},U=({loading:e,visitData:t})=>{let{styles:a}=D();return(0,n.jsxs)(f.default,{gutter:24,children:[(0,n.jsx)(x.default,{...q,children:(0,n.jsxs)($,{variant:"borderless",title:"\u603B\u9500\u552E\u989D",action:(0,n.jsx)(w.default,{title:"\u6307\u6807\u8BF4\u660E",children:(0,n.jsx)(b.default,{})}),loading:e,total:()=>(0,n.jsx)(O,{children:"126560"}),footer:(0,n.jsx)(M,{label:"\u65E5\u9500\u552E\u989D",value:`\u{FFE5}${(0,N.default)(12423).format("0,0")}`}),contentHeight:46,children:[(0,n.jsxs)(V,{flag:"up",style:{marginRight:16},children:["\u5468\u540C\u6BD4",(0,n.jsx)("span",{className:a.trendText,children:"12%"})]}),(0,n.jsxs)(V,{flag:"down",children:["\u65E5\u540C\u6BD4",(0,n.jsx)("span",{className:a.trendText,children:"11%"})]})]})}),(0,n.jsx)(x.default,{...q,children:(0,n.jsx)($,{variant:"borderless",loading:e,title:"\u8BBF\u95EE\u91CF",action:(0,n.jsx)(w.default,{title:"\u6307\u6807\u8BF4\u660E",children:(0,n.jsx)(b.default,{})}),total:(0,N.default)(8846).format("0,0"),footer:(0,n.jsx)(M,{label:"\u65E5\u8BBF\u95EE\u91CF",value:(0,N.default)(1234).format("0,0")}),contentHeight:46,children:(0,n.jsx)(y.Area,{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:t})})}),(0,n.jsx)(x.default,{...q,children:(0,n.jsx)($,{variant:"borderless",loading:e,title:"\u652F\u4ED8\u7B14\u6570",action:(0,n.jsx)(w.default,{title:"\u6307\u6807\u8BF4\u660E",children:(0,n.jsx)(b.default,{})}),total:(0,N.default)(6560).format("0,0"),footer:(0,n.jsx)(M,{label:"\u8F6C\u5316\u7387",value:"60%"}),contentHeight:46,children:(0,n.jsx)(y.Column,{xField:"x",yField:"y",padding:-20,axis:!1,height:46,data:t,scale:{x:{paddingInner:.4}}})})}),(0,n.jsx)(x.default,{...q,children:(0,n.jsx)($,{loading:e,variant:"borderless",title:"\u8FD0\u8425\u6D3B\u52A8\u6548\u679C",action:(0,n.jsx)(w.default,{title:"\u6307\u6807\u8BF4\u660E",children:(0,n.jsx)(b.default,{})}),total:"78%",footer:(0,n.jsxs)("div",{style:{whiteSpace:"nowrap",overflow:"hidden"},children:[(0,n.jsxs)(V,{flag:"up",style:{marginRight:16},children:["\u5468\u540C\u6BD4",(0,n.jsx)("span",{className:a.trendText,children:"12%"})]}),(0,n.jsxs)(V,{flag:"down",children:["\u65E5\u540C\u6BD4",(0,n.jsx)("span",{className:a.trendText,children:"11%"})]})]}),contentHeight:46,children:(0,n.jsx)(T.default,{percent:78,strokeColor:{from:"#108ee9",to:"#87d068"},status:"active"})})})]});};var Y=a("b2910433"),J=a("91c0242a"),Q=l._(J);let X=(0,C.createStyles)(({token:e})=>({suffix:{marginLeft:"4px",color:e.colorText,fontSize:"16px",fontStyle:"normal"},numberInfoTitle:{marginBottom:"16px",color:e.colorText,fontSize:e.fontSizeLG,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.fontSizeLG,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"]}})),Z=({theme:e,title:t,subTitle:a,total:l,subTotal:i,status:s,suffix:r,gap:d,...o})=>{let{styles:c}=X();return(0,n.jsxs)("div",{className:(0,z.default)({[c[`numberInfo${e}`]]:!!e}),...o,children:[t&&(0,n.jsx)("div",{className:c.numberInfoTitle,title:"string"==typeof t?t:"",children:t}),a&&(0,n.jsx)("div",{className:c.numberInfoSubTitle,title:"string"==typeof a?a:"",children:a}),(0,n.jsxs)("div",{className:c.numberInfoValue,style:d?{marginTop:d}:{},children:[(0,n.jsxs)("span",{children:[l,r&&(0,n.jsx)("em",{className:c.suffix,children:r})]}),(s||i)&&(0,n.jsxs)("span",{className:c.subTotal,children:[i,s&&"up"===s?(0,n.jsx)(W.default,{}):(0,n.jsx)(G.default,{})]})]})]});},ee=({data:e,currentTabKey:t})=>(0,n.jsxs)(f.default,{gutter:8,style:{width:138,margin:"8px 0"},children:[(0,n.jsx)(x.default,{span:12,children:(0,n.jsx)(Z,{title:e.name,subTitle:"\u8F6C\u5316\u7387",gap:2,total:`${100*e.cvr}%`,theme:t!==e.name?"light":void 0})}),(0,n.jsx)(x.default,{span:12,style:{paddingTop:36},children:(0,n.jsx)(Y.Tiny.Ring,{height:60,width:60,percent:e.cvr,color:["#E8EEF4","#5FABF4"]})})]}),et=({activeKey:e,loading:t,offlineData:a,offlineChartData:l,handleTabChange:i})=>{let{styles:s}=D();return(0,n.jsx)(I.default,{loading:t,className:s.offlineCard,variant:"borderless",style:{marginTop:32},children:(0,n.jsx)(Q.default,{activeKey:e,onChange:i,items:a.map(t=>({key:t.name,label:(0,n.jsx)(ee,{data:t,currentTabKey:e}),children:(0,n.jsx)("div",{style:{padding:"0 24px"},children:(0,n.jsx)(y.Line,{height:400,data:l,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"}}}})})}))})});};var ea=a("e68da947"),el=l._(ea),ei=()=>(0,n.jsx)("div",{style:{paddingTop:100,textAlign:"center"},children:(0,n.jsx)(el.default,{size:"large"})}),en=a("1a3052a5"),es=l._(en),er=a("80b6ac25");let{Text:ed}=l._(er).default,eo=({dropdownGroup:e,salesType:t,loading:a,salesPieData:l,handleChangeSalesType:i})=>{let{styles:s}=D();return(0,n.jsxs)(I.default,{loading:a,className:s.salesCard,variant:"borderless",title:"\u9500\u552E\u989D\u7C7B\u522B\u5360\u6BD4",style:{height:"100%"},extra:(0,n.jsxs)("div",{className:s.salesCardExtra,children:[e,(0,n.jsx)(es.default,{className:s.salesTypeRadio,value:t,onChange:i,options:[{label:"\u5168\u90E8\u6E20\u9053",value:"all"},{label:"\u7EBF\u4E0A",value:"online"},{label:"\u95E8\u5E97",value:"stores"}],size:"middle"})]}),children:[(0,n.jsx)(ed,{children:"\u9500\u552E\u989D"}),(0,n.jsx)(y.Pie,{height:340,radius:.8,innerRadius:.5,angleField:"y",colorField:"x",data:l,legend:!1,label:{position:"spider",text:e=>`${e.x}: ${(0,N.default)(e.y).format("0,0")}`}})]});};var ec=a("38ab0c18"),ex=l._(ec),ep=a("2ba63931");let{RangePicker:eh}=l._(ep).default,eu=[];for(let e=0;e<7;e+=1)eu.push({title:`\u{5DE5}\u{4E13}\u{8DEF} ${e} \u{53F7}\u{5E97}`,total:323234});let ef=({rangePickerValue:e,salesData:t,isActive:a,handleRangePickerChange:l,loading:i,selectDate:s})=>{let{styles:r}=D();return(0,n.jsx)(I.default,{loading:i,variant:"borderless",styles:{body:{padding:i?24:0}},children:(0,n.jsx)(Q.default,{className:r.salesCard,tabBarExtraContent:(0,n.jsxs)("div",{className:r.salesExtraWrap,children:[(0,n.jsxs)("div",{className:r.salesExtra,children:[(0,n.jsx)(ex.default,{type:"text",className:a("today"),onClick:()=>s("today"),children:"\u4ECA\u65E5"}),(0,n.jsx)(ex.default,{type:"text",className:a("week"),onClick:()=>s("week"),children:"\u672C\u5468"}),(0,n.jsx)(ex.default,{type:"text",className:a("month"),onClick:()=>s("month"),children:"\u672C\u6708"}),(0,n.jsx)(ex.default,{type:"text",className:a("year"),onClick:()=>s("year"),children:"\u672C\u5E74"})]}),(0,n.jsx)(eh,{value:e,onChange:l,variant:"filled",style:{width:256}})]}),size:"large",tabBarStyle:{marginBottom:24},items:[{key:"sales",label:"\u9500\u552E\u989D",children:(0,n.jsxs)(f.default,{children:[(0,n.jsx)(x.default,{xl:16,lg:12,md:12,sm:24,xs:24,children:(0,n.jsx)("div",{className:r.salesBar,children:(0,n.jsx)(y.Column,{height:300,data:t,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)(x.default,{xl:8,lg:12,md:12,sm:24,xs:24,children:(0,n.jsxs)("div",{className:r.salesRank,children:[(0,n.jsx)("h4",{className:r.rankingTitle,children:"\u95E8\u5E97\u9500\u552E\u989D\u6392\u540D"}),(0,n.jsx)("ul",{className:r.rankingList,children:eu.map((e,t)=>(0,n.jsxs)("li",{children:[(0,n.jsx)("span",{className:`${r.rankingItemNumber} ${t<3?r.rankingItemNumberActive:""}`,children:t+1}),(0,n.jsx)("span",{className:r.rankingItemTitle,title:e.title,children:e.title}),(0,n.jsx)("span",{children:(0,N.default)(e.total).format("0,0")})]},e.title))})]})})]})},{key:"views",label:"\u8BBF\u95EE\u91CF",children:(0,n.jsxs)(f.default,{children:[(0,n.jsx)(x.default,{xl:16,lg:12,md:12,sm:24,xs:24,children:(0,n.jsx)("div",{className:r.salesBar,children:(0,n.jsx)(y.Column,{height:300,data:t,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)(x.default,{xl:8,lg:12,md:12,sm:24,xs:24,children:(0,n.jsxs)("div",{className:r.salesRank,children:[(0,n.jsx)("h4",{className:r.rankingTitle,children:"\u95E8\u5E97\u8BBF\u95EE\u91CF\u6392\u540D"}),(0,n.jsx)("ul",{className:r.rankingList,children:eu.map((e,t)=>(0,n.jsxs)("li",{children:[(0,n.jsx)("span",{className:`${t<3?r.rankingItemNumberActive:r.rankingItemNumber}`,children:t+1}),(0,n.jsx)("span",{className:r.rankingItemTitle,title:e.title,children:e.title}),(0,n.jsx)("span",{children:(0,N.default)(e.total).format("0,0")})]},e.title))})]})})]})}]})});};var eg=a("953c7673"),em=l._(eg);let ej=({loading:e,visitData2:t,searchData:a,dropdownGroup:l})=>{let i=[{title:"\u6392\u540D",dataIndex:"index",key:"index"},{title:"\u641C\u7D22\u5173\u952E\u8BCD",dataIndex:"keyword",key:"keyword",render:e=>(0,n.jsx)("a",{href:"/",children:e})},{title:"\u7528\u6237\u6570",dataIndex:"count",key:"count",sorter:(e,t)=>e.count-t.count},{title:"\u5468\u6DA8\u5E45",dataIndex:"range",key:"range",sorter:(e,t)=>e.range-t.range,render:(e,t)=>(0,n.jsx)(V,{flag:1===t.status?"down":"up",children:(0,n.jsxs)("span",{style:{marginRight:4},children:[e,"%"]})})}];return(0,n.jsxs)(I.default,{loading:e,variant:"borderless",title:"\u7EBF\u4E0A\u70ED\u95E8\u641C\u7D22",extra:l,style:{height:"100%"},children:[(0,n.jsxs)(f.default,{gutter:68,children:[(0,n.jsxs)(x.default,{sm:12,xs:24,style:{marginBottom:24},children:[(0,n.jsx)(Z,{subTitle:(0,n.jsxs)("span",{children:["\u641C\u7D22\u7528\u6237\u6570",(0,n.jsx)(w.default,{title:"\u6307\u6807\u8BF4\u660E",children:(0,n.jsx)(b.default,{style:{marginLeft:8}})})]}),gap:8,total:(0,N.default)(12321).format("0,0"),status:"up",subTotal:17.1}),(0,n.jsx)(y.Area,{xField:"x",yField:"y",shapeField:"smooth",height:45,axis:!1,padding:-12,style:{fill:"linear-gradient(-90deg, white 0%, #6294FA 100%)",fillOpacity:.4},data:t})]}),(0,n.jsxs)(x.default,{sm:12,xs:24,style:{marginBottom:24},children:[(0,n.jsx)(Z,{subTitle:(0,n.jsxs)("span",{children:["\u4EBA\u5747\u641C\u7D22\u6B21\u6570",(0,n.jsx)(w.default,{title:"\u6307\u6807\u8BF4\u660E",children:(0,n.jsx)(b.default,{style:{marginLeft:8}})})]}),total:2.7,status:"down",subTotal:26.2,gap:8}),(0,n.jsx)(y.Area,{xField:"x",yField:"y",shapeField:"smooth",height:45,padding:-12,style:{fill:"linear-gradient(-90deg, white 0%, #6294FA 100%)",fillOpacity:.4},data:t,axis:!1})]})]}),(0,n.jsx)(em.default,{rowKey:e=>e.index,size:"small",columns:i,dataSource:a,pagination:{style:{marginBottom:0},pageSize:5}})]});};async function eb(){return(0,o.request)("/api/fake_analysis_chart_data");}var ey=a("ab5f2fcc"),ev=l._(ey);function eT(e){return 1*e<10?`0${e}`:e;}function ek(e){let t=new Date;if("today"===e)return t.setHours(0),t.setMinutes(0),t.setSeconds(0),[(0,ev.default)(t),(0,ev.default)(t.getTime()+86399e3)];if("week"===e){let e=t.getDay();t.setHours(0),t.setMinutes(0),t.setSeconds(0),0===e?e=6:e-=1;let a=t.getTime()-864e5*e;return[(0,ev.default)(a),(0,ev.default)(a+604799e3)];}let a=t.getFullYear();if("month"===e){let e=t.getMonth(),l=(0,ev.default)(t).add(1,"months"),i=l.year(),n=l.month();return[(0,ev.default)(`${a}-${eT(e+1)}-01 00:00:00`),(0,ev.default)((0,ev.default)(`${i}-${eT(n+1)}-01 00:00:00`).valueOf()-1e3)];}return[(0,ev.default)(`${a}-01-01 00:00:00`),(0,ev.default)(`${a}-12-31 23:59:59`)];}let ew=()=>{var e;let t;let{styles:a}=D(),[l,i]=(0,m.useState)("all"),[s,c]=(0,m.useState)(""),[p,u]=(0,m.useState)(ek("year")),{loading:g,data:j}=(0,o.useRequest)(eb);t="all"===l?null==j?void 0:j.salesTypeData:"online"===l?null==j?void 0:j.salesTypeDataOnline:null==j?void 0:j.salesTypeDataOffline;let b=(0,n.jsx)("span",{className:a.iconGroup,children:(0,n.jsx)(h.default,{menu:{items:[{key:"1",label:"\u64CD\u4F5C\u4E00"},{key:"2",label:"\u64CD\u4F5C\u4E8C"}]},placement:"bottomRight",children:(0,n.jsx)(r.default,{})})}),y=s||(null==j?void 0:null===(e=j.offlineData[0])||void 0===e?void 0:e.name)||"";return(0,n.jsxs)(d.GridContent,{children:[(0,n.jsx)(m.Suspense,{fallback:(0,n.jsx)(ei,{}),children:(0,n.jsx)(U,{loading:g,visitData:(null==j?void 0:j.visitData)||[]})}),(0,n.jsx)(m.Suspense,{fallback:null,children:(0,n.jsx)(ef,{rangePickerValue:p,salesData:(null==j?void 0:j.salesData)||[],isActive:e=>{if(!p)return"";let t=ek(e);return t&&p[0]&&p[1]&&p[0].isSame(t[0],"day")&&p[1].isSame(t[1],"day")?a.currentDate:"";},handleRangePickerChange:e=>{u(e);},loading:g,selectDate:e=>{u(ek(e));}})}),(0,n.jsxs)(f.default,{gutter:24,style:{marginTop:24},children:[(0,n.jsx)(x.default,{xl:12,lg:24,md:24,sm:24,xs:24,children:(0,n.jsx)(m.Suspense,{fallback:null,children:(0,n.jsx)(ej,{loading:g,visitData2:(null==j?void 0:j.visitData2)||[],searchData:(null==j?void 0:j.searchData)||[],dropdownGroup:b})})}),(0,n.jsx)(x.default,{xl:12,lg:24,md:24,sm:24,xs:24,children:(0,n.jsx)(m.Suspense,{fallback:null,children:(0,n.jsx)(eo,{dropdownGroup:b,salesType:l,loading:g,salesPieData:t||[],handleChangeSalesType:e=>{i(e);}})})})]}),(0,n.jsx)(m.Suspense,{fallback:null,children:(0,n.jsx)(et,{activeKey:y,loading:g,offlineData:(null==j?void 0:j.offlineData)||[],offlineChartData:(null==j?void 0:j.offlineChartData)||[],handleTabChange:e=>{c(e);}})})]});};}}]);
|
|
//# sourceMappingURL=8b39a838-async.2665ecc8.js.map
|