You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
45 lines
1.3 KiB
JavaScript
45 lines
1.3 KiB
JavaScript
import { NavLink, useParams } from 'react-router-dom';
|
|
import { useEffect, useState } from 'react';
|
|
import { Row, Col, Space, Typography, Divider } from 'antd';
|
|
import * as comm from '@/utils/commons';
|
|
import { useTranslation } from 'react-i18next';
|
|
import { fetchNoticeDetail } from '@/stores/Notice';
|
|
import BackBtn from '@/components/BackBtn';
|
|
import { usingStorage } from '@/hooks/usingStorage';
|
|
|
|
const { Title, Paragraph } = Typography;
|
|
|
|
function Detail() {
|
|
const { t } = useTranslation();
|
|
const { CCP_BLID } = useParams();
|
|
const {userId} = usingStorage();
|
|
|
|
const [noticeInfo, setNoticeInfo] = useState({});
|
|
useEffect(() => {
|
|
// console.info("notice detail .useEffect " + CCP_BLID);
|
|
fetchNoticeDetail(userId, CCP_BLID).then((res) => {
|
|
setNoticeInfo(res);
|
|
});
|
|
}, []);
|
|
|
|
return (
|
|
<Space direction='vertical' style={{ width: '100%' }}>
|
|
<Row gutter={16}>
|
|
<Col span={4}></Col>
|
|
<Col span={16}>
|
|
<Title level={1}>{noticeInfo.CCP_BLTitle}</Title>
|
|
<Divider orientation='right'>{noticeInfo.CCP_LastEditTime}</Divider>
|
|
<Paragraph>
|
|
<div dangerouslySetInnerHTML={{ __html: comm.escape2Html(noticeInfo.CCP_BLContent) }}></div>
|
|
</Paragraph>
|
|
</Col>
|
|
<Col span={4}>
|
|
<BackBtn />
|
|
</Col>
|
|
</Row>
|
|
</Space>
|
|
);
|
|
}
|
|
|
|
export default Detail;
|