perf(前端): 未分配: 读取未分配会话消息.

dev/supplier-email-drawer
Lei OT 5 months ago
parent 756cd7935f
commit 7aac5e76e0

@ -45,7 +45,7 @@ const ChatWindow = () => {
<Content style={{ maxHeight: 'calc(100vh - 166px)', height: 'calc(100vh - 166px)', minWidth: '360px' }}> <Content style={{ maxHeight: 'calc(100vh - 166px)', height: 'calc(100vh - 166px)', minWidth: '360px' }}>
<Layout className='h-full'> <Layout className='h-full'>
<Header className='px-1 ant-layout-sider-light ant-card h-auto flex justify-between gap-1 items-center'> <Header className='px-1 ant-layout-sider-light bg-white ant-card h-auto flex justify-between gap-1 items-center'>
{/* <Button type='text' icon={collapsedLeft ? <MenuUnfoldOutlined /> : <MenuFoldOutlined />} onClick={() => setCollapsedLeft(!collapsedLeft)} className=' rounded-none rounded-l' /> */} {/* <Button type='text' icon={collapsedLeft ? <MenuUnfoldOutlined /> : <MenuFoldOutlined />} onClick={() => setCollapsedLeft(!collapsedLeft)} className=' rounded-none rounded-l' /> */}
<MessagesHeader /> <MessagesHeader />
{/* <Button type='text' icon={<ReloadOutlined />} onClick={() => setCollapsedRight(!collapsedRight)} className='' title='最新消息记录' /> */} {/* <Button type='text' icon={<ReloadOutlined />} onClick={() => setCollapsedRight(!collapsedRight)} className='' title='最新消息记录' /> */}

@ -21,11 +21,14 @@ function ChatAssign() {
const [opi, setOpi] = useState({}); const [opi, setOpi] = useState({});
async function refreshConversationList() { async function refreshConversationList() {
const _list = await fetchConversationsSearch({ whatsapp_id: whatsappid }); const _list = await fetchConversationsSearch({ whatsapp_id: whatsappid })
if (_list.length > 0) { if (_list.length > 0) {
setCurrentConversation(_list[0]); const unassignI = _list.findIndex((item) => item.opi_sn === 0)
setConversationid(String(_list[0].conversationid)); if (unassignI > -1) {
setOpi({ label: _list[0].opi_name, value: String(_list[0].opi_sn) }); setCurrentConversation(_list[unassignI])
setConversationid(String(_list[unassignI].conversationid))
setOpi({ label: _list[unassignI].opi_name, value: String(_list[unassignI].opi_sn) })
}
} }
} }
@ -39,7 +42,7 @@ function ChatAssign() {
return ( return (
<> <>
<Layout className='h-full chatwindow-wrapper mobilechat-wrapper' style={{ maxHeight: 'calc(100vh - 32px)', height: 'calc(100vh - 32px)', minWidth: '360px' }}> <Layout className='h-full chatwindow-wrapper mobilechat-wrapper' style={{ maxHeight: 'calc(100vh - 32px)', height: 'calc(100vh - 32px)', minWidth: '360px' }}>
<Header className=' px-2 ant-layout-sider-light ant-card h-auto flex flex-col justify-between gap-1 '> <Header className=' px-2 ant-layout-sider-light bg-white ant-card h-auto flex flex-col justify-between gap-1 '>
<InputAssign className={'block py-2'} initialValues={{ conversationid, whatsappid }} {...{ conversationid, opi }} /> <InputAssign className={'block py-2'} initialValues={{ conversationid, whatsappid }} {...{ conversationid, opi }} />
<MessagesHeader /> <MessagesHeader />
</Header> </Header>

Loading…
Cancel
Save