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