2022-03-17 14:58:49 +08:00
|
|
|
<template>
|
2024-03-26 17:33:19 +08:00
|
|
|
<div style="background: #ececec; padding: 25px">
|
2024-03-27 18:46:10 +08:00
|
|
|
<a-card title="四级总通过率查询" :loading="loading" :bordered="false">
|
2024-03-26 17:33:19 +08:00
|
|
|
<template #extra>
|
|
|
|
<a-select v-model:value="college" style="width: 300px" :options="collegeOptions"></a-select>
|
2024-03-27 16:10:08 +08:00
|
|
|
<a-select v-model:value="entrydate" style="margin-left: 10px;width: 100px"
|
2024-03-26 17:33:19 +08:00
|
|
|
:options="entrydateOptions"></a-select>
|
2024-03-27 15:49:00 +08:00
|
|
|
<a-button style="margin-left: 10px;" type="primary" @click="query">查询</a-button>
|
2024-03-26 17:33:19 +08:00
|
|
|
</template>
|
|
|
|
<a-row :gutter="24">
|
2024-03-27 18:26:50 +08:00
|
|
|
<a-col :xl="12">
|
|
|
|
<div style="padding-left: 10px;min-height: 400px;">
|
|
|
|
<a-table :dataSource="dataSourceCet4" :columns="columns" :pagination='false'>
|
|
|
|
</a-table>
|
2024-03-27 18:46:10 +08:00
|
|
|
<span style="font-size: 15px;float: right;margin-top: 10px;" v-if="total && total > 0">
|
|
|
|
学院总人数: {{ total }}
|
|
|
|
</span>
|
2024-03-27 18:26:50 +08:00
|
|
|
</div>
|
2024-03-26 17:33:19 +08:00
|
|
|
</a-col>
|
|
|
|
</a-row>
|
|
|
|
</a-card>
|
2024-03-26 13:30:08 +08:00
|
|
|
</div>
|
2022-03-17 14:58:49 +08:00
|
|
|
</template>
|
2024-03-26 13:30:08 +08:00
|
|
|
|
|
|
|
<script>
|
2024-03-26 17:33:19 +08:00
|
|
|
import { defHttp } from '/@/utils/http/axios';
|
2024-03-26 13:30:08 +08:00
|
|
|
import * as echarts from 'echarts';
|
|
|
|
|
|
|
|
export default {
|
2024-03-26 17:33:19 +08:00
|
|
|
name: "Analysis",
|
|
|
|
data() {
|
|
|
|
return {
|
2024-03-27 18:46:10 +08:00
|
|
|
loading: false,
|
2024-03-27 15:49:00 +08:00
|
|
|
dataSourceCet4: [],
|
|
|
|
columns: [
|
|
|
|
{
|
|
|
|
title: '年级',
|
|
|
|
dataIndex: 'grade',
|
|
|
|
key: 'grade',
|
|
|
|
},
|
|
|
|
{
|
|
|
|
title: '参加人数',
|
|
|
|
dataIndex: 'attendNumber',
|
|
|
|
key: 'attendNumber',
|
|
|
|
},
|
|
|
|
{
|
|
|
|
title: '新通过人数',
|
|
|
|
dataIndex: 'passNumber',
|
|
|
|
key: 'passNumber',
|
|
|
|
},
|
|
|
|
{
|
|
|
|
title: '累计总通过率',
|
|
|
|
dataIndex: 'passRate',
|
|
|
|
key: 'passRate',
|
|
|
|
}
|
|
|
|
],
|
2024-03-26 17:33:19 +08:00
|
|
|
Url: {
|
2024-03-27 16:10:08 +08:00
|
|
|
getEntrydate: '/cet/getEntrydate',
|
|
|
|
getCollege: '/cet/getCollege',
|
2024-03-27 15:49:00 +08:00
|
|
|
getData: '/cet/getData'
|
2024-03-26 17:33:19 +08:00
|
|
|
},
|
2024-03-27 18:26:50 +08:00
|
|
|
total: 0,
|
2024-03-26 17:33:19 +08:00
|
|
|
collegeOptions: [],
|
|
|
|
entrydateOptions: [],
|
|
|
|
college: null,
|
2024-03-27 16:10:08 +08:00
|
|
|
entrydate: null
|
2024-03-26 17:33:19 +08:00
|
|
|
};
|
|
|
|
},
|
2024-03-26 13:30:08 +08:00
|
|
|
methods: {
|
2024-03-26 17:33:19 +08:00
|
|
|
// 获取年级和学院数据
|
2024-03-27 16:10:08 +08:00
|
|
|
async getEntrydateAndCollegeData() {
|
|
|
|
const getEntrydate = await defHttp.get({ url: this.Url.getEntrydate });
|
|
|
|
const getCollege = await defHttp.get({ url: this.Url.getCollege });
|
|
|
|
this.collegeOptions = getCollege.colleges;
|
|
|
|
// 手动添加一个全校字段
|
|
|
|
this.collegeOptions.unshift({ value: '全校', label: '全校' });
|
2024-03-27 15:49:00 +08:00
|
|
|
this.college = this.collegeOptions[0].value;
|
2024-03-27 16:10:08 +08:00
|
|
|
this.entrydateOptions = getEntrydate.entrydates;
|
2024-03-26 17:33:19 +08:00
|
|
|
this.entrydate = this.entrydateOptions[0].value;
|
2024-03-27 15:49:00 +08:00
|
|
|
},
|
|
|
|
// 查询数据
|
|
|
|
async query() {
|
2024-03-27 18:46:10 +08:00
|
|
|
try {
|
|
|
|
this.loading = true;
|
|
|
|
let params = {
|
|
|
|
college: this.college,
|
|
|
|
entrydate: this.entrydate
|
|
|
|
}
|
|
|
|
const result = await defHttp.get({ url: this.Url.getData, params });
|
2024-03-27 19:53:47 +08:00
|
|
|
this.dataSourceCet4 = result.cet4;
|
|
|
|
this.total = result.total;
|
2024-03-27 18:46:10 +08:00
|
|
|
|
|
|
|
} finally {
|
|
|
|
this.loading = false;
|
2024-03-27 15:49:00 +08:00
|
|
|
}
|
2024-03-26 17:33:19 +08:00
|
|
|
}
|
2024-03-26 13:30:08 +08:00
|
|
|
},
|
|
|
|
mounted() {
|
2024-03-27 16:10:08 +08:00
|
|
|
this.getEntrydateAndCollegeData();
|
2024-03-26 13:30:08 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
}
|
2022-03-17 14:58:49 +08:00
|
|
|
</script>
|
2024-03-26 13:30:08 +08:00
|
|
|
|
|
|
|
<style lang="less" scoped>
|
2024-03-27 16:10:08 +08:00
|
|
|
.container {
|
|
|
|
display: flex;
|
|
|
|
background-color: #fff;
|
|
|
|
padding: 15px;
|
|
|
|
border-radius: 4px;
|
|
|
|
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.09);
|
|
|
|
}
|
|
|
|
|
2024-03-26 13:30:08 +08:00
|
|
|
.title {
|
|
|
|
font-size: 34px;
|
|
|
|
color: rgb(8, 8, 8);
|
|
|
|
font-weight: bold;
|
|
|
|
}
|
2024-03-27 16:10:08 +08:00
|
|
|
</style>
|