实践课程统计结果调整

dev_cs
杨树明 5 years ago
parent 522339b4f5
commit 9cc8fd3539

@ -6,6 +6,11 @@ import axios from 'axios';
const $ = window.$;
const echarts = require('echarts');
function InitChapterUsageSituation(_data){
var myChart = echarts.init(document.getElementById('chapterUsageSituation'));
myChart.showLoading({
text: "数据获取中",
effect: 'whirling'
})
var Color = ['#49A9EE', '#FFD86E', '#98D87D', '#8996E6','#F3857B', '#B97BF3','#4DE8B4','#f76d0c','#510cf7','#def70c','#3bf70c','#0cf7e1'];
var option = {
@ -84,8 +89,12 @@ function InitChapterUsageSituation(_data){
}]
};
var myChart = echarts.init(document.getElementById('chapterUsageSituation'));
myChart.setOption(option);
setTimeout(() => {
myChart.setOption(option);
myChart.hideLoading();
}, 1000)
}
class FirstTab extends Component{
constructor(props){

@ -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>
)

@ -370,17 +370,17 @@ class InfosTopics extends Component{
{
`
::-webkit-scrollbar-thumb {
background-color: #cde5fe;
box-shadow: 0px 0px black;
}
::-webkit-scrollbar-track {
-webkit-box-shadow: inset 0 0 6px rgba(0, 0, 0, 0);
background-color: #fff;
}
// ::-webkit-scrollbar-thumb {
// background-color: #cde5fe;
//
// box-shadow: 0px 0px black;
// }
//
//
// ::-webkit-scrollbar-track {
// -webkit-box-shadow: inset 0 0 6px rgba(0, 0, 0, 0);
// background-color: #fff;
// }
.shaiContent li.shaiItem {
padding: 0px 9px;

Loading…
Cancel
Save