Переглянути джерело

Merge branch 'develop' of http://git.zanxiangnet.com/wjx/ad-manage

wjx 8 місяців тому
батько
коміт
4a1f6a24dd

+ 2 - 2
src/pages/adMonitor/adMonitorList/columnTrend.tsx

@@ -1,5 +1,5 @@
 import { useAjax } from "@/Hook/useAjax"
-import { GetAdColumnTrendProps, getAdColumnTrendApi } from "@/services/adMonitor/adMonitor"
+import { GetAdColumnTrendProps, getAdColumnTrendApi, getAdV3ColumnTrendApi } from "@/services/adMonitor/adMonitor"
 import { DatePicker, Modal, Select, Space, Spin } from "antd"
 import React, { useEffect, useState } from "react"
 import moment from "moment"
@@ -18,7 +18,7 @@ const ColumnTrend: React.FC<Props> = ({ data: { field, dataTimeMin, dataTimeMax,
     const { LineMonitor } = useEcharts()
     const [lineDis, setLineDis] = useState<any[]>([])
     const [queryParams, setQueryParams] = useState<GetAdColumnTrendProps>({ timeUnit: 'day', pageParams, trendColumns: [field], dataTimeMin, dataTimeMax })
-    const getAdColumnTrend = useAjax((params) => getAdColumnTrendApi(params), { formatResult: true })
+    const getAdColumnTrend = useAjax((params) => getAdV3ColumnTrendApi(params), { formatResult: true })
     /*********************************/
 
     useEffect(() => {

+ 2 - 2
src/pages/adMonitor/adMonitorList/monitor1.tsx

@@ -146,9 +146,9 @@ function Monitor(props: { onChange: () => void }) {
         let params = adgroup ? { ...newQueryForm, adgroupIdStr: adgroup } : newQueryForm
         let res = await getCostTrendList.run({ ...params, timeUnit: planTimeUnit, sysUserIds: sysUserId, accountIdStr: accountId?.join(), trendColumns })
         let data = trendColumns.map((field) => {
-            let value: any = {}
+            let value: any = { legendName: LineField[field as keyof typeof LineField] }
             res?.data?.forEach((item: any, index: number) => {
-                if (index === 0) value.legendName = LineField[field as keyof typeof LineField];
+                // if (index === 0) value.legendName = LineField[field as keyof typeof LineField];
                 value[item?.trend_unit] = item?.[field]
             });
             return value

+ 1 - 1
src/pages/launchSystemV3/adMonitorListV3/config.ts

@@ -213,7 +213,7 @@ const dynamicConfig = [
             { title: '公众号关注人数(点击归因)', dataIndex: 'from_follow_by_click_uv_day', serverIndex: 'creative_data.from_follow_by_click_uv_day', label: '广告转化信息', width: 85 },
             { title: '公众号关注成本(点击归因)', dataIndex: 'from_follow_by_click_cost_day', serverIndex: 'creative_data.from_follow_by_click_cost_day', label: '广告转化信息', width: 85 },
             { title: '公众号关注率(点击归因)', dataIndex: 'biz_follow_rate_click', serverIndex: 'calculate_creative_data.biz_follow_rate_click', label: '广告转化信息', width: 85 },
-            { title: '公众号关注人数(平台上报)', dataIndex: 'biz_follow_uv_total', serverIndex: 'creative_data.biz_follow_uv_total', label: '广告转化信息', width: 85 },
+            { title: '公众号关注人数(平台上报)', dataIndex: 'biz_follow_uv_day', serverIndex: 'creative_data.biz_follow_uv_day', label: '广告转化信息', width: 85 },
             { title: '公众号关注成本(平台上报)', dataIndex: 'biz_follow_cost', serverIndex: 'calculate_creative_data.biz_follow_cost', label: '广告转化信息', width: 85 },
             { title: '公众号关注率(平台上报)', dataIndex: 'biz_follow_rate', serverIndex: 'calculate_creative_data.biz_follow_rate', label: '广告转化信息', width: 85 },
             { title: '目标转化量', dataIndex: 'conversions_count_day', serverIndex: 'creative_data.conversions_count_day', label: '广告转化信息', width: 70 },

+ 3 - 3
src/pages/launchSystemV3/adMonitorListV3/tableDynamicConfig.tsx

@@ -247,13 +247,13 @@ function tableDynamicConfig(
         },
         {
             title: '公众号关注人数(平台上报)',
-            dataIndex: 'biz_follow_uv_total',
-            key: 'biz_follow_uv_total',
+            dataIndex: 'biz_follow_uv_day',
+            key: 'biz_follow_uv_day',
             align: 'center',
             width: 120,
             sorter: true,
             render: (a: any, b: any) => {
-                return <StatisticNull data={b} field='biz_follow_uv_total' />
+                return <StatisticNull data={b} field='biz_follow_uv_day' />
             }
         },
         {

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

@@ -472,6 +472,18 @@ export async function getAdColumnTrendApi(data: GetAdColumnTrendProps) {
     })
 }
 
+/**
+ * v3指标趋势
+ * @param data 
+ * @returns 
+ */
+export async function getAdV3ColumnTrendApi(data: GetAdColumnTrendProps) {
+    return request(`${api}/tencentMonitor/adV3/columnTrend`, {
+        method: 'POST',
+        data
+    })
+}
+
 export interface AdListProps {
     pageNum: number
     pageSize: number