From 8d68b6a1dcdf5008fba6bdac5858d1085a0e63e7 Mon Sep 17 00:00:00 2001 From: liuwh <hugeinfo123> Date: Mon, 30 Mar 2020 23:14:04 +0800 Subject: [PATCH] 提交 --- SunshineIns/src/page/ApplyFor.jsx | 29 +++++++++++++++++------------ 1 files changed, 17 insertions(+), 12 deletions(-) diff --git a/SunshineIns/src/page/ApplyFor.jsx b/SunshineIns/src/page/ApplyFor.jsx index 2eab1b3..7047bb8 100644 --- a/SunshineIns/src/page/ApplyFor.jsx +++ b/SunshineIns/src/page/ApplyFor.jsx @@ -64,7 +64,7 @@ formData: data, }); this.setState({ loading: true }) - Fetch.entryQuery({ ...data,type:1 }) + Fetch.entryQuery({ ...data, type: 1 }) .then(res => { console.log(res) for (var i = 0; i < res.rows.length; i++) { @@ -79,7 +79,7 @@ getData = () => { this.setState({ loading: true }) - Fetch.entryQuery({ ...this.state.formData,type:1 }) + Fetch.entryQuery({ ...this.state.formData, type: 1 }) .then(res => { console.log(res) for (var i = 0; i < res.rows.length; i++) { @@ -168,16 +168,21 @@ 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 ? + <React.Fragment> + <Divider type="vertical" /> + <Popconfirm + title="确认删除任务吗?" + id={record.id} + onConfirm={e => this.confirm(record.id)} + okText="确定" + cancelText="取消" + > + <a href="#">删除</a> + </Popconfirm> + </React.Fragment> : '' + } </span> ), }]; -- Gitblit v1.8.0