dev_forum
parent
ca2e882337
commit
5c8bdefab8
After Width: | Height: | Size: 27 KiB |
@ -1,73 +1,74 @@
|
|||||||
import React, {Component} from "react";
|
import React, {Component} from "react";
|
||||||
import {WordsBtn} from 'educoder';
|
import {WordsBtn} from 'educoder';
|
||||||
import {Table} from "antd";
|
import {Table} from "antd";
|
||||||
import {Link,Switch,Route,Redirect} from 'react-router-dom';
|
import {Link,Switch,Route,Redirect} from 'react-router-dom';
|
||||||
|
|
||||||
class Coursesshixundetails extends Component {
|
class Coursesshixundetails extends Component {
|
||||||
|
|
||||||
constructor(props) {
|
constructor(props) {
|
||||||
super(props);
|
super(props);
|
||||||
this.state = {
|
this.state = {
|
||||||
loadingstate:true
|
loadingstate:true
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
componentDidMount() {
|
componentDidMount() {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
render() {
|
render() {
|
||||||
let {data}=this.props;
|
let {data}=this.props;
|
||||||
let columns=[{
|
// console.log(data)
|
||||||
title: '评测次数',
|
let columns=[{
|
||||||
dataIndex: 'number',
|
title: '评测次数',
|
||||||
width:"127px",
|
dataIndex: 'number',
|
||||||
key: 'number',
|
width:"127px",
|
||||||
render: (text, record) => (
|
key: 'number',
|
||||||
<span>
|
render: (text, record) => (
|
||||||
{record.number}
|
<span>
|
||||||
</span>
|
{record.number}
|
||||||
),
|
</span>
|
||||||
}, {
|
),
|
||||||
title: '详细信息',
|
}, {
|
||||||
dataIndex: 'name',
|
title: '详细信息',
|
||||||
key: 'name',
|
dataIndex: 'name',
|
||||||
render: (text, record) => (
|
key: 'name',
|
||||||
<span>
|
render: (text, record) => (
|
||||||
{record.name}
|
<span>
|
||||||
</span>
|
{record.name}
|
||||||
),
|
</span>
|
||||||
}];
|
),
|
||||||
|
}];
|
||||||
let datas=[];
|
|
||||||
data&&data.forEach((item,key)=>{
|
let datas=[];
|
||||||
datas.push({
|
data&&data.forEach((item,key)=>{
|
||||||
number: item.position,
|
datas.push({
|
||||||
name: item.output_detail
|
number: item.position,
|
||||||
|
name: item.output_detail
|
||||||
})
|
|
||||||
})
|
})
|
||||||
|
})
|
||||||
return (
|
|
||||||
<div>
|
return (
|
||||||
<style>{`
|
<div>
|
||||||
.ant-table-thead > tr > th{
|
<style>{`
|
||||||
text-align: center;
|
.ant-table-thead > tr > th{
|
||||||
}
|
text-align: center;
|
||||||
|
}
|
||||||
`}</style>
|
|
||||||
{data&&data?<Table
|
`}</style>
|
||||||
bordered
|
{data&&data? data.length===0?"":<Table
|
||||||
dataSource={datas}
|
bordered
|
||||||
columns={columns}
|
dataSource={datas}
|
||||||
pagination={false}
|
columns={columns}
|
||||||
// loading={loadingstate}
|
pagination={false}
|
||||||
// onChange={this.TablePagination}
|
// loading={loadingstate}
|
||||||
/>:""}
|
// onChange={this.TablePagination}
|
||||||
</div>
|
/>:""}
|
||||||
|
</div>
|
||||||
)
|
|
||||||
}
|
)
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
export default Coursesshixundetails;
|
export default Coursesshixundetails;
|
File diff suppressed because it is too large
Load Diff
Loading…
Reference in new issue