|
@@ -19,13 +19,13 @@ interface GroupUserInfoProps {
|
|
|
* @param param0
|
|
|
* @returns
|
|
|
*/
|
|
|
-const GroupUserInfo: React.FC<GroupUserInfoProps> = ({ groupData: { id: localCsgroupId, csgroupName, tencentCorpName, tencentCorpId }, adAccountId }) => {
|
|
|
+const GroupUserInfo: React.FC<GroupUserInfoProps> = ({ groupData: { id: localCsgroupId, localCorpId, csgroupName, tencentCorpName, tencentCorpId }, adAccountId }) => {
|
|
|
|
|
|
/********************************************/
|
|
|
const [visible, setVisible] = React.useState<boolean>(false);
|
|
|
const [addData, setAddData] = React.useState<{ visible: boolean, data: any }>({ visible: false, data: undefined });
|
|
|
- const [queryForm, setQueryForm] = useState<GetCustomerServiceGroupUserListProps>({ pageNum: 1, pageSize: 20, localCsgroupId });
|
|
|
- const [queryParamsNew, setQueryParamsNew] = useState<GetCustomerServiceGroupUserListProps>({ pageNum: 1, pageSize: 20, localCsgroupId });
|
|
|
+ const [queryForm, setQueryForm] = useState<GetCustomerServiceGroupUserListProps>({ pageNum: 1, pageSize: 20, localCsgroupId, localCorpId });
|
|
|
+ const [queryParamsNew, setQueryParamsNew] = useState<GetCustomerServiceGroupUserListProps>({ pageNum: 1, pageSize: 20, localCsgroupId, localCorpId });
|
|
|
const [selectedRows, setSelectedRows] = useState<any[]>([])
|
|
|
const [userEditData, setUserEditData] = useState<{ visible: boolean, idList: number[] }>();
|
|
|
const [logData, setLogData] = useState<{ visible: boolean, data: any }>();
|
|
@@ -43,9 +43,9 @@ const GroupUserInfo: React.FC<GroupUserInfoProps> = ({ groupData: { id: localCsg
|
|
|
|
|
|
useEffect(() => {
|
|
|
if (visible) {
|
|
|
- getLocalCorpCsgroupUserList.run({ ...queryParamsNew, localCsgroupId })
|
|
|
+ getLocalCorpCsgroupUserList.run({ ...queryParamsNew, localCsgroupId, localCorpId })
|
|
|
}
|
|
|
- }, [visible, localCsgroupId, queryParamsNew])
|
|
|
+ }, [visible, localCsgroupId, localCorpId, queryParamsNew])
|
|
|
|
|
|
const add = useCallback(() => {
|
|
|
getLocalCorpCsgroupUserAllList.run({ localCsgroupId }).then((res) => {
|
|
@@ -64,8 +64,8 @@ const GroupUserInfo: React.FC<GroupUserInfoProps> = ({ groupData: { id: localCsg
|
|
|
}, [csgroupName, tencentCorpName, tencentCorpId, localCsgroupId, csgroupName])
|
|
|
|
|
|
/** 删除客服 */
|
|
|
- const delUser = (idList: number[]) => {
|
|
|
- delLocalCorpCsgroupUser.run({ localCsgroupId, idList }).then((res) => {
|
|
|
+ const delUser = (idList: number[], groupId?: number) => {
|
|
|
+ delLocalCorpCsgroupUser.run({ localCsgroupId: localCsgroupId || groupId, idList }).then((res) => {
|
|
|
if (res) {
|
|
|
message.success('删除成功');
|
|
|
getLocalCorpCsgroupUserList.refresh();
|
|
@@ -94,7 +94,7 @@ const GroupUserInfo: React.FC<GroupUserInfoProps> = ({ groupData: { id: localCsg
|
|
|
title={<strong style={{ fontSize: 20 }}>{csgroupName} 客服组成员</strong>}
|
|
|
open={visible}
|
|
|
onClose={() => setVisible(false)}
|
|
|
- width={1000}
|
|
|
+ width={1200}
|
|
|
headerStyle={{ padding: '10px 16px' }}
|
|
|
maskClosable={false}
|
|
|
className={`modalResetCss targetingSelect`}
|
|
@@ -131,13 +131,13 @@ const GroupUserInfo: React.FC<GroupUserInfoProps> = ({ groupData: { id: localCsg
|
|
|
<Popconfirm
|
|
|
title="确定删除?"
|
|
|
onConfirm={() => {
|
|
|
- delUser(selectedRows.map(item => item.id))
|
|
|
+ delUser(selectedRows.map(item => item.id), selectedRows[0]?.localCsgroupId)
|
|
|
}}
|
|
|
disabled={selectedRows.length === 0}
|
|
|
>
|
|
|
<Button type="primary" disabled={selectedRows.length === 0} danger icon={<DeleteOutlined />} loading={delLocalCorpCsgroupUser.loading}>删除</Button>
|
|
|
</Popconfirm>
|
|
|
- <Button type="primary" icon={<PlusOutlined />} loading={getLocalCorpCsgroupUserAllList.loading} onClick={add}>成员加减</Button>
|
|
|
+ {localCsgroupId && <Button type="primary" icon={<PlusOutlined />} loading={getLocalCorpCsgroupUserAllList.loading} onClick={add}>成员加减</Button>}
|
|
|
</Space>
|
|
|
</div>
|
|
|
<Table
|
|
@@ -167,7 +167,7 @@ const GroupUserInfo: React.FC<GroupUserInfoProps> = ({ groupData: { id: localCsg
|
|
|
title: '归属客服池',
|
|
|
dataIndex: 'poolType',
|
|
|
key: 'poolType',
|
|
|
- width: 100,
|
|
|
+ width: 120,
|
|
|
align: 'center',
|
|
|
render(value) {
|
|
|
return <span style={{ fontSize: 12 }}>{POOLTYPEEle[value as keyof typeof POOLTYPEEle]}</span>
|
|
@@ -183,6 +183,16 @@ const GroupUserInfo: React.FC<GroupUserInfoProps> = ({ groupData: { id: localCsg
|
|
|
return <span style={{ fontSize: 12 }}>{(value || value === 0) ? value : '--'}</span>
|
|
|
}
|
|
|
},
|
|
|
+ {
|
|
|
+ title: '归属客服组',
|
|
|
+ dataIndex: 'localCsgroupName',
|
|
|
+ key: 'localCsgroupName',
|
|
|
+ width: 150,
|
|
|
+ ellipsis: true,
|
|
|
+ render(value) {
|
|
|
+ return <span style={{ fontSize: 12 }}>{value}</span>
|
|
|
+ }
|
|
|
+ },
|
|
|
{
|
|
|
title: '创建时间',
|
|
|
dataIndex: 'createTime',
|
|
@@ -214,7 +224,7 @@ const GroupUserInfo: React.FC<GroupUserInfoProps> = ({ groupData: { id: localCsg
|
|
|
<Popconfirm
|
|
|
title="确定删除?"
|
|
|
onConfirm={() => {
|
|
|
- delUser([records.id])
|
|
|
+ delUser([records.id], records.localCsgroupId)
|
|
|
}}
|
|
|
>
|
|
|
<a style={{ color: 'red' }}>删除</a>
|
|
@@ -226,7 +236,7 @@ const GroupUserInfo: React.FC<GroupUserInfoProps> = ({ groupData: { id: localCsg
|
|
|
dataSource={getLocalCorpCsgroupUserList.data?.records}
|
|
|
size="small"
|
|
|
loading={getLocalCorpCsgroupUserList?.loading}
|
|
|
- scroll={{ y: 500 }}
|
|
|
+ scroll={{ y: 600 }}
|
|
|
rowKey={'id'}
|
|
|
pagination={{
|
|
|
total: getLocalCorpCsgroupUserList.data?.total,
|