dodo hold 2 år sedan
förälder
incheckning
d921a23024

+ 1 - 0
src/api/taobao.ts

@@ -141,6 +141,7 @@ export interface TkReportRecord {
 
 export interface TkReportParams extends Partial<TkReportRecord> {
     accountId?: number;
+    total_key?: string;
     query_date?: string[]; // 覆盖 report_date 的类型为字符串数组
     current: number;
     pageSize: number;

+ 4 - 0
src/views/taobao/components/categories-percent.vue

@@ -81,6 +81,8 @@ import {
 // 使用 defineProps 来定义并接收 props
 const props = defineProps<{
     record: TkReportRecord;
+    total_key: string;
+
 }>();
 
 const scrollbar = ref(true);
@@ -99,6 +101,7 @@ const fetchData = async (
     params: TkReportParams = {
         current: 1,
         pageSize: 0,
+        total_key: props.total_key,
     }
 ) => {
     setLoading(true);
@@ -118,6 +121,7 @@ const search = () => {
         accountName: props.record.accountName,
         isLeaf: props.record.isLeaf,
         query_date: [props.record.report_date],
+        total_key: props.total_key,
     } as unknown as TkReportParams);
 };
 

+ 4 - 27
src/views/taobao/list.vue

@@ -142,55 +142,32 @@
                     </a-tag>
                 </template>
                 <template #actions="{ record }">
-                    <div style="margin:5px 5px 0 0;">
                         <a-tag v-if="record.enable_parse" size="mini" bordered color="red"
                             @click="changeAttr(record.id, 'enable_parse', false)">
-                            <template #icon>
-                                <icon-check />
-                            </template>
                             转链
                         </a-tag>
                         <a-tag v-else size="mini" bordered color=""
                             @click="changeAttr(record.id, 'enable_parse', true)">
-                            <template #icon>
-                                <icon-stop />
-                            </template>
                             转链
                         </a-tag>
-                    </div>
-                    <div style="margin:5px 5px 0 0;">
+                        <span style="margin:0 5px;">
                         <a-tag v-if="record.enable_coupon" size="mini" bordered color="orange"
                             @click="changeAttr(record.id, 'enable_coupon', false)">
-                            <template #icon>
-                                <icon-check />
-                            </template>
                             优惠券
                         </a-tag>
                         <a-tag v-else size="mini" bordered color=""
                             @click="changeAttr(record.id, 'enable_coupon', true)">
-                            <template #icon>
-                                <icon-stop />
-                            </template>
                             优惠券
                         </a-tag>
-                    </div>
-
-                    <div style="margin:5px 5px 0 0;">
+                    </span>
                         <a-tag v-if="record.enable_fake_click" size="mini" bordered color="blue"
                             @click="changeAttr(record.id, 'enable_fake_click', false)">
-                            <template #icon>
-                                <icon-check />
-                            </template>
                             补点击
                         </a-tag>
                         <a-tag v-else size="mini" bordered color="gray"
                             @click="changeAttr(record.id, 'enable_fake_click', true)">
-                            <template #icon>
-                                <icon-stop />
-                            </template>
                             补点击
                         </a-tag>
-                    </div>
                 </template>
                 <template #time="{ record }">
                     <div>{{ record.create_time }}</div>
@@ -307,8 +284,8 @@ const columns = computed<TableColumnData[]>(() => [
     {
         title: '分类',
         slotName: 'actions',
-        width: 100,
-        align: 'right',
+        width: 200,
+        align: 'center',
     },
     {
         title: '时间',

+ 143 - 18
src/views/taobao/report_daily.vue

@@ -188,6 +188,30 @@
                         </template>
                     </a-popover>
                 </template>
+                <template #parse_total_count="{ record }">
+                    <a-popover v-if="record.parse_total_count > 0" popup-container="body" trigger="click">
+                        <a-tag color="green">{{ record.parse_total_count }}</a-tag>
+                        <template #content>
+                            <CategoriesPercent total_key="parse_total" :record="record" />
+                        </template>
+                    </a-popover>
+                </template>
+                <template #coupon_total_count="{ record }">
+                    <a-popover v-if="record.coupon_total_count > 0" popup-container="body" trigger="click">
+                        <a-tag color="green">{{ record.coupon_total_count }}</a-tag>
+                        <template #content>
+                            <CategoriesPercent total_key="coupon_total" :record="record" />
+                        </template>
+                    </a-popover>
+                </template>
+                <template #tool_total_count="{ record }">
+                    <a-popover v-if="record.tool_total_count > 0" popup-container="body" trigger="click">
+                        <a-tag color="green">{{ record.tool_total_count }}</a-tag>
+                        <template #content>
+                            <CategoriesPercent total_key="tool_total" :record="record" />
+                        </template>
+                    </a-popover>
+                </template>
             </a-table>
         </a-card>
     </div>
@@ -299,12 +323,6 @@ const columns = computed<TableColumnData[]>(() => [
                 width: 100,
                 align: 'right'
             },
-            {
-                title: '点击次数(修正)',
-                dataIndex: 'fix_uclk_pv_56',
-                width: 130,
-                align: 'right'
-            },
         ]
     },
     {
@@ -419,42 +437,149 @@ const columns = computed<TableColumnData[]>(() => [
         ]
     },
     {
-        title: 'API调用',
+        title: '第三方API调用',
         children: [
             {
-                title: '调用总数',
+                title: '调用',
                 dataIndex: 'total_count',
                 slotName: 'total_count',
-                width: 100,
+                width: 80,
                 align: 'right'
             },
             {
-                title: '转链成功',
+                title: '成功',
                 dataIndex: 'success_count',
-                width: 100,
+                width: 90,
                 align: 'right'
             },
             {
-                title: '转链成功(%)',
+                title: '成功(%)',
                 dataIndex: 'success_percentage',
-                width: 120,
+                width: 90,
                 align: 'right'
             },
             {
-                title: '放弃转链',
+                title: '放弃',
                 dataIndex: 'abandon_count',
-                width: 100,
+                width: 90,
                 align: 'right'
             },
             {
-                title: '放弃转链(%)',
+                title: '放弃(%)',
                 dataIndex: 'abandon_percentage',
-                width: 120,
+                width: 90,
+                align: 'right'
+            },
+        ]
+    },
+    {
+        title: '转链API调用',
+        children: [
+            {
+                title: '调用',
+                dataIndex: 'parse_total_count',
+                slotName: 'parse_total_count',
+                width: 90,
+                align: 'right'
+            },
+            {
+                title: '成功',
+                dataIndex: 'parse_success_count',
+                width: 90,
+                align: 'right'
+            },
+            {
+                title: '成功(%)',
+                dataIndex: 'parse_success_percentage',
+                width: 90,
+                align: 'right'
+            },
+            {
+                title: '放弃',
+                dataIndex: 'parse_abandon_count',
+                width: 90,
+                align: 'right'
+            },
+            {
+                title: '放弃(%)',
+                dataIndex: 'parse_abandon_percentage',
+                width: 90,
+                align: 'right'
+            },
+        ]
+    },
+    {
+        title: '优惠券API调用',
+        children: [
+            {
+                title: '调用',
+                dataIndex: 'coupon_total_count',
+                slotName: 'coupon_total_count',
+                width: 90,
+                align: 'right'
+            },
+            {
+                title: '成功',
+                dataIndex: 'coupon_success_count',
+                width: 90,
+                align: 'right'
+            },
+            {
+                title: '成功(%)',
+                dataIndex: 'coupon_success_percentage',
+                width: 90,
+                align: 'right'
+            },
+            {
+                title: '放弃',
+                dataIndex: 'coupon_abandon_count',
+                width: 90,
+                align: 'right'
+            },
+            {
+                title: '放弃(%)',
+                dataIndex: 'coupon_abandon_percentage',
+                width: 90,
+                align: 'right'
+            },
+        ]
+    },
+    {
+        title: '工具API调用',
+        children: [
+            {
+                title: '调用',
+                dataIndex: 'tool_total_count',
+                slotName: 'tool_total_count',
+                width: 90,
+                align: 'right'
+            },
+            {
+                title: '成功',
+                dataIndex: 'tool_success_count',
+                width: 90,
+                align: 'right'
+            },
+            {
+                title: '成功(%)',
+                dataIndex: 'tool_success_percentage',
+                width: 90,
+                align: 'right'
+            },
+            {
+                title: '放弃',
+                dataIndex: 'tool_abandon_count',
+                width: 90,
+                align: 'right'
+            },
+            {
+                title: '放弃(%)',
+                dataIndex: 'tool_abandon_percentage',
+                width: 90,
                 align: 'right'
             },
         ]
     },
-
     {
         title: '最后更新时间',
         dataIndex: 'last_time',