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.4 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),P=e(15009),i=e.n(P),B=e(99289),x=e.n(B),m=e(5574),t=e.n(m),n=e(48357),E=e(11415),_=e(39615),v=e(90930),j=e(67539),T=e(57470),C=e(64317),$=e(34540),G=e(13169),y=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 S=(0,D.useRef)(),k=(0,D.useState)(void 0),L=t()(k,2),K=L[0],q=L[1],O=function(){return window.innerWidth<=768},ee=(0,D.useState)({deviceId:{show:!O()},appName:{show:!O()},platform:{show:!O()},deviceBrand:{show:!O()},deviceName:{show:!O()},ip:{show:!O()},advType:{show:!O()}}),W=t()(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:"Default"},2:{text:"\u63D2\u9875",status:"Processing"},3:{text:"\u6FC0\u52B1\u89C6\u9891",status:"Success"}}},{title:"ecpm(\u5143)",dataIndex:"ecpm",hideInSearch:!0,renderText:function(a){return a/100}},{title:"\u8BBE\u5907",dataIndex:"device",hideInSearch:!0,renderText:function(a,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:"\u7528\u6237",dataIndex:"user",hideInSearch:!0,width:150,renderText:function(a,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=t()(se,2),c=F[0],_e=F[1],ie=(0,D.useState)([]),Z=t()(ie,2),V=Z[0],ue=Z[1],R=_.Z.Divider,oe=(0,D.useState)(!1),z=t()(oe,2),U=z[0],de=z[1],le=function(){var s=x()(i()().mark(function a(u){var d;return i()().wrap(function(o){for(;;)switch(o.prev=o.next){case 0:return o.next=2,(0,n.d1)({appCode:u});case 2:d=o.sent,d.data&&_e(d.data);case 4:case"end":return o.stop()}},a)}));return function(u){return s.apply(this,arguments)}}(),N=function(){var s=x()(i()().mark(function a(u){var d;return i()().wrap(function(o){for(;;)switch(o.prev=o.next){case 0:return o.next=2,(0,n.Zb)(l()(l()({},u),{},{code:b}));case 2:d=o.sent,d.data&&ue(d.data);case 4:case"end":return o.stop()}},a)}));return function(u){return s.apply(this,arguments)}}();(0,D.useEffect)(function(){var s;(s=S.current)===null||s===void 0||s.reload(),le(b),N({code:b})},[b]);var ce=V.map(function(s){return{date:function(){var a=s.date+"",u=a.slice(0,4),d=a.slice(4,6),I=a.slice(6,8);return"".concat(u,"-").concat(d,"-").concat(I)}(),income:(0,M.P)(s.income)}}),ve={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,a){return s+(a.income?a.income:0)},0))+"\u5143",height:400,label:{text:function(a){return a.income>0?a.income:""},textBaseline:"bottom"}};return(0,r.jsx)(v._z,{children:(0,r.jsxs)(G.Z,{defaultActiveKey:"1",centered:!0,style:{backgroundColor:"white",padding:"20px"},children:[(0,r.jsx)(y.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:S,rowKey:"key",search:{labelWidth:120},request:function(){var s=x()(i()().mark(function a(u){var d,I,o,A;return i()().wrap(function(p){for(;;)switch(p.prev=p.next){case 0:return p.next=2,(0,n._5)(l()(l()({},u),{},{code:b}));case 2:return o=p.sent,u.current===1&&q((A=o.data)===null||A===void 0?void 0:A.sum),p.abrupt("return",{dat