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

"use strict";(self.webpackChunkant_design_pro=self.webpackChunkant_design_pro||[]).push([[857],{46701:function(_e,M,t){t.r(M);var b=t(5574),p=t.n(b),C=t(15009),o=t.n(C),U=t(97857),m=t.n(U),B=t(99289),h=t.n(B),g=t(92296),d=t(31847),K=t(90930),L=t(85601),W=t(57470),O=t(64317),S=t(34540),Z=t(35312),F=t(13169),P=t(16250),z=t(27484),$=t.n(z),G=t(9220),v=t(67294),N=t(96974),D=t(48357),a=t(85893),H=function(){var I=(0,v.useRef)(),J=(0,Z.useIntl)(),Q=[{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:"Default"},2:{text:"\u63D2\u9875",status:"Processing"},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"}],V=(0,N.UO)(),E=V.code,X=function(){var n=h()(o()().mark(function e(i){var _,l,r;return o()().wrap(function(c){for(;;)switch(c.prev=c.next){case 0:return c.next=2,(0,D._5)(m()(m()({},i),{},{code:E}));case 2:return r=c.sent,c.abrupt("return",{data:(_=r.data)===null||_===void 0?void 0:_.data,total:(l=r.data)===null||l===void 0?void 0:l.total,success:!0});case 4:case"end":return c.stop()}},e)}));return function(i){return n.apply(this,arguments)}}(),Y=(0,v.useState)(),j=p()(Y,2),s=j[0],w=j[1],k=(0,v.useState)([]),T=p()(k,2),R=T[0],q=T[1],x=d.Z.Divider,ee=(0,v.useState)(!1),y=p()(ee,2),f=y[0],te=y[1],ae=function(){var n=h()(o()().mark(function e(i){var _;return o()().wrap(function(r){for(;;)switch(r.prev=r.next){case 0:return r.next=2,(0,D.d1)({appCode:i});case 2:_=r.sent,_.data&&w(_.data);case 4:case"end":return r.stop()}},e)}));return function(i){return n.apply(this,arguments)}}(),A=function(){var n=h()(o()().mark(function e(i){var _;return o()().wrap(function(r){for(;;)switch(r.prev=r.next){case 0:return r.next=2,(0,D.Zb)(m()(m()({},i),{},{code:E}));case 2:_=r.sent,_.data&&q(_.data);case 4:case"end":return r.stop()}},e)}));return function(i){return n.apply(this,arguments)}}();(0,v.useEffect)(function(){var n;(n=I.current)===null||n===void 0||n.reload(),ae(E),A({code:E})},[E]);var u=function(e){return e?parseFloat((e/1e5).toFixed(2)):0},ne=R.map(function(n){return{date:function(){var e=n.date+"",i=e.slice(0,4),_=e.slice(4,6),l=e.slice(6,8);return"".concat(i,"-").concat(_,"-").concat(l)}(),income:u(n.income)}}),re={data:ne,xField:"date",yField:"income",tooltip:{name:"\u6536\u5165",field:"income"},axis:{date:{title:"\u65E5\u671F"}},title:"\u7D2F\u8BA1"+u(R.reduce(function(n,e){return n+(e.income?e.income:0)},0))+"\u5143",height:400,label:{text:function(e){return e.income>0?e.income:""},textBaseline:"bottom"}};return(0,a.jsx)(K._z,{children:(0,a.jsxs)(F.Z,{defaultActiveKey:"1",centered:!0,style:{backgroundColor:"white",padding:"20px"},children:[(0,a.jsx)(P.Z,{tab:"\u5E7F\u544A\u8BE6\u60C5",children:(0,a.jsx)(L.Z,{headerTitle:J.formatMessage({id:"pages.searchTable.title",defaultMessage:"Enquiry form"}),actionRef:I,rowKey:"key",search:{labelWidth:120},request:X,columns:Q})},"1"),(0,a.jsxs)(P.Z,{tab:"\u6570\u636E\u603B\u89C8",children:[(0,a.jsx)(G.Z,{onResize:function(e){te(e.width<596)},children:(0,a.jsx)(d.Z,{children:(0,a.jsxs)(d.Z.Group,{direction:f?"column":"row",children:[(0,a.jsx)(d.Z,{statistic:{title:"\u4E0A\u6708\u6536\u5165\uFF08\u5143\uFF09",value:u(s==null?void 0:s.lastMonthIncome)}}),(0,a.jsx)(x,{type:f?"horizontal":"vertical"}),(0,a.jsx)(d.Z,{statistic:{title:"\u672C\u6708\u6536\u5165\uFF08\u5143\uFF09",value:u(s==null?void 0:s.thisMonthIncome)}}),(0,a.jsx)(x,{type:f?"horizontal":"vertical"}),(0,a.jsx)(d.Z,{statistic:{title:"\u4ECA\u65E5\u6536\u5165\uFF08\u5143\uFF09",value:u(s==null?void 0:s.todayIncome)}}),(0,a.jsx)(x,{type:f?"horizontal":"vertical"}),(0,a.jsx)(d.Z,{statistic:{title:"\u6628\u65E5\u6536\u5165\uFF08\u5143\uFF09",value:u(s==null?void 0:s.yesterdayIncome)}})]})})},"resize-observer"),(0,a.jsxs)(W.t,{defaultCollapsed:!0,split:!0,onFinish:A,children:[(0,a.jsx)(O.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,a.jsx)(O.Z,{name:"advType",label:"\u5E7F\u544A\u7C7B\u578B",valueEnum:{1:"\u6A2A\u5E45",2:"\u63D2\u9875",3:"\u6FC0\u52B1\u89C6\u9891"}}),(0,a.jsx)(S.Z,{fieldProps:{disabledDate:function(e){return e&&e>=$()().startOf("day")}},name:"date",label:"\u65F6\u95F4"})]}),(0,a.jsx)(g.Z,m()({},re))]},"2")]})})};M.default=H}}]);