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

8 months ago
"use strict";(self.webpackChunkant_design_pro=self.webpackChunkant_design_pro||[]).push([[857],{46701:function(ne,h,e){e.r(h);var b=e(5574),f=e.n(b),C=e(15009),d=e.n(C),U=e(97857),u=e.n(U),B=e(99289),p=e.n(B),D=e(48357),y=e(92296),o=e(31847),g=e(90930),K=e(57470),x=e(64317),L=e(34540),W=e(50624),S=e(35312),Z=e(13169),O=e(16250),F=e(27484),z=e.n(F),$=e(9220),m=e(67294),G=e(96974),_=e(85893),N=function(){var M=(0,m.useRef)(),H=(0,S.useIntl)(),J=[{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(t){return t/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"}],Q=(0,G.UO)(),c=Q.code,V=function(){var a=p()(d()().mark(function t(s){var n,v,r;return d()().wrap(function(l){for(;;)switch(l.prev=l.next){case 0:return l.next=2,(0,D._5)(u()(u()({},s),{},{code:c}));case 2:return r=l.sent,l.abrupt("return",{data:(n=r.data)===null||n===void 0?void 0:n.data,total:(v=r.data)===null||v===void 0?void 0:v.total,success:!0});case 4:case"end":return l.stop()}},t)}));return function(s){return a.apply(this,arguments)}}(),X=(0,m.useState)(),P=f()(X,2),i=P[0],Y=P[1],w=(0,m.useState)([]),I=f()(w,2),T=I[0],k=I[1],q=o.Z.Divider,ee=(0,m.useState)(!1),j=f()(ee,2),R=j[0],te=j[1],ae=function(){var a=p()(d()().mark(function t(s){var n;return d()().wrap(function(r){for(;;)switch(r.prev=r.next){case 0:return r.next=2,(0,D.d1)({appCode:s});case 2:n=r.sent,n.data&&Y(n.data);case 4:case"end":return r.stop()}},t)}));return function(s){return a.apply(this,arguments)}}(),A=function(){var a=p()(d()().mark(function t(s){var n;return d()().wrap(function(r){for(;;)switch(r.prev=r.next){case 0:return r.next=2,(0,D.Zb)(u()(u()({},s),{},{code:c}));case 2:n=r.sent,n.data&&k(n.data);case 4:case"end":return r.stop()}},t)}));return function(s){return a.apply(this,arguments)}}();(0,m.useEffect)(function(){var a;(a=M.current)===null||a===void 0||a.reload(),ae(c),A({code:c})},[c]);var E=function(t){return t?parseFloat((t/1e5).toFixed(2)):0},_e=T.map(function(a){return{date:a.date+"",income:E(a.income)}}),re={data:_e,xField:"date",yField:"income",axis:{date:{title:"\u65E5\u671F"},income:{title:"\u6536\u5165\uFF08\u5143\uFF09"}},title:"\u7D2F\u8BA1"+E(T.reduce(function(a,t){return a+(t.income?t.income:0)},0))+"\u5143",height:400,label:{text:function(t){return t.\u6536\u5165>0?t.\u6536\u5165:""},textBaseline:"bottom"}};return(0,_.jsx)(g._z,{children:(0,_.jsxs)(Z.Z,{defaultActiveKey:"1",centered:!0,style:{backgroundColor:"white",padding:"20px"},children:[(0,_.jsxs)(O.Z,{tab:"\u6570\u636E\u603B\u89C8",children:[(0,_.jsx)($.Z,{onResize:function(t){te(t.width<596)},children:(0,_.jsx)(o.Z,{children:(0,_.jsxs)(o.Z.Group,{direction:R?"column":"row",children:[(0,_.jsx)(o.Z,{statistic:{title:"\u7D2F\u8BA1\u6536\u5165\uFF08\u5143\uFF09",value:E(i==null?void 0:i.totalIncome)}}),(0,_.jsx)(q,{type:R?"horizontal":"vertical"}),(0,_.jsx)(o.Z,{statistic:{title:"\u4ECA\u65E5\u6536\u5165\uFF08\u5143\uFF09",value:E(i==null?void 0:i.todayIncome)}})]})})},"resize-observer"),(0,_.jsxs)(K.t,{defaultCollapsed:!0,split:!0,onFinish:A,children:[(0,_.jsx)(x.Z,{label:"\u5E73\u53F0",name:"pla