ui优化
This commit is contained in:
parent
d7bdcadfc7
commit
7ba725c13f
2
.env
2
.env
|
@ -2,7 +2,7 @@
|
|||
VITE_PORT = 3100
|
||||
|
||||
# 网站标题
|
||||
VITE_GLOB_APP_TITLE = 哈师大四级查询平台
|
||||
VITE_GLOB_APP_TITLE = 哈尔滨师范大学英语四六级综合管理平台
|
||||
|
||||
# 简称,用于配置文件名字 不要出现空格、数字开头等特殊字符
|
||||
VITE_GLOB_APP_SHORT_NAME = JeecgBootAdmin
|
||||
|
|
BIN
logo.png
BIN
logo.png
Binary file not shown.
Before Width: | Height: | Size: 42 KiB After Width: | Height: | Size: 5.3 KiB |
Binary file not shown.
After Width: | Height: | Size: 16 KiB |
Binary file not shown.
Before Width: | Height: | Size: 42 KiB After Width: | Height: | Size: 5.3 KiB |
|
@ -4,9 +4,10 @@
|
|||
-->
|
||||
<template>
|
||||
<div class="anticon" :class="getAppLogoClass" @click="goHome">
|
||||
<img src="../../../assets/images/logo.png" />
|
||||
<div class="ml-2 truncate md:opacity-100" :class="getTitleClass" v-show="showTitle">
|
||||
{{ title }}
|
||||
<img style="width: 100%;" src="../../../assets/images/logo-red.png" />
|
||||
<div style="display: flex;" class="ml-2 truncate md:opacity-100" :class="getTitleClass" v-show="showTitle">
|
||||
<!-- {{ title }} -->
|
||||
<!-- <span>英语四六级综合管理平台</span> -->
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
|
|
@ -11,6 +11,16 @@
|
|||
<a-row :gutter="24">
|
||||
<a-col :xl="24" :style="{ marginBottom: '24px' }">
|
||||
<div class="container">
|
||||
<div style="display: flex;">
|
||||
<span class="title">学院 / 专业通过率变化</span>
|
||||
<div v-if="topCollege != null">
|
||||
<span style="color: red; font-size: 18px; padding-left: 100px;"> {{ topCollege }}</span>
|
||||
<span style="font-size: 15px;"> 在 </span>
|
||||
<span style="color: red; font-size: 18px;"> {{ topBath }} </span>
|
||||
<span style="font-size: 15px;"> 批次的通过率为:</span>
|
||||
<span style="color: red; font-size: 18px;"> {{ sumRate }}%</span>
|
||||
</div>
|
||||
</div>
|
||||
<div id="map1" style="width: 100%; height: 450px;"></div>
|
||||
</div>
|
||||
</a-col>
|
||||
|
@ -21,6 +31,7 @@
|
|||
</template>
|
||||
|
||||
<script>
|
||||
import { result } from 'lodash-es';
|
||||
import { defHttp } from '/@/utils/http/axios';
|
||||
import * as echarts from 'echarts';
|
||||
|
||||
|
@ -46,14 +57,16 @@ export default {
|
|||
level: null,
|
||||
college: null,
|
||||
batch: null,
|
||||
collegeMajor: null
|
||||
collegeMajor: null,
|
||||
sumRate: null,//总通过率
|
||||
topCollege: null,//顶部选择器选择的学院
|
||||
topBath: null,//顶部选择器选择的批次
|
||||
};
|
||||
},
|
||||
methods: {
|
||||
dataChart(data) {
|
||||
let xData = [];
|
||||
let yData = [];
|
||||
console.log(data, "data")
|
||||
for (let key in data) {
|
||||
xData.push(key);
|
||||
// 将数据转换为百分比(加上%)
|
||||
|
@ -64,7 +77,7 @@ export default {
|
|||
// 指定图表的配置项和数据
|
||||
let option = {
|
||||
title: {
|
||||
text: "学院 / 专业通过率变化",
|
||||
// text: "学院 / 专业通过率变化",
|
||||
},
|
||||
xAxis: {
|
||||
type: 'category',
|
||||
|
@ -175,9 +188,8 @@ export default {
|
|||
},
|
||||
// 查询数据
|
||||
async query() {
|
||||
let data = null;
|
||||
let resultData = null;
|
||||
try {
|
||||
console.log("sb", this.batch);
|
||||
//如果this.batch为null则先赋个值
|
||||
if (!this.batch) {
|
||||
this.batch = '2017-12-01';
|
||||
|
@ -187,18 +199,21 @@ export default {
|
|||
}
|
||||
//如果this.batch[1]不存在则设为null
|
||||
let major = this.batch.length > 1 ? this.batch[1] : "";
|
||||
this.topCollege = this.collegeMajor;
|
||||
this.topBath = this.batch;
|
||||
this.loading = true;
|
||||
let params = {
|
||||
batch: this.batch,
|
||||
college: this.collegeMajor,
|
||||
level: 'cet4',
|
||||
}
|
||||
console.log("params", params);
|
||||
data = await defHttp.get({ url: this.Url.getRate, params });
|
||||
resultData = await defHttp.get({ url: this.Url.getRate, params });
|
||||
this.sumRate = resultData.sumRate;
|
||||
console.log("result", resultData)
|
||||
} finally {
|
||||
this.loading = false;
|
||||
this.$nextTick(() => {
|
||||
this.dataChart(data);
|
||||
this.dataChart(resultData.data);
|
||||
})
|
||||
}
|
||||
}
|
||||
|
@ -214,7 +229,7 @@ export default {
|
|||
|
||||
<style lang="less" scoped>
|
||||
.container {
|
||||
display: flex;
|
||||
// display: flex;
|
||||
background-color: #fff;
|
||||
padding: 15px;
|
||||
border-radius: 4px;
|
||||
|
@ -222,7 +237,7 @@ export default {
|
|||
}
|
||||
|
||||
.title {
|
||||
font-size: 34px;
|
||||
font-size: 20px;
|
||||
color: rgb(8, 8, 8);
|
||||
font-weight: bold;
|
||||
}
|
||||
|
|
|
@ -11,6 +11,14 @@
|
|||
<a-row :gutter="24">
|
||||
<a-col :xl="13">
|
||||
<div style="padding-left: 10px;min-height: 400px;">
|
||||
<div v-if="topCollege != null" style="margin-bottom: 5px;">
|
||||
<span style="font-size: 15px;">当前数据为 </span>
|
||||
<span style="color: red; font-size: 18px;">{{ topCollege }}</span>
|
||||
<span v-if="topMajor != null && topMajor != '' " style="color: red; font-size: 18px;"> / {{ topMajor }}</span>
|
||||
<span style="font-size: 15px;"> 的 </span>
|
||||
<span style="color: red; font-size: 20px;">{{ topEntrydate }}</span>
|
||||
<span style="font-size: 15px;"> 级数据</span>
|
||||
</div>
|
||||
<a-table :dataSource="dataSourceCet4" :columns="columns" :pagination='false' bordered>
|
||||
<template v-slot:passRateSlot>
|
||||
累计总通过率
|
||||
|
@ -109,8 +117,12 @@ export default {
|
|||
collegeMajorOptions: [],
|
||||
entrydateOptions: [],
|
||||
college: null,
|
||||
entrydate: null,
|
||||
collegeMajor: null
|
||||
entrydate: 2017,//年级选择器
|
||||
//设置默认值为全校
|
||||
collegeMajor: ['全校'],//学院专业选择器
|
||||
topCollege: null,//顶部选择器
|
||||
topMajor: null,//顶部选择器
|
||||
topEntrydate: null,//顶部选择器
|
||||
};
|
||||
},
|
||||
methods: {
|
||||
|
@ -123,7 +135,7 @@ export default {
|
|||
this.collegeOptions.unshift({ value: '全校', label: '全校' });
|
||||
this.college = this.collegeOptions[0].value;
|
||||
this.entrydateOptions = getEntrydate.entrydates;
|
||||
this.entrydate = this.entrydateOptions[0].value;
|
||||
// this.entrydate = this.entrydateOptions[0].value;
|
||||
},
|
||||
//获取学院专业级联数据
|
||||
async getCollegeMajorData() {
|
||||
|
@ -145,7 +157,7 @@ export default {
|
|||
this.collegeMajorOptions.unshift({ value: '专升本', label: '专升本' });
|
||||
// 手动添加一个全校字段
|
||||
this.collegeMajorOptions.unshift({ value: '全校', label: '全校' });
|
||||
this.collegeMajor = ['全校'];
|
||||
// this.collegeMajor = ['全校'];
|
||||
console.log(this.collegeMajorOptions);
|
||||
},
|
||||
|
||||
|
@ -154,6 +166,9 @@ export default {
|
|||
try {
|
||||
//如果this.collegeMajor[1]不存在则设为null
|
||||
let major = this.collegeMajor.length > 1 ? this.collegeMajor[1] : "";
|
||||
this.topCollege = this.collegeMajor[0];
|
||||
this.topMajor = major;
|
||||
this.topEntrydate = this.entrydate;
|
||||
if (this.college)
|
||||
this.loading = true;
|
||||
let params = {
|
||||
|
@ -301,6 +316,7 @@ export default {
|
|||
mounted() {
|
||||
this.getEntrydateAndCollegeData();
|
||||
this.getCollegeMajorData();
|
||||
this.query();
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue