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