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

"use strict";(self.webpackChunkant_design_pro=self.webpackChunkant_design_pro||[]).push([[542],{86408:function(g,f,e){e.r(f);var h=e(97857),l=e.n(h),x=e(15009),i=e.n(x),B=e(99289),P=e.n(B),v=e(5574),a=e.n(v),n=e(48357),E=e(11415),_=e(39615),m=e(90930),j=e(67539),T=e(57470),C=e(64317),$=e(34540),G=e(13169),S=e(16250),Y=e(27484),X=e.n(Y),w=e(9220),D=e(67294),Q=e(96974),M=e(58125),H=e(38171),r=e(85893),J=function(){var y=(0,D.useRef)(),k=(0,D.useState)(void 0),L=a()(k,2),K=L[0],q=L[1],I=function(){return window.innerWidth<=768},ee=(0,D.useState)({deviceId:{show:!I()},appName:{show:!I()},platform:{show:!I()},deviceBrand:{show:!I()},deviceName:{show:!I()},ip:{show:!I()},advType:{show:!I()}}),W=a()(ee,2),te=W[0],ae=W[1],ne=[{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",width:80,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:"Success"},2:{text:"\u63D2\u9875",status:"Success"},3:{text:"\u6FC0\u52B1\u89C6\u9891",status:"Success"}}},{title:"ecpm(\u5143)",dataIndex:"ecpm",hideInSearch:!0,renderText:function(t){return t/100}},{title:"\u91D1\u5E01(\u5143)",dataIndex:"ecpmReal",hideInSearch:!0,renderText:function(t){return t/100}},{title:"\u8BBE\u5907",dataIndex:"device",hideInSearch:!0,renderText:function(t,u){return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("p",{children:u.deviceBrand}),(0,r.jsx)("p",{children:u.deviceName})]})}},{title:"ip",dataIndex:"ip",hideInSearch:!0,valueType:"textarea"},{title:"\u4EE3\u7406",dataIndex:"adminName",hideInSearch:!0,valueType:"textarea"},{title:"\u7528\u6237",dataIndex:"user",hideInSearch:!0,width:150,renderText:function(t,u){if(u.user)return(0,r.jsx)(H.Z,{data:u.user})}},{title:"\u65F6\u95F4",hideInSearch:!0,dataIndex:"createdAt",valueType:"dateTime"},{title:"\u65F6\u95F4",hideInTable:!0,dataIndex:"createdAt",valueType:"dateRange"},{title:"\u7528\u6237id",hideInTable:!0,dataIndex:"userId"}],re=(0,Q.UO)(),b=re.code,se=(0,D.useState)(),F=a()(se,2),c=F[0],_e=F[1],ie=(0,D.useState)([]),Z=a()(ie,2),V=Z[0],ue=Z[1],R=_.Z.Divider,de=(0,D.useState)(!1),z=a()(de,2),U=z[0],oe=z[1],le=function(){var s=P()(i()().mark(function t(u){var o;return i()().wrap(function(d){for(;;)switch(d.prev=d.next){case 0:return d.next=2,(0,n.d1)({appCode:u});case 2:o=d.sent,o.data&&_e(o.data);case 4:case"end":return d.stop()}},t)}));return function(u){return s.apply(this,arguments)}}(),N=function(){var s=P()(i()().mark(function t(u){var o;return i()().wrap(function(d){for(;;)switch(d.prev=d.next){case 0:return d.next=2,(0,n.Zb)(l()(l()({},u),{},{code:b}));case 2:o=d.sent,o.data&&ue(o.data);case 4:case"end":return d.stop()}},t)}));return function(u){return s.apply(this,arguments)}}();(0,D.useEffect)(function(){var s;(s=y.current)===null||s===void 0||s.reload(),le(b),N({code:b})},[b]);var ce=V.map(function(s){return{date:function(){var t=s.date+"",u=t.slice(0,4),o=t.slice(4,6),O=t.slice(6,8);return"".concat(u,"-").concat(o,"-").concat(O)}(),income:(0,M.P)(s.income)}}),me={data:ce,xField:"date",yField:"income",tooltip:{name:"\u6536\u5165",field:"income"},axis:{date:{title:"\u65E5\u671F"}},title:"\u7D2F\u8BA1"+(0,M.P)(V.reduce(function(s,t){return s+(t.income?t.income:0)},0))+"\u5143",height:400,label:{text:function(t){return t.income>0?t.income:""},textBaseline:"bottom"}};return(0,r.jsx)(m._z,{children:(0,r.jsxs)(G.Z,{defaultActiveKey:"1",centered:!0,style:{backgroundColor:"white",padding:"20px"},children:[(0,r.jsx)(S.Z,{tab:"\u5E7F\u544A\u8BE6\u60C5",children:(0,r.jsx)(j.Z,{headerTitle:K?"\u8868\u683C\u7D2F\u8BA1\uFF1A"+(0,M.P)(K)+"\u5143":"",actionRef:y,rowKey:"key",search:{labelWidth:120},request:function(){var s=P()(i()().mark(function t(u){var o,O,d,A;return i()().wrap(function(p){for(;;)swit