"use strict";(self.webpackChunkant_design_pro=self.webpackChunkant_design_pro||[]).push([[371],{35431:function(L,M,e){e.r(M);var y=e(97857),c=e.n(y),U=e(15009),n=e.n(U),R=e(99289),v=e.n(R),j=e(5574),A=e.n(j),D=e(48357),C=e(90930),O=e(85601),I=e(35312),T=e(13169),x=e(16250),E=e(67294),P=e(80484),o=e(85893),_=function(){var m=(0,E.useRef)(),b=(0,E.useRef)(),r=(0,E.useState)(0),B=A()(r,2),K=B[0],W=B[1],w=(0,I.useIntl)(),$=(0,I.useModel)("@@initialState"),g=$.initialState,f=g==null?void 0:g.currentUser,S=function(){var p=v()(n()().mark(function u(){var a,i,d;return n()().wrap(function(h){for(;;)switch(h.prev=h.next){case 0:return h.next=2,(0,D.ln)();case 2:return i=h.sent,d=[],(a=i.data)===null||a===void 0||a.forEach(function(t){d.push({label:t.name,value:t.code})}),h.abrupt("return",d);case 6:case"end":return h.stop()}},u)}));return function(){return p.apply(this,arguments)}}(),N=function(){var p=v()(n()().mark(function u(a){var i,d,l;return n()().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if(a.appName){t.next=2;break}return t.abrupt("return",{data:[],total:0,success:!0});case 2:return t.next=4,(0,P.sk)({appCode:a.appName?a.appName:""});case 4:return d=t.sent,d.data&&W((l=d.data)===null||l===void 0?void 0:l.filter(function(H){return H.status===0}).length),t.abrupt("return",{data:d.data,total:(i=d.data)===null||i===void 0?void 0:i.length,success:!0});case 7:case"end":return t.stop()}},u)}));return function(a){return p.apply(this,arguments)}}(),G=function(){var p=v()(n()().mark(function u(a){var i;return n()().wrap(function(l){for(;;)switch(l.prev=l.next){case 0:if(a){l.next=2;break}return l.abrupt("return");case 2:return l.next=4,(0,P.n4)({deviceId:a});case 4:(i=b.current)===null||i===void 0||i.reload();case 5:case"end":return l.stop()}},u)}));return function(a){return p.apply(this,arguments)}}(),Z=[{title:"\u5E94\u7528\u540D\u79F0",dataIndex:"appName",valueType:"textarea",request:S},{title:"\u8BBE\u5907id",dataIndex:"deviceId",valueType:"textarea",ellipsis:!0,copyable:!0},{title:"\u5E73\u53F0",dataIndex:"platform",valueEnum:{1:{text:"\u7A7F\u5C71\u7532"},2:{text:"\u817E\u8BAF"},5:{text:"\u5FEB\u624B"},7:{text:"Sigmob"}}},{title:"ecpm(\u5143)",dataIndex:"ecpm",hideInSearch:!0,renderText:function(u){return u/100}},{title:"ecpm-\u62BD\u6210\u540E(\u5143)",dataIndex:"deductEcpm",hideInSearch:!0,renderText:function(u,a){return f!=null&&f.incomeRate&&a.ecpm?Math.floor(a.ecpm*f.incomeRate/100)/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"}],F=[{title:"\u5E94\u7528\u540D\u79F0",dataIndex:"appName",valueType:"textarea",request:S,hideInTable:!0},{title:"\u8BBE\u5907id",dataIndex:"deviceId",valueType:"text",ellipsis:!0,width:400,copyable:!0,hideInSearch:!0},{title:"\u72B6\u6001",dataIndex:"status",valueEnum:{0:{text:"\u6B63\u5E38"},"-1":{text:"\u5DF2\u4E0B\u7EBF"}},filters:!0,onFilter:!0,hideInSearch:!0},{title:"\u7ED1\u5B9A\u65F6\u95F4",hideInSearch:!0,dataIndex:"createdAt",valueType:"dateTime"},{title:"\u64CD\u4F5C",dataIndex:"operation",hideInSearch:!0,render:function(u,a){return a.status===0?(0,o.jsx)("a",{onClick:function(){return G(a.deviceId)},children:"\u4E0B\u7EBF"}):null}}],z=function(){var p=v()(n()().mark(function u(a){var i,d,l;return n()().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if(a.appName){t.next=2;break}return t.abrupt("return",{data:[],total:0,success:!0});case 2:return t.next=4,(0,D._5)(c()(c()({},a),{},{code:a.appName}));case 4:return l=t.sent,t.abrupt("return",{data:(i=l.data)===null||i===void 0?void 0:i.data,total:(d=l.data)===null||d===void 0?void 0:d.total,success:!0});case 6:case"end":return t.stop()}},u)}));return function(a){return p.apply(this,arguments)}}();return(0,o.jsx)(C._z,{children:(0,o.jsxs)(T.Z,{defaultActiveKey:"1",centered:!0,style:{backgroundColor:"white",padding:"20px"},children:[(0,o.jsxs)(x.Z,{tab:"\u8BBE\u5907\u5217\u8868",children:[(0,o.jsx)("p",{style:{textAlign:"center"},children:"\u6B63\u5E38\u4F7F\u7528\u8BBE\u5907\u6570\uFF1A"+K+"\uFF0C\u5269\u4F59\u53EF\u7ED1\u5B9A\u8BBE\u5907\u6570\uFF1A"+Math.max(0,(f!=null&&f.deviceCnt?f.deviceCnt:0)-K)}),(0,o.jsx)(O.Z,{actionRef:b,rowKey:"id",request:N,columns:F})]},"1"),(0,o.jsx)(x.Z,{tab:"\u5E7F\u544A\u8BE6\u60C5",children:(0,o.jsx)(O.Z,{headerTitle:w.formatMessage({id:"pages.searchTable.title",defaultMessage:"Enquiry form"}),actionRef:m,rowKey:"id",search:{labelWidth:120},request:z,columns:Z})},"2")]})})};M.default=_},80484:function(L,M,e){e.d(M,{OE:function(){return I},di:function(){return C},n4:function(){return P},sk:function(){return x}});var y=e(15009),c=e.n(y),U=e(97857),n=e.n(U),R=e(99289),v=e.n(R),j=e(35312);function A(_,s){return D.apply(this,arguments)}function D(){return D=_asyncToGenerator(_regeneratorRuntime().mark(function _(s,m){return _regeneratorRuntime().wrap(function(r){for(;;)switch(r.prev=r.next){case 0:return r.abrupt("return",request("/api/admin/device/calc",_objectSpread({method:"GET",params:_objectSpread({},s)},m||{})));case 1:case"end":return r.stop()}},_)})),D.apply(this,arguments)}function C(_,s){return O.apply(this,arguments)}function O(){return O=v()(c()().mark(function _(s,m){return c()().wrap(function(r){for(;;)switch(r.prev=r.next){case 0:return r.abrupt("return",(0,j.request)("/api/admin/device/incomeDaily",n()({method:"POST",headers:{"Content-Type":"application/json"},data:s},m||{})));case 1:case"end":return r.stop()}},_)})),O.apply(this,arguments)}function I(_,s){return T.apply(this,arguments)}function T(){return T=v()(c()().mark(function _(s,m){return c()().wrap(function(r){for(;;)switch(r.prev=r.next){case 0:return r.abrupt("return",(0,j.request)("/api/admin/device/incomeOverview",n()({method:"GET",params:n()({},s)},m||{})));case 1:case"end":return r.stop()}},_)})),T.apply(this,arguments)}function x(_,s){return E.apply(this,arguments)}function E(){return E=v()(c()().mark(function _(s,m){return c()().wrap(function(r){for(;;)switch(r.prev=r.next){case 0:return r.abrupt("return",(0,j.request)("/api/admin/device/list",n()({method:"GET",params:n()({},s)},m||{})));case 1:case"end":return r.stop()}},_)})),E.apply(this,arguments)}function P(_,s){return o.apply(this,arguments)}function o(){return o=v()(c()().mark(function _(s,m){return c()().wrap(function(r){for(;;)switch(r.prev=r.next){case 0:return r.abrupt("return",(0,j.request)("/api/admin/device/offline",n()({method:"POST",params:n()({},s)},m||{})));case 1:case"end":return r.stop()}},_)})),o.apply(this,arguments)}}}]);