From ed96dab91fbac7159525fe557af2ecdd135c791d Mon Sep 17 00:00:00 2001
From: liuwh <liuwh@hugeinfo.com.cn>
Date: Mon, 23 Mar 2020 14:21:40 +0800
Subject: [PATCH] 1
---
SunshineIns/src/page/CareList.jsx | 17 ++++++++++-------
1 files changed, 10 insertions(+), 7 deletions(-)
diff --git a/SunshineIns/src/page/CareList.jsx b/SunshineIns/src/page/CareList.jsx
index 2b2fa4e..96aa49c 100644
--- a/SunshineIns/src/page/CareList.jsx
+++ b/SunshineIns/src/page/CareList.jsx
@@ -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: '创建时间',
@@ -192,11 +192,7 @@
render: (text, record) => (
<span>
{
- record.status == 1 ?
- <React.Fragment>
- <Divider type="vertical" />
- <a onClick={() => this.showModal(record.id)}>结束任务</a>
- </React.Fragment> :
+ record.status == 0 ?
<React.Fragment>
<a onClick={() => this.showModal(record.id)}>编辑</a>
<Divider type="vertical" />
@@ -209,7 +205,14 @@
>
<a href="#">删除</a>
</Popconfirm>
- </React.Fragment>
+ </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>
),
--
Gitblit v1.8.0