From ccd3305924eb8a43b47d64c88724b73023eb2d33 Mon Sep 17 00:00:00 2001 From: Xubx <1827135378@qq.com> Date: Thu, 17 Oct 2024 14:08:39 +0800 Subject: [PATCH] =?UTF-8?q?=E9=A6=96=E9=A1=B5=E4=B8=8E=E6=8C=89=E4=B8=93?= =?UTF-8?q?=E4=B8=9A=E7=BB=B4=E5=BA=A6=E5=88=86=E6=9E=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/cet/cet-ana-major.vue | 1492 +++++++++++------------- src/views/dashboard/Analysis/index.vue | 48 +- 2 files changed, 714 insertions(+), 826 deletions(-) diff --git a/src/views/cet/cet-ana-major.vue b/src/views/cet/cet-ana-major.vue index 6d0d60a..db9eecd 100644 --- a/src/views/cet/cet-ana-major.vue +++ b/src/views/cet/cet-ana-major.vue @@ -59,10 +59,15 @@ :options="entrydateOptions"> 查询 --> - - + + - + + + + + + @@ -71,732 +76,369 @@ diff --git a/src/views/dashboard/Analysis/index.vue b/src/views/dashboard/Analysis/index.vue index ddb1b60..c265d73 100644 --- a/src/views/dashboard/Analysis/index.vue +++ b/src/views/dashboard/Analysis/index.vue @@ -113,6 +113,8 @@ passNumberBottom: 0, passRateBottom: 0, passRatePie: [], + lineXData: [], + lineYData: [], collegeOptions: [], collegeMajorOptions: [], entrydateOptions: [], @@ -129,7 +131,7 @@ this.getEntrydateAndCollegeData(); this.getCollegeMajorData(); this.query(); - this.map2Chart(); + //this.map2Chart(); }, methods: { // 获取年级和学院数据 @@ -201,8 +203,12 @@ passRate['大四学年'] = result.cet4['大四学年']; } result.cet4 = passRate; + this.lineXData = []; + this.lineYData = []; for (let grade in result.cet4) { result.cet4[grade].forEach((item) => { + this.lineXData.push(item.batch); + this.lineYData.push((item.batchpassrate * 100).toFixed(1)); if (index % 2 == 0) { piedata.push({ value: parseFloat(item.gradepassrate - passrate).toFixed(3), name: grade + '时通过' }); passrate = parseFloat(item.gradepassrate).toFixed(3); @@ -232,6 +238,7 @@ piedata.push({ value: (1 - passrate).toFixed(3), name: '未通过' }); //外置饼图 setTimeout(() => { this.drawPieChart(piedata); + this.map2Chart(); }, 100); // this.drawPieChart(); } finally { @@ -253,7 +260,26 @@ }, }, tooltip: { - trigger: 'item', + trigger: 'axis', + axisPointer: { + type: 'shadow', + }, + formatter: function (params) { + return ( + params[0].name + + '' + + '' + + '' + + params[0].marker + + '' + + ' ' + + params[0].value + + '%' + + '' + + '' + + '' + ); + }, }, grid: { top: '50px', @@ -263,15 +289,29 @@ }, xAxis: { type: 'category', - data: ['2017-12-01', '2017-12-01', '2017-12-01', '2017-12-01', '2017-12-01'], + data: this.lineXData, }, yAxis: { type: 'value', }, series: [ { - data: [150, 230, 224, 218, 135], + data: this.lineYData, type: 'line', + itemStyle: { + normal: { + label: { + show: true, //开启显示 + position: 'top', //在上方显示 + textStyle: { + //数值样式 + color: 'black', + fontSize: 12, + }, + formatter: '{c}%', + }, + }, + }, }, ], };