前端修改
This commit is contained in:
parent
a3a14d4ccc
commit
daff63566b
|
@ -1,6 +1,6 @@
|
|||
<template>
|
||||
<div style="background: #ececec; padding: 25px">
|
||||
<a-card title="按学院分析" :bordered="false">
|
||||
<a-card title="按学院分析" :loading="loading" :bordered="false">
|
||||
<template #extra>
|
||||
<!-- <a-select v-model:value="college" style="width: 300px" :options="collegeOptions"></a-select> -->
|
||||
<a-select v-model:value="batch" style="margin-left: 10px;width: 120px" :options="batchOptions"></a-select>
|
||||
|
@ -31,6 +31,7 @@ export default {
|
|||
getCollege: '/cet/getCollege',
|
||||
getRate: '/cet/getRateByBatch'
|
||||
},
|
||||
loading: false,
|
||||
collegeOptions: [],
|
||||
batchOptions: [],
|
||||
levelOptions: [
|
||||
|
@ -43,7 +44,7 @@ export default {
|
|||
};
|
||||
},
|
||||
methods: {
|
||||
map1Chart() {
|
||||
dataChart() {
|
||||
// 基于准备好的dom,初始化echarts实例 这个和上面的main对应
|
||||
let myChart = echarts.init(document.getElementById("map1"));
|
||||
// 指定图表的配置项和数据
|
||||
|
@ -110,17 +111,21 @@ export default {
|
|||
},
|
||||
// 查询数据
|
||||
async query() {
|
||||
this.loading = true;
|
||||
let params = {
|
||||
batch: this.batch,
|
||||
level: 'cet4'
|
||||
}
|
||||
const data = await defHttp.get({ url: this.Url.getRate, params });
|
||||
this.$message.info(`查询结果:${JSON.stringify(data)}`);
|
||||
this.loading = false;
|
||||
this.$nextTick(() => {
|
||||
this.dataChart();
|
||||
})
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.getBatch();
|
||||
this.map1Chart();
|
||||
this.dataChart();
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -1,12 +1,13 @@
|
|||
<template>
|
||||
<div style="background: #ececec; padding: 25px">
|
||||
<a-card title="按学院分析" :bordered="false">
|
||||
<a-card title="按批次分析" :loading="loading" :bordered="false">
|
||||
<template #extra>
|
||||
<!-- <a-select v-model:value="college" style="width: 300px" :options="collegeOptions"></a-select> -->
|
||||
<a-select v-model:value="batch" style="margin-left: 10px;width: 120px" :options="batchOptions"></a-select>
|
||||
<a-select v-model:value="college" style="width: 300px" :options="collegeOptions"></a-select>
|
||||
<!-- <a-select v-model:value="batch" style="margin-left: 10px;width: 120px" :options="batchOptions"></a-select> -->
|
||||
<!-- <a-select v-model:value="level" style="margin-left: 10px;width: 120px" :options="levelOptions"></a-select> -->
|
||||
<a-button style="margin-left: 10px;" type="primary" @click="query">查询</a-button>
|
||||
</template>
|
||||
<div>
|
||||
<a-row :gutter="24">
|
||||
<a-col :xl="24" :style="{ marginBottom: '24px' }">
|
||||
<div class="container">
|
||||
|
@ -14,6 +15,7 @@
|
|||
</div>
|
||||
</a-col>
|
||||
</a-row>
|
||||
</div>
|
||||
</a-card>
|
||||
</div>
|
||||
</template>
|
||||
|
@ -29,8 +31,9 @@ export default {
|
|||
Url: {
|
||||
getBatch: '/cet/getBatch',
|
||||
getCollege: '/cet/getCollege',
|
||||
getRate: '/cet/getRateByBatch'
|
||||
getRate: '/cet/getRateByCollege'
|
||||
},
|
||||
loading: false,
|
||||
collegeOptions: [],
|
||||
batchOptions: [],
|
||||
levelOptions: [
|
||||
|
@ -43,7 +46,7 @@ export default {
|
|||
};
|
||||
},
|
||||
methods: {
|
||||
map1Chart() {
|
||||
dataChart() {
|
||||
// 基于准备好的dom,初始化echarts实例 这个和上面的main对应
|
||||
let myChart = echarts.init(document.getElementById("map1"));
|
||||
// 指定图表的配置项和数据
|
||||
|
@ -95,32 +98,34 @@ export default {
|
|||
// 获取批次数据
|
||||
async getBatch() {
|
||||
const getBatch = await defHttp.get({ url: this.Url.getBatch });
|
||||
// const getCollege = await defHttp.get({ url: this.Url.getCollege });
|
||||
const getCollege = await defHttp.get({ url: this.Url.getCollege });
|
||||
|
||||
// this.collegeOptions = getCollege.colleges;
|
||||
// 手动添加一个全校字段
|
||||
// this.collegeOptions.unshift({ value: '全校', label: '全校' });
|
||||
// this.college = this.collegeOptions[0].value;
|
||||
this.collegeOptions = getCollege.colleges;
|
||||
this.college = this.collegeOptions[0].value;
|
||||
|
||||
this.batchOptions = getBatch.batches;
|
||||
this.batch = this.batchOptions[0].value;
|
||||
// this.batchOptions = getBatch.batches;
|
||||
// this.batch = this.batchOptions[0].value;
|
||||
this.level = this.levelOptions[0].value;
|
||||
|
||||
this.query();
|
||||
// this.query();
|
||||
},
|
||||
// 查询数据
|
||||
async query() {
|
||||
this.loading = true;
|
||||
let params = {
|
||||
batch: this.batch,
|
||||
college: this.college,
|
||||
level: 'cet4'
|
||||
}
|
||||
const data = await defHttp.get({ url: this.Url.getRate, params });
|
||||
this.$message.info(`查询结果:${JSON.stringify(data)}`);
|
||||
this.loading = false;
|
||||
this.$nextTick(() => {
|
||||
this.dataChart();
|
||||
})
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.getBatch();
|
||||
this.map1Chart();
|
||||
this.dataChart();
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<template>
|
||||
<div style="background: #ececec; padding: 25px">
|
||||
<a-card title="四六级总通过率查询" :bordered="false">
|
||||
<a-card title="四级总通过率查询" :bordered="false">
|
||||
<template #extra>
|
||||
<a-select v-model:value="college" style="width: 300px" :options="collegeOptions"></a-select>
|
||||
<a-select v-model:value="entrydate" style="margin-left: 10px;width: 100px"
|
||||
|
@ -8,19 +8,16 @@
|
|||
<a-button style="margin-left: 10px;" type="primary" @click="query">查询</a-button>
|
||||
</template>
|
||||
<a-row :gutter="24">
|
||||
<a-col :xl="12" :style="{ marginBottom: '24px' }">
|
||||
<a-table :dataSource="dataSourceCet4" bordered :columns="columns" :pagination='false'>
|
||||
<a-col :xl="12">
|
||||
<div style="padding-left: 10px;min-height: 400px;">
|
||||
<a-table :dataSource="dataSourceCet4" :columns="columns" :pagination='false'>
|
||||
<template #title>
|
||||
<span style="font-size: 20px;font-weight:bold">四级成绩分析</span>
|
||||
</template>
|
||||
</a-table>
|
||||
</a-col>
|
||||
<a-col :xl="12" :style="{ marginBottom: '24px' }">
|
||||
<a-table :dataSource="dataSourceCet6" bordered :columns="columns" :pagination='false'>
|
||||
<template #title>
|
||||
<span style="font-size: 20px;font-weight:bold">六级成绩分析</span>
|
||||
<span style="font-size: 15px;float: right;" v-if="total && total > 0">
|
||||
学院总人数: {{ total }}
|
||||
</span>
|
||||
</template>
|
||||
</a-table>
|
||||
</div>
|
||||
</a-col>
|
||||
</a-row>
|
||||
</a-card>
|
||||
|
@ -36,7 +33,6 @@ export default {
|
|||
data() {
|
||||
return {
|
||||
dataSourceCet4: [],
|
||||
dataSourceCet6: [],
|
||||
columns: [
|
||||
{
|
||||
title: '年级',
|
||||
|
@ -64,6 +60,7 @@ export default {
|
|||
getCollege: '/cet/getCollege',
|
||||
getData: '/cet/getData'
|
||||
},
|
||||
total: 0,
|
||||
collegeOptions: [],
|
||||
entrydateOptions: [],
|
||||
college: null,
|
||||
|
@ -90,7 +87,7 @@ export default {
|
|||
}
|
||||
const result = await defHttp.get({ url: this.Url.getData, params });
|
||||
this.dataSourceCet4 = result.data.cet4;
|
||||
this.dataSourceCet6 = result.data.cet6;
|
||||
this.total = result.data.total;
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
|
|
Loading…
Reference in New Issue