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

"use strict";(self.webpackChunkant_design_pro=self.webpackChunkant_design_pro||[]).push([[371],{35431:function(w,I,e){e.r(I);var U=e(97857),m=e.n(U),C=e(15009),_=e.n(C),R=e(99289),v=e.n(R),j=e(5574),g=e.n(j),D=e(48357),A=e(90930),M=e(85601),x=e(35312),T=e(13169),P=e(16250),f=e(67294),y=e(80484),o=e(85893),s=function(){var p=(0,f.useRef)(),b=(0,f.useRef)(),r=(0,f.useState)(0),B=g()(r,2),K=B[0],$=B[1],N=(0,x.useIntl)(),G=(0,x.useModel)("@@initialState"),S=G.initialState,h=S==null?void 0:S.currentUser,L=function(){var c=v()(_()().mark(function n(){var t,i,d;return _()().wrap(function(E){for(;;)switch(E.prev=E.next){case 0:return E.next=2,(0,D.ln)();case 2:return i=E.sent,d=[],(t=i.data)===null||t===void 0||t.forEach(function(a){d.push({label:a.name,value:a.code})}),E.abrupt("return",d);case 6:case"end":return E.stop()}},n)}));return function(){return c.apply(this,arguments)}}(),O=function(){return window.innerWidth<=768},Z=function(){var c=v()(_()().mark(function n(t){var i,d,l;return _()().wrap(function(a){for(;;)switch(a.prev=a.next){case 0:if(t.appName){a.next=2;break}return a.abrupt("return",{data:[],total:0,success:!0});case 2:return a.next=4,(0,y.sk)({appCode:t.appName?t.appName:""});case 4:return d=a.sent,d.data&&$((l=d.data)===null||l===void 0?void 0:l.filter(function(Y){return Y.status===0}).length),a.abrupt("return",{data:d.data,total:(i=d.data)===null||i===void 0?void 0:i.length,success:!0});case 7:case"end":return a.stop()}},n)}));return function(t){return c.apply(this,arguments)}}(),F=function(){var c=v()(_()().mark(function n(t){var i;return _()().wrap(function(l){for(;;)switch(l.prev=l.next){case 0:if(t){l.next=2;break}return l.abrupt("return");case 2:return l.next=4,(0,y.n4)({deviceId:t});case 4:(i=b.current)===null||i===void 0||i.reload();case 5:case"end":return l.stop()}},n)}));return function(t){return c.apply(this,arguments)}}(),z=(0,f.useState)({deviceId:{show:!O()},appName:{show:!O()},platform:{show:!O()},deviceBrand:{show:!O()},deviceName:{show:!O()},ip:{show:!O()}}),W=g()(z,2),H=W[0],J=W[1],Q=[{title:"\u5E94\u7528\u540D\u79F0",dataIndex:"appName",valueType:"textarea",request:L},{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(n){return n/100}},{title:"ecpm-\u62BD\u6210\u540E(\u5143)",dataIndex:"deductEcpm",hideInSearch:!0,renderText:function(n,t){return h!=null&&h.incomeRate&&t.ecpm?Math.floor(t.ecpm*h.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"}],V=[{title:"\u5E94\u7528\u540D\u79F0",dataIndex:"appName",valueType:"textarea",request:L,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(n,t){return t.status===0?(0,o.jsx)("a",{onClick:function(){return F(t.deviceId)},children:"\u4E0B\u7EBF"}):null}}],X=function(){var c=v()(_()().mark(function n(t){var i,d,l;return _()().wrap(function(a){for(;;)switch(a.prev=a.next){case 0:if(t.appName){a.next=2;break}return a.abrupt("return",{data:[],total:0,success:!0});case 2:return a.next=4,(0,D._5)(m()(m()({},t),{},{code:t.appName}));case 4:return l=a.sent,a.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 a.stop()}},n)}));return function(t){return c.apply(this,arguments)}}();return(0,o.jsx)(A._z,{children:(0,o.jsxs)(T.Z,{defaultActiveKey:"1",centered:!0,style:{backgroundColor:"white",padding:"20px"},children:[(0,o.jsxs)(P.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,(h!=null&&h.deviceCnt?h.deviceCnt:0)-K)}),(0,o.jsx)(M.Z,{actionRef:b,rowKey:"id",request:Z,columns:V})]},"1"),(0,o.jsx)(P.Z,{tab:"\u5E7F\u544A\u8BE6\u60C5",children:(0,o.jsx)(M.Z,{headerTitle:N.formatMessage({id:"pages.searchTable.title",defaultMessage:"Enquiry form"}),actionRef:p,rowKey:"id",search:{labelWidth:120},request:X,columns:Q,columnsState:{value:H,onChange:function(n){J(n)}}})},"2")]})})};I.default=s},80484:function(w,I,e){e.d(I,{OE:function(){return x},di:function(){return A},n4:function(){return y},sk:function(){return P}});var U=e(15009),m=e.n(U),C=e(97857),_=e.n(C),R=e(99289),v=e.n(R),j=e(35312);function g(s,u){return D.apply(this,arguments)}function D(){return D=_asyncToGenerator(_regeneratorRuntime().mark(function s(u,p){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({},u)},p||{})));case 1:case"end":return r.stop()}},s)})),D.apply(this,arguments)}function A(s,u){return M.apply(this,arguments)}function M(){return M=v()(m()().mark(function s(u,p){return m()().wrap(function(r){for(;;)switch(r.prev=r.next){case 0:return r.abrupt("return",(0,j.request)("/api/admin/device/incomeDaily",_()({method:"POST",headers:{"Content-Type":"application/json"},data:u},p||{})));case 1:case"end":return r.stop()}},s)})),M.apply(this,arguments)}function x(s,u){return T.apply(this,arguments)}function T(){return T=v()(m()().mark(function s(u,p){return m()().wrap(function(r){for(;;)switch(r.prev=r.next){case 0:return r.abrupt("return",(0,j.request)("/api/admin/device/incomeOverview",_()({method:"GET",params:_()({},u)},p||{})));case 1:case"end":return r.stop()}},s)})),T.apply(this,arguments)}function P(s,u){return f.apply(this,arguments)}function f(){return f=v()(m()().mark(function s(u,p){return m()().wrap(function(r){for(;;)switch(r.prev=r.next){case 0:return r.abrupt("return",(0,j.request)("/api/admin/device/list",_()({method:"GET",params:_()({},u)},p||{})));case 1:case"end":return r.stop()}},s)})),f.apply(this,arguments)}function y(s,u){return o.apply(this,arguments)}function o(){return o=v()(m()().mark(function s(u,p){return m()().wrap(function(r){for(;;)switch(r.prev=r.next){case 0:return r.abrupt("return",(0,j.request)("/api/admin/device/offline",_()({method:"POST",params:_()({},u)},p||{})));case 1:case"end":return r.stop()}},s)})),o.apply(this,arguments)}}}]);