|
|
|
@ -4,7 +4,9 @@ import { WordsBtn,on, off, trigger ,getImageUrl,sortDirections} from 'educoder';
|
|
|
|
|
import axios from'axios';
|
|
|
|
|
import Dropdownbox from './Dropdownbox';
|
|
|
|
|
import Dynamiclist from './Dynamiclist';
|
|
|
|
|
import NoneData from "../../courses/coursesPublic/NoneData";
|
|
|
|
|
import './Statistics.css';
|
|
|
|
|
|
|
|
|
|
const { TabPane } = Tabs;
|
|
|
|
|
class Statistics extends Component{
|
|
|
|
|
constructor(props){
|
|
|
|
@ -56,12 +58,13 @@ class Statistics extends Component{
|
|
|
|
|
course_groups:result.data.course_groups
|
|
|
|
|
})
|
|
|
|
|
let list=result.data.course_groups;
|
|
|
|
|
if(list.length>0){
|
|
|
|
|
this.setState({
|
|
|
|
|
group_ids:[list[0].id],
|
|
|
|
|
})
|
|
|
|
|
this.getwork_scoredata(page,[list[0].id],sort);
|
|
|
|
|
}
|
|
|
|
|
// if(list.length>0){
|
|
|
|
|
// this.setState({
|
|
|
|
|
// group_ids:[list[0].id],
|
|
|
|
|
// })
|
|
|
|
|
// }
|
|
|
|
|
this.getwork_scoredata(page,undefined,sort);
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
}).catch((error) => {
|
|
|
|
|
console.log(error);
|
|
|
|
@ -207,7 +210,7 @@ class Statistics extends Component{
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
render(){
|
|
|
|
|
let {nd1,nd2,nd3,data,bomdata}=this.state;
|
|
|
|
|
let {nd1,nd2,nd3,data,bomdata,course_members}=this.state;
|
|
|
|
|
|
|
|
|
|
const columns = [
|
|
|
|
|
{
|
|
|
|
@ -322,7 +325,7 @@ class Statistics extends Component{
|
|
|
|
|
<Spin size="large" spinning={this.state.topisSpin}>
|
|
|
|
|
<p className="clearfix padding30">
|
|
|
|
|
<Row gutter={24}>
|
|
|
|
|
<Col>
|
|
|
|
|
<Col className={"Statisticsmxxy"}>
|
|
|
|
|
明星学员
|
|
|
|
|
</Col>
|
|
|
|
|
</Row>
|
|
|
|
@ -434,7 +437,7 @@ class Statistics extends Component{
|
|
|
|
|
return(
|
|
|
|
|
<Col span={5} className={"Statisticscenter"}>
|
|
|
|
|
<Col>{item.user_name}</Col>
|
|
|
|
|
<Col>2th</Col>
|
|
|
|
|
<Col>2nd</Col>
|
|
|
|
|
</Col>
|
|
|
|
|
)
|
|
|
|
|
}
|
|
|
|
@ -444,7 +447,7 @@ class Statistics extends Component{
|
|
|
|
|
return(
|
|
|
|
|
<Col span={5} className={"Statisticscenter"}>
|
|
|
|
|
<Col>{item.user_name}</Col>
|
|
|
|
|
<Col>1th</Col>
|
|
|
|
|
<Col>1st</Col>
|
|
|
|
|
</Col>
|
|
|
|
|
)
|
|
|
|
|
}
|
|
|
|
@ -454,7 +457,7 @@ class Statistics extends Component{
|
|
|
|
|
return(
|
|
|
|
|
<Col span={5} className={"Statisticscenter"}>
|
|
|
|
|
<Col>{item.user_name}</Col>
|
|
|
|
|
<Col>3th</Col>
|
|
|
|
|
<Col>3rd</Col>
|
|
|
|
|
</Col>
|
|
|
|
|
)
|
|
|
|
|
}
|
|
|
|
@ -487,23 +490,24 @@ class Statistics extends Component{
|
|
|
|
|
}
|
|
|
|
|
.ant-table-thead > tr > th, .ant-table-tbody > tr > td {
|
|
|
|
|
padding: 16px 0px;
|
|
|
|
|
text-align: center;
|
|
|
|
|
}
|
|
|
|
|
`
|
|
|
|
|
}</style>
|
|
|
|
|
<Tabs className="statisticsTabs" activeKey={this.state.activeKey} onChange={this.activeKey} tabBarExtraContent={this.props.isAdmin()===true?operations:""}>
|
|
|
|
|
<TabPane tab="学习成绩" key="1" className={"statisticsTabs1"} >
|
|
|
|
|
<Table
|
|
|
|
|
{bomdata===undefined||bomdata===null?"":bomdata.length===0?<NoneData/>:<Table
|
|
|
|
|
columns={columns}
|
|
|
|
|
dataSource={bomdata}
|
|
|
|
|
pagination={false}
|
|
|
|
|
onChange={this.handleTableChange}
|
|
|
|
|
/>
|
|
|
|
|
/>}
|
|
|
|
|
</TabPane>
|
|
|
|
|
<TabPane tab="课堂活跃度" key="2">
|
|
|
|
|
<Dynamiclist
|
|
|
|
|
{course_members===undefined||course_members===null?"":course_members.length===0?<NoneData/>:<Dynamiclist
|
|
|
|
|
{...this.state}
|
|
|
|
|
{...this.props}
|
|
|
|
|
/>
|
|
|
|
|
/>}
|
|
|
|
|
</TabPane>
|
|
|
|
|
</Tabs>
|
|
|
|
|
</Spin>
|
|
|
|
|