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

"use strict";(self.webpackChunkant_design_pro=self.webpackChunkant_design_pro||[]).push([[628],{58451:function(_e,f,e){e.r(f);var b=e(97857),C=e.n(b),T=e(15009),r=e.n(T),R=e(99289),v=e.n(R),x=e(5574),m=e.n(x),E=e(48357),I=e(64289),o=e(31847),B=e(90930),K=e(57470),p=e(64317),L=e(34540),W=e(27484),g=e.n(W),y=e(9220),l=e(67294),S=e(96974),a=e(85893),Z=function(){var F=(0,l.useState)(),D=m()(F,2),i=D[0],z=D[1],G=(0,l.useState)([]),O=m()(G,2),P=O[0],$=O[1],H=(0,l.useState)([]),M=m()(H,2),J=M[0],N=M[1],Q=o.Z.Divider,V=(0,l.useState)(!1),j=m()(V,2),h=j[0],X=j[1],Y=(0,S.UO)(),U=Y.code,w=function(){var t=v()(r()().mark(function _(){var s;return r()().wrap(function(n){for(;;)switch(n.prev=n.next){case 0:return n.next=2,(0,E.d1)({appCode:U});case 2:s=n.sent,s.data&&z(s.data);case 4:case"end":return n.stop()}},_)}));return function(){return t.apply(this,arguments)}}(),k=function(){var t=v()(r()().mark(function _(){var s;return r()().wrap(function(n){for(;;)switch(n.prev=n.next){case 0:return n.next=2,(0,E.ln)();case 2:s=n.sent,s.data&&N(s.data);case 4:case"end":return n.stop()}},_)}));return function(){return t.apply(this,arguments)}}(),A=function(){var t=v()(r()().mark(function _(s){var u;return r()().wrap(function(d){for(;;)switch(d.prev=d.next){case 0:return d.next=2,(0,E.Zb)(s);case 2:u=d.sent,u.data&&$(u.data);case 4:case"end":return d.stop()}},_)}));return function(s){return t.apply(this,arguments)}}();(0,l.useEffect)(function(){w(),k(),A({code:U})},[]);var c=function(_){return _?parseFloat((_/1e5).toFixed(2)):0},q=P.map(function(t){return{date:t.date+"",income:c(t.income)}}),ee={data:q,xField:"date",yField:"income",tooltip:{name:"\u6536\u5165",field:"income"},axis:{date:{title:"\u65E5\u671F"},income:{title:"\u6536\u5165\uFF08\u5143\uFF09"}},title:"\u533A\u95F4\u7D2F\u8BA1"+c(P.reduce(function(t,_){return t+(_.income?_.income:0)},0))+"\u5143",height:400,label:{text:function(_){return _.\u6536\u5165>0?_.\u6536\u5165:""},textBaseline:"bottom"}};return(0,a.jsxs)(B._z,{children:[(0,a.jsx)(y.Z,{onResize:function(_){X(_.width<596)},children:(0,a.jsx)(o.Z,{children:(0,a.jsxs)(o.Z.Group,{direction:h?"column":"row",children:[(0,a.jsx)(o.Z,{statistic:{title:"\u7D2F\u8BA1\u6536\u5165\uFF08\u5143\uFF09",value:c(i==null?void 0:i.totalIncome)}}),(0,a.jsx)(Q,{type:h?"horizontal":"vertical"}),(0,a.jsx)(o.Z,{statistic:{title:"\u6628\u65E5\u6536\u5165\uFF08\u5143\uFF09",value:c(i==null?void 0:i.yesterdayIncome)}})]})})},"resize-observer"),(0,a.jsxs)("div",{style:{marginTop:"20px",padding:"40px"},children:[(0,a.jsxs)(K.t,{defaultCollapsed:!0,split:!0,onFinish:A,children:[(0,a.jsx)(p.Z,{name:"code",label:"\u5E94\u7528",options:J.map(function(t){return{label:t.name,value:t.code}})}),(0,a.jsx)(p.Z,{label:"\u5E73\u53F0",name:"platform",valueEnum:{1:"\u7A7F\u5C71\u7532",2:"\u817E\u8BAF",5:"\u5FEB\u624B",7:"Sigmob"}}),(0,a.jsx)(p.Z,{name:"advType",label:"\u5E7F\u544A\u7C7B\u578B",valueEnum:{1:"\u6A2A\u5E45",2:"\u63D2\u9875",3:"\u6FC0\u52B1\u89C6\u9891"}}),(0,a.jsx)(L.Z,{fieldProps:{disabledDate:function(_){return _&&_>=g()().startOf("day")}},name:"date",label:"\u65F6\u95F4"})]}),(0,a.jsx)(I.Z,C()({},ee))]})]})};f.default=Z}}]);