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.4 KiB

"use strict";(self.webpackChunkant_design_pro=self.webpackChunkant_design_pro||[]).push([[857],{46701:function(le,O,t){t.r(O);var U=t(15009),u=t.n(U),B=t(97857),E=t.n(B),g=t(99289),D=t.n(g),K=t(5574),f=t.n(K),L=t(92296),o=t(31847),S=t(90930),W=t(85601),Z=t(57470),P=t(64317),F=t(34540),z=t(35312),$=t(13169),I=t(16250),N=t(27484),w=t.n(N),G=t(9220),c=t(67294),H=t(96974),x=t(48357),n=t(85893),J=function(){var j=(0,c.useRef)(),Q=(0,z.useIntl)(),d=function(){return window.innerWidth<=768},V=(0,c.useState)({deviceId:{show:!d()},appName:{show:!d()},platform:{show:!d()},deviceBrand:{show:!d()},deviceName:{show:!d()},ip:{show:!d()},advType:{show:!d()}}),T=f()(V,2),X=T[0],Y=T[1],k=[{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:"\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(e){return e/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=(0,H.UO)(),p=q.code,ee=function(){var a=D()(u()().mark(function e(i){var s,l,r;return u()().wrap(function(v){for(;;)switch(v.prev=v.next){case 0:return v.next=2,(0,x._5)(E()(E()({},i),{},{code:p}));case 2:return r=v.sent,v.abrupt("return",{data:(s=r.data)===null||s===void 0?void 0:s.data,total:(l=r.data)===null||l===void 0?void 0:l.total,success:!0});case 4:case"end":return v.stop()}},e)}));return function(i){return a.apply(this,arguments)}}(),te=(0,c.useState)(),b=f()(te,2),_=b[0],ae=b[1],ne=(0,c.useState)([]),y=f()(ne,2),C=y[0],re=y[1],M=o.Z.Divider,se=(0,c.useState)(!1),R=f()(se,2),h=R[0],_e=R[1],ie=function(){var a=D()(u()().mark(function e(i){var s;return u()().wrap(function(r){for(;;)switch(r.prev=r.next){case 0:return r.next=2,(0,x.d1)({appCode:i});case 2:s=r.sent,s.data&&ae(s.data);case 4:case"end":return r.stop()}},e)}));return function(i){return a.apply(this,arguments)}}(),A=function(){var a=D()(u()().mark(function e(i){var s;return u()().wrap(function(r){for(;;)switch(r.prev=r.next){case 0:return r.next=2,(0,x.Zb)(E()(E()({},i),{},{code:p}));case 2:s=r.sent,s.data&&re(s.data);case 4:case"end":return r.stop()}},e)}));return function(i){return a.apply(this,arguments)}}();(0,c.useEffect)(function(){var a;(a=j.current)===null||a===void 0||a.reload(),ie(p),A({code:p})},[p]);var m=function(e){return e?parseFloat((e/1e5).toFixed(2)):0},oe=C.map(function(a){return{date:function(){var e=a.date+"",i=e.slice(0,4),s=e.slice(4,6),l=e.slice(6,8);return"".concat(i,"-").concat(s,"-").concat(l)}(),income:m(a.income)}}),de={data:oe,xField:"date",yField:"income",tooltip:{name:"\u6536\u5165",field:"income"},axis:{date:{title:"\u65E5\u671F"}},title:"\u7D2F\u8BA1"+m(C.reduce(function(a,e){return a+(e.income?e.income:0)},0))+"\u5143",height:400,label:{text:function(e){return e.income>0?e.income:""},textBaseline:"bottom"}};return(0,n.jsx)(S._z,{children:(0,n.jsxs)($.Z,{defaultActiveKey:"1",centered:!0,style:{backgroundColor:"white",padding:"20px"},children:[(0,n.jsx)(I.Z,{tab:"\u5E7F\u544A\u8BE6\u60C5",children:(0,n.jsx)(W.Z,{headerTitle:Q.formatMessage({id:"pages.searchTable.title",defaultMessage:"Enquiry form"}),actionRef:j,rowKey:"key",search:{labelWidth:120},request:ee,columns:k,columnsState:{value:X,onChange:function(e){Y(e)}}})