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

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