From 87089b2adf329d8491af11350498229ead271bf9 Mon Sep 17 00:00:00 2001 From: Xubx <1827135378@qq.com> Date: Tue, 10 Dec 2024 13:49:30 +0800 Subject: [PATCH 1/7] =?UTF-8?q?=E6=A0=A1=E9=A2=86=E5=AF=BC=E9=A1=B5?= =?UTF-8?q?=E9=9D=A2=E5=BC=80=E5=8F=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/cet/universityDashboard.vue | 0 1 file changed, 0 insertions(+), 0 deletions(-) create mode 100644 src/views/cet/universityDashboard.vue diff --git a/src/views/cet/universityDashboard.vue b/src/views/cet/universityDashboard.vue new file mode 100644 index 0000000..e69de29 -- 2.41.0 From f0ed560e7392b31c826ae44fdc308930bfc760ae Mon Sep 17 00:00:00 2001 From: Xubx <1827135378@qq.com> Date: Tue, 10 Dec 2024 14:16:33 +0800 Subject: [PATCH 2/7] =?UTF-8?q?=E9=99=A2=E9=A2=86=E5=AF=BC=E9=A1=B5?= =?UTF-8?q?=E9=9D=A2=E5=BC=80=E5=8F=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/cet/collegeDashboard.vue | 408 +++++++++++++++++++++++++++++ 1 file changed, 408 insertions(+) create mode 100644 src/views/cet/collegeDashboard.vue diff --git a/src/views/cet/collegeDashboard.vue b/src/views/cet/collegeDashboard.vue new file mode 100644 index 0000000..8d0e9e5 --- /dev/null +++ b/src/views/cet/collegeDashboard.vue @@ -0,0 +1,408 @@ + + + + + -- 2.41.0 From 2b83ad54a3a4856525ae6d28c628dc6bea98f58a Mon Sep 17 00:00:00 2001 From: YuNan <3194726156@qq.com> Date: Mon, 16 Dec 2024 18:40:24 +0800 Subject: [PATCH 3/7] =?UTF-8?q?=E5=9F=BA=E6=9C=AC=E5=AE=9E=E7=8E=B0?= =?UTF-8?q?=E9=99=A2=E9=A2=86=E5=AF=BC=E9=A6=96=E9=A1=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/cet/cet-ana-3.vue | 4 +- src/views/cet/collegeDashboard.vue | 1035 ++++++++++++++++++---------- 2 files changed, 664 insertions(+), 375 deletions(-) diff --git a/src/views/cet/cet-ana-3.vue b/src/views/cet/cet-ana-3.vue index 195427f..d9a6b6c 100644 --- a/src/views/cet/cet-ana-3.vue +++ b/src/views/cet/cet-ana-3.vue @@ -334,7 +334,7 @@ }, }, title: { - text: '该批次每一年级的通过率饼图', + text: '该批次每一年级的通过率环形图', left: 'top', top: '0%', textStyle: { @@ -352,7 +352,7 @@ series: [ { - name: '学院/专业该批次通过人数饼图', + name: '学院/专业该批次通过人数环形图', type: 'pie', radius: ['50%', '100%'], center: ['50%', '50%'], diff --git a/src/views/cet/collegeDashboard.vue b/src/views/cet/collegeDashboard.vue index 8d0e9e5..86751f5 100644 --- a/src/views/cet/collegeDashboard.vue +++ b/src/views/cet/collegeDashboard.vue @@ -1,408 +1,697 @@ -- 2.41.0 From 8f96b9ba85ab9c4ff419a25253f12ac91db3a359 Mon Sep 17 00:00:00 2001 From: YuNan <3194726156@qq.com> Date: Tue, 14 Jan 2025 16:00:00 +0800 Subject: [PATCH 4/7] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E9=99=A2=E9=A2=86?= =?UTF-8?q?=E5=AF=BC=E9=A6=96=E9=A1=B5=E6=95=B0=E6=8D=AE=E7=9A=84=E5=8A=A0?= =?UTF-8?q?=E8=BD=BD=E6=95=88=E6=9E=9C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/cet/collegeDashboard.vue | 56 +++++++++++++++++------------- 1 file changed, 32 insertions(+), 24 deletions(-) diff --git a/src/views/cet/collegeDashboard.vue b/src/views/cet/collegeDashboard.vue index 86751f5..e166082 100644 --- a/src/views/cet/collegeDashboard.vue +++ b/src/views/cet/collegeDashboard.vue @@ -28,32 +28,33 @@ bordered class="custom-table" :style="{ fontSize: '10px', color: '#333', marginTop: '-11px' }" + :loading="loadingTable" /> - +
-
+ - +
-
+ - -
-
- -
-
+ +
+
+ +
+
@@ -70,6 +71,11 @@ collegeStudentPassRate: '11', schoolStudentPassRate: '11', loading: false, + loadingTable: false, + loadingMap2: false, + loadingMap3: false, + loadingMap4: false, + loadingMap5: false, dataSourceCet4: [], batch: '', college: '', @@ -120,13 +126,9 @@ this.queryMajorByCollege(); }, methods: { - //查询页面头部的数据 - async queryTopData() { - let result = await defHttp.get({ url: this.Url.getDataForHead }); - console.log('0000', result.data); - }, // 查询数据 async query() { + this.loadingTable = true; let resultData = null; try { //如果this.batch为null则先赋个值 @@ -136,7 +138,6 @@ if (!this.college) { this.college = '计算机科学与信息工程学院'; } - this.loading = true; let params = { batch: this.batch, college: this.college, @@ -158,7 +159,7 @@ this.dataSourceCet4 = tableData; //表格数据 console.log(this.dataSourceCet4, 'dataSourceCet4'); } finally { - this.loading = false; + this.loadingTable = false; this.$nextTick(() => { //this.dataChart(resultData.data); console.log('cet4:', resultData.data); @@ -167,6 +168,7 @@ } }, async queryMajorByCollege() { + this.loadingMap5 = true; if (!this.college) { this.college = '计算机科学与信息工程学院'; } @@ -193,12 +195,14 @@ console.log('666'); let res = await defHttp.post({ url: this.Url.getRateByMajor, params }); console.log('55555', res.data); + this.loadingMap5 = false; this.$nextTick(() => { this.drawChart(res.data); }); }, //绘画饼图--该批次每一年级的通过率饼图 async card_Table() { + this.loadingMap2 = true; //console.log(this.passRatePie); //console.log('piedata', piedata); //如果this.batch为null则先赋个值 @@ -320,16 +324,19 @@ ], animationDurationUpate: 500, }; + this.loadingMap2 = false; this.$nextTick(() => { var myChart = echarts.init(document.getElementById('map2')); myChart.setOption(option); }); }, handleSelectChange() { + this.loadingMap3 = true; this.majorPassRate(); }, // 本学院各专业通过率-map3--------------------------------------------- async majorPassRate() { + this.loadingMap3 = true; console.log('55555555', this.entrydate); if (!this.batch) { this.batch = '2024-06-01'; @@ -337,7 +344,6 @@ if (!this.college) { this.college = ['计算机科学与信息工程学院']; } - this.map3loading = true; //将选择后的entrydate转化为数组 let entrydateArray = []; entrydateArray.push(this.entrydate); @@ -428,15 +434,15 @@ ], animationDurationUpdate: 500, }; - this.map3loading = false; + this.loadingMap3 = false; this.$nextTick(() => { var myChart = echarts.init(document.getElementById('map3')); myChart.setOption(majorOption); }); }, - // 年级通过率 + // 年级通过率map4 async gradePassRate() { - this.map2loading = true; + this.loadingMap4 = true; const getEntrydate = await defHttp.get({ url: this.Url.getEntrydate }); this.entrydateOptions = getEntrydate.entrydates; let entrydate = this.entrydateOptions.map((item) => item.value); @@ -500,14 +506,15 @@ animationDurationUpdate: 500, }; - this.map2loading = false; + this.loadingMap4 = false; this.$nextTick(() => { var myChart = echarts.init(document.getElementById('map4')); myChart.setOption(collegeOption); }); }, - //各专业通过率详情 + //各专业通过率详情map5 drawChart(data) { + this.loadingMap5 = true; let seriesData = []; let xData = this.majorentrydate.sort((a, b) => a - b); let k = 0; @@ -667,6 +674,7 @@ // 使用刚指定的配置项和数据显示图表。 console.log(option, 'option'); console.log(myChart, 'myChart'); + this.loadingMap5 = false; setTimeout(() => { myChart.setOption(option); }, 1); -- 2.41.0 From d66336ab60a2400e35683f3df851d0d1cb0b2311 Mon Sep 17 00:00:00 2001 From: YuNan <3194726156@qq.com> Date: Mon, 20 Jan 2025 17:36:28 +0800 Subject: [PATCH 5/7] =?UTF-8?q?=E9=99=A2=E9=A6=96=E9=A1=B5=E5=8A=A8?= =?UTF-8?q?=E6=80=81=E6=9F=A5=E8=AF=A2=E5=8A=9F=E8=83=BD=E5=AE=9E=E7=8E=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/cet/collegeDashboard.vue | 81 +++++++++++++++++++----------- 1 file changed, 51 insertions(+), 30 deletions(-) diff --git a/src/views/cet/collegeDashboard.vue b/src/views/cet/collegeDashboard.vue index e166082..4c3e508 100644 --- a/src/views/cet/collegeDashboard.vue +++ b/src/views/cet/collegeDashboard.vue @@ -27,7 +27,7 @@ :pagination="false" bordered class="custom-table" - :style="{ fontSize: '10px', color: '#333', marginTop: '-11px' }" + :style="{ fontSize: '10px', color: '#333', marginTop: '11px' }" :loading="loadingTable" /> @@ -66,11 +66,11 @@ export default { data() { return { + roleName: null, collegeStudentCount: '11', collegeStudentPassCount: '11', collegeStudentPassRate: '11', schoolStudentPassRate: '11', - loading: false, loadingTable: false, loadingMap2: false, loadingMap3: false, @@ -116,20 +116,37 @@ getCollegeRate: '/cet/getRateByCollege', getEntrydate: '/cet/getEntrydate', getCollegeMajor: '/cet/getCollegeMajor', + getUserInfo: '/sys/user/getUserInfo', + queryUserRole: '/sys/user/queryUserRole', + queryById: '/sys/role/queryById', }, }; }, mounted() { this.query(); - this.majorPassRate(); - this.gradePassRate(); - this.queryMajorByCollege(); }, methods: { // 查询数据 async query() { this.loadingTable = true; + this.loadingMap2 = true; + this.loadingMap3 = true; + this.loadingMap4 = true; + this.loadingMap5 = true; let resultData = null; + let userInfoResult = await defHttp.get({ url: this.Url.getUserInfo }); + console.log('123', userInfoResult.userInfo.id); + let id = userInfoResult.userInfo.id; + let roleId = await defHttp.get({ url: this.Url.queryUserRole, params: { userid: id } }); + //console.log('userAndRoleId', userAndRoleId); + //let roleId = userAndRoleId[1]; + console.log('roleId', roleId); + + let roleInfo = await defHttp.get({ url: this.Url.queryById, params: { id: roleId[0] } }); + console.log('roleInfo', roleInfo); + this.roleName = roleInfo.roleName; + console.log('roleName', this.roleName); + this.college = this.roleName; try { //如果this.batch为null则先赋个值 if (!this.batch) { @@ -145,7 +162,7 @@ }; resultData = await defHttp.get({ url: this.Url.getData, params }); - console.log('result', resultData); + //console.log('result', resultData); //表格数据 let tableData = []; for (let grade in resultData.gradeData) { @@ -157,13 +174,16 @@ }); } this.dataSourceCet4 = tableData; //表格数据 - console.log(this.dataSourceCet4, 'dataSourceCet4'); + //console.log(this.dataSourceCet4, 'dataSourceCet4'); } finally { this.loadingTable = false; this.$nextTick(() => { //this.dataChart(resultData.data); - console.log('cet4:', resultData.data); - this.card_Table(); + //console.log('cet4:', resultData.data); + this.circleMap(); + this.majorPassRate(); + this.gradePassRate(); + this.queryMajorByCollege(); }); } }, @@ -174,15 +194,15 @@ } let resultData = await defHttp.get({ url: this.Url.getCollegeMajor }); let collegeAndMajor = resultData.collegeMajor; - console.log('11111111111', collegeAndMajor); + //console.log('11111111111', collegeAndMajor); // 从 collegeAndMajor 中查找对应学院的专业 let majors = collegeAndMajor.find((item) => item.college === this.college); - console.log('3333', majors); + //console.log('3333', majors); majors = majors.major; this.majors = majors; - console.log('444', this.majors); + //console.log('444', this.majors); let collegeAndMajors = this.majors.map((major) => [this.college, major]); - console.log('777', collegeAndMajors); + //console.log('777', collegeAndMajors); //this.major = resultData. const getEntrydate = await defHttp.get({ url: this.Url.getEntrydate }); this.entrydateOptions = getEntrydate.entrydates; @@ -192,20 +212,21 @@ college: collegeAndMajors, entrydate: entrydate, }; - console.log('666'); + //console.log('666'); let res = await defHttp.post({ url: this.Url.getRateByMajor, params }); - console.log('55555', res.data); + //console.log('55555', res.data); this.loadingMap5 = false; this.$nextTick(() => { this.drawChart(res.data); }); }, - //绘画饼图--该批次每一年级的通过率饼图 - async card_Table() { + //绘画饼图map2--最新批次每一年级的通过率环形图 + async circleMap() { this.loadingMap2 = true; //console.log(this.passRatePie); //console.log('piedata', piedata); //如果this.batch为null则先赋个值 + //S if (!this.batch) { this.batch = '2024-06-01'; } @@ -217,10 +238,10 @@ college: this.college, level: 'cet4', }; - console.log(queryParams, 'queryParams'); + //console.log(queryParams, 'queryParams'); let result = await defHttp.get({ url: this.Url.getData, params: queryParams }); - console.log(result, 'result'); + //console.log(result, 'result'); let chartsData = []; for (let key in result.gradeData) { chartsData.push({ @@ -247,7 +268,7 @@ left: 'top', top: '0%', textStyle: { - fontSize: 12, + fontSize: 14, }, }, legend: { @@ -337,7 +358,7 @@ // 本学院各专业通过率-map3--------------------------------------------- async majorPassRate() { this.loadingMap3 = true; - console.log('55555555', this.entrydate); + //console.log('55555555', this.entrydate); if (!this.batch) { this.batch = '2024-06-01'; } @@ -353,9 +374,9 @@ level: 'cet4', }; let url = this.Url.getRateByMajor; - console.log(queryParams, 'queryParams'); + //console.log(queryParams, 'queryParams'); let result = await defHttp.post({ url: url, data: queryParams }); - console.log('88888', result.data); + //console.log('88888', result.data); if (!result) { return; } @@ -447,7 +468,7 @@ this.entrydateOptions = getEntrydate.entrydates; let entrydate = this.entrydateOptions.map((item) => item.value); - const college = ['计算机科学与信息工程学院']; + const college = [this.college]; let queryParams = { college: college, @@ -568,19 +589,19 @@ '#FAF0E6 ', ]; for (let i in data) { - console.log(i, 'i'); + //console.log(i, 'i'); legendData.push(i); let yData = []; // legendData=[]; - console.log(data[i], 'data[i]'); + //console.log(data[i], 'data[i]'); for (let j in data[i]) { - console.log(data[i][j].college, 'data[i][j].college111'); + //console.log(data[i][j].college, 'data[i][j].college111'); // if(data[i][j].college == ''){ yData.push(data[i][j].passRate); // legendData.push(data[i][j].college); } - console.log(yData, 'yData'); + //console.log(yData, 'yData'); seriesData.push({ name: i, type: 'bar', @@ -672,8 +693,8 @@ series: seriesData, }; // 使用刚指定的配置项和数据显示图表。 - console.log(option, 'option'); - console.log(myChart, 'myChart'); + //console.log(option, 'option'); + //console.log(myChart, 'myChart'); this.loadingMap5 = false; setTimeout(() => { myChart.setOption(option); -- 2.41.0 From eb54c9607245a294663c1a0b3dfbdcb5bc121641 Mon Sep 17 00:00:00 2001 From: YuNan <3194726156@qq.com> Date: Tue, 21 Jan 2025 16:15:13 +0800 Subject: [PATCH 6/7] =?UTF-8?q?=E9=99=A2=E9=A2=86=E5=AF=BC=E9=A6=96?= =?UTF-8?q?=E9=A1=B5=E6=A0=87=E7=AD=BE=E6=9B=B4=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/cet/collegeDashboard.vue | 40 +++++++++++++----------------- 1 file changed, 17 insertions(+), 23 deletions(-) diff --git a/src/views/cet/collegeDashboard.vue b/src/views/cet/collegeDashboard.vue index 4c3e508..354e46b 100644 --- a/src/views/cet/collegeDashboard.vue +++ b/src/views/cet/collegeDashboard.vue @@ -1,26 +1,9 @@