实践课程统计结果调整

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

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

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

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

Loading…
Cancel
Save