Merge branch 'dev_aliyun' of https://bdgit.educoder.net/Hjqreturn/educoder into dev_aliyun

dev_oauth
daiao 6 years ago
commit 7647f30b2d

@ -5,6 +5,13 @@ import { BrowserRouter as Router, Route, Link } from "react-router-dom";
import { Spin } from 'antd'; import { Spin } from 'antd';
class Loading extends Component { class Loading extends Component {
componentDidUpdate(prevProps, prevState) {
if (!prevProps.error && this.props.error) {
console.log(this.props.error)
window.location.reload()
}
}
render() { render() {
// Loading // Loading
return ( return (

@ -119,17 +119,17 @@ class ListPageIndex extends Component{
{/*头部banner*/} {/*头部banner*/}
<CoursesBanner {...this.props}></CoursesBanner> <CoursesBanner {...this.props}></CoursesBanner>
{mysearch!==undefined? {/*{mysearch!==undefined?*/}
( {/*(*/}
mysearch===true? {/* mysearch===true?*/}
<Guide {/* <Guide*/}
setwindowlocal={(b)=>this.setwindowlocal(b)} {/* setwindowlocal={(b)=>this.setwindowlocal(b)}*/}
> {/* >*/}
</Guide> {/* </Guide>*/}
:"" {/* :""*/}
) {/* )*/}
:"" {/* :""*/}
} {/*}*/}
<div className="educontent clearfix" style={{flex: "1 0 auto"}}> <div className="educontent clearfix" style={{flex: "1 0 auto"}}>
<div className="stud-class-set"> <div className="stud-class-set">

@ -24,7 +24,8 @@ function startechart(data){
// trigger: 'axis', // trigger: 'axis',
showDelay : 0, showDelay : 0,
formatter : function (params) { formatter : function (params) {
if(params.name == data.username){
if(params.name === data.username){
return "姓名:"+data.username + "<br/>"+'学号: '+data.user_id + "<br/>"+'效率:'+ data.echart_data.myself_eff[1]; return "姓名:"+data.username + "<br/>"+'学号: '+data.user_id + "<br/>"+'效率:'+ data.echart_data.myself_eff[1];
}else if (params.value.length > 1) { }else if (params.value.length > 1) {
/* return '学生ID: ' + params.value[2] + '<br/>' /* return '学生ID: ' + params.value[2] + '<br/>'
@ -34,6 +35,7 @@ function startechart(data){
return params.name + ":" + params.value +" "; return params.name + ":" + params.value +" ";
} }
}, },
axisPointer:{ axisPointer:{
show: true, show: true,
type : 'cross', type : 'cross',
@ -106,7 +108,7 @@ function startechart(data){
markPoint : { markPoint : {
data : [ data : [
{ {
name: data.username, name: data===undefined?"":data.username,
xAxis:data.echart_data===undefined?"":data.echart_data.myself_eff[0], xAxis:data.echart_data===undefined?"":data.echart_data.myself_eff[0],
yAxis:data.echart_data===undefined?"":data.echart_data.myself_eff[1], yAxis:data.echart_data===undefined?"":data.echart_data.myself_eff[1],
value: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:'二班', // name:'二班',
type:'scatter', // type:'scatter',
data: data.echart_data===undefined?"":data.echart_data.myself_eff, // data: data.echart_data===undefined?"":data.echart_data.myself_eff,
itemStyle:{ // itemStyle:{
color:'#c23531' // color:'#c23531'
}} // }}
]}; ]};
effChart.setOption(option); effChart.setOption(option);
@ -189,7 +191,7 @@ function startechart(data){
borderWidth: 1, borderWidth: 1,
formatter: function (obj) { formatter: function (obj) {
var value = obj.value; var value = obj.value;
if(obj.name ==data.username){ if(obj.name ===data.username){
return "姓名:"+data.username + "<br/>"+'学号: '+data.user_id + "<br/>"+'得分:'+ data.echart_data===undefined?"":data.echart_data.myself_object[1]; return "姓名:"+data.username + "<br/>"+'学号: '+data.user_id + "<br/>"+'得分:'+ data.echart_data===undefined?"":data.echart_data.myself_object[1];
} }
@ -242,7 +244,7 @@ function startechart(data){
markPoint : { markPoint : {
data : [ data : [
{ {
name: data.username, name: data===undefined?"":data.username,
xAxis: data.echart_data===undefined?"":data.echart_data.myself_object[0], xAxis: data.echart_data===undefined?"":data.echart_data.myself_object[0],
yAxis:data.echart_data===undefined?"":data.echart_data.myself_object[1], yAxis:data.echart_data===undefined?"":data.echart_data.myself_object[1],
value: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', // name: '能力1',
type: 'scatter', // type: 'scatter',
data: data.echart_data===undefined?"":data.echart_data.myself_object, // data: data.echart_data===undefined?"":data.echart_data.myself_object,
itemStyle:itemStyle1, // itemStyle:itemStyle1,
symbolSize: function (val){ // symbolSize: function (val){
return Math.round(val[2]); // return Math.round(val[2]);
} // }
} // }
] ]
}; };
// 使用刚指定的配置项和数据显示图表。 // 使用刚指定的配置项和数据显示图表。
@ -368,7 +370,7 @@ class Shixunechart extends Component {
</div> </div>
<div className="fl with65" style={{paddingLeft: "5%"}}> <div className="fl with65" style={{paddingLeft: "5%"}}>
<li className="mt5 mb5">{data&&data.username}</li> <li className="mt5 mb5">{data&&data.username}</li>
<li className="mt5 mb5">{data&&data.user_id}</li> <li className="mt5 mb5">{data&&data.student_id}</li>
<li className="mt5 mb5 color-orange03"><span className="color-orange03">{data&&data.echart_data===undefined?"":data&&data.echart_data.myself_eff[1]}</span></li> <li className="mt5 mb5 color-orange03"><span className="color-orange03">{data&&data.echart_data===undefined?"":data&&data.echart_data.myself_eff[1]}</span></li>
<li className="mt5 mb5 color-orange03"><span className="color-orange03">{data&&data.echart_data===undefined?"":data&&data.echart_data.myself_eff[0]}</span></li> <li className="mt5 mb5 color-orange03"><span className="color-orange03">{data&&data.echart_data===undefined?"":data&&data.echart_data.myself_eff[0]}</span></li>
</div> </div>
@ -394,7 +396,7 @@ class Shixunechart extends Component {
</div> </div>
<div className="fl with65" style={{paddingLeft: "5%"}}> <div className="fl with65" style={{paddingLeft: "5%"}}>
<li className="mt5 mb5">{data&&data.username}</li> <li className="mt5 mb5">{data&&data.username}</li>
<li className="mt5 mb5">{data&&data.user_id}</li> <li className="mt5 mb5">{data&&data.student_id}</li>
<li className="mt5 mb5 color-orange03"><span className="color-orange03">{data&&data.echart_data===undefined?"":data&&data.echart_data.myself_object[1]}</span></li> <li className="mt5 mb5 color-orange03"><span className="color-orange03">{data&&data.echart_data===undefined?"":data&&data.echart_data.myself_object[1]}</span></li>
</div> </div>
</div> </div>

Loading…
Cancel
Save