diff --git a/src/views/cet/cet-ana-1.vue b/src/views/cet/cet-ana-1.vue
index 6163f50..d546db6 100644
--- a/src/views/cet/cet-ana-1.vue
+++ b/src/views/cet/cet-ana-1.vue
@@ -2,10 +2,11 @@
-
+
-
查询
@@ -59,31 +60,31 @@ export default {
if (option.value !== '全校') {
option.disabled = true;
}
-
+
});
this.college = ['全校'];
});
},
onCollegeMajorChange(value) {
- if (value.includes('全校')) {
- this.collegeOptions.forEach(option => {
- if (option.value !== '全校') {
- option.disabled = true;
- }
- });
- }else{
- this.collegeOptions.forEach(option => {
- option.disabled = false;
- if (value!=='全校'&&option.value === '全校') {
- option.disabled = true;
- }
- if(value.length===0){
+ if (value.includes('全校')) {
+ this.collegeOptions.forEach(option => {
+ if (option.value !== '全校') {
+ option.disabled = true;
+ }
+ });
+ } else {
+ this.collegeOptions.forEach(option => {
option.disabled = false;
- }
- });
- }
- console.log(value);
- },
+ if (value !== '全校' && option.value === '全校') {
+ option.disabled = true;
+ }
+ if (value.length === 0) {
+ option.disabled = false;
+ }
+ });
+ }
+ console.log(value);
+ },
dataChart(data) {
let xData = [];
let yData = [];
@@ -108,8 +109,8 @@ export default {
formatter: function (params) {
return params[0].name + '
' +
'' +
- '' + params[0].marker + params[0].seriesName + ' | '+' ' + params[0].value + '%' + ' |
' +
- '' + params[1].marker + params[1].seriesName + ' | '+' ' + params[1].value + ' |
' +
+ '' + params[0].marker + params[0].seriesName + ' | ' + ' ' + params[0].value + '%' + ' |
' +
+ '' + params[1].marker + params[1].seriesName + ' | ' + ' ' + params[1].value + ' |
' +
'
';
}
},
@@ -207,7 +208,7 @@ export default {
let result = null;
console.log(this.college, this.entrydate);
//如果this.college和this.batch为null则先赋静态值
- if (this.college===null||this.college.length===0) {
+ if (this.college === null || this.college.length === 0) {
this.college = ['全校'];
}
if (!this.entrydate) {
@@ -221,7 +222,7 @@ export default {
entrydate: this.entrydate,
level: 'cet4'
}
- console.log(params.college,"college")
+ console.log(params.college, "college")
result = await defHttp.post({ url: this.Url.getRate, params });
//使数据按照passRate从大到小排序
result.data.sort((a, b) => {
diff --git a/src/views/cet/cet-ana-2.vue b/src/views/cet/cet-ana-2.vue
index 6bfb78c..4d93ad2 100644
--- a/src/views/cet/cet-ana-2.vue
+++ b/src/views/cet/cet-ana-2.vue
@@ -67,7 +67,7 @@ export default {
data: xData,
axisLabel: {
interval: 0,//代表显示所有x轴标签显示
- rotate: -20,//代表倾斜30度显示
+ rotate: -10,//代表倾斜30度显示
}
},
tooltip: {
diff --git a/src/views/cet/cet-ana-3.vue b/src/views/cet/cet-ana-3.vue
index f7c1abf..d710c77 100644
--- a/src/views/cet/cet-ana-3.vue
+++ b/src/views/cet/cet-ana-3.vue
@@ -1,212 +1,221 @@
-
-
-
-
-
-
-
\ No newline at end of file
+
+}
+
+
+
\ No newline at end of file
diff --git a/src/views/dashboard/Analysis/index.vue b/src/views/dashboard/Analysis/index.vue
index 6d827ce..3806557 100644
--- a/src/views/dashboard/Analysis/index.vue
+++ b/src/views/dashboard/Analysis/index.vue
@@ -19,10 +19,12 @@
-
- 学院 / 专业总人数: {{ total }}
-
-
+
+ 学院 / 专业总人数: {{ total }}
+ 累计通过人数: {{ passNumberBottom }}
+ 累计总通过率: {{ passRateBottom }}
+
@@ -99,6 +101,9 @@ export default {
getCollegeMajor: '/cet/getCollegeMajor'
},
total: 0,
+ passNumberBottom: 0,
+ passRateBottom: 0,
+ passRatePie: [],
collegeOptions: [],
collegeMajorOptions: [],
entrydateOptions: [],
@@ -169,14 +174,13 @@ export default {
passrate = parseFloat(item.gradepassrate).toFixed(3);
}
index++
-
tableData.push({
grade: grade,
attendNumber: item.attendNumber,
batch: item.batch,
- gradepassrate: item.gradepassrate,
+ gradepassrate: (item.gradepassrate * 100).toFixed(1) + '%',
passNumber: item.passNumber,
- batchpassrate: item.batchpassrate
+ batchpassrate: (item.batchpassrate * 100).toFixed(1) + '%'
});
});
}
@@ -184,6 +188,13 @@ export default {
console.log("tableData", tableData);
this.dataSourceCet4 = tableData;
this.total = result.total;
+ this.passNumberBottom = result.passNumber;
+ this.passRateBottom = (result.passRate * 100).toFixed(1) + '%';
+ //内置饼图
+ //清空数据
+ this.passRatePie =[]
+ this.passRatePie.push({ value: result.passRate, name: '已通过' });
+ this.passRatePie.push({ value: 1 - result.passRate, name: '未通过' })
piedata.push({ value: (1 - passrate).toFixed(3), name: '未通过' });
setTimeout(() => {
this.drawPieChart(piedata);
@@ -196,33 +207,21 @@ export default {
test() {
defHttp.get({ url: "/cet/getTest" });
},
- renderGrade(record, index) {
- console.log(record, "record", index, "index");
- console.log(record.grade)
- if (index % 2 == 0) {
- return {
- children: record.grade,
- attrs: {
- rowSpan: 2
- }
- }
- } else {
- return {
- children: record.grade,
- attrs: {
- rowSpan: 0
- }
- }
- }
- },
drawPieChart(piedata) {
+ console.log(this.passRatePie)
+ console.log("piedata", piedata)
let myChart = echarts.init(document.getElementById('piechart'));
let option = {
tooltip: {
trigger: 'item',
confine: false,
+ //字体大小
+ itemStyle:{
+ fontSize:100
+ }
},
+
title: {
text: '四级通过率分析',
left: 'left',
@@ -235,22 +234,60 @@ export default {
top: '5%',
left: 'center'
},
+
series: [
+ //内圈饼图
{
name: '四级通过率',
type: 'pie',
- radius: ['40%', '70%'],
+ radius: ['0', '30%'],
+ avoidLabelOverlap: false,
+ itemStyle: {
+ borderRadius: 3,
+ borderColor: '#fff',
+ borderWidth: 2,
+ normal: {
+ color: function (colors) {
+ var colorList = ['#00CD66', '#FF6A6A'];
+ return colorList[colors.dataIndex];
+ }
+ },
+ },
+ label: {
+ position: 'inner',
+ fontSize: 14
+ },
+ emphasis: {
+ label: {
+ show: true,
+ fontSize: 20,
+ fontWeight: 'bold'
+ }
+ },
+ data: this.passRatePie
+ },
+ //外圈饼图
+ {
+ name: '四级通过率',
+ type: 'pie',
+ radius: ['40%', '60%'],
avoidLabelOverlap: false,
itemStyle: {
-
borderRadius: 10,
borderColor: '#fff',
- borderWidth: 2
+ borderWidth: 2,
+ normal: {
+ color: function (colors) {
+ var colorList = ['#008B45', '#00CD66', '#00EE76', '#00FF7F', '#FF6A6A'];
+ return colorList[colors.dataIndex];
+ }
+ },
+ },
+ label: {
+ show: true,
+ fontSize:14,
+ overflow: 'truncate'
},
- // label: {
- // show: false,
- // position: 'center'
- // },
emphasis: {
label: {
show: true,