wjx 9 ay önce
ebeveyn
işleme
ee5c98b8a3

+ 3 - 3
src/components/CustomList/index.tsx

@@ -6,8 +6,8 @@ import { ReactComponent as DrawStem } from '@/assets/drawStem.svg'
 import { SortableContainer, SortableElement, SortableHandle } from "react-sortable-hoc";
 import arrayMove from "array-move";
 
-const DragHandle = SortableHandle(() => <DrawStem className='draw' />);
-const SortableItem = SortableElement(({ item, del, setConfig }: any) => {
+const DragHandle: any = SortableHandle(() => <DrawStem className='draw' />);
+const SortableItem: any = SortableElement(({ item, del, setConfig }: any) => {
     const [visible, setVisible] = useState<boolean>(false)
     const [width, setWidth] = useState<number>(item?.width || 0)
     return <li className='liDraw'>
@@ -43,7 +43,7 @@ const SortableItem = SortableElement(({ item, del, setConfig }: any) => {
     </li>
 });
 /** 外层 */
-const SortableList = SortableContainer(({ children }: { children: any }) => (<ul className='selectedList'>{children}</ul>));
+const SortableList: any = SortableContainer(({ children }: { children: any }) => (<ul className='selectedList'>{children}</ul>));
 
 interface dataProps {
     title: string,

+ 2 - 3
src/components/QueryForm/index.tsx

@@ -1,11 +1,10 @@
 import { useAjax } from "@/Hook/useAjax"
 import { AD_STATUS_ENUM, BID_MODE_ENUM } from "@/pages/iaaData/const"
-import { getAppListApi, getPutUserListApi } from "@/services/iaaData"
+import { getPutUserListApi } from "@/services/iaaData"
 import { Button, Col, Form, Row, Space, DatePicker, Select, Input, InputNumber } from "antd"
 import { RangePickerProps } from "antd/lib/date-picker"
 import React, { useEffect, useState } from "react"
 
-
 interface Props {
     onChange?: (data: any) => void
     /** 默认值 */
@@ -74,7 +73,7 @@ const QueryForm: React.FC<Props> = (props) => {
             {isAccountId && <Col><Form.Item name='accountId'>
                 <Input placeholder="广告账号" style={{ width: 150 }} />
             </Form.Item></Col>}
-            
+
             {/* 广告名称 */}
             {isPromotionName && <Col><Form.Item name='promotionName'>
                 <Input placeholder="广告名称" style={{ width: 150 }} />

+ 1 - 1
src/components/QueryForm/intervalTime.tsx

@@ -26,7 +26,7 @@ const IntervalTime: React.FC<Props> = ({ value = [undefined, undefined], onChang
         }
     }, [value, data])
 
-    const handleOk = (value: number, index: number) => {
+    const handleOk = (value: number | null, index: number) => {
         let newData = JSON.parse(JSON.stringify(data))
         newData[index] = value
         setData(newData)

+ 4 - 4
src/pages/iaaData/tencentIaa/appEveryDayData/tableConfig.tsx

@@ -145,15 +145,15 @@ function columns12(): { label: string, fieldSHow?: { label: string, saveField: s
                     render: (a: number) => <Statistic value={a || 0} />
                 },
                 {
-                    title: '活跃用户停留总时长', tips: '活跃用户人均停留时长*活跃用户人数', dataIndex: 'activeDuration', label: '应用端指标', align: 'center', width: 90, default: 31, sorter: true,
+                    title: '活跃用户停留总时长', tips: '活跃用户人均停留时长*活跃用户人数', dataIndex: 'activeDuration', label: '应用端指标', align: 'center', width: 110, default: 31, sorter: true,
                     render: (a: number) => {
-                        return formatSecondsToTime(a || 0)
+                        return formatSecondsToTime(a ? Math.round(a) : 0)
                     }
                 },
                 {
-                    title: '活跃用户人均停留时长', tips: '活跃用户停留总时长/活跃用户人数', dataIndex: 'avgActiveDuration', label: '应用端指标', align: 'center', width: 100, default: 32, sorter: true,
+                    title: '活跃用户人均停留时长', tips: '活跃用户停留总时长/活跃用户人数', dataIndex: 'avgActiveDuration', label: '应用端指标', align: 'center', width: 120, default: 32, sorter: true,
                     render: (a: number) => {
-                        return formatSecondsToTime(a || 0)
+                        return formatSecondsToTime(a ? Math.round(a) : 0)
                     }
                 },
                 {

+ 1 - 1
src/utils/utils.ts

@@ -137,5 +137,5 @@ export function formatSecondsToTime(seconds: number): string {
     const secs = seconds % 60;
 
     // 使用 padStart 确保每个部分都是两位数  
-    return `${String(hours).padStart(2, '0')}:${String(minutes).padStart(2, '0')}:${String(secs).padStart(2, '0')}`;
+    return `${hours > 24 ? `${Math.floor(hours / 24)}天${hours % 24}` : String(hours).padStart(2, '0')}:${String(minutes).padStart(2, '0')}:${String(secs).padStart(2, '0')}`;
 }