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.
1 lines
5.5 KiB
1 lines
5.5 KiB
"use strict";(self.webpackChunkant_design_pro=self.webpackChunkant_design_pro||[]).push([[857],{46701:function(ce,O,t){t.r(O);var K=t(97857),E=t.n(K),L=t(15009),m=t.n(L),W=t(99289),x=t.n(W),g=t(5574),h=t.n(g),P=t(48357),Z=t(78677),d=t(39615),F=t(90930),z=t(67539),V=t(57470),I=t(64317),$=t(34540),w=t(13169),j=t(16250),N=t(27484),G=t.n(N),H=t(9220),o=t(67294),J=t(96974),n=t(85893),Q=function(){var T=(0,o.useRef)(),X=(0,o.useState)(void 0),b=h()(X,2),y=b[0],Y=b[1],u=function(){return window.innerWidth<=768},k=(0,o.useState)({deviceId:{show:!u()},appName:{show:!u()},platform:{show:!u()},deviceBrand:{show:!u()},deviceName:{show:!u()},ip:{show:!u()},advType:{show:!u()}}),C=h()(k,2),q=C[0],ee=C[1],te=[{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",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(e){return e/100}},{title:"\u8BBE\u5907\u54C1\u724C",dataIndex:"deviceBrand",hideInSearch:!0,valueType:"textarea"},{title:"\u8BBE\u5907\u540D",dataIndex:"deviceName",hideInSearch:!0,valueType:"textarea"},{title:"ip",dataIndex:"ip",hideInSearch:!0,valueType:"textarea"},{title:"\u65F6\u95F4",hideInSearch:!0,dataIndex:"createdAt",valueType:"dateTime"},{title:"\u65F6\u95F4",hideInTable:!0,dataIndex:"createdAt",valueType:"dateRange"}],ae=(0,J.UO)(),f=ae.code,ne=(0,o.useState)(),R=h()(ne,2),_=R[0],re=R[1],se=(0,o.useState)([]),A=h()(se,2),U=A[0],_e=A[1],D=d.Z.Divider,ie=(0,o.useState)(!1),S=h()(ie,2),p=S[0],de=S[1],oe=function(){var a=x()(m()().mark(function e(i){var s;return m()().wrap(function(r){for(;;)switch(r.prev=r.next){case 0:return r.next=2,(0,P.d1)({appCode:i});case 2:s=r.sent,s.data&&re(s.data);case 4:case"end":return r.stop()}},e)}));return function(i){return a.apply(this,arguments)}}(),B=function(){var a=x()(m()().mark(function e(i){var s;return m()().wrap(function(r){for(;;)switch(r.prev=r.next){case 0:return r.next=2,(0,P.Zb)(E()(E()({},i),{},{code:f}));case 2:s=r.sent,s.data&&_e(s.data);case 4:case"end":return r.stop()}},e)}));return function(i){return a.apply(this,arguments)}}();(0,o.useEffect)(function(){var a;(a=T.current)===null||a===void 0||a.reload(),oe(f),B({code:f})},[f]);var l=function(e){return e?parseFloat((e/1e5).toFixed(2)):0},ue=U.map(function(a){return{date:function(){var e=a.date+"",i=e.slice(0,4),s=e.slice(4,6),c=e.slice(6,8);return"".concat(i,"-").concat(s,"-").concat(c)}(),income:l(a.income)}}),le={data:ue,xField:"date",yField:"income",tooltip:{name:"\u6536\u5165",field:"income"},axis:{date:{title:"\u65E5\u671F"}},title:"\u7D2F\u8BA1"+l(U.reduce(function(a,e){return a+(e.income?e.income:0)},0))+"\u5143",height:400,label:{text:function(e){return e.income>0?e.income:""},textBaseline:"bottom"}};return(0,n.jsx)(F._z,{children:(0,n.jsxs)(w.Z,{defaultActiveKey:"1",centered:!0,style:{backgroundColor:"white",padding:"20px"},children:[(0,n.jsx)(j.Z,{tab:"\u5E7F\u544A\u8BE6\u60C5",children:(0,n.jsx)(z.Z,{headerTitle:y?"\u8868\u683C\u7D2F\u8BA1\uFF1A"+l(y)+"\u5143":"",actionRef:T,rowKey:"key",search:{labelWidth:120},request:function(){var a=x()(m()().mark(function e(i){var s,c,r,M;return m()().wrap(function(v){for(;;)switch(v.prev=v.next){case 0:return v.next=2,(0,P._5)(E()(E()({},i),{},{code:f}));case 2:return r=v.sent,i.current===1&&Y((M=r.data)===null||M===void 0?void 0:M.sum),v.abrupt("return",{data:(s=r.data)===null||s===void 0?void 0:s.data,total:(c=r.data)===null||c===void 0?void 0:c.total,success:!0});case 5:case"end":return v.stop()}},e)}));return function(e){return a.apply(this,arguments)}}(),columns:te,columnsState:{value:q,onChange:function(e){ee(e)}}})},"1"),(0,n.jsxs)(j.Z,{tab:"\u6570\u636E\u603B\u89C8",children:[(0,n.jsx)(H.Z,{onResize:function(e){de(e.width<596)},children:(0,n.jsx)(d.Z,{children:(0,n.jsxs)(d.Z.Group,{direction:p?"column":"row",children:[(0,n.jsx)(d.Z,{statistic:{title:"\u4E0A\u6708\u6536\u5165\uFF08\u5143\uFF09",value:l(_==null?void 0:_.lastMonthIncome)}}),(0,n.jsx)(D,{type:p?"horizontal":"vertical"}),(0,n.jsx)(d.Z,{statistic:{title:"\u672C\u6708\u6536\u5165\uFF08\u5143\uFF09",value:l(_==null?void 0:_.thisMonthIncome)}}),(0,n.jsx)(D,{type:p?"horizontal":"vertical"}),(0,n.jsx)(d.Z,{statistic:{title:"\u4ECA\u65E5\u6536\u5165\uFF08\u5143\uFF09",value:l(_==null?void 0:_.todayIncome)}}),(0,n.jsx)(D,{type:p?"horizontal":"vertical"}),(0,n.jsx)(d.Z,{statistic:{title:"\u6628\u65E5\u6536\u5165\uFF08\u5143\uFF09",value:l(_==null?void 0:_.yesterdayIncome)}})]})})},"resize-observer"),(0,n.jsxs)(V.t,{defaultCollapsed:!0,split:!0,onFinish:B,children:[(0,n.jsx)(I.Z,{label:"\u5E73\u53F0",name:"platform",valueEnum:{1:"\u7A7F\u5C71\u7532",2:"\u817E\u8BAF",3:"\u767E\u5EA6\u8054\u76DF",4:"Mintegral",5:"\u5FEB\u624B",6:"\u6E38\u53EF\u8D62",7:"Sigmob",8:"Admob"}}),(0,n.jsx)(I.Z,{name:"advType",label:"\u5E7F\u544A\u7C7B\u578B",valueEnum:{1:"\u6A2A\u5E45",2:"\u63D2\u9875",3:"\u6FC0\u52B1\u89C6\u9891"}}),(0,n.jsx)($.Z,{fieldProps:{disabledDate:function(e){return e&&e>=G()().startOf("day")}},name:"date",label:"\u65F6\u95F4"})]}),(0,n.jsx)(Z.Z,E()({},le))]},"2")]})})};O.default=Q}}]);
|
|
|