From 101098593cd1d998979cb8c603276b8f6687942e Mon Sep 17 00:00:00 2001
From: Mr Ke <kelq@hugeinfo.com.cn>
Date: Wed, 08 Apr 2020 14:45:02 +0800
Subject: [PATCH] 修复问卷编辑问题
---
SunshineIns/src/page/ApplyForEdit.jsx | 77 ++++++++++++++++++++++++++++++++------
1 files changed, 64 insertions(+), 13 deletions(-)
diff --git a/SunshineIns/src/page/ApplyForEdit.jsx b/SunshineIns/src/page/ApplyForEdit.jsx
index 7589c31..8298f3e 100644
--- a/SunshineIns/src/page/ApplyForEdit.jsx
+++ b/SunshineIns/src/page/ApplyForEdit.jsx
@@ -6,6 +6,7 @@
import HeadView from '../view/HeadView';
import BusDetailView from '../view/BusDetailView';
import TableView from '../view/TableView';
+import LineView from "../view/LineView";
import ImageBoxView from '../view/ImageBoxView'
// 引入编辑器以及编辑器样式
import Fetch from '../fetch';
@@ -69,7 +70,7 @@
},
disabled: res.status ? true : false,
loading: false,
- fileList: res.list ? res.list.map((item, index) => ({ uid: index, id:item.id, name:item.name, status:'done', url: domain + `/api/v1/attachment/download/${item.id}?online=false` })):[]
+ fileList: res.list ? res.list.map((item, index) => ({ uid: item.uid, id: item.uid, name: item.name, status: 'done', url: domain + `/api/v1/attachment/download/${item.uid}?online=false` })) : []
});
})
@@ -241,8 +242,9 @@
this.setState({ fileList });
},
fileList: fileList,
- onDownload:(file)=>{
- Fetch.attachmentDownload(file.id)
+ onDownload: (file) => {
+ console.log(file)
+ Fetch.attachmentDownload(file.uid)
.then(res => {
message.success("下载成功!");
});
@@ -292,22 +294,71 @@
</Col>
</Row>
</div>
+
+ {
+ savedate.approveLogs ?
+ <LineView title="审核记录" style="15vh">
+ {
+ savedate.approveLogs.length == 1 ?
+ <table>
+ <tbody>
+ <tr>
+ <td className="table-vaule1">检察院审核人</td>
+ <td className="table-vaule2">{savedate.approveLogs[0].approverName}</td>
+ <td className="table-vaule3">检察院审核时间</td>
+ <td className="table-vaule4">{moment(savedate.approveLogs[0].createTime).format('YYYY/MM/DD HH:mm:ss')}</td>
+ </tr>
+ <tr>
+ <td className="table-vaule1">检察院回复内容</td>
+ <td className="table-vaule2">{savedate.approveLogs[0].opinion}</td>
+ </tr>
+ </tbody>
+ </table>
+ : savedate.approveLogs.length == 2 ?
+ <React.Fragment>
+ <table>
+ <tbody>
+ <tr>
+ <td className="table-vaule1">检察院审核人</td>
+ <td className="table-vaule2">{savedate.approveLogs[0].approverName}</td>
+ <td className="table-vaule3">检察院审核时间</td>
+ <td className="table-vaule4">{moment(savedate.approveLogs[0].createTime).format('YYYY/MM/DD HH:mm:ss')}</td>
+ </tr>
+ <tr>
+ <td className="table-vaule1">检察院回复内容</td>
+ <td className="table-vaule2">{savedate.approveLogs[0].opinion}</td>
+ </tr>
+ </tbody>
+ </table><table>
+ <tbody>
+ <tr>
+ <td className="table-vaule1">公安审核人</td>
+ <td className="table-vaule2">{savedate.approveLogs[1].approverName}</td>
+ <td className="table-vaule3">公安审核时间</td>
+ <td className="table-vaule4">{moment(savedate.approveLogs[1].createTime).format('YYYY/MM/DD HH:mm:ss')}</td>
+ </tr>
+ <tr>
+ <td className="table-vaule1">公安回复内容</td>
+ <td className="table-vaule2">{savedate.approveLogs[1].opinion}</td>
+ </tr>
+ </tbody>
+ </table>
+ </React.Fragment> : ''
+ }
+ </LineView>
+ : ''
+ }
{
- savedate.status == 2 || savedate.status == 99 ?
+ savedate.status ?
<div style={{ display: 'flex', justifyContent: 'center' }}>
<Button style={{ marginLeft: '15px', width: '150px' }} onClick={this.cancle}>返回</Button>
</div>
:
- savedate.status == 1 ?
- <div style={{ display: 'flex', justifyContent: 'center' }}>
- <Button style={{ marginRight: '15px', width: '150px' }} type="primary" onClick={this.showModal}>结束任务</Button>
- <Button style={{ marginLeft: '15px', width: '150px' }} onClick={this.cancle}>返回</Button>
- </div> :
- <div style={{ display: 'flex', justifyContent: 'center' }}>
- <Button style={{ marginRight: '15px', width: '150px' }} type="primary" onClick={this.submit}>提交</Button>
- <Button style={{ marginLeft: '15px', width: '150px' }} onClick={this.cancle}>返回</Button>
- </div>
+ <div style={{ display: 'flex', justifyContent: 'center' }}>
+ <Button style={{ marginRight: '15px', width: '150px' }} type="primary" onClick={this.submit}>提交</Button>
+ <Button style={{ marginLeft: '15px', width: '150px' }} onClick={this.cancle}>返回</Button>
+ </div>
}
</BusDetailView>
--
Gitblit v1.8.0