|
|
@ -1,6 +1,6 @@
|
|
|
|
import React, {Component} from "react";
|
|
|
|
import React, {Component} from "react";
|
|
|
|
import {WordsBtn} from 'educoder';
|
|
|
|
import {WordsBtn} from 'educoder';
|
|
|
|
import { Form, Select, Input, Button,Checkbox,Upload,Icon,message,Modal, Table, Divider,InputNumber, Tag,DatePicker,Radio,Tooltip} from "antd";
|
|
|
|
import { Form, Select, Input, Button,Checkbox,Upload,Icon,message,Modal, Table, Divider,InputNumber, Tag,DatePicker,Radio,Tooltip,Spin} from "antd";
|
|
|
|
import {Link,Switch,Route,Redirect} from 'react-router-dom';
|
|
|
|
import {Link,Switch,Route,Redirect} from 'react-router-dom';
|
|
|
|
import axios from 'axios';
|
|
|
|
import axios from 'axios';
|
|
|
|
import ConclusionEvaluation from './shixunreport/ConclusionEvaluation';
|
|
|
|
import ConclusionEvaluation from './shixunreport/ConclusionEvaluation';
|
|
|
@ -24,20 +24,27 @@ class ShixunWorkReport extends Component {
|
|
|
|
constructor(props) {
|
|
|
|
constructor(props) {
|
|
|
|
super(props);
|
|
|
|
super(props);
|
|
|
|
this.state = {
|
|
|
|
this.state = {
|
|
|
|
data:undefined
|
|
|
|
data:undefined,
|
|
|
|
|
|
|
|
spinning:true
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
componentDidMount() {
|
|
|
|
componentDidMount() {
|
|
|
|
|
|
|
|
this.setState({
|
|
|
|
|
|
|
|
spinning:true
|
|
|
|
|
|
|
|
})
|
|
|
|
let homeworkid=this.props.match.params.homeworkid;
|
|
|
|
let homeworkid=this.props.match.params.homeworkid;
|
|
|
|
let url = `/student_works/${homeworkid}/shixun_work_report.json`
|
|
|
|
let url = `/student_works/${homeworkid}/shixun_work_report.json`
|
|
|
|
axios.get(url).then((result) => {
|
|
|
|
axios.get(url).then((result) => {
|
|
|
|
this.setState({
|
|
|
|
this.setState({
|
|
|
|
data:result.data
|
|
|
|
data:result.data,
|
|
|
|
|
|
|
|
spinning:false
|
|
|
|
})
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
|
|
}).catch((error) => {
|
|
|
|
}).catch((error) => {
|
|
|
|
console.log(error)
|
|
|
|
console.log(error)
|
|
|
|
|
|
|
|
this.setState({
|
|
|
|
|
|
|
|
spinning:false
|
|
|
|
|
|
|
|
})
|
|
|
|
})
|
|
|
|
})
|
|
|
|
let query = this.props.location.pathname;
|
|
|
|
let query = this.props.location.pathname;
|
|
|
|
const type = query.split('/');
|
|
|
|
const type = query.split('/');
|
|
|
@ -51,8 +58,10 @@ class ShixunWorkReport extends Component {
|
|
|
|
let category_id=data===undefined?"":data.category.category_id;
|
|
|
|
let category_id=data===undefined?"":data.category.category_id;
|
|
|
|
let homework_common_id=data===undefined?"":data.homework_common_id;
|
|
|
|
let homework_common_id=data===undefined?"":data.homework_common_id;
|
|
|
|
let homeworkid=this.props.match.params.homeworkid;
|
|
|
|
let homeworkid=this.props.match.params.homeworkid;
|
|
|
|
|
|
|
|
const antIcon = <Icon type="loading" style={{ fontSize: 24 }} spin />;
|
|
|
|
return (
|
|
|
|
return (
|
|
|
|
data===undefined?"":<div className="newMain clearfix ">
|
|
|
|
|
|
|
|
|
|
|
|
data===undefined?"":<Spin indicator={antIcon} spinning={this.state.spinning}><div className="newMain clearfix ">
|
|
|
|
<div className={"educontent mb20" }>
|
|
|
|
<div className={"educontent mb20" }>
|
|
|
|
<div className="educontent">
|
|
|
|
<div className="educontent">
|
|
|
|
<p className="clearfix mt20">
|
|
|
|
<p className="clearfix mt20">
|
|
|
@ -166,6 +175,7 @@ class ShixunWorkReport extends Component {
|
|
|
|
</style>
|
|
|
|
</style>
|
|
|
|
{
|
|
|
|
{
|
|
|
|
data&&data.shixun_detail===undefined?"":data.shixun_detail.map((item,key)=>{
|
|
|
|
data&&data.shixun_detail===undefined?"":data.shixun_detail.map((item,key)=>{
|
|
|
|
|
|
|
|
// console.log(item)
|
|
|
|
return(
|
|
|
|
return(
|
|
|
|
<div key={key} className={"mb20"}>
|
|
|
|
<div key={key} className={"mb20"}>
|
|
|
|
<div className="font-16 color-dark-21 ml20 mr20">
|
|
|
|
<div className="font-16 color-dark-21 ml20 mr20">
|
|
|
@ -185,7 +195,7 @@ class ShixunWorkReport extends Component {
|
|
|
|
/>
|
|
|
|
/>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
{item.st===0?<div className="font-16 color-dark-21 ml20 mr20">
|
|
|
|
{item.st===0?item.passed_code===null?"":<div className="font-16 color-dark-21 ml20 mr20">
|
|
|
|
<div className="bor-grey-e mt15">
|
|
|
|
<div className="bor-grey-e mt15">
|
|
|
|
<p className="clearfix pt5 pb5 pl15 pr15 back-f6-grey codebox">
|
|
|
|
<p className="clearfix pt5 pb5 pl15 pr15 back-f6-grey codebox">
|
|
|
|
<span className="fl">最近通过的代码</span>
|
|
|
|
<span className="fl">最近通过的代码</span>
|
|
|
@ -223,6 +233,7 @@ class ShixunWorkReport extends Component {
|
|
|
|
|
|
|
|
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
</Spin>
|
|
|
|
|
|
|
|
|
|
|
|
)
|
|
|
|
)
|
|
|
|
}
|
|
|
|
}
|
|
|
|