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.2 KiB

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