nili
9 months ago
27 changed files with 1057 additions and 836 deletions
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@ -1 +0,0 @@ |
|||||
"use strict";(self.webpackChunkant_design_pro=self.webpackChunkant_design_pro||[]).push([[857],{46701:function(O,i,e){e.r(i);var p=e(15009),d=e.n(p),v=e(99289),o=e.n(v),m=e(48357),h=e(90930),E=e(1507),f=e(35312),I=e(67294),c=e(85893),x=function(){var T=(0,I.useRef)(),M=(0,f.useIntl)(),D=function(){var u=o()(d()().mark(function a(){var s,_,r;return d()().wrap(function(n){for(;;)switch(n.prev=n.next){case 0:return n.next=2,(0,m.ln)();case 2:return _=n.sent,r=[],(s=_.data)===null||s===void 0||s.forEach(function(t){r.push({label:t.name,value:t.code})}),n.abrupt("return",r);case 6:case"end":return n.stop()}},a)}));return function(){return u.apply(this,arguments)}}(),P=[{title:"\u5E94\u7528\u540D\u79F0",hideInTable:!0,dataIndex:"code",valueType:"select",request:D},{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(a){return a/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"}];return(0,c.jsx)(h._z,{children:(0,c.jsx)(E.Z,{headerTitle:M.formatMessage({id:"pages.searchTable.title",defaultMessage:"Enquiry form"}),actionRef:T,rowKey:"key",search:{labelWidth:120},request:function(){var u=o()(d()().mark(function a(s){var _,r,l;return d()().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,(0,m._5)(s);case 2:return l=t.sent,t.abrupt("return",{data:(_=l.data)===null||_===void 0?void 0:_.data,total:(r=l.data)===null||r===void 0?void 0:r.total,success:!0});case 4:case"end":return t.stop()}},a)}));return function(a){return u.apply(this,arguments)}}(),columns:P})})};i.default=x}}]); |
|
@ -0,0 +1 @@ |
|||||
|
"use strict";(self.webpackChunkant_design_pro=self.webpackChunkant_design_pro||[]).push([[857],{46701:function(O,i,e){e.r(i);var p=e(15009),d=e.n(p),v=e(99289),o=e.n(v),h=e(90930),E=e(50624),f=e(35312),I=e(67294),m=e(48357),c=e(85893),x=function(){var T=(0,I.useRef)(),M=(0,f.useIntl)(),D=function(){var u=o()(d()().mark(function a(){var s,_,r;return d()().wrap(function(n){for(;;)switch(n.prev=n.next){case 0:return n.next=2,(0,m.ln)();case 2:return _=n.sent,r=[],(s=_.data)===null||s===void 0||s.forEach(function(t){r.push({label:t.name,value:t.code})}),n.abrupt("return",r);case 6:case"end":return n.stop()}},a)}));return function(){return u.apply(this,arguments)}}(),P=[{title:"\u5E94\u7528\u540D\u79F0",hideInTable:!0,dataIndex:"code",valueType:"select",request:D},{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(a){return a/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"}];return(0,c.jsx)(h._z,{children:(0,c.jsx)(E.Z,{headerTitle:M.formatMessage({id:"pages.searchTable.title",defaultMessage:"Enquiry form"}),actionRef:T,rowKey:"key",search:{labelWidth:120},request:function(){var u=o()(d()().mark(function a(s){var _,r,l;return d()().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,(0,m._5)(s);case 2:return l=t.sent,t.abrupt("return",{data:(_=l.data)===null||_===void 0?void 0:_.data,total:(r=l.data)===null||r===void 0?void 0:r.total,success:!0});case 4:case"end":return t.stop()}},a)}));return function(a){return u.apply(this,arguments)}}(),columns:P})})};i.default=x}}]); |
@ -0,0 +1 @@ |
|||||
|
"use strict";(self.webpackChunkant_design_pro=self.webpackChunkant_design_pro||[]).push([[628],{58451:function(_e,p,e){e.r(p);var b=e(97857),C=e.n(b),T=e(15009),r=e.n(T),R=e(99289),v=e.n(R),x=e(5574),m=e.n(x),E=e(48357),I=e(64289),i=e(31847),B=e(90930),g=e(57470),f=e(64317),K=e(34540),L=e(27484),W=e.n(L),y=e(9220),l=e(67294),S=e(96974),a=e(85893),Z=function(){var F=(0,l.useState)(),D=m()(F,2),o=D[0],z=D[1],G=(0,l.useState)([]),O=m()(G,2),P=O[0],$=O[1],H=(0,l.useState)([]),M=m()(H,2),J=M[0],N=M[1],Q=i.Z.Divider,V=(0,l.useState)(!1),h=m()(V,2),j=h[0],X=h[1],Y=(0,S.UO)(),A=Y.code,w=function(){var t=v()(r()().mark(function _(){var s;return r()().wrap(function(n){for(;;)switch(n.prev=n.next){case 0:return n.next=2,(0,E.d1)({appCode:A});case 2:s=n.sent,s.data&&z(s.data);case 4:case"end":return n.stop()}},_)}));return function(){return t.apply(this,arguments)}}(),k=function(){var t=v()(r()().mark(function _(){var s;return r()().wrap(function(n){for(;;)switch(n.prev=n.next){case 0:return n.next=2,(0,E.ln)();case 2:s=n.sent,s.data&&N(s.data);case 4:case"end":return n.stop()}},_)}));return function(){return t.apply(this,arguments)}}(),U=function(){var t=v()(r()().mark(function _(s){var u;return r()().wrap(function(d){for(;;)switch(d.prev=d.next){case 0:return console.log("fetchDaily"),console.log(s),d.next=4,(0,E.Zb)(s);case 4:u=d.sent,u.data&&$(u.data);case 6:case"end":return d.stop()}},_)}));return function(s){return t.apply(this,arguments)}}();(0,l.useEffect)(function(){w(),k(),U({code:A})},[]);var c=function(_){return _?parseFloat((_/1e5).toFixed(2)):0},q=P.map(function(t){return{date:t.date+"",income:c(t.income)}}),ee={data:q,xField:"date",yField:"income",theme:"classicDark",tooltip:{name:"\u6536\u5165",field:"income"},axis:{date:{title:"\u65E5\u671F"},income:{title:"\u6536\u5165\uFF08\u5143\uFF09"}},title:"\u7D2F\u8BA1"+c(P.reduce(function(t,_){return t+(_.income?_.income:0)},0))+"\u5143",height:400,label:{text:function(_){return _.\u6536\u5165>0?_.\u6536\u5165:""},textBaseline:"bottom"}};return(0,a.jsxs)(B._z,{children:[(0,a.jsx)(y.Z,{onResize:function(_){X(_.width<596)},children:(0,a.jsx)(i.Z,{children:(0,a.jsxs)(i.Z.Group,{direction:j?"column":"row",children:[(0,a.jsx)(i.Z,{statistic:{title:"\u7D2F\u8BA1\u6536\u5165\uFF08\u5143\uFF09",value:c(o==null?void 0:o.totalIncome)}}),(0,a.jsx)(Q,{type:j?"horizontal":"vertical"}),(0,a.jsx)(i.Z,{statistic:{title:"\u4ECA\u65E5\u6536\u5165\uFF08\u5143\uFF09",value:c(o==null?void 0:o.todayIncome)}})]})})},"resize-observer"),(0,a.jsxs)("div",{style:{marginTop:"20px",padding:"40px"},children:[(0,a.jsxs)(g.t,{defaultCollapsed:!0,split:!0,onFinish:U,children:[(0,a.jsx)(f.Z,{name:"code",label:"\u5E94\u7528",options:J.map(function(t){return{label:t.name,value:t.code}})}),(0,a.jsx)(f.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,a.jsx)(f.Z,{name:"advType",label:"\u5E7F\u544A\u7C7B\u578B",valueEnum:{1:"\u6A2A\u5E45",2:"\u63D2\u9875",3:"\u6FC0\u52B1\u89C6\u9891"}}),(0,a.jsx)(K.Z,{fieldProps:{disabledDate:function(_){return _&&_>=W()().startOf("day")}},name:"date",label:"\u65F6\u95F4"})]}),(0,a.jsx)(I.Z,C()({},ee))]})]})};p.default=Z}}]); |
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@ -1,165 +1,162 @@ |
|||||
import { advList, appList } from '@/services/matrix/admin'; |
|
||||
import { PageContainer, ProColumns, ProTable } from '@ant-design/pro-components'; |
import { PageContainer, ProColumns, ProTable } from '@ant-design/pro-components'; |
||||
|
import { ProFieldRequestData, RequestOptionsType } from '@ant-design/pro-utils'; |
||||
import { useIntl } from '@umijs/max'; |
import { useIntl } from '@umijs/max'; |
||||
import React, { useRef } from 'react'; |
import React, { useRef } from 'react'; |
||||
import { RequestOptionsType, ProFieldRequestData } from "@ant-design/pro-utils"; |
|
||||
|
|
||||
import type { ActionType } from '@ant-design/pro-components'; |
import type { ActionType } from '@ant-design/pro-components'; |
||||
|
import { advList, appList } from '@/services/matrix/admin'; |
||||
const AdvRecordList: React.FC = () => { |
const AdvRecordList: React.FC = () => { |
||||
|
const actionRef = useRef<ActionType>(); |
||||
|
|
||||
const actionRef = useRef<ActionType>(); |
/** |
||||
|
* @en-US International configuration |
||||
/** |
* @zh-CN 国际化配置 |
||||
* @en-US International configuration |
* */ |
||||
* @zh-CN 国际化配置 |
const intl = useIntl(); |
||||
* */ |
|
||||
const intl = useIntl(); |
|
||||
|
|
||||
const appNameMap: ProFieldRequestData = async () => { |
const appNameMap: ProFieldRequestData = async () => { |
||||
let res = await appList(); |
let res = await appList(); |
||||
let data: RequestOptionsType[] = []; |
let data: RequestOptionsType[] = []; |
||||
|
|
||||
res.data?.forEach(x=>{ |
res.data?.forEach((x) => { |
||||
data.push({label: x.name, value: x.code}) |
data.push({ label: x.name, value: x.code }); |
||||
}) |
}); |
||||
return data; |
return data; |
||||
} |
}; |
||||
|
|
||||
const columns: ProColumns<API.MatrixAdvRecordBo>[] = [ |
const columns: ProColumns<API.MatrixAdvRecordBo>[] = [ |
||||
{ |
{ |
||||
title: "应用名称", |
title: '应用名称', |
||||
hideInTable: true, |
hideInTable: true, |
||||
dataIndex: 'code', |
dataIndex: 'code', |
||||
valueType: "select", |
valueType: 'select', |
||||
request: appNameMap |
request: appNameMap, |
||||
|
}, |
||||
|
{ |
||||
|
title: '设备Id', |
||||
|
dataIndex: 'deviceId', |
||||
|
valueType: 'textarea', |
||||
|
ellipsis: true, |
||||
|
copyable: true, |
||||
|
}, |
||||
|
{ |
||||
|
title: '应用名称', |
||||
|
hideInSearch: true, |
||||
|
dataIndex: 'appName', |
||||
|
valueType: 'textarea', |
||||
|
}, |
||||
|
{ |
||||
|
title: '平台', |
||||
|
dataIndex: 'platform', |
||||
|
valueEnum: { |
||||
|
1: { |
||||
|
text: '穿山甲', |
||||
|
}, |
||||
|
2: { |
||||
|
text: '腾讯', |
||||
|
}, |
||||
|
3: { |
||||
|
text: '百度联盟', |
||||
|
}, |
||||
|
4: { |
||||
|
text: 'Mintegral', |
||||
|
}, |
||||
|
5: { |
||||
|
text: '快手', |
||||
|
}, |
||||
|
6: { |
||||
|
text: '游可赢', |
||||
|
}, |
||||
|
7: { |
||||
|
text: 'Sigmob', |
||||
|
}, |
||||
|
8: { |
||||
|
text: 'Admob', |
||||
|
}, |
||||
}, |
}, |
||||
{ |
}, |
||||
title: "设备Id", |
{ |
||||
dataIndex: 'deviceId', |
title: '广告类型', |
||||
valueType: 'textarea', |
dataIndex: 'advType', |
||||
ellipsis: true, |
valueEnum: { |
||||
copyable: true |
1: { |
||||
}, |
text: '横幅', |
||||
{ |
status: 'Default', |
||||
title: "应用名称", |
}, |
||||
hideInSearch: true, |
2: { |
||||
dataIndex: 'appName', |
text: '插页', |
||||
valueType: 'textarea', |
status: 'Processing', |
||||
}, |
}, |
||||
{ |
3: { |
||||
title: "平台", |
text: '激励视频', |
||||
dataIndex: 'platform', |
status: 'Success', |
||||
valueEnum: { |
}, |
||||
1: { |
}, |
||||
text:"穿山甲" , |
}, |
||||
}, |
{ |
||||
2: { |
title: 'ecpm(元)', |
||||
text: "腾讯", |
dataIndex: 'ecpm', |
||||
}, |
hideInSearch: true, |
||||
3: { |
renderText: (x) => { |
||||
text: "百度联盟", |
return x / 100; |
||||
}, |
}, |
||||
4: { |
}, |
||||
text:"Mintegral", |
{ |
||||
}, |
title: '设备品牌', |
||||
5: { |
dataIndex: 'deviceBrand', |
||||
text:"快手", |
hideInSearch: true, |
||||
}, |
valueType: 'textarea', |
||||
6: { |
}, |
||||
text:"游可赢", |
{ |
||||
}, |
title: '设备名', |
||||
7: { |
dataIndex: 'deviceName', |
||||
text:"Sigmob", |
hideInSearch: true, |
||||
}, |
valueType: 'textarea', |
||||
8: { |
}, |
||||
text:"Admob", |
{ |
||||
}, |
title: 'ip', |
||||
}, |
dataIndex: 'ip', |
||||
}, |
hideInSearch: true, |
||||
{ |
valueType: 'textarea', |
||||
title: "广告类型", |
}, |
||||
dataIndex: 'advType', |
{ |
||||
valueEnum: { |
title: '时间', |
||||
1: { |
hideInSearch: true, |
||||
text:"横幅" , |
dataIndex: 'createdAt', |
||||
status: 'Default', |
valueType: 'dateTime', |
||||
}, |
}, |
||||
2: { |
{ |
||||
text: "插页", |
title: '时间', |
||||
status: 'Processing', |
hideInTable: true, |
||||
}, |
dataIndex: 'createdAt', |
||||
3: { |
valueType: 'dateRange', |
||||
text: "激励视频", |
}, |
||||
status: 'Success', |
]; |
||||
}, |
|
||||
}, |
|
||||
}, |
|
||||
{ |
|
||||
title: "ecpm(元)", |
|
||||
dataIndex: 'ecpm', |
|
||||
hideInSearch: true, |
|
||||
renderText: (x) => { |
|
||||
return x / 100; |
|
||||
} |
|
||||
}, |
|
||||
{ |
|
||||
title: "设备品牌", |
|
||||
dataIndex: 'deviceBrand', |
|
||||
hideInSearch: true, |
|
||||
valueType: 'textarea', |
|
||||
}, |
|
||||
{ |
|
||||
title: "设备名", |
|
||||
dataIndex: 'deviceName', |
|
||||
hideInSearch: true, |
|
||||
valueType: 'textarea', |
|
||||
}, |
|
||||
{ |
|
||||
title: "ip", |
|
||||
dataIndex: 'ip', |
|
||||
hideInSearch: true, |
|
||||
valueType: 'textarea', |
|
||||
}, |
|
||||
{ |
|
||||
title: "时间", |
|
||||
hideInSearch: true, |
|
||||
dataIndex: 'createdAt', |
|
||||
valueType: 'dateTime' |
|
||||
}, |
|
||||
{ |
|
||||
title: "时间", |
|
||||
hideInTable: true, |
|
||||
dataIndex: 'createdAt', |
|
||||
valueType: 'dateRange' |
|
||||
} |
|
||||
]; |
|
||||
|
|
||||
|
|
||||
return ( |
|
||||
<PageContainer> |
|
||||
<ProTable<API.MatrixAdvRecordBo, API.AdvRecordQuery> |
|
||||
headerTitle={intl.formatMessage({ |
|
||||
id: 'pages.searchTable.title', |
|
||||
defaultMessage: 'Enquiry form', |
|
||||
})} |
|
||||
actionRef={actionRef} |
|
||||
rowKey="key" |
|
||||
search={{ |
|
||||
labelWidth: 120, |
|
||||
}} |
|
||||
request={async (params: any) => { |
|
||||
const res = await advList(params); |
|
||||
return { |
|
||||
data: res.data?.data, |
|
||||
total: res.data?.total, |
|
||||
success: true |
|
||||
} |
|
||||
}} |
|
||||
columns={columns} |
|
||||
/> |
|
||||
</PageContainer> |
|
||||
); |
|
||||
}; |
|
||||
|
|
||||
export default AdvRecordList; |
return ( |
||||
|
<PageContainer> |
||||
|
<ProTable<API.MatrixAdvRecordBo, API.AdvRecordQuery> |
||||
|
headerTitle={intl.formatMessage({ |
||||
|
id: 'pages.searchTable.title', |
||||
|
defaultMessage: 'Enquiry form', |
||||
|
})} |
||||
|
actionRef={actionRef} |
||||
|
rowKey="key" |
||||
|
search={{ |
||||
|
labelWidth: 120, |
||||
|
}} |
||||
|
request={async (params: any) => { |
||||
|
const res = await advList(params); |
||||
|
return { |
||||
|
data: res.data?.data, |
||||
|
total: res.data?.total, |
||||
|
success: true, |
||||
|
}; |
||||
|
}} |
||||
|
columns={columns} |
||||
|
/> |
||||
|
</PageContainer> |
||||
|
); |
||||
|
}; |
||||
|
|
||||
|
export default AdvRecordList; |
||||
|
Loading…
Reference in new issue