| | |
| | | |
| | | componentDidMount() { } |
| | | |
| | | cancle = (id) => { |
| | | link = (id) => { |
| | | console.log(id) |
| | | // // this.props.history.push("/document/create?id=" + id); |
| | | this.props.history.push({ pathname: "/document/create/" + id }); |
| | | this.props.history.push({ pathname: "/document/detail/" + id }); |
| | | } |
| | | |
| | | emoveTAG = (str) => { |
| | | return str.replace(/<[^>]+>/g, ""); |
| | | } |
| | | |
| | | renderColumns = () => { |
| | | return [ |
| | | { title: '标题', dataIndex: 'documentTitle' }, |
| | | { title: '通知内容', dataIndex: 'documentContent' }, |
| | | { |
| | | title: '通知内容', dataIndex: 'documentContent', ellipsis: true, width: '40%', render: (cur, item) => { |
| | | return this.emoveTAG(cur) |
| | | } |
| | | }, |
| | | { title: '接受情况', dataIndex: 'groupType', render: (cur, item) => <span>{item.readNumber || 0}/{item.noticeNumber || 0}</span> }, |
| | | { title: '通知时间', dataIndex: 'createTime', render: (cur, item) => cur !== "" && cur != null ? moment(cur).format("YYYY-MM-DD HH:mm") : "" }, |
| | | { title: '操作', render: (text, record) => <a onClick={() => this.cancle(record.id)}>查看</a> } |
| | | { title: '操作', render: (text, record) => <a onClick={() => this.link(record.id)}>查看</a> } |
| | | ]; |
| | | } |
| | | |
| | |
| | | key: formData.__key, |
| | | columns: this.renderColumns(), |
| | | extraFromData: { |
| | | type: '', |
| | | type: 'DT00002', |
| | | }, |
| | | setFormData: this.setFormData |
| | | } |