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

"use strict";(self.webpackChunkant_design_pro=self.webpackChunkant_design_pro||[]).push([[371],{89793:function(Y,b,a){a.r(b),a.d(b,{default:function(){return K}});var w=a(97857),f=a.n(w),D=a(15009),d=a.n(D),N=a(99289),h=a.n(N),M=a(5574),B=a.n(M),E=a(48357),O=a(90930),R=a(85601),I=a(35312),Z=a(13169),$=a(16250),y=a(67294);function P(m,o){return T.apply(this,arguments)}function T(){return T=h()(d()().mark(function m(o,x){return d()().wrap(function(l){for(;;)switch(l.prev=l.next){case 0:return l.abrupt("return",(0,I.request)("/api/admin/device/list",f()({method:"GET",params:f()({},o)},x||{})));case 1:case"end":return l.stop()}},m)})),T.apply(this,arguments)}function F(m,o){return g.apply(this,arguments)}function g(){return g=h()(d()().mark(function m(o,x){return d()().wrap(function(l){for(;;)switch(l.prev=l.next){case 0:return l.abrupt("return",(0,I.request)("/api/admin/device/offline",f()({method:"POST",params:f()({},o)},x||{})));case 1:case"end":return l.stop()}},m)})),g.apply(this,arguments)}var c=a(85893),G=function(){var o=(0,y.useRef)(),x=(0,y.useRef)(),S=(0,y.useState)(0),l=B()(S,2),j=l[0],U=l[1],L=(0,I.useIntl)(),z=(0,I.useModel)("@@initialState"),C=z.initialState,v=C==null?void 0:C.currentUser,A=function(){var s=h()(d()().mark(function r(){var e,n,i;return d()().wrap(function(p){for(;;)switch(p.prev=p.next){case 0:return p.next=2,(0,E.ln)();case 2:return n=p.sent,i=[],(e=n.data)===null||e===void 0||e.forEach(function(t){i.push({label:t.name,value:t.code})}),p.abrupt("return",i);case 6:case"end":return p.stop()}},r)}));return function(){return s.apply(this,arguments)}}(),W=function(){var s=h()(d()().mark(function r(e){var n,i,u;return d()().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if(e.appName){t.next=2;break}return t.abrupt("return",{data:[],total:0,success:!0});case 2:return t.next=4,P({appCode:e.appName?e.appName:""});case 4:return i=t.sent,i.data&&U((u=i.data)===null||u===void 0?void 0:u.filter(function(X){return X.status===0}).length),t.abrupt("return",{data:i.data,total:(n=i.data)===null||n===void 0?void 0:n.length,success:!0});case 7:case"end":return t.stop()}},r)}));return function(e){return s.apply(this,arguments)}}(),H=function(){var s=h()(d()().mark(function r(e){var n;return d()().wrap(function(u){for(;;)switch(u.prev=u.next){case 0:if(e){u.next=2;break}return u.abrupt("return");case 2:return u.next=4,F({deviceId:e});case 4:(n=x.current)===null||n===void 0||n.reload();case 5:case"end":return u.stop()}},r)}));return function(e){return s.apply(this,arguments)}}(),J=[{title:"\u5E94\u7528\u540D\u79F0",dataIndex:"appName",valueType:"textarea",request:A},{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:"\u5E7F\u544A\u7C7B\u578B",dataIndex:"advType",valueEnum:{1:{text:"\u6A2A\u5E45",status:"Default"},2:{text:"\u63D2\u9875",status:"Processing"},3:{text:"\u6FC0\u52B1\u89C6\u9891",status:"Success"}}},{title:"ecpm(\u5143)",dataIndex:"ecpm",hideInSearch:!0,renderText:function(r){return r/100}},{title:"ecpm-\u62BD\u6210\u540E(\u5143)",dataIndex:"deductEcpm",hideInSearch:!0,renderText:function(r,e){return v!=null&&v.incomeRate&&e.ecpm?Math.floor(e.ecpm*v.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"}],Q=[{title:"\u5E94\u7528\u540D\u79F0",dataIndex:"appName",valueType:"textarea",request:A,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"}},