diff --git a/public/react/src/Loading.js b/public/react/src/Loading.js
index cf17d1d1b..e05a36a54 100644
--- a/public/react/src/Loading.js
+++ b/public/react/src/Loading.js
@@ -5,6 +5,13 @@ import { BrowserRouter as Router, Route, Link } from "react-router-dom";
import { Spin } from 'antd';
class Loading extends Component {
+ componentDidUpdate(prevProps, prevState) {
+ if (!prevProps.error && this.props.error) {
+ console.log(this.props.error)
+ window.location.reload()
+ }
+ }
+
render() {
// Loading
return (
diff --git a/public/react/src/modules/courses/ListPageIndex.js b/public/react/src/modules/courses/ListPageIndex.js
index 9c1923452..20718c903 100644
--- a/public/react/src/modules/courses/ListPageIndex.js
+++ b/public/react/src/modules/courses/ListPageIndex.js
@@ -119,17 +119,17 @@ class ListPageIndex extends Component{
{/*头部banner*/}
- {mysearch!==undefined?
- (
- mysearch===true?
- this.setwindowlocal(b)}
- >
-
- :""
- )
- :""
- }
+ {/*{mysearch!==undefined?*/}
+ {/*(*/}
+ {/* mysearch===true?*/}
+ {/* this.setwindowlocal(b)}*/}
+ {/* >*/}
+ {/* */}
+ {/* :""*/}
+ {/* )*/}
+ {/* :""*/}
+ {/*}*/}
diff --git a/public/react/src/modules/courses/shixunHomework/shixunreport/Shixunechart.js b/public/react/src/modules/courses/shixunHomework/shixunreport/Shixunechart.js
index c12ec13d5..9842aa026 100644
--- a/public/react/src/modules/courses/shixunHomework/shixunreport/Shixunechart.js
+++ b/public/react/src/modules/courses/shixunHomework/shixunreport/Shixunechart.js
@@ -24,7 +24,8 @@ function startechart(data){
// trigger: 'axis',
showDelay : 0,
formatter : function (params) {
- if(params.name == data.username){
+
+ if(params.name === data.username){
return "姓名:"+data.username + "
"+'学号: '+data.user_id + "
"+'效率:'+ data.echart_data.myself_eff[1];
}else if (params.value.length > 1) {
/* return '学生ID: ' + params.value[2] + '
'
@@ -34,6 +35,7 @@ function startechart(data){
return params.name + ":" + params.value +" ";
}
},
+
axisPointer:{
show: true,
type : 'cross',
@@ -106,7 +108,7 @@ function startechart(data){
markPoint : {
data : [
{
- name: data.username,
+ name: data===undefined?"":data.username,
xAxis:data.echart_data===undefined?"":data.echart_data.myself_eff[0],
yAxis:data.echart_data===undefined?"":data.echart_data.myself_eff[1],
value:data.echart_data===undefined?"":data.echart_data.myself_eff[1],
@@ -130,13 +132,13 @@ function startechart(data){
]
}
},
- {
- name:'二班',
- type:'scatter',
- data: data.echart_data===undefined?"":data.echart_data.myself_eff,
- itemStyle:{
- color:'#c23531'
- }}
+ // {
+ // name:'二班',
+ // type:'scatter',
+ // data: data.echart_data===undefined?"":data.echart_data.myself_eff,
+ // itemStyle:{
+ // color:'#c23531'
+ // }}
]};
effChart.setOption(option);
@@ -189,7 +191,7 @@ function startechart(data){
borderWidth: 1,
formatter: function (obj) {
var value = obj.value;
- if(obj.name ==data.username){
+ if(obj.name ===data.username){
return "姓名:"+data.username + "
"+'学号: '+data.user_id + "
"+'得分:'+ data.echart_data===undefined?"":data.echart_data.myself_object[1];
}
@@ -242,7 +244,7 @@ function startechart(data){
markPoint : {
data : [
{
- name: data.username,
+ name: data===undefined?"":data.username,
xAxis: data.echart_data===undefined?"":data.echart_data.myself_object[0],
yAxis:data.echart_data===undefined?"":data.echart_data.myself_object[1],
value:data.echart_data===undefined?"":data.echart_data.myself_object[1]
@@ -255,15 +257,15 @@ function startechart(data){
}
}
},
- {
- name: '能力1',
- type: 'scatter',
- data: data.echart_data===undefined?"":data.echart_data.myself_object,
- itemStyle:itemStyle1,
- symbolSize: function (val){
- return Math.round(val[2]);
- }
- }
+ // {
+ // name: '能力1',
+ // type: 'scatter',
+ // data: data.echart_data===undefined?"":data.echart_data.myself_object,
+ // itemStyle:itemStyle1,
+ // symbolSize: function (val){
+ // return Math.round(val[2]);
+ // }
+ // }
]
};
// 使用刚指定的配置项和数据显示图表。
@@ -368,7 +370,7 @@ class Shixunechart extends Component {
{data&&data.username}
- {data&&data.user_id}
+ {data&&data.student_id}
{data&&data.echart_data===undefined?"":data&&data.echart_data.myself_eff[1]}
{data&&data.echart_data===undefined?"":data&&data.echart_data.myself_eff[0]}
@@ -394,7 +396,7 @@ class Shixunechart extends Component {