|
|
|
@ -1,6 +1,6 @@
|
|
|
|
|
import { useState, useEffect, useRef, useMemo } from 'react'
|
|
|
|
|
import { App, Button, Divider, Avatar, List, Flex, Typography, Tooltip, Empty } from 'antd'
|
|
|
|
|
import { LoadingOutlined, ApiOutlined, FilePdfOutlined, FileOutlined, FileWordOutlined, FileExcelOutlined, FileJpgOutlined, FileImageOutlined, FileTextOutlined, FileGifOutlined, GlobalOutlined, FileZipOutlined } from '@ant-design/icons'
|
|
|
|
|
import { LoadingOutlined, ApiOutlined, FilePdfOutlined, FileOutlined, FileWordOutlined, FileExcelOutlined, FileJpgOutlined, FileImageOutlined, FileTextOutlined, FileGifOutlined, GlobalOutlined, FileZipOutlined, DeleteOutlined } from '@ant-design/icons'
|
|
|
|
|
import { EditIcon, MailCheckIcon, ReplyAllIcon, ReplyIcon, ResendIcon, ShareForwardIcon, SendPlaneFillIcon, InboxIcon } from '@/components/Icons'
|
|
|
|
|
import { isEmpty, TagColorStyle } from '@/utils/commons'
|
|
|
|
|
import EmailEditorPopup from '../Input/EmailEditorPopup'
|
|
|
|
@ -158,8 +158,11 @@ const EmailDetailInline = ({ mailID, emailMsg = {}, disabled = false, variant, s
|
|
|
|
|
break
|
|
|
|
|
case 'failed':
|
|
|
|
|
btns.push(
|
|
|
|
|
<Tooltip key='resend-t' title='重发'>
|
|
|
|
|
<Button key={'resend'} onClick={() => handleResend()} size='small' type='text' icon={<ResendIcon className='text-orange-500' />}>{compactBtn ? '' : '重发'}</Button></Tooltip>,
|
|
|
|
|
<Tooltip key='delete-t' title='删除'>
|
|
|
|
|
<Button key={'delete'} danger onClick={() => alert('todo')} size='small' type='text' icon={<DeleteOutlined className='text-red-500' />}>{compactBtn ? '' : '删除'}</Button></Tooltip>,
|
|
|
|
|
|
|
|
|
|
<Tooltip key='resend-t' title='发送'>
|
|
|
|
|
<Button key={'resend'} onClick={() => handleResend()} size='small' type='text' icon={<SendPlaneFillIcon className='text-orange-500' />}>{compactBtn ? '' : '发送'}</Button></Tooltip>,
|
|
|
|
|
)
|
|
|
|
|
btns.push(
|
|
|
|
|
<Tooltip key='edit-t' title='编辑'>
|
|
|
|
@ -209,7 +212,7 @@ const EmailDetailInline = ({ mailID, emailMsg = {}, disabled = false, variant, s
|
|
|
|
|
</div>
|
|
|
|
|
<div className=' ml-auto flex flex-col justify-start gap-1 items-end'>
|
|
|
|
|
{/* <ActionBtns /> */}
|
|
|
|
|
<div className='text-xs '>{mailData.info?.MAI_SendDate || emailMsg.localDate}{mailData.info.MAI_Direction === 1 ? <SendPlaneFillIcon className='text-primary' /> : <InboxIcon className='text-indigo-500' />}</div>
|
|
|
|
|
<div className='text-xs '>{mailData.info?.MAI_SendDate || emailMsg.localDate}</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
<div className='text-sm'>
|
|
|
|
@ -240,10 +243,11 @@ const EmailDetailInline = ({ mailID, emailMsg = {}, disabled = false, variant, s
|
|
|
|
|
{mailData.info?.mailType === 'text/html' ? (
|
|
|
|
|
<EmailContent content={mailData.content} id={mailID} key={mailID} />
|
|
|
|
|
) : (
|
|
|
|
|
<div className='mt-2 whitespace-pre-wrap' dangerouslySetInnerHTML={{ __html: mailData.content }}></div>
|
|
|
|
|
<div className='mt-2 whitespace-pre-wrap flex-auto' dangerouslySetInnerHTML={{ __html: mailData.content }}></div>
|
|
|
|
|
)}
|
|
|
|
|
{mailData.attachments.length > 0 && (
|
|
|
|
|
{mailData.AttachList.length > 0 && (
|
|
|
|
|
<div className={`${compactBtn === false ? 'w-48' : 'border-b border-t-0'} overflow-hidden`}>
|
|
|
|
|
{mailData.attachments.length > 0 && (<>
|
|
|
|
|
<span> 附件 ({mailData.attachments.length})</span>
|
|
|
|
|
<List
|
|
|
|
|
dataSource={mailData.attachments || []}
|
|
|
|
@ -258,7 +262,9 @@ const EmailDetailInline = ({ mailID, emailMsg = {}, disabled = false, variant, s
|
|
|
|
|
</Typography.Text>
|
|
|
|
|
</List.Item>
|
|
|
|
|
)}
|
|
|
|
|
/>
|
|
|
|
|
/></>
|
|
|
|
|
)}
|
|
|
|
|
{mailData.insideAttachments.length > 0 && <span className='text-gray-500 italic'> 文内附件 ({mailData.insideAttachments.length}) 已在正文显示</span>}
|
|
|
|
|
</div>
|
|
|
|
|
)}
|
|
|
|
|
</Flex>
|
|
|
|
|