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
1 lines
5.1 KiB
"use strict";(self.webpackChunkant_design_pro=self.webpackChunkant_design_pro||[]).push([[581],{37643:function(F,M,_){_.r(M);var T=_(97857),l=_.n(T),R=_(15009),i=_.n(R),y=_(99289),d=_.n(y),c=_(5574),v=_.n(c),h=_(48357),b=_(80484),D=_(4025),A=_(90930),m=_(31847),C=_(57470),p=_(64317),g=_(34540),O=_(27484),t=_.n(O),a=_(9220),s=_(67294),f=_(96974),e=_(85893),w=function(){var G=(0,s.useState)(),I=v()(G,2),E=I[0],Z=I[1],$=(0,s.useState)([]),x=v()($,2),L=x[0],z=x[1],H=(0,s.useState)([]),B=v()(H,2),J=B[0],N=B[1],Q=(0,s.useState)(!1),W=v()(Q,2),V=W[0],X=W[1],Y=(0,f.UO)(),K=Y.code,k=function(){var n=d()(i()().mark(function r(){var u;return i()().wrap(function(o){for(;;)switch(o.prev=o.next){case 0:return o.next=2,(0,b.OE)({appCode:K});case 2:u=o.sent,u.data&&Z(u.data);case 4:case"end":return o.stop()}},r)}));return function(){return n.apply(this,arguments)}}(),q=function(){var n=d()(i()().mark(function r(){var u;return i()().wrap(function(o){for(;;)switch(o.prev=o.next){case 0:return o.next=2,(0,h.ln)();case 2:u=o.sent,u.data&&N(u.data);case 4:case"end":return o.stop()}},r)}));return function(){return n.apply(this,arguments)}}(),S=function(){var n=d()(i()().mark(function r(u){var j;return i()().wrap(function(P){for(;;)switch(P.prev=P.next){case 0:return P.next=2,(0,b.di)(u);case 2:j=P.sent,j.data&&z(j.data);case 4:case"end":return P.stop()}},r)}));return function(u){return n.apply(this,arguments)}}();(0,s.useEffect)(function(){k(),q(),S({code:K})},[]);var U=function(r){return r?parseFloat((r/1e5).toFixed(2)):0},ee=function(r){var u=r+"";return u.slice(4,6)+"/"+u.slice(6,8)},_e=L.map(function(n){return{date:ee(n.date),income:U(n.income)}}),re={data:_e,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"+U(L.reduce(function(n,r){return n+(r.income?r.income:0)},0))+"\u5143",height:400,label:{text:function(r){return r.income>0?r.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,e.jsxs)(A._z,{children:[(0,e.jsx)(a.Z,{onResize:function(r){X(r.width<596)},children:(0,e.jsx)(m.Z,{children:(0,e.jsxs)(m.Z.Group,{direction:V?"column":"row",children:[(0,e.jsx)(m.Z,{statistic:{title:"\u7D2F\u8BA1\u6536\u5165\uFF08\u5143\uFF09",value:U(E==null?void 0:E.totalIncome)}}),(0,e.jsx)(m.Z,{statistic:{title:"\u6628\u65E5\u6536\u5165\uFF08\u5143\uFF09",value:U(E==null?void 0:E.yesterdayIncome)}})]})})},"resize-observer"),(0,e.jsxs)("div",{style:{marginTop:"20px",padding:"40px",backgroundColor:"white"},children:[(0,e.jsxs)(C.t,{defaultCollapsed:!0,split:!0,onFinish:S,children:[(0,e.jsx)(p.Z,{name:"code",label:"\u5E94\u7528",options:J.map(function(n){return{label:n.name,value:n.code}})}),(0,e.jsx)(p.Z,{label:"\u5E73\u53F0",name:"platform",valueEnum:{1:"\u7A7F\u5C71\u7532",2:"\u817E\u8BAF",5:"\u5FEB\u624B",7:"Sigmob"}}),(0,e.jsx)(g.Z,{fieldProps:{disabledDate:function(r){return r&&r>=t()().startOf("day")}},name:"date",label:"\u65F6\u95F4"})]}),(0,e.jsx)(D.Z,l()({},re))]})]})};M.default=w},80484:function(F,M,_){_.d(M,{OE:function(){return A},di:function(){return b},n4:function(){return g},sk:function(){return C}});var T=_(15009),l=_.n(T),R=_(97857),i=_.n(R),y=_(99289),d=_.n(y),c=_(35312);function v(t,a){return h.apply(this,arguments)}function h(){return h=_asyncToGenerator(_regeneratorRuntime().mark(function t(a,s){return _regeneratorRuntime().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",request("/api/admin/device/calc",_objectSpread({method:"GET",params:_objectSpread({},a)},s||{})));case 1:case"end":return e.stop()}},t)})),h.apply(this,arguments)}function b(t,a){return D.apply(this,arguments)}function D(){return D=d()(l()().mark(function t(a,s){return l()().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",(0,c.request)("/api/admin/device/incomeDaily",i()({method:"POST",headers:{"Content-Type":"application/json"},data:a},s||{})));case 1:case"end":return e.stop()}},t)})),D.apply(this,arguments)}function A(t,a){return m.apply(this,arguments)}function m(){return m=d()(l()().mark(function t(a,s){return l()().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",(0,c.request)("/api/admin/device/incomeOverview",i()({method:"GET",params:i()({},a)},s||{})));case 1:case"end":return e.stop()}},t)})),m.apply(this,arguments)}function C(t,a){return p.apply(this,arguments)}function p(){return p=d()(l()().mark(function t(a,s){return l()().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",(0,c.request)("/api/admin/device/list",i()({method:"GET",params:i()({},a)},s||{})));case 1:case"end":return e.stop()}},t)})),p.apply(this,arguments)}function g(t,a){return O.apply(this,arguments)}function O(){return O=d()(l()().mark(function t(a,s){return l()().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",(0,c.request)("/api/admin/device/offline",i()({method:"POST",params:i()({},a)},s||{})));case 1:case"end":return e.stop()}},t)})),O.apply(this,arguments)}}}]);
|
|
|