|  | @@ -10,17 +10,19 @@ import UpdateAd from "./updateAd";
 | 
											
												
													
														|  |  import TableData from "@/pages/launchSystemNew/components/TableData";
 |  |  import TableData from "@/pages/launchSystemNew/components/TableData";
 | 
											
												
													
														|  |  import AddDynamic from "../../tencentAdPutIn/create/addDynamic";
 |  |  import AddDynamic from "../../tencentAdPutIn/create/addDynamic";
 | 
											
												
													
														|  |  import { arraysHaveSameValues } from "@/utils/utils";
 |  |  import { arraysHaveSameValues } from "@/utils/utils";
 | 
											
												
													
														|  | -import { MARKETING_CARRIER_TYPE_ENUM, MARKETING_GOAL_ENUM, MARKETING_TARGET_TYPE_ENUM, SITE_SET_ENUM } from "../../tencentAdPutIn/const";
 |  | 
 | 
											
												
													
														|  | 
 |  | +import { MARKETING_CARRIER_TYPE_ENUM, MARKETING_GOAL_ENUM, MARKETING_SUB_GOAL_ENUM, MARKETING_TARGET_TYPE_ENUM, MARKETING_TARGET_TYPE_GAME_ENUM, SITE_SET_ENUM } from "../../tencentAdPutIn/const";
 | 
											
												
													
														|  |  import Log from "../components/log";
 |  |  import Log from "../components/log";
 | 
											
												
													
														|  |  import '../../tencentAdPutIn/index.less'
 |  |  import '../../tencentAdPutIn/index.less'
 | 
											
												
													
														|  |  import UserTactics from "../../tencentAdPutIn/create/TacticsS/userTactics";
 |  |  import UserTactics from "../../tencentAdPutIn/create/TacticsS/userTactics";
 | 
											
												
													
														|  |  import UpdateAd3 from "./updateAd3";
 |  |  import UpdateAd3 from "./updateAd3";
 | 
											
												
													
														|  | 
 |  | +import { useLocalStorageState } from "ahooks";
 | 
											
												
													
														|  |  const { Text } = Typography;
 |  |  const { Text } = Typography;
 | 
											
												
													
														|  |  
 |  |  
 | 
											
												
													
														|  |  const Ad: React.FC<ADQV3.AdProps> = ({ userId, creativeHandle }) => {
 |  |  const Ad: React.FC<ADQV3.AdProps> = ({ userId, creativeHandle }) => {
 | 
											
												
													
														|  |  
 |  |  
 | 
											
												
													
														|  |      /*****************************************/
 |  |      /*****************************************/
 | 
											
												
													
														|  | -    const [queryFrom, set_queryFrom] = useState<ADQV3.GetAdListProps>({ pageNum: 1, pageSize: 20, useType: 1 })
 |  | 
 | 
											
												
													
														|  | 
 |  | +    const [useType, setUseType] = useLocalStorageState<1 | 2>('AD_USETYPE', 1);
 | 
											
												
													
														|  | 
 |  | +    const [queryFrom, set_queryFrom] = useState<ADQV3.GetAdListProps>({ pageNum: 1, pageSize: 20, useType: useType || 1 })
 | 
											
												
													
														|  |      const [isClearSelect, setIsClearSelect] = useState(true)
 |  |      const [isClearSelect, setIsClearSelect] = useState(true)
 | 
											
												
													
														|  |      const [selectedRows, setSelectedRows] = useState<any[]>([])
 |  |      const [selectedRows, setSelectedRows] = useState<any[]>([])
 | 
											
												
													
														|  |      const [tactics, setTactics] = useState<any>()
 |  |      const [tactics, setTactics] = useState<any>()
 | 
											
										
											
												
													
														|  | @@ -36,7 +38,7 @@ const Ad: React.FC<ADQV3.AdProps> = ({ userId, creativeHandle }) => {
 | 
											
												
													
														|  |      /*****************************************/
 |  |      /*****************************************/
 | 
											
												
													
														|  |  
 |  |  
 | 
											
												
													
														|  |      useEffect(() => {
 |  |      useEffect(() => {
 | 
											
												
													
														|  | -        getList({ pageNum: 1, pageSize: 20, useType: 1 })
 |  | 
 | 
											
												
													
														|  | 
 |  | +        getList({ pageNum: 1, pageSize: 20, useType: useType || 1 })
 | 
											
												
													
														|  |      }, [userId])
 |  |      }, [userId])
 | 
											
												
													
														|  |  
 |  |  
 | 
											
												
													
														|  |      // 获取列表
 |  |      // 获取列表
 | 
											
										
											
												
													
														|  | @@ -93,9 +95,12 @@ const Ad: React.FC<ADQV3.AdProps> = ({ userId, creativeHandle }) => {
 | 
											
												
													
														|  |                      filterOption={(input: any, option: any) =>
 |  |                      filterOption={(input: any, option: any) =>
 | 
											
												
													
														|  |                          (option!.children as unknown as string).toLowerCase().includes(input.toLowerCase())
 |  |                          (option!.children as unknown as string).toLowerCase().includes(input.toLowerCase())
 | 
											
												
													
														|  |                      }
 |  |                      }
 | 
											
												
													
														|  | -                    value={queryFrom.useType}
 |  | 
 | 
											
												
													
														|  | 
 |  | +                    value={useType}
 | 
											
												
													
														|  |                      onChange={(value: any) => {
 |  |                      onChange={(value: any) => {
 | 
											
												
													
														|  | -                        set_queryFrom({ ...queryFrom, useType: value })
 |  | 
 | 
											
												
													
														|  | 
 |  | +                        let params = { ...queryFrom, useType: value, pageNum: 1 }
 | 
											
												
													
														|  | 
 |  | +                        setUseType(value)
 | 
											
												
													
														|  | 
 |  | +                        set_queryFrom(params)
 | 
											
												
													
														|  | 
 |  | +                        getList(params)
 | 
											
												
													
														|  |                      }}
 |  |                      }}
 | 
											
												
													
														|  |                  >
 |  |                  >
 | 
											
												
													
														|  |                      <Select.Option value={1}>小说</Select.Option>
 |  |                      <Select.Option value={1}>小说</Select.Option>
 | 
											
										
											
												
													
														|  | @@ -232,7 +237,7 @@ const Ad: React.FC<ADQV3.AdProps> = ({ userId, creativeHandle }) => {
 | 
											
												
													
														|  |          </Row>
 |  |          </Row>
 | 
											
												
													
														|  |          <TableData
 |  |          <TableData
 | 
											
												
													
														|  |              isCard={false}
 |  |              isCard={false}
 | 
											
												
													
														|  | -            columns={() => tableConfig(() => getAdqV3AdList.refresh(), creativeHandle)}
 |  | 
 | 
											
												
													
														|  | 
 |  | +            columns={() => tableConfig(() => getAdqV3AdList.refresh(), creativeHandle, useType)}
 | 
											
												
													
														|  |              ajax={getAdqV3AdList}
 |  |              ajax={getAdqV3AdList}
 | 
											
												
													
														|  |              syncAjax={sync}
 |  |              syncAjax={sync}
 | 
											
												
													
														|  |              fixed={{ left: 2, right: 5 }}
 |  |              fixed={{ left: 2, right: 5 }}
 | 
											
										
											
												
													
														|  | @@ -268,23 +273,40 @@ const Ad: React.FC<ADQV3.AdProps> = ({ userId, creativeHandle }) => {
 | 
											
												
													
														|  |                              setUpdateDate({ visible: true, type: '删除' })
 |  |                              setUpdateDate({ visible: true, type: '删除' })
 | 
											
												
													
														|  |                          }}>删除</Button></Col>
 |  |                          }}>删除</Button></Col>
 | 
											
												
													
														|  |                          <Col><Dropdown
 |  |                          <Col><Dropdown
 | 
											
												
													
														|  | -                            overlay={<Menu>
 |  | 
 | 
											
												
													
														|  | -                                <Menu.Item disabled={selectedRows.length === 0} onClick={() => {
 |  | 
 | 
											
												
													
														|  | -                                    setUpdateDate({ visible: true, type: '修改出价' })
 |  | 
 | 
											
												
													
														|  | -                                }}><span style={{ display: 'inline-block', width: 120 }}>修改出价</span></Menu.Item>
 |  | 
 | 
											
												
													
														|  | -                                <Menu.Item disabled={selectedRows.length === 0} onClick={() => {
 |  | 
 | 
											
												
													
														|  | -                                    setUpdateDate({ visible: true, type: '修改名称' })
 |  | 
 | 
											
												
													
														|  | -                                }}>修改名称</Menu.Item>
 |  | 
 | 
											
												
													
														|  | -                                <Menu.Item disabled={selectedRows.length === 0} onClick={() => {
 |  | 
 | 
											
												
													
														|  | -                                    setUpdateDate({ visible: true, type: '修改日限额' })
 |  | 
 | 
											
												
													
														|  | -                                }}>修改日限额</Menu.Item>
 |  | 
 | 
											
												
													
														|  | -                                <Menu.Item disabled={selectedRows.length === 0} onClick={() => {
 |  | 
 | 
											
												
													
														|  | -                                    setUpdateDate({ visible: true, type: '修改投放时间' })
 |  | 
 | 
											
												
													
														|  | -                                }}>修改投放日期</Menu.Item>
 |  | 
 | 
											
												
													
														|  | -                                <Menu.Item disabled={selectedRows.length === 0} onClick={() => {
 |  | 
 | 
											
												
													
														|  | -                                    setUpdateDate({ visible: true, type: '修改投放首日开始时间' })
 |  | 
 | 
											
												
													
														|  | -                                }}>修改投放首日开始时间</Menu.Item>
 |  | 
 | 
											
												
													
														|  | -                            </Menu>}
 |  | 
 | 
											
												
													
														|  | 
 |  | +                            menu={{
 | 
											
												
													
														|  | 
 |  | +                                items: [
 | 
											
												
													
														|  | 
 |  | +                                    {
 | 
											
												
													
														|  | 
 |  | +                                        label: <span style={{ display: 'inline-block', width: 120 }}>修改出价</span>,
 | 
											
												
													
														|  | 
 |  | +                                        key: '1',
 | 
											
												
													
														|  | 
 |  | +                                        disabled: selectedRows.length === 0,
 | 
											
												
													
														|  | 
 |  | +                                        onClick: () => { setUpdateDate({ visible: true, type: '修改出价' }) }
 | 
											
												
													
														|  | 
 |  | +                                    },
 | 
											
												
													
														|  | 
 |  | +                                    {
 | 
											
												
													
														|  | 
 |  | +                                        label: '修改名称',
 | 
											
												
													
														|  | 
 |  | +                                        key: '2',
 | 
											
												
													
														|  | 
 |  | +                                        disabled: selectedRows.length === 0,
 | 
											
												
													
														|  | 
 |  | +                                        onClick: () => { setUpdateDate({ visible: true, type: '修改名称' }) }
 | 
											
												
													
														|  | 
 |  | +                                    },
 | 
											
												
													
														|  | 
 |  | +                                    {
 | 
											
												
													
														|  | 
 |  | +                                        label: '修改日限额',
 | 
											
												
													
														|  | 
 |  | +                                        key: '3',
 | 
											
												
													
														|  | 
 |  | +                                        disabled: selectedRows.length === 0,
 | 
											
												
													
														|  | 
 |  | +                                        onClick: () => { setUpdateDate({ visible: true, type: '修改日限额' }) }
 | 
											
												
													
														|  | 
 |  | +                                    },
 | 
											
												
													
														|  | 
 |  | +                                    {
 | 
											
												
													
														|  | 
 |  | +                                        label: '修改投放日期',
 | 
											
												
													
														|  | 
 |  | +                                        key: '4',
 | 
											
												
													
														|  | 
 |  | +                                        disabled: selectedRows.length === 0,
 | 
											
												
													
														|  | 
 |  | +                                        onClick: () => { setUpdateDate({ visible: true, type: '修改投放时间' }) }
 | 
											
												
													
														|  | 
 |  | +                                    },
 | 
											
												
													
														|  | 
 |  | +                                    {
 | 
											
												
													
														|  | 
 |  | +                                        label: '修改投放首日开始时间',
 | 
											
												
													
														|  | 
 |  | +                                        key: '5',
 | 
											
												
													
														|  | 
 |  | +                                        disabled: selectedRows.length === 0,
 | 
											
												
													
														|  | 
 |  | +                                        onClick: () => { setUpdateDate({ visible: true, type: '修改投放首日开始时间' }) }
 | 
											
												
													
														|  | 
 |  | +                                    }
 | 
											
												
													
														|  | 
 |  | +                                ]
 | 
											
												
													
														|  | 
 |  | +                            }}
 | 
											
												
													
														|  |                              placement="bottomLeft"
 |  |                              placement="bottomLeft"
 | 
											
												
													
														|  |                              arrow
 |  |                              arrow
 | 
											
												
													
														|  |                          >
 |  |                          >
 | 
											
										
											
												
													
														|  | @@ -303,6 +325,7 @@ const Ad: React.FC<ADQV3.AdProps> = ({ userId, creativeHandle }) => {
 | 
											
												
													
														|  |                                  addDynamic()
 |  |                                  addDynamic()
 | 
											
												
													
														|  |                              }}
 |  |                              }}
 | 
											
												
													
														|  |                              userId={userId}
 |  |                              userId={userId}
 | 
											
												
													
														|  | 
 |  | +                            putInType={useType === 1 ? 'NOVEL' : 'GAME'}
 | 
											
												
													
														|  |                          /></Col>
 |  |                          /></Col>
 | 
											
												
													
														|  |                          <Col><Button type='primary' icon={<PlusOutlined />} disabled={selectedRows.length === 0} onClick={addDynamic}>添加创意</Button></Col>
 |  |                          <Col><Button type='primary' icon={<PlusOutlined />} disabled={selectedRows.length === 0} onClick={addDynamic}>添加创意</Button></Col>
 | 
											
												
													
														|  |                          <Col>
 |  |                          <Col>
 | 
											
										
											
												
													
														|  | @@ -313,8 +336,8 @@ const Ad: React.FC<ADQV3.AdProps> = ({ userId, creativeHandle }) => {
 | 
											
												
													
														|  |                                  {selectedRows?.length > 0 && <div style={{ maxWidth: '380px' }}>
 |  |                                  {selectedRows?.length > 0 && <div style={{ maxWidth: '380px' }}>
 | 
											
												
													
														|  |                                      <Text type="danger" ellipsis={{ tooltip: true }} strong style={{ fontSize: 12 }}>
 |  |                                      <Text type="danger" ellipsis={{ tooltip: true }} strong style={{ fontSize: 12 }}>
 | 
											
												
													
														|  |                                          {`当前广告选择:
 |  |                                          {`当前广告选择:
 | 
											
												
													
														|  | -                                        营销目的:${MARKETING_GOAL_ENUM[selectedRows?.[0]?.marketingGoal as keyof typeof MARKETING_GOAL_ENUM]},
 |  | 
 | 
											
												
													
														|  | -                                        推广产品类型:${MARKETING_TARGET_TYPE_ENUM[selectedRows?.[0]?.marketingTargetType as keyof typeof MARKETING_TARGET_TYPE_ENUM]},
 |  | 
 | 
											
												
													
														|  | 
 |  | +                                        营销目的:${useType === 2 ? MARKETING_SUB_GOAL_ENUM[selectedRows?.[0]?.marketingSubGoal as keyof typeof MARKETING_SUB_GOAL_ENUM] : MARKETING_GOAL_ENUM[selectedRows?.[0]?.marketingGoal as keyof typeof MARKETING_GOAL_ENUM]},
 | 
											
												
													
														|  | 
 |  | +                                        推广产品类型:${useType === 2 ? MARKETING_TARGET_TYPE_GAME_ENUM[selectedRows?.[0]?.marketingTargetType as keyof typeof MARKETING_TARGET_TYPE_GAME_ENUM] : MARKETING_TARGET_TYPE_ENUM[selectedRows?.[0]?.marketingTargetType as keyof typeof MARKETING_TARGET_TYPE_ENUM]},
 | 
											
												
													
														|  |                                          营销载体类型:${MARKETING_CARRIER_TYPE_ENUM[selectedRows?.[0]?.marketingCarrierType as keyof typeof MARKETING_CARRIER_TYPE_ENUM]},
 |  |                                          营销载体类型:${MARKETING_CARRIER_TYPE_ENUM[selectedRows?.[0]?.marketingCarrierType as keyof typeof MARKETING_CARRIER_TYPE_ENUM]},
 | 
											
												
													
														|  |                                          版位选择:${selectedRows?.[0]?.automaticSiteEnabled ? '自动版位' : '选择特定版位'},
 |  |                                          版位选择:${selectedRows?.[0]?.automaticSiteEnabled ? '自动版位' : '选择特定版位'},
 | 
											
												
													
														|  |                                          ${!selectedRows?.[0]?.automaticSiteEnabled && `广告版位:${selectedRows?.[0]?.siteSet.map((item: string | number) => SITE_SET_ENUM[item as keyof typeof SITE_SET_ENUM]).toString()}`}
 |  |                                          ${!selectedRows?.[0]?.automaticSiteEnabled && `广告版位:${selectedRows?.[0]?.siteSet.map((item: string | number) => SITE_SET_ENUM[item as keyof typeof SITE_SET_ENUM]).toString()}`}
 | 
											
										
											
												
													
														|  | @@ -335,10 +358,11 @@ const Ad: React.FC<ADQV3.AdProps> = ({ userId, creativeHandle }) => {
 | 
											
												
													
														|  |                  // hideSelectAll: handleType === 3,
 |  |                  // hideSelectAll: handleType === 3,
 | 
											
												
													
														|  |                  getCheckboxProps: (record: any) => {
 |  |                  getCheckboxProps: (record: any) => {
 | 
											
												
													
														|  |                      if (handleType === 2 && selectedRows?.length > 0) {
 |  |                      if (handleType === 2 && selectedRows?.length > 0) {
 | 
											
												
													
														|  | -                        const { siteSet, marketingCarrierType, marketingGoal, marketingTargetType, sceneSpec, automaticSiteEnabled } = selectedRows[0]
 |  | 
 | 
											
												
													
														|  | 
 |  | +                        const { siteSet, marketingCarrierType, marketingGoal, marketingSubGoal, marketingTargetType, sceneSpec, automaticSiteEnabled } = selectedRows[0]
 | 
											
												
													
														|  |                          return {
 |  |                          return {
 | 
											
												
													
														|  |                              disabled: record.isDeleted || !(
 |  |                              disabled: record.isDeleted || !(
 | 
											
												
													
														|  |                                  record?.marketingGoal === marketingGoal &&  // 营销内容
 |  |                                  record?.marketingGoal === marketingGoal &&  // 营销内容
 | 
											
												
													
														|  | 
 |  | +                                record?.marketingSubGoal === marketingSubGoal &&  // 二级营销内容
 | 
											
												
													
														|  |                                  record?.marketingCarrierType === marketingCarrierType && // 营销载体
 |  |                                  record?.marketingCarrierType === marketingCarrierType && // 营销载体
 | 
											
												
													
														|  |                                  record?.marketingTargetType === marketingTargetType && // 推广产品
 |  |                                  record?.marketingTargetType === marketingTargetType && // 推广产品
 | 
											
												
													
														|  |                                  record?.automaticSiteEnabled === automaticSiteEnabled &&   // 自动版位
 |  |                                  record?.automaticSiteEnabled === automaticSiteEnabled &&   // 自动版位
 | 
											
										
											
												
													
														|  | @@ -435,6 +459,7 @@ const Ad: React.FC<ADQV3.AdProps> = ({ userId, creativeHandle }) => {
 | 
											
												
													
														|  |          {/* 新增创意 */}
 |  |          {/* 新增创意 */}
 | 
											
												
													
														|  |          {addDynamicVisible && <AddDynamic
 |  |          {addDynamicVisible && <AddDynamic
 | 
											
												
													
														|  |              adData={selectedRows}
 |  |              adData={selectedRows}
 | 
											
												
													
														|  | 
 |  | +            putInType={useType === 1 ? 'NOVEL' : 'GAME'}
 | 
											
												
													
														|  |              visible={addDynamicVisible}
 |  |              visible={addDynamicVisible}
 | 
											
												
													
														|  |              onClose={() => {
 |  |              onClose={() => {
 | 
											
												
													
														|  |                  setAddDynamicVisible(false)
 |  |                  setAddDynamicVisible(false)
 |