代码调整

This commit is contained in:
joylink_cuiweidong 2022-04-15 18:45:08 +08:00
parent e5240b10ca
commit 87dc324d74

View File

@ -30,10 +30,20 @@ export default {
color:'#f00'
}
},
// text:'',
yAxis:{
position:'left',
name:'人数',
nameLocation:'end',
minInterval:1,
nameTextStyle:{
align:'left',
fontSize:14
},
axisLine:{show:true}
},
}
},
async created() {
async mounted() {
this.initChart()
},
methods: {
@ -46,12 +56,45 @@ export default {
this.myChart3 = echarts.init(chartDom3);
let option1={
title: Object.assign({text:'教学时长统计'},this.title),
tooltip: {trigger: 'item'},
series: [
{
data:[
{ value: 1048, name: '福州' },
{ value: 735, name: '测试' },
{ value: 580, name: '标准' },
],
radius: '80%',
type: 'pie'
}
]
}
let option2={
xAxis: {},
yAxis:this.yAxis,
title: Object.assign({text:'考试成绩统计'},this.title),
series: [
{
data:[],
type: 'bar'
}
]
}
let option3={
title: Object.assign({text:'仿真时长统计'},this.title),
tooltip: {trigger: 'item'},
// http://2i38984j47.qicp.vip/doc/UserExamController.html
series: [
{
data:[
{ value: 1048, name: 'Search Engine' },
{ value: 735, name: 'Direct' },
{ value: 580, name: 'Email' },
],
radius: '80%',
type: 'pie'
}
]
}
option1 && this.myChart1 && this.myChart1.setOption(option1);
option2 && this.myChart2 && this.myChart2.setOption(option2);
@ -59,6 +102,33 @@ export default {
}
}
};
// [
// {
// "id": "92",
// "userId": "92",
// "account": "p8f1a3",
// "username": ".",
// "examId": "92",
// "examName": ".",
// "score": 30.89,
// "usedTime": 674,
// "result": "mrz4xd",
// "duration": 403,
// "userExamQuestionsVOs": [
// {
// "id": 651,
// "userExamId": "92",
// "trainingId": "92",
// "trainingName": ".",
// "usedTime": 622,
// "score": 71.79,
// "group": "76w1am",
// "cause": "kwmnx3"
// }
// ]
// }
// ]
</script>
<style scoped>
.student_title_content {
@ -76,18 +146,19 @@ export default {
.statisticChartLeft{
width: 30%;
display: inline-block;
height: 700px;
height: 500px;
/* border:1px #ccc solid */
}
.statisticChartCenter{
width: 40%;
display: inline-block;
height: 700px;
height: 500px;
}
.statisticChartRight{
width: 30%;
display: inline-block;
height: 700px;
height: 500px;
/* border:1px #ccc solid */
}
</style>