perf: 邮箱目录: 保留选中

dev/ckeditor
Lei OT 4 months ago
parent a6cb136ccf
commit 3df24ab6ba

@ -151,7 +151,7 @@ export const fetchEmailBindOrderAction = async (params) => {
* @param {object} { opi_sn }
*/
export const getEmailDirAction = async (params = { opi_sn: '' }) => {
const defaultParams = { opi_sn: 0, year: dayjs().year() }
const defaultParams = { opi_sn: 0, year: dayjs().year(), by_start_date: 1, by_success: -1, important: -1, if_want_book: -1, if_thinking: -1 }
const { errcode, result } = await fetchJSON(`http://202.103.68.144:8889/v3/email_dir`, { ...defaultParams, ...params })
return errcode === 0 ? result : [];
} ;

@ -135,7 +135,7 @@ function Follow() {
const treeNode = pick(node, ['key', 'parent', 'iconIndex', 'getMails', 'title', 'parentTitle', 'parentIconIndex' ]);
const { COLI_SN, VKey, VParent, ApplyDate, OrderSourceType, IsTrue } = node?._raw || {}
if (VKey && !(!IsTrue && !COLI_SN)) {
setMailboxActiveNode({...treeNode, ...node._raw, OPI_SN: currentMailboxOPI});
setMailboxActiveNode({...treeNode, ...node._raw, key: treeNode.key, OPI_SN: currentMailboxOPI});
setActiveEmailId(0);
}
}
@ -195,7 +195,7 @@ function Follow() {
// console.log('tree 0', byState);
setDeiStickyTree(byState)
const first = currentMailboxDEI || accountDEI[0].value
setExpandTree([`${first}-today`, `${first}-todo`])
setExpandTree([`${first}-today`, `${first}-todo`, mailboxActiveNode.key])
setStickyTree(byState[first] || [])
return () => {}
@ -212,9 +212,10 @@ function Follow() {
key='sticky-today'
blockNode
showIcon
showLine
showLine autoExpandParent={true}
expandAction={'doubleClick'}
onSelect={handleTreeSelectGetMails}
selectedKeys={[mailboxActiveNode.key]}
onExpand={(expandedKeys) => setExpandTree(expandedKeys)}
expandedKeys={expandTree}
defaultExpandedKeys={expandTree}

Loading…
Cancel
Save