forked from huge/frontEnd/hugeOA

Mr Ke
2020-04-27 5acddbdb6b6d48a08b52602fd232993fd5c3715d
src/components/page/AnnouncementPage/index.jsx
@@ -9,6 +9,8 @@
import TableView from '../../common/TableView';
import SearchFormView from '../../common/SearchFormView';
import moment from 'moment';
import { Modal } from 'antd';
import FindAlreadyReadOrNotView from '../../common/FindAlreadyReadOrNotView';
import './index.scss';
@@ -26,6 +28,7 @@
        page: 1,
        size: 10,
      },
      visible: false//modal的可视化状态
    };
  }
@@ -50,7 +53,7 @@
          return this.emoveTAG(cur)
        }
      },
      { title: '接受情况', dataIndex: 'groupType', render: (cur, item) => <span>{item.readNumber || 0}/{item.noticeNumber || 0}</span> },
      { 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: '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> }
    ];
@@ -64,7 +67,7 @@
  }
  render() {
    const { formData } = this.state;
    const { formData, documentId, visible } = this.state;
    let tableParams = {
      url: `api/document/getNotice`,
@@ -78,6 +81,18 @@
    }
    return (
      <div className="rules-list-main">
        <Modal
          visible={visible}
          onCancel={() => this.setState({ visible: false })}
          footer={null}
          title="接收情况"
        >
          {
            documentId &&
            <FindAlreadyReadOrNotView key={documentId} documentId={documentId} />
          }
        </Modal>
        <SearchFormView
          formData={formData}
          setFormData={this.setFormData}