"use strict";(self.webpackChunkant_design_pro=self.webpackChunkant_design_pro||[]).push([[542],{40110:function(te,b,t){var w=t(1413),x=t(67294),K=t(509),m=t(91146),W=function(S,C){return x.createElement(m.Z,(0,w.Z)((0,w.Z)({},S),{},{ref:C,icon:K.Z}))},D=x.forwardRef(W);b.Z=D},61999:function(te,b,t){t.r(b),t.d(b,{default:function(){return Te}});var w=t(97857),x=t.n(w),K=t(15009),m=t.n(K),W=t(99289),D=t.n(W),H=t(5574),S=t.n(H),C=t(48357),ae=t(78677),E=t(39615),ne=t(90930),re=t(67539),ie=t(57470),V=t(64317),de=t(34540),se=t(13169),le=t(71230),Q=t(15746),J=t(16250),ue=t(27484),X=t.n(ue),oe=t(9220),f=t(67294),ce=t(96974),v=t(58125),ve=t(26839),N=function(){return N=Object.assign||function(Z){for(var d,T=1,j=arguments.length;T=X()().startOf("day")},A=function(){var P=D()(m()().mark(function g(c){var i,I,s,n;return m()().wrap(function(R){for(;;)switch(R.prev=R.next){case 0:return R.next=2,(0,C.jD)(c);case 2:I=R.sent,s=[],(i=I.data)===null||i===void 0||i.forEach(function(l){l.advType===1&&s.push({type:"\u6A2A\u5E45",value:(0,v.P)(l.income)}),l.advType===2&&s.push({type:"\u63D2\u9875",value:(0,v.P)(l.income)}),l.advType===3&&s.push({type:"\u89C6\u9891",value:(0,v.P)(l.income)})}),n=s.reduce(function(l,L){return l+L.value},0),s.forEach(function(l){l.\u6536\u5165=l.value+"\u5143",n>0&&(l.\u767E\u5206\u6BD4=(l.value/n*100).toFixed(1)+"%")}),$(s);case 8:case"end":return R.stop()}},g)}));return function(c){return P.apply(this,arguments)}}(),F={data:p,title:{title:"\u5386\u53F2\u6570\u636E",align:"center"},angleField:"value",colorField:"type",height:200,marginTop:20,label:{text:"value",position:"outside"},legend:{color:{title:!1,position:"right",rowPadding:5}},tooltip:{title:"type",items:[{name:"\u6536\u5165",field:"\u6536\u5165"},{name:"\u5360\u6BD4",field:"\u767E\u5206\u6BD4"}]}},M=function(g,c){var i=parseInt(c[0]),I=parseInt(c[1]);A(i&&I?{code:d.appCode,beginDate:i,endDate:I}:{code:d.appCode})};return(0,f.useEffect)(function(){A({code:d.appCode})},[d.appCode]),(0,e.jsx)(e.Fragment,{children:(0,e.jsxs)(q.Z,{style:{height:300},children:[(0,e.jsx)(me,{onChange:M,format:"YYYYMMDD",disabledDate:y}),p.length>0&&(0,e.jsx)(k,x()({},F))]})})},ye=pe,ge=function(d){var T=(0,f.useState)([]),j=S()(T,2),p=j[0],$=j[1],y=function(){var F=D()(m()().mark(function M(){var P,g,c,i;return m()().wrap(function(s){for(;;)switch(s.prev=s.next){case 0:return s.next=2,(0,C.R2)({code:d.appCode});case 2:g=s.sent,c=[],(P=g.data)===null||P===void 0||P.forEach(function(n){n.advType===1&&c.push({type:"\u6A2A\u5E45",value:(0,v.P)(n.income)}),n.advType===2&&c.push({type:"\u63D2\u9875",value:(0,v.P)(n.income)}),n.advType===3&&c.push({type:"\u89C6\u9891",value:(0,v.P)(n.income)})}),i=c.reduce(function(n,z){return n+z.value},0),c.forEach(function(n){n.\u6536\u5165=n.value+"\u5143",i>0&&(n.\u767E\u5206\u6BD4=(n.value/i*100).toFixed(1)+"%")}),$(c);case 8:case"end":return s.stop()}},M)}));return function(){return F.apply(this,arguments)}}(),A={data:p,title:{title:"\u4ECA\u65E5\u6570\u636E",align:"center"},angleField:"value",colorField:"type",height:200,marginTop:20,label:{text:"value",position:"outside"},legend:{color:{title:!1,position:"right",rowPadding:5}},tooltip:{title:"type",items:[{name:"\u6536\u5165",field:"\u6536\u5165"},{name:"\u5360\u6BD4",field:"\u767E\u5206\u6BD4"}]}};return(0,f.useEffect)(function(){y()},[d.appCode]),(0,e.jsx)(e.Fragment,{children:(0,e.jsx)(q.Z,{style:{height:300},children:p.length>0&&(0,e.jsx)(k,x()({},A))})})},xe=ge,je=t(42767),Se=function(){var d=(0,f.useRef)(),T=(0,f.useState)(void 0),j=S()(T,2),p=j[0],$=j[1],y=function(){return window.innerWidth<=768},A=(0,f.useState)({deviceId:{show:!y()},appName:{show:!y()},platform:{show:!y()},deviceBrand:{show:!y()},deviceName:{show:!y()},ip:{show:!y()},advType:{show:!y()}}),F=S()(A,2),M=F[0],P=F[1],g=[{title:"\u7528\u6237id",hideInTable:!0,dataIndex:"userId"},{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",width:80,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:"Success"},2:{text:"\u63D2\u9875",status:"Success"},3:{text:"\u6FC0\u52B1\u89C6\u9891",status:"Success"}}},{title:"ecpm(\u5143)",dataIndex:"ecpm",hideInSearch:!0,renderText:function(a){return a/100}},{title:"\u5355\u6761\u6536\u5165(\u5143)",dataIndex:"ecpm",hideInSearch:!0,renderText:function(a){return(0,v.P)(a)}},{title:"\u8BBE\u5907",dataIndex:"device",hideInSearch:!0,renderText:function(a,u){return(0,e.jsxs)(e.Fragment,{children:[(0,e.jsx)("p",{children:u.deviceBrand}),(0,e.jsx)("p",{children:u.deviceName})]})}},{title:"ip",dataIndex:"ip",hideInSearch:!0,valueType:"textarea"},{title:"\u4EE3\u7406",dataIndex:"adminName",hideInSearch:!0,valueType:"textarea"},{title:"\u7528\u6237",dataIndex:"user",hideInSearch:!0,width:150,renderText:function(a,u){if(u.user)return(0,e.jsx)(je.Z,{data:u.user})}},{title:"\u65F6\u95F4",hideInSearch:!0,dataIndex:"createdAt",valueType:"dateTime"},{title:"\u65F6\u95F4",hideInTable:!0,dataIndex:"createdAt",valueType:"dateRange"}],c=(0,ce.UO)(),i=c.code,I=(0,f.useState)(),s=S()(I,2),n=s[0],z=s[1],R=(0,f.useState)([]),l=S()(R,2),L=l[0],Pe=l[1],Y=E.Z.Divider,Ie=(0,f.useState)(!1),_=S()(Ie,2),U=_[0],De=_[1],Ce=function(){var r=D()(m()().mark(function a(u){var h;return m()().wrap(function(o){for(;;)switch(o.prev=o.next){case 0:return o.next=2,(0,C.d1)({appCode:u});case 2:h=o.sent,h.data&&z(h.data);case 4:case"end":return o.stop()}},a)}));return function(u){return r.apply(this,arguments)}}(),ee=function(){var r=D()(m()().mark(function a(u){var h;return m()().wrap(function(o){for(;;)switch(o.prev=o.next){case 0:return o.next=2,(0,C.Zb)(x()(x()({},u),{},{code:i}));case 2:h=o.sent,h.data&&Pe(h.data);case 4:case"end":return o.stop()}},a)}));return function(u){return r.apply(this,arguments)}}();(0,f.useEffect)(function(){var r;(r=d.current)===null||r===void 0||r.reload(),Ce(i),ee({code:i})},[i]);var Ee=L.map(function(r){return{date:function(){var a=r.date+"",u=a.slice(0,4),h=a.slice(4,6),O=a.slice(6,8);return"".concat(u,"-").concat(h,"-").concat(O)}(),income:(0,v.P)(r.income)}}),Ze={data:Ee,xField:"date",yField:"income",tooltip:{name:"\u6536\u5165",field:"income"},axis:{date:{title:"\u65E5\u671F"}},title:"\u7D2F\u8BA1"+(0,v.P)(L.reduce(function(r,a){return r+(a.income?a.income:0)},0))+"\u5143",height:400,label:{text:function(a){return a.income>0?a.income:""},textBaseline:"bottom"}};return(0,e.jsx)(ne._z,{children:(0,e.jsxs)(se.Z,{defaultActiveKey:"1",centered:!0,style:{backgroundColor:"white",padding:"20px"},children:[(0,e.jsx)(J.Z,{tab:"\u5E7F\u544A\u8BE6\u60C5",children:(0,e.jsx)(re.Z,{headerTitle:p?"\u8868\u683C\u7D2F\u8BA1\uFF1A"+(0,v.P)(p)+"\u5143":"",actionRef:d,rowKey:"key",search:{labelWidth:120},request:function(){var r=D()(m()().mark(function a(u){var h,O,o,G;return m()().wrap(function(B){for(;;)switch(B.prev=B.next){case 0:return B.next=2,(0,C._5)(x()(x()({},u),{},{code:i}));case 2:return o=B.sent,u.current===1&&$((G=o.data)===null||G===void 0?void 0:G.sum),B.abrupt("return",{data:(h=o.data)===null||h===void 0?void 0:h.data,total:(O=o.data)===null||O===void 0?void 0:O.total,success:!0});case 5:case"end":return B.stop()}},a)}));return function(a){return r.apply(this,arguments)}}(),columns:g,columnsState:{value:M,onChange:function(a){P(a)}}})},"1"),(0,e.jsxs)(J.Z,{tab:"\u6570\u636E\u603B\u89C8",children:[(0,e.jsx)(oe.Z,{onResize:function(a){De(a.width<596)},children:(0,e.jsx)(E.Z,{children:(0,e.jsxs)(E.Z.Group,{direction:U?"column":"row",children:[(0,e.jsx)(E.Z,{statistic:{title:"\u4E0A\u6708\u6536\u5165\uFF08\u5143\uFF09",value:(0,v.P)(n==null?void 0:n.lastMonthIncome)}}),(0,e.jsx)(Y,{type:U?"horizontal":"vertical"}),(0,e.jsx)(E.Z,{statistic:{title:"\u672C\u6708\u6536\u5165\uFF08\u5143\uFF09",value:(0,v.P)(n==null?void 0:n.thisMonthIncome)}}),(0,e.jsx)(Y,{type:U?"horizontal":"vertical"}),(0,e.jsx)(E.Z,{statistic:{title:"\u4ECA\u65E5\u6536\u5165\uFF08\u5143\uFF09",value:(0,v.P)(n==null?void 0:n.todayIncome)}}),(0,e.jsx)(Y,{type:U?"horizontal":"vertical"}),(0,e.jsx)(E.Z,{statistic:{title:"\u6628\u65E5\u6536\u5165\uFF08\u5143\uFF09",value:(0,v.P)(n==null?void 0:n.yesterdayIncome)}})]})})},"resize-observer"),(0,e.jsxs)(le.Z,{children:[(0,e.jsx)(Q.Z,{span:10,offset:1,children:(0,e.jsx)(ye,{appCode:i||""})}),(0,e.jsx)(Q.Z,{span:10,offset:2,children:(0,e.jsx)(xe,{appCode:i||""})})]}),(0,e.jsxs)(ie.t,{defaultCollapsed:!0,split:!0,onFinish:ee,children:[(0,e.jsx)(V.Z,{label:"\u5E73\u53F0",name:"platform",valueEnum:{1:"\u7A7F\u5C71\u7532",2:"\u817E\u8BAF",3:"\u767E\u5EA6\u8054\u76DF",4:"Mintegral",5:"\u5FEB\u624B",6:"\u6E38\u53EF\u8D62",7:"Sigmob",8:"Admob"}}),(0,e.jsx)(V.Z,{name:"advType",label:"\u5E7F\u544A\u7C7B\u578B",valueEnum:{1:"\u6A2A\u5E45",2:"\u63D2\u9875",3:"\u6FC0\u52B1\u89C6\u9891"}}),(0,e.jsx)(de.Z,{fieldProps:{disabledDate:function(a){return a&&a>=X()().startOf("day")}},name:"date",label:"\u65F6\u95F4"})]}),(0,e.jsx)(ae.Z,x()({},Ze))]},"2")]})})},Te=Se}}]);