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
5.5 KiB

"use strict";(self.webpackChunkant_design_pro=self.webpackChunkant_design_pro||[]).push([[857],{46701:function(ce,O,t){t.r(O);var g=t(97857),E=t.n(g),K=t(15009),m=t.n(K),L=t(99289),x=t.n(L),W=t(5574),f=t.n(W),P=t(48357),Z=t(11415),d=t(39615),F=t(90930),z=t(67539),V=t(57470),I=t(64317),$=t(34540),w=t(13169),j=t(16250),N=t(27484),G=t.n(N),H=t(9220),o=t(67294),J=t(96974),n=t(85893),Q=function(){var T=(0,o.useRef)(),X=(0,o.useState)(void 0),b=f()(X,2),y=b[0],Y=b[1],l=function(){return window.innerWidth<=768},k=(0,o.useState)({deviceId:{show:!l()},appName:{show:!l()},platform:{show:!l()},deviceBrand:{show:!l()},deviceName:{show:!l()},ip:{show:!l()},advType:{show:!l()}}),C=f()(k,2),q=C[0],ee=C[1],te=[{title:"\u8BBE\u5907id",dataIndex:"deviceId",valueType:"textarea",ellipsis:!0,copyable:!0},{title:"\u5E94\u7528\u540D\u79F0",hideInSearch:!0,dataIndex:"appName",valueType:"textarea"},{title:"\u5E73\u53F0",dataIndex:"platform",valueEnum:{1:{text:"\u7A7F\u5C71\u7532"},2:{text:"\u817E\u8BAF"},3:{text:"\u767E\u5EA6\u8054\u76DF"},4:{text:"Mintegral"},5:{text:"\u5FEB\u624B"},6:{text:"\u6E38\u53EF\u8D62"},7:{text:"Sigmob"},8:{text:"Admob"}}},{title:"\u5E7F\u544A\u7C7B\u578B",dataIndex:"advType",valueEnum:{1:{text:"\u6A2A\u5E45",status:"Default"},2:{text:"\u63D2\u9875",status:"Processing"},3:{text:"\u6FC0\u52B1\u89C6\u9891",status:"Success"}}},{title:"ecpm(\u5143)",dataIndex:"ecpm",hideInSearch:!0,renderText:function(e){return e/100}},{title:"\u8BBE\u5907\u54C1\u724C",dataIndex:"deviceBrand",hideInSearch:!0,valueType:"textarea"},{title:"\u8BBE\u5907\u540D",dataIndex:"deviceName",hideInSearch:!0,valueType:"textarea"},{title:"ip",dataIndex:"ip",hideInSearch:!0,valueType:"textarea"},{title:"\u65F6\u95F4",hideInSearch:!0,dataIndex:"createdAt",valueType:"dateTime"},{title:"\u65F6\u95F4",hideInTable:!0,dataIndex:"createdAt",valueType:"dateRange"}],ae=(0,J.UO)(),h=ae.code,ne=(0,o.useState)(),R=f()(ne,2),s=R[0],re=R[1],_e=(0,o.useState)([]),A=f()(_e,2),U=A[0],se=A[1],D=d.Z.Divider,ie=(0,o.useState)(!1),B=f()(ie,2),p=B[0],de=B[1],oe=function(){var a=x()(m()().mark(function e(i){var _;return m()().wrap(function(r){for(;;)switch(r.prev=r.next){case 0:return r.next=2,(0,P.d1)({appCode:i});case 2:_=r.sent,_.data&&re(_.data);case 4:case"end":return r.stop()}},e)}));return function(i){return a.apply(this,arguments)}}(),S=function(){var a=x()(m()().mark(function e(i){var _;return m()().wrap(function(r){for(;;)switch(r.prev=r.next){case 0:return r.next=2,(0,P.Zb)(E()(E()({},i),{},{code:h}));case 2:_=r.sent,_.data&&se(_.data);case 4:case"end":return r.stop()}},e)}));return function(i){return a.apply(this,arguments)}}();(0,o.useEffect)(function(){var a;(a=T.current)===null||a===void 0||a.reload(),oe(h),S({code:h})},[h]);var u=function(e){return e?parseFloat((e/1e5).toFixed(2)):0},le=U.map(function(a){return{date:function(){var e=a.date+"",i=e.slice(0,4),_=e.slice(4,6),c=e.slice(6,8);return"".concat(i,"-").concat(_,"-").concat(c)}(),income:u(a.income)}}),ue={data:le,xField:"date",yField:"income",tooltip:{name:"\u6536\u5165",field:"income"},axis:{date:{title:"\u65E5\u671F"}},title:"\u7D2F\u8BA1"+u(U.reduce(function(a,e){return a+(e.income?e.income:0)},0))+"\u5143",height:400,label:{text:function(e){return e.income>0?e.income:""},textBaseline:"bottom"}};return(0,n.jsx)(F._z,{children:(0,n.jsxs)(w.Z,{defaultActiveKey:"1",centered:!0,style:{backgroundColor:"white",padding:"20px"},children:[(0,n.jsx)(j.Z,{tab:"\u5E7F\u544A\u8BE6\u60C5",children:(0,n.jsx)(z.Z,{headerTitle:y?"\u8868\u683C\u7D2F\u8BA1\uFF1A"+u(y)+"\u5143":"",actionRef:T,rowKey:"key",search:{labelWidth:120},request:function(){var a=x()(m()().mark(function e(i){var _,c,r,M;return m()().wrap(function(v){for(;;)switch(v.prev=v.next){case 0:return v.next=2,(0,P._5)(E()(E()({},i),{},{code:h}));case 2:return r=v.sent,i.current===1&&Y((M=r.data)===null||M===void 0?void 0:M.sum),v.abrupt("return",{data:(_=r.data)===null||_===void 0?void 0:_.data,total:(c=r.data)===null||c===void 0?void 0:c.total,success:!0});case 5:case"end":return v.stop()}},e)}));return function(e){return a.apply(this,arguments)}}(),columns:te,columnsState:{value:q,onChange:function(e){ee(e)}}})},"1"),(0,n.jsxs)(j.Z,{tab:"\u6570\u636E\u603B\u89C8",children:[(0,n.jsx)(H.Z,{onResize:function(e){de(e.width<596)},children:(0,n.jsx)(d.Z,{children:(0,n.jsxs)(d.Z.Group,{direction:p?"column":"row",children:[(0,n.jsx)(d.Z,{statistic:{title:"\u4E0A\u6708\u6536\u5165\uFF08\u5143\uFF09",value:u(s==null?void 0:s.lastMonthIncome)}}),(0,n.jsx)(D,{type:p?"horizontal":"vertical"}),(0,n.jsx)(d.Z,{statistic:{title:"\u672C\u6708\u6536\u5165\uFF08\u5143\uFF09",value:u(s==null?void 0:s.thisMonthIncome)}}),(0,n.jsx)(D,{type:p?"horizontal":"vertical"}),(0,n.jsx)(d.Z,{statistic:{title:"\u4ECA\u65E5\u6536\u5165\uFF08\u5143\uFF09",value:u(s==null?void 0:s.todayIncome)}}),(0,n.jsx)(D,{type:p?"horizontal":"vertical"}),(0,n.jsx)(d.Z,{statistic:{title:"\u6628\u65E5\u6536\u5165\uFF08\u5143\uFF09",value:u(s==null?void 0:s.yesterdayIncome)}})]})})},"resize-observer"),(0,n.jsxs)(V.t,{defaultCollapsed:!0,split:!0,onFinish:S,children:[(0,n.jsx)(I.Z,{label:"\u5E73\u53F0",name:"platform",valueEnum:{1:"\u7A7F\u5C71\u7532",2:"\u817E\u8BAF",3:"\u767E\u5EA6\u8054\u76DF",4:"Mintegral",5:"\u5FEB\u624B",6:"\u6E38\u53EF\u8D62",7:"Sigmob",8:"Admob"}}),(0,n.jsx)(I.Z,{name:"advType",label:"\u5E7F\u544A\u7C7B\u578B",valueEnum:{1:"\u6A2A\u5E45",2:"\u63D2\u9875",3:"\u6FC0\u52B1\u89C6\u9891"}}),(0,n.jsx)($.Z,{fieldProps:{disabledDate:function(e){return e&&e>=G()().startOf("day")}},name:"date",label:"\u65F6\u95F4"})]}),(0,n.jsx)(Z.Z,E()({},ue))]},"2")]})})};O.default=Q}}]);