forked from nsjcy/frontEnd/nsjcy

liuwh
2020-03-31 b72fc1b10b08cf2fea1626d32e1ca2cccabe2edd
SunshineIns/src/page/CareList.jsx
@@ -61,7 +61,7 @@
    }
    componentDidMount() {
        document.title = '社会关护管理';
        document.title = '社会观护管理';
        this.getData();
    }
@@ -169,7 +169,7 @@
            key: 'status',
            render: text => (
                text == 0 ?
                    <Badge style={{ backgroundColor: '#6C757C' }} count={'已结束'} /> : text == 1 ? <Badge count={'进行中'} style={{ backgroundColor: '#6C757C' }} /> : text == 2 ? <Badge count={'进行中'} style={{ backgroundColor: '#6C757C' }} /> : <Badge count={'已结束'} style={{ backgroundColor: '#2ECC71' }} />
                    <Badge style={{ backgroundColor: '#6C757C' }} count={'未开始'} /> : text == 1 ? <Badge count={'进行中'} style={{ backgroundColor: '#F1C40F' }} /> : text == 2 ? <Badge count={'已结束'} style={{ backgroundColor: '#2ECC71' }} /> : <Badge count={'结束'} style={{ backgroundColor: '#2ECC71' }} />
            )
        }, {
            title: '创建时间',
@@ -191,23 +191,28 @@
            key: 'action',
            render: (text, record) => (
                <span>
                    <a onClick={() => this.showModal(record.id)}>编辑</a>
                    <Divider type="vertical" />
                    <Popconfirm
                        title="确认删除任务吗?"
                        id={record.id}
                        onConfirm={e => this.confirm(record.id)}
                        okText="确定"
                        cancelText="取消"
                    >
                        <a href="#">删除</a>
                    </Popconfirm>
                    {
                        record.status == 1 ?
                        record.status == 0 ?
                            <React.Fragment>
                                <a onClick={() => this.showModal(record.id)}>编辑</a>
                                <Divider type="vertical" />
                                <a onClick={() => this.showModal(record.id)}>结束任务</a>
                            </React.Fragment> : ''
                                <Popconfirm
                                    title="确认删除任务吗?"
                                    id={record.id}
                                    onConfirm={e => this.confirm(record.id)}
                                    okText="确定"
                                    cancelText="取消"
                                >
                                    <a href="#">删除</a>
                                </Popconfirm>
                            </React.Fragment> :
                            record.status == 1 ?
                                <React.Fragment>
                                    <a onClick={() => this.showModal(record.id)}>查看</a>
                                    <Divider type="vertical" />
                                    <a onClick={() => this.showModal(record.id)}>结束任务</a>
                                </React.Fragment> :
                                <a onClick={() => this.showModal(record.id)}>查看</a>
                    }
                </span>
            ),