| | |
| | | componentDidMount() { } |
| | | |
| | | link = (id) => { |
| | | console.log(id) |
| | | this.props.history.push({ pathname: "/document/detail/" + id }); |
| | | } |
| | | |
| | |
| | | |
| | | renderColumns = () => { |
| | | return [ |
| | | { title: '标题', dataIndex: 'documentTitle' }, |
| | | { title: '标题', dataIndex: 'documentTitle', ellipsis: true }, |
| | | { |
| | | title: '通知内容', dataIndex: 'documentContent', width: '40%', ellipsis: true, render: (cur, item) => { |
| | | title: '通知内容', dataIndex: 'documentContent', ellipsis: true, render: (cur, item) => { |
| | | return cur ? this.emoveTAG(cur) : '无' |
| | | } |
| | | }, |
| | | { title: '接受情况', dataIndex: 'groupType', render: (cur, item) => <a onClick={() => { this.setState({ visible: true, documentId: item.id }) }}> <span>{item.readNumber || 0}/{item.noticeNumber || 0}</span></a> }, |
| | | { title: '接受情况', dataIndex: 'groupType', render: (cur, item) => <a onClick={() => { this.setState({ visible: true, documentId: item.id, curItem: item }) }}> <span>{item.readNumber || 0}/{item.noticeNumber || 0}</span></a> }, |
| | | { title: '发布时间', dataIndex: 'createTime', render: (cur, item) => cur !== "" && cur != null ? moment(cur).format("YYYY-MM-DD HH:mm") : "" }, |
| | | { title: '操作', render: (text, record) => <a onClick={() => this.link(record.id)}>查看</a> } |
| | | ]; |
| | | } |
| | | |
| | | setFormData = data => { |
| | | console.log('form', data); |
| | | this.setState({ |
| | | formData: data, |
| | | }); |
| | | } |
| | | |
| | | onTabsChange = (key) => { |
| | | console.log(key); |
| | | } |
| | | |
| | | |
| | | render() { |
| | | const { formData, visible, documentId } = this.state; |
| | | const { formData, visible, documentId, curItem } = this.state; |
| | | |
| | | let tableParams = { |
| | | url: `api/document/getNotice`, |
| | |
| | | visible={visible} |
| | | onCancel={() => this.setState({ visible: false })} |
| | | footer={null} |
| | | title="接收情况" |
| | | title={<div > |
| | | {curItem ? curItem.documentTitle : '接受情况'} |
| | | </div>} |
| | | > |
| | | { |
| | | documentId && |
| | | <FindAlreadyReadOrNotView key={documentId} documentId={documentId}/> |
| | | <FindAlreadyReadOrNotView key={documentId} documentId={documentId} /> |
| | | } |
| | | |
| | | </Modal> |