From 2ea56ed08b58386f0612635101b1acd51cd4a44c Mon Sep 17 00:00:00 2001
From: Mr Ke <kelq@hugeinfo.com.cn>
Date: Wed, 29 Apr 2020 18:06:45 +0800
Subject: [PATCH] 浏览日志,操作日志;用户中心(个人信息);用户管理(用户中心)
---
src/components/common/TopListTableView/index.jsx | 20 ++++++++++----------
1 files changed, 10 insertions(+), 10 deletions(-)
diff --git a/src/components/common/TopListTableView/index.jsx b/src/components/common/TopListTableView/index.jsx
index d359b2b..edb1878 100644
--- a/src/components/common/TopListTableView/index.jsx
+++ b/src/components/common/TopListTableView/index.jsx
@@ -27,14 +27,15 @@
fetch({
url: `api/merits/queryMerits`
}).then(res => {
- console.log('res', res);
- this.setState({
- topList: [
- { ...tag['latenessRanking'], dataSource: res['latenessRanking'] },
- { ...tag['meritsRanking'], dataSource: res['meritsRanking'] },
- { ...tag['defectRanking'], dataSource: res['defectRanking'] },
- ]
- })
+ if( res) {
+ this.setState({
+ topList: [
+ { ...tag['latenessRanking'], dataSource: res['latenessRanking'] },
+ { ...tag['meritsRanking'], dataSource: res['meritsRanking'] },
+ { ...tag['defectRanking'], dataSource: res['defectRanking'] },
+ ]
+ })
+ }
})
}
@@ -46,7 +47,7 @@
<span className="top-list-table-view-main-table-title-fuc">查看</span>
</div>
<Table
- dataSource={dataSource || []}
+ dataSource={dataSource ? dataSource.map((a, idx) => ({ ...a, key: idx })) : []}
columns={columns}
size="small"
bordered={false}
@@ -57,7 +58,6 @@
render() {
let { topList } = this.state;
- console.log(topList)
return (
<div className="top-list-table-view-main">
<Row type="flex" gutter={12}>
--
Gitblit v1.8.0