|
|
@@ -2,19 +2,25 @@ import React from 'react'
|
|
|
import MarkDown from 'react-markdown'
|
|
|
import styles from '@/pages/Hr/Notification/index.less'
|
|
|
import 'vditor/src/assets/scss/index.scss'
|
|
|
+import { Tag } from 'antd'
|
|
|
+import { useIntl } from 'umi'
|
|
|
|
|
|
const MessageDrawer = props => {
|
|
|
const {
|
|
|
- item: { title, createTime, content }
|
|
|
+ item: { title, createTime, content, msgType }
|
|
|
} = props
|
|
|
+ const intl = useIntl()
|
|
|
return (
|
|
|
<div className="px-5 vditor-reset">
|
|
|
- <h1 className="pt-4 text-xl pr-6">{title}</h1>
|
|
|
- <div className="text-blueGray-500 py-1">{createTime}</div>
|
|
|
+ <span className="pt-5 block">
|
|
|
+ <Tag color="purple">{intl.formatMessage({ id: `component.globalHeader.${msgType}` })}</Tag>
|
|
|
+ </span>
|
|
|
+ <h1 className={['text-xl pr-6 mt-3', styles.NotificationCont].join(' ')}>{title}</h1>
|
|
|
+ <span className="text-hex-aaa">{createTime}</span>
|
|
|
+ <div className="w-22 h-[1px] bg-hex-ddd mt-3" />
|
|
|
<div
|
|
|
className={['py-3', styles.NotificationCont].join(' ')}
|
|
|
- style={{ height: 'calc(100vh - 120px)', overflowY: 'auto' }}
|
|
|
- >
|
|
|
+ style={{ height: 'calc(100vh - 160px)', overflowY: 'auto' }}>
|
|
|
<MarkDown>{content}</MarkDown>
|
|
|
</div>
|
|
|
</div>
|