|
|
|
@ -166,18 +166,17 @@ class SecondTab extends Component{
|
|
|
|
|
constructor(props){
|
|
|
|
|
super(props);
|
|
|
|
|
this.state = {
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
componentDidMount(){
|
|
|
|
|
var pathId = this.props.match.params.pathId;
|
|
|
|
|
|
|
|
|
|
var myChart = echarts.init(document.getElementById('shixunStudyStatistics'));
|
|
|
|
|
myChart.showLoading({
|
|
|
|
|
text: "数据获取中",
|
|
|
|
|
effect: 'whirling'
|
|
|
|
|
})
|
|
|
|
|
var myCharts = echarts.init(document.getElementById('showloding'));
|
|
|
|
|
myCharts.showLoading({
|
|
|
|
|
text: "数据获取中",
|
|
|
|
|
effect: 'whirling'
|
|
|
|
|
})
|
|
|
|
|
const url = `/paths/${pathId}/shixun_report.json`
|
|
|
|
|
axios.get(url, {
|
|
|
|
|
})
|
|
|
|
@ -211,11 +210,20 @@ class SecondTab extends Component{
|
|
|
|
|
mapByNumber[item.number] = item
|
|
|
|
|
})
|
|
|
|
|
})
|
|
|
|
|
this.setState({ shixunList }, () => {
|
|
|
|
|
InitShixunStudyStatistics(yAxisMonth, barData, mapByNumber, myChart);
|
|
|
|
|
myChart.hideLoading()
|
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
this.setState({
|
|
|
|
|
shixunList
|
|
|
|
|
})
|
|
|
|
|
var myChart = echarts.init(document.getElementById('shixunStudyStatistics'));
|
|
|
|
|
myChart.showLoading({
|
|
|
|
|
text: "数据获取中",
|
|
|
|
|
effect: 'whirling'
|
|
|
|
|
})
|
|
|
|
|
setTimeout(() => {
|
|
|
|
|
InitShixunStudyStatistics(yAxisMonth, barData, mapByNumber, myChart);
|
|
|
|
|
myCharts.hideLoading();
|
|
|
|
|
myChart.hideLoading();
|
|
|
|
|
}, 1000)
|
|
|
|
|
|
|
|
|
|
})
|
|
|
|
|
.catch(function (error) {
|
|
|
|
@ -261,8 +269,10 @@ class SecondTab extends Component{
|
|
|
|
|
</div>
|
|
|
|
|
<div className="with40 fl static_shadow edu-back-white">
|
|
|
|
|
<p className="font-24 padding30-20">实训学习统计</p>
|
|
|
|
|
<div id="shixunStudyStatistics"
|
|
|
|
|
style={{"width":"480px","height": shixunList ? `${shixunList.length * 35 + 100}px` : "440px"}}></div>
|
|
|
|
|
{shixunList===undefined?<div id="showloding"
|
|
|
|
|
style={{"width":"480px","height":"440px"}}></div>:""}
|
|
|
|
|
{shixunList===undefined?"":<div id="shixunStudyStatistics"
|
|
|
|
|
style={{"width":"480px","minHeight":`${shixunList&&shixunList.length *50}px`}}></div>}
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
)
|
|
|
|
|