|
@@ -1,4 +1,4 @@
|
|
-import { Tag, Space, Badge, Modal, Select, Avatar as AntdAvatar, message } from 'antd';
|
|
|
|
|
|
+import { Tag, Space, Badge, Modal, Select, Avatar as AntdAvatar, message, Divider, Checkbox } from 'antd';
|
|
import React, { useCallback, useEffect, useState } from 'react';
|
|
import React, { useCallback, useEffect, useState } from 'react';
|
|
import { useModel } from 'umi';
|
|
import { useModel } from 'umi';
|
|
import Avatar from './AvatarDropdown';
|
|
import Avatar from './AvatarDropdown';
|
|
@@ -248,7 +248,7 @@ const GlobalHeaderRight: React.FC<{}> = () => {
|
|
})
|
|
})
|
|
}, [])
|
|
}, [])
|
|
|
|
|
|
-
|
|
|
|
|
|
+ const appListOptions = appList.filter(item => item.productType === initialState?.productType).filter(item => item.mediaPlatform === initialState?.mediaPlatform)
|
|
return (
|
|
return (
|
|
<div style={{ display: 'flex', justifyContent: 'space-between' }}>
|
|
<div style={{ display: 'flex', justifyContent: 'space-between' }}>
|
|
{location.hash.includes('/iaaData') && <div style={{ left: left + 10, position: 'absolute' }}>
|
|
{location.hash.includes('/iaaData') && <div style={{ left: left + 10, position: 'absolute' }}>
|
|
@@ -293,8 +293,7 @@ const GlobalHeaderRight: React.FC<{}> = () => {
|
|
filterOption={(input, option) => (option?.name as any)?.toLowerCase().indexOf(input.toLowerCase()) >= 0}
|
|
filterOption={(input, option) => (option?.name as any)?.toLowerCase().indexOf(input.toLowerCase()) >= 0}
|
|
value={initialState?.iaaApp}
|
|
value={initialState?.iaaApp}
|
|
onChange={(e) => {
|
|
onChange={(e) => {
|
|
- // if (e?.length > 0)
|
|
|
|
- setInitialState({ ...initialState, iaaApp: e })
|
|
|
|
|
|
+ setInitialState({ ...initialState, iaaApp: e })
|
|
}}
|
|
}}
|
|
allowClear
|
|
allowClear
|
|
loading={getAppList.loading}
|
|
loading={getAppList.loading}
|
|
@@ -302,8 +301,25 @@ const GlobalHeaderRight: React.FC<{}> = () => {
|
|
maxTagCount={1}
|
|
maxTagCount={1}
|
|
removeIcon={<CloseOutlined style={{ color: '#000' }} />}
|
|
removeIcon={<CloseOutlined style={{ color: '#000' }} />}
|
|
clearIcon={<CloseOutlined style={{ color: '#000' }} />}
|
|
clearIcon={<CloseOutlined style={{ color: '#000' }} />}
|
|
|
|
+ dropdownRender={menu => (
|
|
|
|
+ <>
|
|
|
|
+ {menu}
|
|
|
|
+ <Divider style={{ margin: '8px 0' }} />
|
|
|
|
+ <Space style={{ padding: '0 8px 4px' }}>
|
|
|
|
+ <Checkbox
|
|
|
|
+ onChange={(e) => {
|
|
|
|
+ if (e.target.checked) {
|
|
|
|
+ setInitialState({ ...initialState, iaaApp: appListOptions.map(item => item.value) })
|
|
|
|
+ } else {
|
|
|
|
+ setInitialState({ ...initialState, iaaApp: [] })
|
|
|
|
+ }
|
|
|
|
+ }}
|
|
|
|
+ >全选</Checkbox>
|
|
|
|
+ </Space>
|
|
|
|
+ </>
|
|
|
|
+ )}
|
|
>
|
|
>
|
|
- {appList.filter(item => item.productType === initialState?.productType).filter(item => item.mediaPlatform === initialState?.mediaPlatform).map(item => {
|
|
|
|
|
|
+ {appListOptions.map(item => {
|
|
return <Select.Option key={item.value} value={item.value} name={item.label}>
|
|
return <Select.Option key={item.value} value={item.value} name={item.label}>
|
|
<Space align='center'>
|
|
<Space align='center'>
|
|
<AntdAvatar shape="square" style={{ marginBottom: 4 }} size={16} icon={<UserOutlined />} src={item?.icon} />
|
|
<AntdAvatar shape="square" style={{ marginBottom: 4 }} size={16} icon={<UserOutlined />} src={item?.icon} />
|