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