|
@@ -1,13 +1,14 @@
|
|
|
import { useAjax } from '@/Hook/useAjax';
|
|
|
-import { delLocalCorpCsgroupUserApi, GetCustomerServiceGroupUserListProps, getLocalCorpCsgroupUserAllListApi, getLocalCorpCsgroupUserListApi, getUserlogListApi } from '@/services/adqV3/global';
|
|
|
-import { DeleteOutlined, EditOutlined, PlusOutlined, SearchOutlined, TeamOutlined } from '@ant-design/icons';
|
|
|
-import { Button, Card, Drawer, Input, message, Modal, Popconfirm, Select, Space, Table } from 'antd';
|
|
|
+import { delLocalCorpCsgroupUserApi, GetCustomerServiceGroupUserListProps, getLocalCorpCsgroupUserAllListApi, getLocalCorpCsgroupUserListApi, getUserlogListApi, putUserDecodeApi } from '@/services/adqV3/global';
|
|
|
+import { DeleteOutlined, DownOutlined, EditOutlined, PlusOutlined, SearchOutlined, TeamOutlined } from '@ant-design/icons';
|
|
|
+import { Button, Card, Drawer, Dropdown, Input, message, Modal, Popconfirm, Select, Space, Table } from 'antd';
|
|
|
import React, { useCallback, useEffect, useState } from 'react';
|
|
|
import '../../../../../tencentAdPutIn/index.less';
|
|
|
import SettingsEnterprise from './settingsEnterprise';
|
|
|
import style from '@/pages/launchSystemV3/tencentAdPutIn/create/index.less';
|
|
|
import { POOLTYPE, POOLTYPEEle } from '../../const';
|
|
|
import GroupUserEdit from './groupUserEdit';
|
|
|
+import UserDecodeLog from './userDecodeLog';
|
|
|
|
|
|
interface GroupUserInfoProps {
|
|
|
groupData: { [x: string]: any };
|
|
@@ -30,11 +31,13 @@ const GroupUserInfo: React.FC<GroupUserInfoProps> = ({ groupData: { id: localCsg
|
|
|
const [userEditData, setUserEditData] = useState<{ visible: boolean, idList: number[] }>();
|
|
|
const [logData, setLogData] = useState<{ visible: boolean, data: any }>();
|
|
|
const [logParams, setLogParams] = useState<{ pageNum: number, pageSize: number }>({ pageNum: 1, pageSize: 20 })
|
|
|
+ const [decodeVisible, setDecodeVisible] = useState<boolean>(false)
|
|
|
|
|
|
const getLocalCorpCsgroupUserList = useAjax((params) => getLocalCorpCsgroupUserListApi(params))
|
|
|
const getUserlogList = useAjax((params) => getUserlogListApi(params))
|
|
|
const getLocalCorpCsgroupUserAllList = useAjax((params) => getLocalCorpCsgroupUserAllListApi(params))
|
|
|
const delLocalCorpCsgroupUser = useAjax((params) => delLocalCorpCsgroupUserApi(params))
|
|
|
+ const putUserDecode = useAjax((params) => putUserDecodeApi(params))
|
|
|
/********************************************/
|
|
|
|
|
|
const handleUser = useCallback(() => {
|
|
@@ -88,6 +91,16 @@ const GroupUserInfo: React.FC<GroupUserInfoProps> = ({ groupData: { id: localCsg
|
|
|
}
|
|
|
}, [logParams, logData])
|
|
|
|
|
|
+ const handleSync = () => {
|
|
|
+ const hide = message.loading({ content: '操作中...', key: 'sync' });
|
|
|
+ putUserDecode.run({ localCsgroupId }).then((res) => {
|
|
|
+ hide();
|
|
|
+ if (res) {
|
|
|
+ message.success('操作成功');
|
|
|
+ }
|
|
|
+ }).catch(() => hide())
|
|
|
+ }
|
|
|
+
|
|
|
return <>
|
|
|
<Button icon={<TeamOutlined />} style={{ border: 'none', fontSize: 12 }} size='small' onClick={() => handleUser()}>成员</Button>
|
|
|
{visible && <Drawer
|
|
@@ -127,6 +140,37 @@ const GroupUserInfo: React.FC<GroupUserInfoProps> = ({ groupData: { id: localCsg
|
|
|
<Button type="primary" icon={<SearchOutlined />} loading={getLocalCorpCsgroupUserList.loading} onClick={() => setQueryParamsNew({ ...queryForm, pageNum: 1 })}>搜索</Button>
|
|
|
</Space>
|
|
|
<Space>
|
|
|
+ <Dropdown menu={{
|
|
|
+ items: [
|
|
|
+ {
|
|
|
+ label: '解密同步',
|
|
|
+ key: '1'
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: '解密查询',
|
|
|
+ key: '2'
|
|
|
+ }
|
|
|
+ ],
|
|
|
+ onClick: ({ key }) => {
|
|
|
+ switch (key) {
|
|
|
+ case '1':
|
|
|
+ handleSync()
|
|
|
+ break
|
|
|
+ case '2':
|
|
|
+ setDecodeVisible(true)
|
|
|
+ break
|
|
|
+ default:
|
|
|
+ break
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }}>
|
|
|
+ <Button>
|
|
|
+ <Space>
|
|
|
+ 服务商授权
|
|
|
+ <DownOutlined />
|
|
|
+ </Space>
|
|
|
+ </Button>
|
|
|
+ </Dropdown>
|
|
|
<Button type="primary" disabled={selectedRows.length === 0} icon={<EditOutlined />} onClick={userEdit}>修改</Button>
|
|
|
<Popconfirm
|
|
|
title="确定删除?"
|
|
@@ -377,6 +421,12 @@ const GroupUserInfo: React.FC<GroupUserInfoProps> = ({ groupData: { id: localCsg
|
|
|
}}
|
|
|
/>
|
|
|
</Modal>}
|
|
|
+
|
|
|
+ {decodeVisible && <UserDecodeLog
|
|
|
+ visible={decodeVisible}
|
|
|
+ onClose={() => setDecodeVisible(false)}
|
|
|
+ localCsgroupId={localCsgroupId}
|
|
|
+ />}
|
|
|
</>
|
|
|
};
|
|
|
|