import { App, Button, Card, Input, Pagination, Popconfirm, Select, Table } from 'antd'; import React, { useEffect, useRef, useState } from 'react'; import style from '../bookLink/index.less' import { useSize } from 'ahooks'; import { useAjax } from '@/Hook/useAjax'; import { delCorpUserChatApi, getCorpUserChatListApi, getCorpUserChatListProps } from '../../API/groupLeaderManage'; import { GroupLeaderTableConfig } from './tableConfig'; import SearchBox from '../../components/searchBox'; import { SearchOutlined, PlusOutlined, DeleteOutlined } from '@ant-design/icons'; import { getAdAccountAllOfMember, getCorpAllListApi } from '@/API/global'; import './global.less' import AddGL from './addGL'; /** * 群主号管理 * @returns */ const GroupLeaderManage: React.FC = () => { /*******************************************/ const { message } = App.useApp(); const ref = useRef(null) const size = useSize(ref) const [queryParams, setQueryParams] = useState({ pageNum: 1, pageSize: 20 }) const [queryParamsNew, setQueryParamsNew] = useState({ pageNum: 1, pageSize: 20 }) const [visible, setVisible] = useState(false) const [selectedRows, setselectedRows] = useState([]) const getCorpUserChatList = useAjax((params) => getCorpUserChatListApi(params)) const delCorpUserChat = useAjax((params) => delCorpUserChatApi(params)) const getCorpAllList = useAjax((params) => getCorpAllListApi(params)) const allOfMember = useAjax(() => getAdAccountAllOfMember()) /*******************************************/ useEffect(() => { allOfMember.run() getCorpAllList.run({}) }, []) useEffect(() => { getCorpUserChatList.run(queryParamsNew) }, [queryParamsNew]) const handleDel = () => { delCorpUserChat.run(selectedRows.map(item => item.id)).then(res => { setselectedRows([]) getCorpUserChatList.refresh() message.success('删除成功') }) } return
} > <> setQueryParams({ ...queryParams, corpUserName: e.target.value as any })} value={queryParams?.corpUserName} placeholder="客服号名称" allowClear /> setQueryParams({ ...queryParams, corpUserIds: e.target.value as any })} value={queryParams?.corpUserIds} placeholder="客服ID(多个,,空格换行)" allowClear /> setQueryParams({ ...queryParams, putUserId: e })} showSearch style={{ width: 110 }} placeholder="投手" filterOption={(input, option) => ((option?.label ?? '') as string).toLowerCase().includes(input.toLowerCase()) } allowClear options={allOfMember?.data?.data?.map((item: any) => ({ label: item.nickname, value: item.userId }))} />