From 58ae2ba21efcd85df331cf996a94038a77302b51 Mon Sep 17 00:00:00 2001
From: Mr Ke <kelq@hugeinfo.com.cn>
Date: Wed, 27 May 2020 17:07:48 +0800
Subject: [PATCH] 修改报错问题

---
 SunshineIns/src/page/ActiveManage.jsx |   21 +++++++++++++++++++--
 1 files changed, 19 insertions(+), 2 deletions(-)

diff --git a/SunshineIns/src/page/ActiveManage.jsx b/SunshineIns/src/page/ActiveManage.jsx
index 2eacf29..3966f9a 100644
--- a/SunshineIns/src/page/ActiveManage.jsx
+++ b/SunshineIns/src/page/ActiveManage.jsx
@@ -144,7 +144,17 @@
         this.setState({
             formData: data,
         });
-        this.getData();
+        this.setState({ loading: true })
+        Fetch.activeManage({ ...this.state.formData })
+            .then(res => {
+                for (var i = 0; i < res.length; i++) {
+                    res[i]['index'] = i + 1;
+                }
+                this.setState({
+                    data: res,
+                    loading: false
+                });
+            });
     }
 
     saveInputChange = ({ target: { value, name } }) => {
@@ -288,6 +298,8 @@
                             record.status == 3 ?
                                 <span>
                                     <label className='theme-color' onClick={() => this.showModal(record.id)} style={{ cursor: 'pointer' }}>查看</label>
+                                    <Divider type="vertical" />
+                                    <label className='theme-color' onClick={() => this.signIn(record.id)} style={{ cursor: 'pointer' }}>签到上墙</label>
                                     {!record.result &&
                                         <React.Fragment>
                                             <Divider type="vertical" />
@@ -296,7 +308,12 @@
                                     }
                                 </span>
                                 :
-                                <span><label className='theme-color' onClick={() => this.showModal(record.id)} style={{ cursor: 'pointer' }}>查看</label></span>
+                                record.status == 99 ?
+                                    <span><label className='theme-color' onClick={() => this.showModal(record.id)} style={{ cursor: 'pointer' }}>查看</label></span>
+                                    :
+                                    <span><label className='theme-color' onClick={() => this.showModal(record.id)} style={{ cursor: 'pointer' }}>查看</label>
+                                        <Divider type="vertical" />
+                                        <label className='theme-color' onClick={() => this.signIn(record.id)} style={{ cursor: 'pointer' }}>签到上墙</label></span>
 
                 )
             ),

--
Gitblit v1.8.0