|
@@ -1,7 +1,7 @@
|
|
import { useAjax } from '@/Hook/useAjax';
|
|
import { useAjax } from '@/Hook/useAjax';
|
|
-import { delLocalCorpCsgroupUserApi, GetCustomerServiceGroupUserListProps, getLocalCorpCsgroupUserAllListApi, getLocalCorpCsgroupUserListApi } from '@/services/adqV3/global';
|
|
|
|
|
|
+import { delLocalCorpCsgroupUserApi, GetCustomerServiceGroupUserListProps, getLocalCorpCsgroupUserAllListApi, getLocalCorpCsgroupUserListApi, getUserlogListApi } from '@/services/adqV3/global';
|
|
import { DeleteOutlined, EditOutlined, PlusOutlined, SearchOutlined, TeamOutlined } from '@ant-design/icons';
|
|
import { DeleteOutlined, EditOutlined, PlusOutlined, SearchOutlined, TeamOutlined } from '@ant-design/icons';
|
|
-import { Button, Card, Drawer, Input, message, Popconfirm, Select, Space, Table } from 'antd';
|
|
|
|
|
|
+import { Button, Card, Drawer, Input, message, Modal, Popconfirm, Select, Space, Table } from 'antd';
|
|
import React, { useCallback, useEffect, useState } from 'react';
|
|
import React, { useCallback, useEffect, useState } from 'react';
|
|
import '../../../../../tencentAdPutIn/index.less';
|
|
import '../../../../../tencentAdPutIn/index.less';
|
|
import SettingsEnterprise from './settingsEnterprise';
|
|
import SettingsEnterprise from './settingsEnterprise';
|
|
@@ -28,8 +28,11 @@ const GroupUserInfo: React.FC<GroupUserInfoProps> = ({ groupData: { id: localCsg
|
|
const [queryParamsNew, setQueryParamsNew] = useState<GetCustomerServiceGroupUserListProps>({ pageNum: 1, pageSize: 20, localCsgroupId });
|
|
const [queryParamsNew, setQueryParamsNew] = useState<GetCustomerServiceGroupUserListProps>({ pageNum: 1, pageSize: 20, localCsgroupId });
|
|
const [selectedRows, setSelectedRows] = useState<any[]>([])
|
|
const [selectedRows, setSelectedRows] = useState<any[]>([])
|
|
const [userEditData, setUserEditData] = useState<{ visible: boolean, idList: number[] }>();
|
|
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 getLocalCorpCsgroupUserList = useAjax((params) => getLocalCorpCsgroupUserListApi(params))
|
|
const getLocalCorpCsgroupUserList = useAjax((params) => getLocalCorpCsgroupUserListApi(params))
|
|
|
|
+ const getUserlogList = useAjax((params) => getUserlogListApi(params))
|
|
const getLocalCorpCsgroupUserAllList = useAjax((params) => getLocalCorpCsgroupUserAllListApi(params))
|
|
const getLocalCorpCsgroupUserAllList = useAjax((params) => getLocalCorpCsgroupUserAllListApi(params))
|
|
const delLocalCorpCsgroupUser = useAjax((params) => delLocalCorpCsgroupUserApi(params))
|
|
const delLocalCorpCsgroupUser = useAjax((params) => delLocalCorpCsgroupUserApi(params))
|
|
/********************************************/
|
|
/********************************************/
|
|
@@ -75,6 +78,16 @@ const GroupUserInfo: React.FC<GroupUserInfoProps> = ({ groupData: { id: localCsg
|
|
setUserEditData({ visible: true, idList: selectedRows.map(item => item.id) });
|
|
setUserEditData({ visible: true, idList: selectedRows.map(item => item.id) });
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+ const handleLog = (data: any) => {
|
|
|
|
+ setLogData({ visible: true, data })
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ useEffect(() => {
|
|
|
|
+ if (logData?.visible) {
|
|
|
|
+ getUserlogList.run({ ...logParams, id: logData.data.id })
|
|
|
|
+ }
|
|
|
|
+ }, [logParams, logData])
|
|
|
|
+
|
|
return <>
|
|
return <>
|
|
<Button icon={<TeamOutlined />} style={{ border: 'none', fontSize: 12 }} size='small' onClick={() => handleUser()}>成员</Button>
|
|
<Button icon={<TeamOutlined />} style={{ border: 'none', fontSize: 12 }} size='small' onClick={() => handleUser()}>成员</Button>
|
|
{visible && <Drawer
|
|
{visible && <Drawer
|
|
@@ -192,18 +205,21 @@ const GroupUserInfo: React.FC<GroupUserInfoProps> = ({ groupData: { id: localCsg
|
|
title: '操作',
|
|
title: '操作',
|
|
dataIndex: 'cz',
|
|
dataIndex: 'cz',
|
|
key: 'cz',
|
|
key: 'cz',
|
|
- width: 50,
|
|
|
|
|
|
+ width: 85,
|
|
align: 'center',
|
|
align: 'center',
|
|
fixed: 'right',
|
|
fixed: 'right',
|
|
render(_, records) {
|
|
render(_, records) {
|
|
- return <Popconfirm
|
|
|
|
- title="确定删除?"
|
|
|
|
- onConfirm={() => {
|
|
|
|
- delUser([records.id])
|
|
|
|
- }}
|
|
|
|
- >
|
|
|
|
- <a style={{ color: 'red' }}>删除</a>
|
|
|
|
- </Popconfirm>
|
|
|
|
|
|
+ return <Space>
|
|
|
|
+ <a onClick={() => { handleLog(records) }}>日志</a>
|
|
|
|
+ <Popconfirm
|
|
|
|
+ title="确定删除?"
|
|
|
|
+ onConfirm={() => {
|
|
|
|
+ delUser([records.id])
|
|
|
|
+ }}
|
|
|
|
+ >
|
|
|
|
+ <a style={{ color: 'red' }}>删除</a>
|
|
|
|
+ </Popconfirm>
|
|
|
|
+ </Space>
|
|
}
|
|
}
|
|
},
|
|
},
|
|
]}
|
|
]}
|
|
@@ -284,6 +300,63 @@ const GroupUserInfo: React.FC<GroupUserInfoProps> = ({ groupData: { id: localCsg
|
|
onClose={() => setUserEditData(undefined)}
|
|
onClose={() => setUserEditData(undefined)}
|
|
/>}
|
|
/>}
|
|
</Drawer>}
|
|
</Drawer>}
|
|
|
|
+
|
|
|
|
+ {logData?.visible && <Modal
|
|
|
|
+ title={<strong>{logData?.data?.localCorpUserName} 日志</strong>}
|
|
|
|
+ open={logData?.visible}
|
|
|
|
+ onCancel={() => setLogData(undefined)}
|
|
|
|
+ footer={null}
|
|
|
|
+ className='modalResetCss'
|
|
|
|
+ >
|
|
|
|
+ <Table
|
|
|
|
+ columns={[
|
|
|
|
+ {
|
|
|
|
+ title: '客服名称',
|
|
|
|
+ dataIndex: 'localCorpUserName',
|
|
|
|
+ key: 'localCorpUserName',
|
|
|
|
+ width: 220,
|
|
|
|
+ ellipsis: true,
|
|
|
|
+ render(value, records) {
|
|
|
|
+ return <span style={{ fontSize: 12 }}>{value}({records.localCorpUserId})</span>
|
|
|
|
+ }
|
|
|
|
+ },
|
|
|
|
+ {
|
|
|
|
+ title: '归属客服池',
|
|
|
|
+ dataIndex: 'poolType',
|
|
|
|
+ key: 'poolType',
|
|
|
|
+ width: 100,
|
|
|
|
+ align: 'center',
|
|
|
|
+ render(value) {
|
|
|
|
+ return <span style={{ fontSize: 12 }}>{POOLTYPEEle[value as keyof typeof POOLTYPEEle]}</span>
|
|
|
|
+ }
|
|
|
|
+ },
|
|
|
|
+ {
|
|
|
|
+ title: '创建时间',
|
|
|
|
+ dataIndex: 'createTime',
|
|
|
|
+ key: 'createTime',
|
|
|
|
+ width: 140,
|
|
|
|
+ render(value) {
|
|
|
|
+ return <span style={{ fontSize: 12 }}>{value}</span>
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ ]}
|
|
|
|
+ dataSource={getUserlogList.data?.records}
|
|
|
|
+ size="small"
|
|
|
|
+ loading={getUserlogList?.loading}
|
|
|
|
+ scroll={{ y: 500 }}
|
|
|
|
+ rowKey={'id'}
|
|
|
|
+ pagination={{
|
|
|
|
+ total: getUserlogList.data?.total,
|
|
|
|
+ defaultPageSize: 20,
|
|
|
|
+ current: getUserlogList.data?.current,
|
|
|
|
+ pageSize: getUserlogList.data?.size
|
|
|
|
+ }}
|
|
|
|
+ onChange={(pagination) => {
|
|
|
|
+ const { current, pageSize } = pagination
|
|
|
|
+ setLogParams({ ...logParams, pageNum: current as number, pageSize: pageSize as number || 20 })
|
|
|
|
+ }}
|
|
|
|
+ />
|
|
|
|
+ </Modal>}
|
|
</>
|
|
</>
|
|
};
|
|
};
|
|
|
|
|