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
9.8 KiB
2 lines
9.8 KiB
7 months ago
|
"use strict";(self.webpackChunkant_design_pro=self.webpackChunkant_design_pro||[]).push([[371],{89793:function(Be,P,i){i.r(P),i.d(P,{default:function(){return fe}});var H=i(97857),f=i.n(H),J=i(15009),l=i.n(J),V=i(99289),h=i.n(V),X=i(5574),R=i.n(X),Y=i(90930),z=i(85601),w=i(31847),k=i(57470),q=i(64317),_=i(34540),S=i(35312),ee=i(13169),$=i(96074),Z=i(16250),te=i(9220),m=i(67294),ae=i(96974),re=i(48357);function Pe(d,c){return E.apply(this,arguments)}function E(){return E=_asyncToGenerator(_regeneratorRuntime().mark(function d(c,v){return _regeneratorRuntime().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",request("/api/admin/device/calc",_objectSpread({method:"GET",params:_objectSpread({},c)},v||{})));case 1:case"end":return t.stop()}},d)})),E.apply(this,arguments)}function ne(d,c){return O.apply(this,arguments)}function O(){return O=h()(l()().mark(function d(c,v){return l()().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",(0,S.request)("/api/admin/device/incomeDaily",f()({method:"POST",headers:{"Content-Type":"application/json"},data:c},v||{})));case 1:case"end":return t.stop()}},d)})),O.apply(this,arguments)}function ie(d,c){return b.apply(this,arguments)}function b(){return b=h()(l()().mark(function d(c,v){return l()().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",(0,S.request)("/api/admin/device/incomeOverview",f()({method:"GET",params:f()({},c)},v||{})));case 1:case"end":return t.stop()}},d)})),b.apply(this,arguments)}function ue(d,c){return A.apply(this,arguments)}function A(){return A=h()(l()().mark(function d(c,v){return l()().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",(0,S.request)("/api/admin/device/list",f()({method:"GET",params:f()({},c)},v||{})));case 1:case"end":return t.stop()}},d)})),A.apply(this,arguments)}function se(d,c){return F.apply(this,arguments)}function F(){return F=h()(l()().mark(function d(c,v){return l()().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",(0,S.request)("/api/admin/device/offline",f()({method:"POST",params:f()({},c)},v||{})));case 1:case"end":return t.stop()}},d)})),F.apply(this,arguments)}function le(d,c){return M.apply(this,arguments)}function M(){return M=h()(l()().mark(function d(c,v){return l()().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",(0,S.request)("/api/admin/device/online",f()({method:"POST",params:f()({},c)},v||{})));case 1:case"end":return t.stop()}},d)})),M.apply(this,arguments)}var ce=i(92296),de=i(27484),oe=i.n(de),s=i(85893),ve=function(){var c=(0,m.useRef)(),v=(0,m.useRef)(),g=(0,m.useState)(0),t=R()(g,2),G=t[0],pe=t[1],he=(0,m.useState)(!1),N=R()(he,2),D=N[0],me=N[1],ye=(0,S.useIntl)(),xe=(0,ae.UO)(),j=xe.code,Se=(0,S.useModel)("@@initialState"),B=Se.initialState,y=B==null?void 0:B.currentUser,ge=(0,m.useState)(),U=R()(ge,2),p=U[0],Ie=U[1],we=(0,m.useState)([]),K=R()(we,2),L=K[0],je=K[1],T=function(){return window.innerWidth<=768},Te=function(){var r=h()(l()().mark(function e(){var a,u,o;return l()().wrap(function(I){for(;;)switch(I.prev=I.next){case 0:return I.next=2,ue({appCode:j||""});case 2:return u=I.sent,u.data&&pe((o=u.data)===null||o===void 0?void 0:o.filter(function(x){return x.status===0}).length),I.abrupt("return",{data:u.data,total:(a=u.data)===null||a===void 0?void 0:a.length,success:!0});case 5:case"end":return I.stop()}},e)}));return function(){return r.apply(this,arguments)}}(),Ce=function(){var r=h()(l()().mark(function e(a){var u;return l()().wrap(function(n){for(;;)switch(n.prev=n.next){case 0:if(a){n.next=2;break}return n.abrupt("return");case 2:return n.next=4,se({deviceId:a});case 4:(u=v.current)===null||u===void 0||u.reload();case 5:case"end":return n.stop()}},e)}));return function(a){return r.apply(this,arguments)}}(),Re=function(){var r=h()(l()().mark(function e(a){var u;return l()().wrap(function(n){for(;;)switch(n.prev=n.next){case 0:if(a){n.next=2;break}return n.abrupt("return");case 2:return n.prev=2,n.next=5,le({deviceId:a});case 5:(u=v.cur
|