|
|
|
@ -81,14 +81,14 @@ function Follow() {
|
|
|
|
|
{
|
|
|
|
|
title: '今日任务',
|
|
|
|
|
key: ele.OPI_DEI_SN + '-today',
|
|
|
|
|
getMails: false,
|
|
|
|
|
getMails: false, iconIndex: 'star',
|
|
|
|
|
icon: <StarTwoTone />,
|
|
|
|
|
children: [], COLI_SN: 0,
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
title: '待办任务',
|
|
|
|
|
key: ele.OPI_DEI_SN + '-todo',
|
|
|
|
|
getMails: false,
|
|
|
|
|
getMails: false, iconIndex: 'calendar',
|
|
|
|
|
icon: <CalendarTwoTone />,
|
|
|
|
|
children: [], COLI_SN: 0,
|
|
|
|
|
},
|
|
|
|
@ -104,6 +104,15 @@ function Follow() {
|
|
|
|
|
const [mailboxActiveNode, setMailboxActiveNode] = useConversationStore(state => [state.mailboxActiveNode, state.setMailboxActiveNode]);
|
|
|
|
|
const [activeEmailId, setActiveEmailId] = useConversationStore(state => [state.mailboxActiveMAI, state.setMailboxActiveMAI]);
|
|
|
|
|
|
|
|
|
|
const computedBreadcrumb = useMemo(() => {
|
|
|
|
|
const { title, iconIndex, parentTitle, parentIconIndex } = mailboxActiveNode
|
|
|
|
|
const x = [
|
|
|
|
|
{ title: parentTitle, iconIndex: parentIconIndex },
|
|
|
|
|
{ title, iconIndex },
|
|
|
|
|
].filter((ele) => ele.title)
|
|
|
|
|
return x
|
|
|
|
|
}, [mailboxActiveNode.VKey])
|
|
|
|
|
|
|
|
|
|
// const [activeEmailId, setActiveEmailId] = useState(0)
|
|
|
|
|
|
|
|
|
|
const [deiStickyTree, setDeiStickyTree] = useState({})
|
|
|
|
@ -123,7 +132,7 @@ function Follow() {
|
|
|
|
|
|
|
|
|
|
const handleTreeSelectGetMails = (selectedKeys, { node }) => {
|
|
|
|
|
// console.info('selectedTreeKeys: ', node)
|
|
|
|
|
const treeNode = pick(node, ['key', 'parent', 'getMails', 'title', 'parentTitle', ]);
|
|
|
|
|
const treeNode = pick(node, ['key', 'parent', 'iconIndex', 'getMails', 'title', 'parentTitle', 'parentIconIndex' ]);
|
|
|
|
|
setMailboxActiveNode({...treeNode, ...node._raw, OPI_SN: currentMailboxOPI});
|
|
|
|
|
// const { COLI_SN, VKey, VParent, ApplyDate, OrderSourceType, IsTrue } = node?._raw || {}
|
|
|
|
|
setActiveEmailId(0);
|
|
|
|
@ -150,26 +159,30 @@ function Follow() {
|
|
|
|
|
{
|
|
|
|
|
title: '今日任务',
|
|
|
|
|
key: key + '-today',
|
|
|
|
|
getMails: false,
|
|
|
|
|
getMails: false,iconIndex: 'star',
|
|
|
|
|
icon: <StarTwoTone />, _raw: {COLI_SN: 0},
|
|
|
|
|
children: (sticky[0] || []).map((o) => ({
|
|
|
|
|
key: `today-${o.COLI_SN}`,
|
|
|
|
|
title: `(${todoTypes[o.coli_ordertype] || o.COLI_State}) ${o.COLI_ID}`,
|
|
|
|
|
iconIndex: 13,
|
|
|
|
|
parent: key + '-today',
|
|
|
|
|
parentTitle: '今日任务',
|
|
|
|
|
parentIconIndex: 'star',
|
|
|
|
|
_raw: { ...o, VKey: o.COLI_SN, VName: o.COLI_ID, VParent:-1, IsTrue: 0, ApplyDate: '', OrderSourceType: 227001, parent: -1 },
|
|
|
|
|
})),
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
title: '待办任务',
|
|
|
|
|
key: key + '-todo',
|
|
|
|
|
getMails: false,
|
|
|
|
|
getMails: false,iconIndex: 'calendar',
|
|
|
|
|
icon: <CalendarTwoTone />,_raw: {COLI_SN: 0},
|
|
|
|
|
children: (sticky[1] || []).map((o) => ({
|
|
|
|
|
key: `todo-${o.COLI_SN}`,
|
|
|
|
|
title: `(${todoTypes[o.coli_ordertype] || o.COLI_State}) ${o.COLI_ID}`,
|
|
|
|
|
iconIndex: 13,
|
|
|
|
|
parent: key + '-todo',
|
|
|
|
|
parentTitle: '待办任务',
|
|
|
|
|
parentIconIndex: 'calendar',
|
|
|
|
|
_raw: { ...o, VKey: o.COLI_SN, VName: o.COLI_ID, VParent:-1, IsTrue: 0, ApplyDate: '', OrderSourceType: 227001, parent: -1 },
|
|
|
|
|
})),
|
|
|
|
|
},
|
|
|
|
@ -214,7 +227,7 @@ function Follow() {
|
|
|
|
|
<Layout.Content style={{ maxHeight: 'calc(100vh - 166px)', height: 'calc(100vh - 166px)', minWidth: '360px' }}>
|
|
|
|
|
<Splitter>
|
|
|
|
|
<Splitter.Panel defaultSize='40%' min={580} max='70%'>
|
|
|
|
|
<Mailbox mailboxDir={mailboxActiveNode} onMailItemClick={(id) => setActiveEmailId(id)} />
|
|
|
|
|
<Mailbox breadcrumb={computedBreadcrumb} mailboxDir={mailboxActiveNode} onMailItemClick={(id) => setActiveEmailId(id)} />
|
|
|
|
|
</Splitter.Panel>
|
|
|
|
|
<Splitter.Panel>
|
|
|
|
|
<EmailDetailInline mailID={activeEmailId || 0} emailMsg={{}} variant={'outline'} size={'small'} />
|
|
|
|
@ -222,7 +235,7 @@ function Follow() {
|
|
|
|
|
</Splitter>
|
|
|
|
|
</Layout.Content>
|
|
|
|
|
|
|
|
|
|
<Button icon={collapsed ? <LeftOutlined /> : <UnorderedListOutlined />} onClick={() => setCollapsed(!collapsed)} className={`absolute top-20 z-10 rounded-none rounded-l ${collapsed ? 'right-1' : 'right-8 '}`} />
|
|
|
|
|
<Button icon={collapsed ? <LeftOutlined /> : <UnorderedListOutlined />} onClick={() => setCollapsed(!collapsed)} className={`absolute z-10 rounded-none rounded-l ${collapsed ? 'right-1 top-36' : 'right-8 top-20'}`} />
|
|
|
|
|
<Layout.Sider
|
|
|
|
|
width='280'
|
|
|
|
|
theme='light'
|
|
|
|
@ -236,7 +249,7 @@ function Follow() {
|
|
|
|
|
collapsedWidth={0}
|
|
|
|
|
trigger={null}
|
|
|
|
|
reverseArrow={true}>
|
|
|
|
|
<OrderProfile />
|
|
|
|
|
<OrderProfile coliSN={mailboxActiveNode.COLI_SN} />
|
|
|
|
|
</Layout.Sider>
|
|
|
|
|
</Layout>
|
|
|
|
|
</>
|
|
|
|
|