forked from huge/frontEnd/hugeOA

Mr Ke
2020-05-16 c235b08e0e1f965357b34e0dbd6d8605fd6c68df
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}>