shenwu пре 2 година
родитељ
комит
d2721d2ac3

+ 2 - 2
config/proxy.ts

@@ -10,8 +10,8 @@
  export default {
   dev: {
     '/api/': {
-      // target: 'http://test.api.zanxiangwl.com',
-      target: 'http://api.zanxiangwl.com',
+      target: 'http://test.api.zanxiangwl.com',
+      // target: 'http://api.zanxiangwl.com',
       changeOrigin: true,
       pathRewrite: { '/api': '' },
     },

+ 40 - 41
src/pages/launchSystemNew/adq/ad/tableConfig.tsx

@@ -1,11 +1,13 @@
 import { AdStatusEnum, BidModeEnum, BidStrategyEnum, OptimizationGoalEnum, PromotedObjectType } from '@/services/launchAdq/enum'
 import React from 'react'
-import { Badge } from 'antd'
+import { Badge, Space } from 'antd'
 import Box from '@/pages/adMonitor/adMonitorList/components/box'
 import SwitchStatus from './switchStatus'
 import TimeSeriesLook from './timeSeriesLook'
 import { ReactComponent as RocketSvg } from '@/assets/rocket.svg'
 import '../index.less'
+import { CopyOutlined } from '@ant-design/icons'
+import { copy } from '@/utils/utils'
 function tableConfig(
     onChange: () => void,
     details: (data: any) => void,
@@ -29,7 +31,7 @@ function tableConfig(
             width: 55,
             fixed: 'left',
             render: (a: string, b: any) => {
-                return <SwitchStatus configuredStatus={a} isDeleted={b?.isDeleted} adgroupId={b?.adgroupId} onChange={onChange}/>
+                return <SwitchStatus configuredStatus={a} isDeleted={b?.isDeleted} adgroupId={b?.adgroupId} onChange={onChange} />
             }
         },
         {
@@ -37,13 +39,15 @@ function tableConfig(
             dataIndex: 'accountId',
             key: 'accountId',
             align: 'center',
-            width: 70,
+            width: 100,
             fixed: 'left',
             ellipsis: true,
             render: (a: string) => {
-                return <a onClick={() => {
-                    tableIdClick({ activeKey: '1', parma: { accountId: a } })
-                }}>{a}</a>
+                return <Space>
+                    <a onClick={() => copy(a)} style={{color:'#00bcd4'}}><CopyOutlined /></a><a onClick={() => {
+                        tableIdClick({ activeKey: '1', parma: { accountId: a } })
+                    }}>{a}</a>
+                </Space>
             }
         },
         {
@@ -51,7 +55,7 @@ function tableConfig(
             dataIndex: 'memo',
             key: 'memo',
             align: 'center',
-            width: 100,
+            width: 90,
             fixed: 'left',
             ellipsis: true,
         },
@@ -60,7 +64,7 @@ function tableConfig(
             dataIndex: 'remark',
             key: 'remark',
             align: 'center',
-            width: 100,
+            width: 90,
             fixed: 'left',
             ellipsis: true,
         },
@@ -69,14 +73,16 @@ function tableConfig(
             dataIndex: 'adgroupId',
             key: 'adgroupId',
             align: 'center',
-            width: 85,
+            width: 120,
             fixed: 'left',
             ellipsis: true,
-            render: (a: string,b:any) => {
-                return <a onClick={() => {
-                    tableIdClick({ activeKey: '3', parma: { adgroupId: a } })
-                    window.open(`https://ad.qq.com/atlas/${b?.accountId}/admanage/adcreative?adgroupid=${b?.adgroupId}&query={%22configured_status%22:[%22AD_STATUS_EXCLUDE_DELETED%22],%22status%22:[]}`)
-                }}>{a}</a>
+            render: (a: string, b: any) => {
+                return <Space>
+                    <a onClick={() => copy(a)} style={{color:'#00bcd4'}}><CopyOutlined /></a>
+                    <a onClick={() => {
+                        tableIdClick({ activeKey: '3', parma: { adgroupId: a } })
+                    }}>{a}</a>
+                </Space>
             }
         },
         {
@@ -84,14 +90,16 @@ function tableConfig(
             dataIndex: 'campaignId',
             key: 'campaignId',
             align: 'center',
-            width: 85,
+            width: 120,
             fixed: 'left',
             ellipsis: true,
-            render: (a: string,b:any) => {
-                return <a onClick={() => {
-                    tableIdClick({ activeKey: '2', parma: { campaignId: a } })
-                    window.open(`https://ad.qq.com/atlas/${b?.accountId}/admanage/adgroup?campaignid=${b?.campaignId}&query={%22operation_status%22:[%22CALCULATE_STATUS_EXCLUDE_DEL%22],%22system_status%22:[]}`)
-                }}>{a}</a>
+            render: (a: string, b: any) => {
+                return <Space >
+                    <a onClick={() => copy(a)} style={{color:'#00bcd4'}}><CopyOutlined /></a>
+                    <a onClick={() => {
+                        tableIdClick({ activeKey: '2', parma: { campaignId: a } })
+                    }}>{a}</a>
+                </Space>
             }
         },
         {
@@ -139,7 +147,7 @@ function tableConfig(
             align: 'center',
             width: 55,
             render: (a: string, b: { endDate: string }) => {
-                return <TimeSeriesLook timeSeries={a}/>
+                return <TimeSeriesLook timeSeries={a} />
             }
         },
         {
@@ -260,26 +268,17 @@ function tableConfig(
                 </div>
             }
         },
-        // {
-        //     title: '操作',
-        //     dataIndex: 'cz',
-        //     key: 'cz',
-        //     width: 65,
-        //     align: 'center',
-        //     fixed: 'right',
-        //     render: (a: any, b: any) => {
-        //         return <Space>
-        //             {b?.status !== 'STATUS_DELETED' && <Popconfirm
-        //                 title="确定删除?"
-        //                 onConfirm={() => deleteHandle(0, b?.adgroupId)}
-        //                 okText="是"
-        //                 cancelText="否"
-        //             >
-        //                 <Button danger type='text' size='small'>删除</Button>
-        //             </Popconfirm>}
-        //         </Space>
-        //     }
-        // },
+        {
+            title: '操作',
+            dataIndex: 'cz',
+            key: 'cz',
+            width: 65,
+            align: 'center',
+            fixed: 'right',
+            render: (a: any, b: any) => {
+                return <a style={{ color: '#1890ff' }} onClick={() => window.open(`https://ad.qq.com/atlas/${b?.accountId}/admanage/adcreative?adgroupid=${b?.adgroupId}&query={%22configured_status%22:[%22AD_STATUS_EXCLUDE_DELETED%22],%22status%22:[]}`)} target="_blank">腾讯广告</a>
+            }
+        },
     ]
 }
 export default tableConfig

+ 2 - 2
src/pages/launchSystemNew/adq/adAccount/index.tsx

@@ -29,7 +29,7 @@ type Props = {
     }) => void
 }
 function AdAccount(props: Props) {
-    let { adAccountId, userId } = props
+    let { adAccountId, userId ,tableIdClick} = props
     let [selectedRowKeys, setSelectedRowKeys] = useState<any[]>([])
     const [queryForm, setQueryForm] = useState<{
         pageNum: number;
@@ -63,7 +63,7 @@ function AdAccount(props: Props) {
     return <div>
         <TableData
             isCard={false}
-            columns={() => tableConfig()}
+            columns={() => tableConfig(tableIdClick)}
             ajax={listAjax}
             syncAjax={sync}
             dataSource={listAjax?.data?.data?.records}

+ 7 - 3
src/pages/launchSystemNew/adq/adAccount/tableConfig.tsx

@@ -1,8 +1,9 @@
 import { FundStatusEnum, } from '@/services/launchAdq/enum'
 import React from 'react'
-import { Badge } from 'antd'
+import { Badge, Space } from 'antd'
 import { copy } from '@/utils/utils'
-function tableConfig(): any {
+import { CopyOutlined } from '@ant-design/icons'
+function tableConfig(tableIdClick: any): any {
     return [
         {
             title: 'ID',
@@ -18,7 +19,10 @@ function tableConfig(): any {
             align: 'center',
             width: 90,
             render: (a: string) => {
-                return <a onClick={() => { copy(a) }}>{a}</a>
+                return <Space>
+                    <a onClick={() => copy(a)} style={{ color: '#00bcd4' }}><CopyOutlined /></a>
+                    <a onClick={() => tableIdClick({ activeKey: '1', parma: { accountId: a } })}>{a}</a>
+                </Space>
             }
         },
         {

+ 28 - 7
src/pages/launchSystemNew/adq/campaign/tableConfig.tsx

@@ -1,5 +1,7 @@
 import { CampaignTypeEnum, ConfiguredStatusEnum, PromotedObjectType, SpeedMode } from '@/services/launchAdq/enum'
-import { Badge, Switch } from 'antd'
+import { copy } from '@/utils/utils'
+import { CopyOutlined } from '@ant-design/icons'
+import { Badge, Space, Switch } from 'antd'
 import React from 'react'
 
 function tableConfig(
@@ -36,10 +38,14 @@ function tableConfig(
             align: 'center',
             width: 90,
             fixed: 'left',
+            ellipsis: true,
             render: (a: string) => {
-                return <a onClick={() => {
-                    tableIdClick({ activeKey: '1', parma: { accountId: a } })
-                }}>{a}</a>
+                return <Space>
+                    <a onClick={() => copy(a)} style={{ color: '#00bcd4' }}><CopyOutlined /></a>
+                    <a onClick={() => {
+                        tableIdClick({ activeKey: '1', parma: { accountId: a } })
+                    }}>{a}</a>
+                </Space>
             }
         },
         {
@@ -49,10 +55,14 @@ function tableConfig(
             align: 'center',
             width: 100,
             fixed: 'left',
+            ellipsis: true,
             render: (a: string) => {
-                return <a onClick={() => {
-                    tableIdClick({ activeKey: '2', parma: { campaignId: a } })
-                }}>{a}</a>
+                return <Space>
+                    <a onClick={() => copy(a)} style={{ color: '#00bcd4' }}><CopyOutlined /></a>
+                    <a onClick={() => {
+                        tableIdClick({ activeKey: '2', parma: { campaignId: a } })
+                    }}>{a}</a>
+                </Space>
             }
         },
         {
@@ -135,6 +145,17 @@ function tableConfig(
                 return <Badge status={a === 'AD_STATUS_NORMAL' ? "processing" : "error"} text={ConfiguredStatusEnum[a]} />
             }
         },
+        {
+            title: '操作',
+            dataIndex: 'cz',
+            key: 'cz',
+            width: 65,
+            align: 'center',
+            fixed: 'right',
+            render: (a: any, b: any) => {
+                return <a style={{ color: '#1890ff' }} onClick={() => window.open(`https://ad.qq.com/atlas/${b?.accountId}/admanage/adgroup?campaignid=${b?.campaignId}&query={%22operation_status%22:[%22CALCULATE_STATUS_EXCLUDE_DEL%22],%22system_status%22:[]}`)} target="_blank">腾讯计划</a>
+            }
+        },
     ]
 }
 export default tableConfig

+ 29 - 14
src/pages/launchSystemNew/adq/creative/tableConfig.tsx

@@ -1,4 +1,7 @@
 import { AdcreativeTemplateEnum, LinkPageNameTypeEnum, LinkPageTypeEnum, PromotedObjectType } from '@/services/launchAdq/enum'
+import { copy } from '@/utils/utils'
+import { CopyOutlined } from '@ant-design/icons'
+import { Space } from 'antd'
 import React from 'react'
 function tableConfig(tableIdClick: (props: {
     activeKey: string,
@@ -17,11 +20,15 @@ function tableConfig(tableIdClick: (props: {
             dataIndex: 'accountId',
             key: 'accountId',
             align: 'center',
-            width: 90,
+            width: 100,
+            ellipsis: true,
             render: (a: string) => {
-                return <a onClick={() => {
-                    tableIdClick({ activeKey: '1', parma: { accountId: a } })
-                }}>{a}</a>
+                return <Space>
+                    <a onClick={() => copy(a)} style={{ color: '#00bcd4' }}><CopyOutlined /></a>
+                    <a onClick={() => {
+                        tableIdClick({ activeKey: '1', parma: { accountId: a } })
+                    }}>{a}</a>
+                </Space>
             }
         },
         {
@@ -29,11 +36,15 @@ function tableConfig(tableIdClick: (props: {
             dataIndex: 'adcreativeId',
             key: 'adcreativeId',
             align: 'center',
-            width: 100,
+            width: 120,
+            ellipsis: true,
             render: (a: string) => {
-                return <a onClick={() => {
-                    tableIdClick({ activeKey: '4', parma: { adcreativeId: a } })
-                }}>{a}</a>
+                return <Space>
+                    <a onClick={() => copy(a)} style={{ color: '#00bcd4' }}><CopyOutlined /></a>
+                    <a onClick={() => {
+                        tableIdClick({ activeKey: '4', parma: { adcreativeId: a } })
+                    }}>{a}</a>
+                </Space>
             }
         },
         {
@@ -41,11 +52,15 @@ function tableConfig(tableIdClick: (props: {
             dataIndex: 'campaignId',
             key: 'campaignId',
             align: 'center',
-            width: 100,
+            width: 120,
+            ellipsis: true,
             render: (a: string) => {
-                return <a onClick={() => {
-                    tableIdClick({ activeKey: '2', parma: { campaignId: a } })
-                }}>{a}</a>
+                return <Space>
+                    <a onClick={() => copy(a)} style={{ color: '#00bcd4' }}><CopyOutlined /></a>
+                    <a onClick={() => {
+                        tableIdClick({ activeKey: '2', parma: { campaignId: a } })
+                    }}>{a}</a>
+                </Space>
             }
         },
         // {
@@ -228,7 +243,7 @@ function tableConfig(tableIdClick: (props: {
             dataIndex: 'adcreativeTemplateId',
             key: 'adcreativeTemplateId',
             align: 'center',
-            render:(a: string | number)=>{
+            render: (a: string | number) => {
                 return AdcreativeTemplateEnum[a]
             }
         },
@@ -303,7 +318,7 @@ function tableConfig(tableIdClick: (props: {
             dataIndex: 'createdTime',
             key: 'createdTime',
             align: 'center',
-            width:150
+            width: 150
         },
     ]
 }

+ 8 - 2
src/pages/launchSystemNew/adq/landingPage/tableConfig.tsx

@@ -1,7 +1,8 @@
 import {  PageStatusEnum, PageTypeEnum, SourceTypeEnum } from '@/services/launchAdq/enum'
 import React from 'react'
-import { Badge } from 'antd'
+import { Badge, Space } from 'antd'
 import { copy } from '@/utils/utils'
+import { CopyOutlined } from '@ant-design/icons'
 function tableConfig(tableIdClick: any): any {
     return [
         {
@@ -10,8 +11,12 @@ function tableConfig(tableIdClick: any): any {
             key: 'accountId',
             align: 'center',
             width:100,
+            ellipsis: true,
             render:(a:string)=>{
-                return <a onClick={() => tableIdClick({ activeKey: '1', parma: { accountId: a } })}>{a}</a>
+                return <Space>
+                <a onClick={() => copy(a)} style={{ color: '#00bcd4' }}><CopyOutlined /></a>
+                <a onClick={() => tableIdClick({ activeKey: '1', parma: { accountId: a } })}>{a}</a>
+                </Space>
             }
         },
         {
@@ -20,6 +25,7 @@ function tableConfig(tableIdClick: any): any {
             key: 'pageId',
             align: 'center',
             width:100,
+            ellipsis: true,
             render:(a:string)=>{
                 return <a onClick={() => copy(a)}>{a}</a>
             }

+ 28 - 18
src/pages/launchSystemNew/adq/log/tableConfig.tsx

@@ -1,5 +1,6 @@
 import { copy } from "@/utils/utils"
-import { Badge } from "antd"
+import { CopyOutlined } from "@ant-design/icons"
+import { Badge, Space } from "antd"
 import React from "react"
 
 
@@ -20,13 +21,16 @@ function tableConfig(tableIdClick: (props: {
             dataIndex: 'accountId',
             key: 'accountId',
             align: 'center',
-            width: 70,
+            width: 100,
             fixed: 'left',
             ellipsis: true,
             render: (a: string) => {
-                return <a onClick={() => {
-                    tableIdClick({ activeKey: '1', parma: { accountId: a } })
-                }}>{a}</a>
+                return <Space>
+                    <a onClick={() => copy(a)} style={{ color: '#00bcd4' }}><CopyOutlined /></a>
+                    <a onClick={() => {
+                        tableIdClick({ activeKey: '1', parma: { accountId: a } })
+                    }}>{a}</a>
+                </Space>
             }
         },
         {
@@ -34,13 +38,16 @@ function tableConfig(tableIdClick: (props: {
             dataIndex: 'adgroupId',
             key: 'adgroupId',
             align: 'center',
-            width: 85,
+            width: 120,
             fixed: 'left',
             ellipsis: true,
             render: (a: string) => {
-                return <a onClick={() => {
-                    tableIdClick({ activeKey: '3', parma: { adgroupId: a } })
-                }}>{a}</a>
+                return <Space>
+                    <a onClick={() => copy(a)} style={{ color: '#00bcd4' }}><CopyOutlined /></a>
+                    <a onClick={() => {
+                        tableIdClick({ activeKey: '3', parma: { adgroupId: a } })
+                    }}>{a}</a>
+                </Space>
             }
         },
         {
@@ -48,13 +55,16 @@ function tableConfig(tableIdClick: (props: {
             dataIndex: 'campaignId',
             key: 'campaignId',
             align: 'center',
-            width: 85,
+            width: 120,
             fixed: 'left',
             ellipsis: true,
             render: (a: string) => {
-                return <a onClick={() => {
-                    tableIdClick({ activeKey: '2', parma: { campaignId: a } })
-                }}>{a}</a>
+                return <Space>
+                    <a onClick={() => copy(a)} style={{ color: '#00bcd4' }}><CopyOutlined /></a>
+                    <a onClick={() => {
+                        tableIdClick({ activeKey: '2', parma: { campaignId: a } })
+                    }}>{a}</a>
+                </Space>
             }
         },
         {
@@ -118,11 +128,11 @@ function tableConfig(tableIdClick: (props: {
             key: 'status',
             width: 70,
             align: 'center',
-            render: (a:any) => {
-                let obj={
-                    '成功':'success',
-                    '失败':'error',
-                    '执行中':'warning'
+            render: (a: any) => {
+                let obj = {
+                    '成功': 'success',
+                    '失败': 'error',
+                    '执行中': 'warning'
                 }
                 return <Badge status={obj[a]} text={a} />
             }

+ 9 - 3
src/pages/launchSystemNew/adq/targeting/tableConfig.tsx

@@ -1,7 +1,8 @@
 import { TargetingSourceTypeEnum, } from '@/services/launchAdq/enum'
 import React from 'react'
-import { Badge, Tooltip } from 'antd'
+import { Badge, Space, Tooltip } from 'antd'
 import { copy } from '@/utils/utils'
+import { CopyOutlined } from '@ant-design/icons'
 function tableConfig(tableIdClick: any): any {
     return [
         {
@@ -9,9 +10,13 @@ function tableConfig(tableIdClick: any): any {
             dataIndex: 'accountId',
             key: 'accountId',
             align: 'center',
-            width: 80,
+            width: 100,
+            ellipsis: true,
             render: (a: string) => {
-                return <a onClick={() => tableIdClick({ activeKey: '1', parma: { accountId: a } })}>{a}</a>
+                return <Space>
+                    <a onClick={() => copy(a)} style={{ color: '#00bcd4' }}><CopyOutlined /></a>
+                    <a onClick={() => tableIdClick({ activeKey: '1', parma: { accountId: a } })}>{a}</a>
+                </Space>
             }
         },
         {
@@ -20,6 +25,7 @@ function tableConfig(tableIdClick: any): any {
             key: 'targetingId',
             align: 'center',
             width: 100,
+            ellipsis: true,
             render: (a: string) => {
                 return <a onClick={() => copy(a)}>{a}</a>
             }