wjx преди 1 година
родител
ревизия
c0ea4f3c8d

+ 29 - 16
src/pages/adMonitor/adMonitorList/components/Details.tsx

@@ -1,6 +1,6 @@
 import useEcharts from "@/Hook/useEcharts"
 import { GetColumnTrendProps, GetListForAdProps } from "@/services/adMonitor/adMonitor"
-import { Card, Drawer, Select, Space, Spin, Tabs } from "antd"
+import { Card, DatePicker, Drawer, Select, Space, Spin, Tabs } from "antd"
 import React, { useEffect, useState } from "react"
 import { useModel } from "umi"
 import './index.less'
@@ -8,6 +8,7 @@ import { columnsList } from "../tableMonitorConfig1"
 import TableData from "@/pages/launchSystemNew/components/TableData"
 import { detailsConfig } from "../config1"
 import TabAd from "./TabAd"
+import moment from "moment"
 
 interface Props {
     data: any,
@@ -19,8 +20,8 @@ const Details: React.FC<Props> = ({ data, onClose, visible }) => {
     /****************************************/
     const { adgroup_id, account_id } = data
     const [activeKey, setActiveKey] = useState<string>('1')
-    const [queryColumnTrend, setQueryColumnTrend] = useState<GetColumnTrendProps>({ accountId: account_id, adgroupId: adgroup_id, trendColumns: ['view', 'cost'], timeUnit: 'hour' })
-    const [queryList, setQueryList] = useState<GetListForAdProps>({ accountId: account_id, adgroupId: adgroup_id, columns: [], pageNum: 1, pageSize: 20, timeUnit: 'hour' })
+    const [queryColumnTrend, setQueryColumnTrend] = useState<GetColumnTrendProps>({ accountId: account_id, adgroupId: adgroup_id, trendColumns: ['view', 'cost'], timeUnit: 'hour', dataTimeMin: moment().format('YYYY-MM-DD'), dataTimeMax: moment().format('YYYY-MM-DD') })
+    const [queryList, setQueryList] = useState<GetListForAdProps>({ accountId: account_id, adgroupId: adgroup_id, columns: [], pageNum: 1, pageSize: 20, timeUnit: 'hour', dataTimeMin: moment().format('YYYY-MM-DD'), dataTimeMax: moment().format('YYYY-MM-DD') })
     const [lineDis, setLineDis] = useState<any[]>([])
     const { LineMonitor } = useEcharts()
     const configName = '数据报表'
@@ -95,19 +96,31 @@ const Details: React.FC<Props> = ({ data, onClose, visible }) => {
         bodyStyle={{ padding: '0 10px', background: '#efefef' }}
         className="detail_drawer"
     >
-        <Tabs activeKey={activeKey} onChange={(e) => setActiveKey(e)} tabBarExtraContent={activeKey === '1' ? <Select
-            size="small"
-            value={queryColumnTrend.timeUnit}
-            style={{ width: 78 }}
-            onChange={(e) => {
-                setQueryColumnTrend({ ...queryColumnTrend, timeUnit: e })
-                setQueryList({ ...queryList, timeUnit: e })
-            }}
-        >
-            <Select.Option value="day">天</Select.Option>
-            <Select.Option value="hour">小时</Select.Option>
-            <Select.Option value="minute">5min</Select.Option>
-        </Select> : null}
+        <Tabs activeKey={activeKey} onChange={(e) => setActiveKey(e)} tabBarExtraContent={activeKey === '1' ? <Space>
+            <Select
+                size="small"
+                value={queryColumnTrend.timeUnit}
+                style={{ width: 78 }}
+                onChange={(e) => {
+                    setQueryColumnTrend({ ...queryColumnTrend, timeUnit: e })
+                    setQueryList({ ...queryList, timeUnit: e })
+                }}
+            >
+                <Select.Option value="day">天</Select.Option>
+                <Select.Option value="hour">小时</Select.Option>
+                <Select.Option value="minute">5min</Select.Option>
+            </Select>
+            <DatePicker.RangePicker
+                size="small"
+                placeholder={['数据时间筛选(起始)', '数据时间筛选(结束)']}
+                value={(queryColumnTrend?.dataTimeMin && queryColumnTrend?.dataTimeMax) ? [moment(queryColumnTrend.dataTimeMin), moment(queryColumnTrend.dataTimeMax)] : undefined as any}
+                style={{ width: 320 }}
+                onChange={(_, o) => {
+                    setQueryColumnTrend({ ...queryColumnTrend, dataTimeMin: o[0], dataTimeMax: o[1] })
+                    setQueryList({ ...queryList, dataTimeMin: o[0], dataTimeMax: o[1], pageNum: 1 })
+                }}
+            />
+        </Space> : null}
         >
             <Tabs.TabPane tab="效果数据" key="1">
                 <Space direction="vertical" style={{ width: '100%' }}>

+ 31 - 4
src/pages/adMonitor/adMonitorList/monitor1.tsx

@@ -44,12 +44,17 @@ function Monitor(props: { onChange: () => void }) {
     const [adgroupName, setAdgroupName] = useState<string>('')
     const [accountIdRule, setAccountIdRule] = useState<string>('')
 
-    const { totalTimeUnit, planTimeUnit, adgroup, accountId, sysUserId } = queryForm
+    const { totalTimeUnit, planTimeUnit, adgroup, accountId, sysUserId, groupAccountIds } = queryForm
     const configName = '起量广告排行明细New'
+    const { getGroupList, groupListInit } = useModel('useLaunchAdq.useAdAuthorize')
+
+    useEffect(() => {
+        groupListInit()
+    }, [])
 
     useEffect(() => {
         getList()
-    }, [queryForHour, filterQuery, queryForm?.sysUserId, queryForm?.accountId, queryForm?.adgroup])
+    }, [queryForHour, filterQuery, queryForm?.sysUserId, queryForm?.accountId, queryForm?.adgroup, queryForm?.groupAccountIds])
 
     const getList = () => {
         let message = localStorage.getItem(`myAdMonitorConfig1.0.0_${configName}`)
@@ -109,6 +114,9 @@ function Monitor(props: { onChange: () => void }) {
         if (queryForm?.adgroup) {
             params.adgroupIdStr = queryForm?.adgroup
         }
+        if (queryForm?.groupAccountIds) {
+            params.groupAccountIds = queryForm?.groupAccountIds
+        }
         params.columns = columns
         getListForHour.run(params)
     }
@@ -124,11 +132,11 @@ function Monitor(props: { onChange: () => void }) {
     // // 获取排行数据,柱图
     useEffect(() => {
         getPlanCostList()
-    }, [totalTimeUnit, accountId, sysUserId])
+    }, [totalTimeUnit, accountId, sysUserId, groupAccountIds])
     // 获取今日计划总消耗图谱,折线
     useEffect(() => {
         getTootalCostList()
-    }, [planTimeUnit, adgroup, accountId, sysUserId])
+    }, [planTimeUnit, adgroup, accountId, sysUserId, groupAccountIds])
 
     /** 获取折线图 */
     const getTootalCostList = useCallback(async () => {
@@ -298,6 +306,25 @@ function Monitor(props: { onChange: () => void }) {
                         }}
                         allowClear
                     />
+                    <Select
+                        showSearch
+                        mode='multiple'
+                        maxTagCount={1}
+                        value={queryForm.groupAccountIds}
+                        style={{ minWidth: 150 }}
+                        allowClear
+                        placeholder="请选择账号分组"
+                        onChange={(value: number[]) => {
+                            setQueryForm({ ...queryForm, groupAccountIds: value, pageNum: 1 })
+                        }}
+                    >
+                        {getGroupList?.data?.map((item: { groupId: number, groupName: number }) => <Select.Option
+                            value={item.groupId}
+                            key={item.groupId}
+                        >
+                            {item.groupName}
+                        </Select.Option>)}
+                    </Select>
                 </Space>
                 <Space>
                     <Tag onClick={() => setShowEacharts(!showEacharts)}>{showEacharts ? <><EyeInvisibleOutlined /> 隐藏</> : <><EyeOutlined /> 显示</>}</Tag>

+ 34 - 4
src/pages/launchSystemNew/adq/ad/FilterQuery.tsx

@@ -35,7 +35,7 @@ const FilterQuery: React.FC<Props> = ({ onChange, initialValues, queryForm, setQ
     const [visible, setVisible] = useState<boolean>(true)
     const [filterTrueList, setFilterTrueList] = useState<QueryProps[]>([])
     const [message, setMessage] = useLocalStorageState('filterQueryContentAdMessage', '');
-
+    const { getGroupList } = useModel('useLaunchAdq.useAdAuthorize')
     const { getPicherList } = useModel('useOperating.useWxGroupList')
     /********************************/
 
@@ -54,6 +54,12 @@ const FilterQuery: React.FC<Props> = ({ onChange, initialValues, queryForm, setQ
             type: 'DatePicker',
             value: (params) => <DatePicker.RangePicker {...params} />
         },
+        {
+            lable: '投放时间',
+            name: 'putDate',
+            type: 'DatePicker',
+            value: (params) => <DatePicker.RangePicker {...params} />
+        },
         // {
         //     lable: '投手',
         //     name: 'sysUserIds',
@@ -272,6 +278,11 @@ const FilterQuery: React.FC<Props> = ({ onChange, initialValues, queryForm, setQ
             newAllValue.adCreateTimeMax = moment(newAllValue?.adCreateTime[1]).format('YYYY-MM-DD')
             delete newAllValue?.adCreateTime
         }
+        if (newAllValue?.putDate && newAllValue?.putDate?.length > 0) {
+            newAllValue.putDateBegin = moment(newAllValue?.putDate[0]).format('YYYY-MM-DD')
+            newAllValue.putDateEnd = moment(newAllValue?.putDate[1]).format('YYYY-MM-DD')
+            delete newAllValue?.putDate
+        }
         setQueryForm({ ...queryForm, pageNum: 1 })
         onChange?.(newAllValue)
     }
@@ -326,6 +337,25 @@ const FilterQuery: React.FC<Props> = ({ onChange, initialValues, queryForm, setQ
                     return <Select.Option value={key} key={key}>{AdStatusEnum[key]}</Select.Option>
                 })}
             </Select>
+            <Select
+                showSearch
+                mode='multiple'
+                maxTagCount={1}
+                value={queryForm.groupAccountIds}
+                style={{ minWidth: 130 }}
+                allowClear
+                placeholder="请选择账号分组"
+                onChange={(value: number[]) => {
+                    setQueryForm({ ...queryForm, groupAccountIds: value, pageNum: 1 })
+                }}
+            >
+                {getGroupList?.data?.map((item: { groupId: number, groupName: number }) => <Select.Option
+                    value={item.groupId}
+                    key={item.groupId}
+                >
+                    {item.groupName}
+                </Select.Option>)}
+            </Select>
             <Input placeholder="请输入广告ID(多个,隔开)" style={{ width: 140 }} value={queryForm.adgroupIdStr} onChange={(e) => setQueryForm({ ...queryForm, adgroupIdStr: e.target.value, pageNum: 1 })} />
             <Select
                 placeholder='已删除?'
@@ -362,11 +392,11 @@ const FilterQuery: React.FC<Props> = ({ onChange, initialValues, queryForm, setQ
             </Select>
 
             <DatePicker.RangePicker
-                placeholder={['投放开始时间(起始)', '投放开始时间(结束)']}
-                value={(queryForm?.putDateBegin && queryForm?.putDateEnd) ? [moment(queryForm.putDateBegin), moment(queryForm.putDateEnd)] : undefined as any}
+                placeholder={['数据时间筛选(起始)', '数据时间筛选(结束)']}
+                value={(queryForm?.dataTimeMin && queryForm?.dataTimeMax) ? [moment(queryForm.dataTimeMin), moment(queryForm.dataTimeMax)] : undefined as any}
                 style={{ width: 320 }}
                 onChange={(_, o) => {
-                    setQueryForm({ ...queryForm, putDateBegin: o[0], putDateEnd: o[1], pageNum: 1 })
+                    setQueryForm({ ...queryForm, dataTimeMin: o[0], dataTimeMax: o[1], pageNum: 1 })
                 }}
             />
 

+ 61 - 4
src/pages/launchSystemNew/adq/ad/adPlanList.tsx

@@ -1,6 +1,6 @@
 
 import { useAjax } from '@/Hook/useAjax'
-import { Col, Row, message, Space, Button, Switch, notification, Modal, Tooltip, Dropdown, Menu } from 'antd'
+import { Col, Row, message, Space, Button, Switch, notification, Modal, Tooltip, Dropdown, Menu, Table, Statistic } from 'antd'
 import React, { useEffect, useCallback, useState, useRef } from 'react'
 import TableData from '../../components/TableData'
 import { putAdqAdgroupsSync, delListAdqAdgroupsApi, newEditAdqAdgroupsDataApi, editAdqAdgroupsDataApi, putAdqAdgroupsSyncBatch, putModifyCustomAudienceApi, getPutUserApi, delUserTagApi } from '@/services/launchAdq/adq'
@@ -17,9 +17,10 @@ import { AdListProps, getAdListApi } from '@/services/adMonitor/adMonitor'
 import FilterQuery from './FilterQuery'
 import Details from '@/pages/adMonitor/adMonitorList/components/Details'
 import AdExpandedRowRender from './adExpandedRowRender'
-import { useSize } from 'ahooks'
+import { useSize, useUpdateEffect } from 'ahooks'
 import RuleAccountLog from '@/components/EarlyWarning/ruleAccountLog'
 import PlanTag from './planTag'
+import moment from 'moment'
 
 const AdPlanList: React.FC<{ userId: string }> = (props) => {
 
@@ -34,7 +35,7 @@ const AdPlanList: React.FC<{ userId: string }> = (props) => {
     const [czjlShow, setCzjlShow] = useState(false)
     const [cpVisible, setCpVisible] = useState(false)
     const [accountCreateLogs, setAccountCreateLogs] = useState<{ adAccountId: number, id: number, customAudienceList?: any[], excludedCustomAudienceList?: any[] }[]>([])
-    const [queryForm, setQueryForm] = useState<AdListProps>({ pageNum: 1, pageSize: 20, columns: [], isDeleted: false })
+    const [queryForm, setQueryForm] = useState<AdListProps>({ pageNum: 1, pageSize: 20, columns: [], isDeleted: false, dataTimeMin: moment().subtract(7, 'days').format('YYYY-MM-DD'), dataTimeMax: moment().format('YYYY-MM-DD') })
     const [filterForm, setFilterForm] = useState<AdListProps>()
     const getAdList = useAjax((params) => getAdListApi(params), { formatResult: true })
     const syncAjax = useAjax((adAccountId) => putAdqAdgroupsSync(adAccountId))
@@ -58,6 +59,8 @@ const AdPlanList: React.FC<{ userId: string }> = (props) => {
     const ref = useRef(null)
     const size = useSize(ref)
     const [scrollLeft, setScrollLeft] = useState<number>(0)
+    const [totalData, setTotalData] = useState<any>({})
+    const [tableField, setTableField] = useState<{ title: string, dataIndex: string }[]>([])
     /************************/
 
     useEffect(() => {
@@ -88,6 +91,35 @@ const AdPlanList: React.FC<{ userId: string }> = (props) => {
         getAdList.run({ ...queryForm, ...filterForm, columns })
     }
 
+    useUpdateEffect(() => {
+        let data: any = {}
+        if (getAdList.data?.data?.sumRecord) {
+            data = getAdList.data?.data?.sumRecord
+        }
+        setTotalData(data)
+    }, [getAdList.data])
+
+    useEffect(() => {
+        let localData = localStorage.getItem('myAdMonitorConfig1.0.0_广告列表New')
+        let data: any[] = []
+        if (localData) {
+            data = JSON.parse(localData)
+        } else {
+            let newSelectData: any[] = [];
+            (planAdConfig as any).forEach((item: { data: { default: any }[] }) => {
+                item?.data?.forEach((d: { default: any }) => {
+                    if (d.default) {
+                        newSelectData[d.default - 1] = d
+                    }
+                })
+            })
+            data = newSelectData
+        }
+        data.unshift({ title: '选择框', dataIndex: 'xzk' })
+        data.unshift({ title: '总计', dataIndex: 'zj' })
+        setTableField(data)
+    }, [localStorage.getItem('myAdMonitorConfig1.0.0_广告列表New')])
+
     useEffect(() => {
         getPutUser.run({ userId })
     }, [userId])
@@ -324,7 +356,7 @@ const AdPlanList: React.FC<{ userId: string }> = (props) => {
                 rowClassName={(record) => {
                     if (record?.tag_value === 100) {
                         return 'row_error'
-                    }else if (record?.tag_value === 90) {
+                    } else if (record?.tag_value === 90) {
                         return 'row_warning'
                     } else {
                         return ''
@@ -476,6 +508,31 @@ const AdPlanList: React.FC<{ userId: string }> = (props) => {
                     setQueryForm({ ...newQueryForm })
                 }}
                 expandedRowRender={(data) => <AdExpandedRowRender data={data} scrollLeft={scrollLeft} width={size?.width} />}
+                summary={() => (
+                    <Table.Summary fixed>
+                        <Table.Summary.Row>
+                            {tableField.map((item, index) => {
+                                let data = totalData[item.dataIndex]
+                                let value = (data === 0 || data) ? data : '--'
+                                if (item.dataIndex === 'zj') {
+                                    return <Table.Summary.Cell index={index} key={item.dataIndex} align="center"><strong>总计</strong></Table.Summary.Cell>
+                                } else if (['ctr_total', 'mp_follow_rate_total',
+                                    'add_quick_app_rate_total', 'scan_follow_rate_total',
+                                    'first_day_order_roi_total', 'order_rate_total',
+                                    'order_roi_total', 'conversions_rate_total'
+                                ].includes(item.dataIndex)) {
+                                    return <Table.Summary.Cell index={index} key={item.dataIndex} align="center">
+                                        <strong>
+                                            {value !== '--' ? <Statistic value={value.toFixed(2)} precision={2} valueStyle={{ color: '#3f8600' }} suffix="%" /> : '--'}
+                                        </strong>
+                                    </Table.Summary.Cell>
+                                } else {
+                                    return <Table.Summary.Cell index={index} key={item.dataIndex} align="center"><strong><Statistic value={value} /></strong></Table.Summary.Cell>
+                                }
+                            })}
+                        </Table.Summary.Row>
+                    </Table.Summary>
+                )}
             />
         </div>
         {detailShow && <Details visible={detailShow} onClose={() => { setDetailShow(false) }} data={detailData} />}

+ 56 - 18
src/pages/launchSystemNew/adq/ad/tablePlanListConfig.tsx

@@ -30,6 +30,9 @@ function tablePlanConfig(
             width: 40,
             fixed: 'left',
             render: (a: string, b: any) => {
+                if (b?.account_id === '总计') {
+                    return '--'
+                }
                 return <SwitchStatus configuredStatus={a} isDeleted={b?.is_deleted} adgroupId={b?.adgroup_id} onChange={onChange} />
             }
         },
@@ -53,6 +56,12 @@ function tablePlanConfig(
             align: 'center',
             width: 80,
             ellipsis: true,
+            render(value, record) {
+                if (record?.account_id === '总计') {
+                    return '--'
+                }
+                return value
+            },
         },
         {
             title: '本地备注',
@@ -61,6 +70,12 @@ function tablePlanConfig(
             align: 'center',
             width: 80,
             ellipsis: true,
+            render(value, record) {
+                if (record?.account_id === '总计') {
+                    return '--'
+                }
+                return value
+            },
         },
         {
             title: '广告ID',
@@ -70,6 +85,9 @@ function tablePlanConfig(
             width: 100,
             ellipsis: true,
             render: (a: string, b: any) => {
+                if (b?.account_id === '总计') {
+                    return '--'
+                }
                 return <Space>
                     <a onClick={() => copy(a)} >{a}</a>
                 </Space>
@@ -83,6 +101,7 @@ function tablePlanConfig(
             width: 100,
             ellipsis: true,
             render: (a: string, b: any) => {
+                if (b?.account_id === '总计') return '--';
                 return <Space >
                     <a onClick={() => copy(a)} >{a}</a>
                 </Space>
@@ -94,7 +113,11 @@ function tablePlanConfig(
             key: 'put_user_name',
             align: 'center',
             width: 70,
-            ellipsis: true
+            ellipsis: true,
+            render(value, record) {
+                if (record?.account_id === '总计') return '--';
+                return value
+            },
         },
         {
             title: '广告名称',
@@ -103,6 +126,7 @@ function tablePlanConfig(
             width: 280,
             ellipsis: true,
             render: (a: string, b: any) => {
+                if (b?.account_id === '总计') return '--';
                 return <InputUpdate title={a} dataIndex={'adgroup_name'} record={b} handleSave={handleSave} />
             }
         },
@@ -113,7 +137,8 @@ function tablePlanConfig(
             align: 'center',
             width: 75,
             ellipsis: true,
-            render: (a: string | number) => {
+            render: (a: string | number, b) => {
+                if (b?.account_id === '总计') return '--';
                 return PromotedObjectType[a]
             }
         },
@@ -125,7 +150,8 @@ function tablePlanConfig(
             width: 150,
             ellipsis: true,
             sorter: true,
-            render: (a: string, b: { end_date: string }) => {
+            render: (a: string, b: { end_date: string, account_id: any }) => {
+                if (b?.account_id === '总计') return '--';
                 return b?.end_date && b?.end_date !== '1970-01-01' ? a + '~' + b.end_date : a + '~' + '长期投放'
             }
         },
@@ -135,7 +161,8 @@ function tablePlanConfig(
             key: 'time_series',
             align: 'center',
             width: 55,
-            render: (a: string, b: { endDate: string }) => {
+            render: (a: string, b: { endDate: string, account_id: string }) => {
+                if (b?.account_id === '总计') return '--';
                 return <TimeSeriesLook timeSeries={a} />
             }
         },
@@ -145,6 +172,10 @@ function tablePlanConfig(
             key: 'first_day_begin_time',
             align: 'center',
             width: 70,
+            render(value, record) {
+                if (record?.account_id === '总计') return '--';
+                return value
+            },
         },
         {
             title: '出价',
@@ -153,7 +184,8 @@ function tablePlanConfig(
             width: 140,
             ellipsis: true,
             sorter: true,
-            render: (a: string, b: { bid_mode: string, optimization_goal: string }) => {
+            render: (a: string, b: { bid_mode: string, optimization_goal: string, account_id: any }) => {
+                if (b?.account_id === '总计') return '--';
                 return `${b?.bid_mode ? BidModeEnum[b?.bid_mode] : ''} ${a}元/${b?.bid_mode === 'BID_MODE_CPM' ? '千次曝光' : b?.bid_mode === 'BID_MODE_CPC' ? '点击' : OptimizationGoalEnum[b?.optimization_goal]}`
             }
         },
@@ -164,7 +196,8 @@ function tablePlanConfig(
             width: 70,
             align: 'center',
             ellipsis: true,
-            render: (a: string, b: { deep_conversion_spec_json: any }) => {
+            render: (a: string, b: { deep_conversion_spec_json: any, account_id: any }) => {
+                if (b?.account_id === '总计') return '--';
                 if (b?.deep_conversion_spec_json) {
                     return JSON.parse(b?.deep_conversion_spec_json)?.deepConversionWorthSpec?.expectedRoi || '--'
                 } else {
@@ -180,7 +213,8 @@ function tablePlanConfig(
             align: 'center',
             width: 80,
             ellipsis: true,
-            render: (a: string) => {
+            render: (a: string, b) => {
+                if (b?.account_id === '总计') return '--';
                 return a === 'SMART_BID_TYPE_CUSTOM' ? '手动出价' : '自动出价'
             }
         },
@@ -191,7 +225,8 @@ function tablePlanConfig(
             align: 'center',
             width: 70,
             ellipsis: true,
-            render: (a: string) => {
+            render: (a: string, b) => {
+                if (b?.account_id === '总计') return '--';
                 return BidStrategyEnum[a]
             }
         },
@@ -203,6 +238,7 @@ function tablePlanConfig(
             width: 70,
             sorter: true,
             render: (a: string, b: any) => {
+                if (b?.account_id === '总计') return '--';
                 return <InputUpdate title={a} isNum={true} dataIndex={'daily_budget'} record={b} handleSave={handleSaveDaily} />
             }
         },
@@ -213,6 +249,7 @@ function tablePlanConfig(
             align: 'center',
             width: 80,
             render: (a: any, b: any) => {
+                if (b?.account_id === '总计') return '--';
                 return a ? '开' : '关'
             }
         },
@@ -223,6 +260,10 @@ function tablePlanConfig(
             align: 'center',
             width: 140,
             ellipsis: true,
+            render(value, record) {
+                if (record?.account_id === '总计') return '--';
+                return value
+            },
         },
         {
             title: '是否已删除',
@@ -231,6 +272,7 @@ function tablePlanConfig(
             align: 'center',
             width: 60,
             render: (a: any, b: any) => {
+                if (b?.account_id === '总计') return '--';
                 return <Badge status={!a ? "processing" : "error"} text={a ? '是' : '否'} />
             }
         },
@@ -242,6 +284,7 @@ function tablePlanConfig(
             width: 70,
             ellipsis: true,
             render: (a: string, b: any) => {
+                if (b?.account_id === '总计') return '--';
                 return b?.rejectMessageList?.filter((str: any) => str)?.length > 0 ? <Popover
                     style={{ width: 500 }}
                     overlayStyle={{ width: 500, fontSize: 12 }}
@@ -261,6 +304,7 @@ function tablePlanConfig(
             width: 70,
             align: 'center',
             render: (a: any, b: any) => {
+                if (b?.account_id === '总计') return '--';
                 return <Box b={b?.creative_preivew} />
             }
         },
@@ -271,7 +315,8 @@ function tablePlanConfig(
             align: 'center',
             width: 100,
             ellipsis: true,
-            render(value, record, index) {
+            render(value, b) {
+                if (b?.account_id === '总计') return '--';
                 return value || '--'
             },
         },
@@ -283,6 +328,7 @@ function tablePlanConfig(
             width: 80,
             className: 'padding2',
             render: (a: any, b: any) => {
+                if (b?.account_id === '总计') return '--';
                 return <div style={{ display: 'flex', justifyContent: 'center', alignItems: 'center', lineHeight: 'normal', fontSize: 14 }}>
                     <RocketSvg /> <a onClick={() => details(b)} style={{ marginLeft: 10 }}>详情</a>
                 </div>
@@ -295,6 +341,7 @@ function tablePlanConfig(
             width: 130,
             align: 'center',
             render: (a: any, b: any) => {
+                if (b?.account_id === '总计') return '--';
                 return <Space>
                     <Dropdown overlay={<Menu>
                         <Menu.Item><a onClick={() => log(b)}>告警日志</a></Menu.Item>
@@ -310,15 +357,6 @@ function tablePlanConfig(
     ]
 
     let adDataArr: ColumnsType<any> = [
-        {
-            title: '数据更新时间',
-            dataIndex: 'create_time',
-            key: 'create_time',
-            align: 'center',
-            width: 120,
-            sorter: true,
-            ellipsis: true
-        },
         {
             title: '消耗',
             dataIndex: 'cost_total',

+ 11 - 12
src/pages/launchSystemNew/adq/config.ts

@@ -64,10 +64,9 @@ const planAdConfig = [
     {
         label: '广告消耗信息',
         data: [
-            { title: '数据更新时间', dataIndex: 'create_time', label: '广告消耗信息', width: 85 },
-            { title: '消耗', dataIndex: 'cost_total', label: '广告消耗信息', width: 90 },
+            { title: '消耗', dataIndex: 'cost_total', label: '广告消耗信息', width: 100 },
             { title: '曝光量', dataIndex: 'view_total', label: '广告消耗信息', width: 90 },
-            { title: '千次曝光成本', dataIndex: 'thousand_display_price_total', label: '广告消耗信息', width: 90 },
+            { title: '千次曝光成本', dataIndex: 'thousand_display_price_total', label: '广告消耗信息', width: 100 },
             { title: '点击量', dataIndex: 'click_total', label: '广告消耗信息', width: 90 },
             { title: '点击率', dataIndex: 'ctr_total', label: '广告消耗信息', width: 90 },
             { title: '点击均价', dataIndex: 'cpc_total', label: '广告消耗信息', width: 90 },
@@ -82,15 +81,15 @@ const planAdConfig = [
             { title: '安装次数', dataIndex: 'install_count_total', label: '广告转化信息', width: 80 },
             { title: '激活次数', dataIndex: 'activated_count_total', label: '广告转化信息', width: 80 },
             { title: '公众号关注人数', dataIndex: 'mp_follow_uv_total', label: '广告转化信息', width: 80 },
-            { title: '公众号关注成本', dataIndex: 'mp_follow_cost_total', label: '广告转化信息', width: 80 },
+            { title: '公众号关注成本', dataIndex: 'mp_follow_cost_total', label: '广告转化信息', width: 90 },
             { title: '公众号关注率', dataIndex: 'mp_follow_rate_total', label: '广告转化信息', width: 80 },
             { title: '公众号关注次数', dataIndex: 'mp_follow_pv_total', label: '广告转化信息', width: 80 },
-            { title: '公众号关注次数成本', dataIndex: 'mp_follow_pv_cost_total', label: '广告转化信息', width: 90 },
+            { title: '公众号关注次数成本', dataIndex: 'mp_follow_pv_cost_total', label: '广告转化信息', width: 100 },
             { title: '快应用添加次数', dataIndex: 'add_quick_app_pv_total', label: '广告转化信息', width: 80 },
-            { title: '快应用添加成本', dataIndex: 'add_quick_app_cost_total', label: '广告转化信息', width: 80 },
+            { title: '快应用添加成本', dataIndex: 'add_quick_app_cost_total', label: '广告转化信息', width: 90 },
             { title: '快应用添加率', dataIndex: 'add_quick_app_rate_total', label: '广告转化信息', width: 80 },
             { title: '加企业微信客服人数', dataIndex: 'scan_follow_uv_total', label: '广告转化信息', width: 90 },
-            { title: '加企业微信客服成本', dataIndex: 'scan_follow_cost_total', label: '广告转化信息', width: 90 },
+            { title: '加企业微信客服成本', dataIndex: 'scan_follow_cost_total', label: '广告转化信息', width: 100 },
             { title: '加企业微信客服率', dataIndex: 'scan_follow_rate_total', label: '广告转化信息', width: 90 },
         ]
     },
@@ -98,20 +97,20 @@ const planAdConfig = [
         label: '商品转化',
         data: [
             { title: '首日新增下单量', dataIndex: 'first_day_order_count_total', label: '商品转化', width: 80 },
-            { title: '首日新增下单金额', dataIndex: 'first_day_order_amount_total', label: '商品转化', width: 80 },
+            { title: '首日新增下单金额', dataIndex: 'first_day_order_amount_total', label: '商品转化', width: 90 },
             { title: '首日新增下单ROI', dataIndex: 'first_day_order_roi_total', label: '商品转化', width: 80 },
             { title: '订单量', dataIndex: 'order_count_total', label: '商品转化', width: 80},
-            { title: '订单金额', dataIndex: 'order_amount_total', label: '商品转化', width: 80 },
-            { title: '下单成本', dataIndex: 'order_cost_total', label: '商品转化', width: 80 },
+            { title: '订单金额', dataIndex: 'order_amount_total', label: '商品转化', width: 90 },
+            { title: '下单成本', dataIndex: 'order_cost_total', label: '商品转化', width: 85 },
             { title: '下单率', dataIndex: 'order_rate_total', label: '商品转化', width: 80 },
             { title: '下单ROI', dataIndex: 'order_roi_total', label: '商品转化', width: 80 },
             { title: '客单价', dataIndex: 'atv_total', label: '商品转化', width: 80 },
             { title: '转化量', dataIndex: 'conversions_count_total', label: '商品转化', width: 80 },
-            { title: '转化成本', dataIndex: 'conversions_cost_total', label: '商品转化', width: 80 },
+            { title: '转化成本', dataIndex: 'conversions_cost_total', label: '商品转化', width: 85 },
             { title: '深度转化', dataIndex: 'deep_conversions_count_total', label: '商品转化', width: 80 },
             { title: '转化率', dataIndex: 'conversions_rate_total', label: '商品转化', width: 80 },
             { title: '加粉数', dataIndex: 'add_fans_count_total', label: '商品转化', width: 80 },
-            { title: '加粉成本', dataIndex: 'add_fans_cost_total', label: '商品转化', width: 80 },
+            { title: '加粉成本', dataIndex: 'add_fans_cost_total', label: '商品转化', width: 85 },
         ]
     },
 ]

+ 9 - 6
src/pages/launchSystemNew/components/TableData/index.tsx

@@ -2,9 +2,9 @@ import CustomListModel from '@/components/CustomList'
 import Tables from '@/components/Tables'
 import { quanpin } from '@/utils/fullScreen'
 import { FullscreenExitOutlined, FullscreenOutlined, RedoOutlined, SettingOutlined, SyncOutlined } from '@ant-design/icons'
-import { Button, Card, Col, Row, Space, Tooltip, } from 'antd'
+import { Button, Card, Col, Empty, Row, Space, Tooltip, } from 'antd'
 import { ColumnsType } from 'antd/lib/table'
-import React, { useEffect, useRef, useState, useCallback } from 'react'
+import React, { useEffect, useRef, useState, useCallback, ReactNode } from 'react'
 import { useModel } from 'umi'
 import style from './index.less'
 interface Prosp {
@@ -51,10 +51,11 @@ interface Prosp {
     totalData?: any[]
     refreshData?: () => void,
     rowClassName?: string | ((record: any, index: any) => string),//样式
+    summary?: (data: readonly any[]) => ReactNode,
 }
 
 function TableData(props: Prosp) {
-    const { isZj, scroll, columns, title, columnWidth, rowClassName, dataSource, totalData = [], refreshData, expandedRowRender, className, isCard = true, leftChild, page = undefined, rowSelection = false, pageSize = undefined, size = 'small', fixed = { left: 0, right: 1 }, total = 0, onChange, config, configName, ajax, syncAjax, hoverable = true, myKey, gutter = [0, 20] } = props
+    const { isZj, scroll, columns, title, columnWidth, rowClassName, dataSource, totalData = [], summary, refreshData, expandedRowRender, className, isCard = true, leftChild, page = undefined, rowSelection = false, pageSize = undefined, size = 'small', fixed = { left: 0, right: 1 }, total = 0, onChange, config, configName, ajax, syncAjax, hoverable = true, myKey, gutter = [0, 20] } = props
     const { state: userState } = useModel('useOperating.useUser')
     const { isFell } = userState
     const [visible, setVisible] = useState<boolean>(false)
@@ -268,11 +269,11 @@ function TableData(props: Prosp) {
             >
                 <Row gutter={gutter}>
                     {header}
-                    <Tab {...{ size, newColumns, rowClassName, handelResize, columnWidth, className, isZj, totalData, rowSelection, columns, scroll, isFell, page, pageSize, dataSource, onChange, expandedRowRender, total, ajax, myKey }} />
+                    <Tab {...{ size, newColumns, rowClassName, handelResize, columnWidth, className, isZj, totalData, rowSelection, columns, scroll, isFell, page, pageSize, dataSource, onChange, summary, expandedRowRender, total, ajax, myKey }} />
                 </Row>
             </Card> : <Row gutter={gutter}>
                 {header}
-                <Tab {...{ size, newColumns, rowClassName, handelResize, className, isZj, columnWidth, totalData, rowSelection, columns, scroll, isFell, page, pageSize, dataSource, onChange, expandedRowRender, total, ajax, myKey }} />
+                <Tab {...{ size, newColumns, rowClassName, handelResize, className, isZj, columnWidth, totalData, rowSelection, columns, scroll, isFell, page, pageSize, dataSource, onChange, summary, expandedRowRender, total, ajax, myKey }} />
             </Row>}
         </Col>
     </Row >
@@ -283,7 +284,7 @@ function TableData(props: Prosp) {
 
 /**表格 */
 const Tab = React.memo((props: any) => {
-    const { size, newColumns, rowClassName, className, handelResize, isZj, columns, scroll, columnWidth, totalData, rowSelection, isFell, page, pageSize, dataSource, onChange, expandedRowRender, total, ajax, myKey } = props
+    const { size, newColumns, rowClassName, className, handelResize, isZj, columns, scroll, columnWidth, totalData, rowSelection, isFell, page, pageSize, dataSource, onChange, summary, expandedRowRender, total, ajax, myKey } = props
     let ran = Math.ceil(Math.random() * 100)
 
     useEffect(() => {
@@ -330,6 +331,7 @@ const Tab = React.memo((props: any) => {
                     sortDirections={['ascend', 'descend', null]}
                     handelResize={((columns: any) => handelResize(columns, 'antd'))}
                     onChange={(pagination: any, filters: any, sorter: any) => onChange && onChange({ pagination, filters, sortData: sorter })}
+                    expandedRowRender={expandedRowRender ? () => <Empty image={Empty.PRESENTED_IMAGE_SIMPLE} />: null}
                 />
             }
             <Tables
@@ -353,6 +355,7 @@ const Tab = React.memo((props: any) => {
                 rowSelection={rowSelection}
                 handelResize={((columns: any) => handelResize(columns))}
                 myKey={myKey}
+                summary={summary}
             />
         </div>
     </Col >

+ 11 - 0
src/services/adMonitor/adMonitor.ts

@@ -14,6 +14,7 @@ export interface ListType {
     sortField?: string, // "排序字段"
     sort?: 'ASC' | 'DESC'  // 排序方式
     topN?: number
+    groupAccountIds?: number[]
 }
 
 /** 获取起量广告列表总表 */
@@ -331,6 +332,9 @@ export interface GetColumnTrendProps {
     adgroupId: number
     timeUnit: 'day' | 'hour' | 'minute'
     trendColumns: string[]
+
+    dataTimeMin?: string
+    dataTimeMax?: string
 }
 /**
  * NEW 广告指标趋势
@@ -365,6 +369,8 @@ export interface GetListForAdProps {
     pageSize: number,
     timeUnit: 'day' | 'hour' | 'minute'
     sortAsc?: boolean
+    dataTimeMin?: string
+    dataTimeMax?: string
 }
 /**
  * NEW 广告数据列表-指定广告的所有数据
@@ -408,6 +414,11 @@ export interface AdListProps {
 
     putDateBegin?: string,
     putDateEnd?: string
+
+    groupAccountIds?: number[]
+
+    dataTimeMin?: string
+    dataTimeMax?: string
 }
 export async function getAdListApi(data: AdListProps) {
     return request(`${api}/tencentMonitor/ad/list`, {