部分需求
This commit is contained in:
parent
9d1b7cc623
commit
06f8f0c7d9
|
@ -2,10 +2,11 @@
|
|||
<div style="background: #ececec; padding: 15px">
|
||||
<a-card title="按学院 / 专业分析" :loading="loading" :bordered="false">
|
||||
<template #extra>
|
||||
<a-select v-model:value="college" style="width: 300px" mode="multiple" :max-tag-count="2" :options="collegeOptions" @change="onCollegeMajorChange"></a-select>
|
||||
<a-select v-model:value="college" style="width: 300px" mode="multiple" :max-tag-count="2"
|
||||
:options="collegeOptions" @change="onCollegeMajorChange"></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-select v-model:value="entrydate" style="margin-left: 10px;width: 150px"
|
||||
<a-select v-model:value="entrydate" style="margin-left: 10px;width: 150px"
|
||||
:options="entrydateOptions"></a-select>
|
||||
<a-button style="margin-left: 10px;" type="primary" @click="query">查询</a-button>
|
||||
</template>
|
||||
|
@ -59,31 +60,31 @@ export default {
|
|||
if (option.value !== '全校') {
|
||||
option.disabled = true;
|
||||
}
|
||||
|
||||
|
||||
});
|
||||
this.college = ['全校'];
|
||||
});
|
||||
},
|
||||
onCollegeMajorChange(value) {
|
||||
if (value.includes('全校')) {
|
||||
this.collegeOptions.forEach(option => {
|
||||
if (option.value !== '全校') {
|
||||
option.disabled = true;
|
||||
}
|
||||
});
|
||||
}else{
|
||||
this.collegeOptions.forEach(option => {
|
||||
option.disabled = false;
|
||||
if (value!=='全校'&&option.value === '全校') {
|
||||
option.disabled = true;
|
||||
}
|
||||
if(value.length===0){
|
||||
if (value.includes('全校')) {
|
||||
this.collegeOptions.forEach(option => {
|
||||
if (option.value !== '全校') {
|
||||
option.disabled = true;
|
||||
}
|
||||
});
|
||||
} else {
|
||||
this.collegeOptions.forEach(option => {
|
||||
option.disabled = false;
|
||||
}
|
||||
});
|
||||
}
|
||||
console.log(value);
|
||||
},
|
||||
if (value !== '全校' && option.value === '全校') {
|
||||
option.disabled = true;
|
||||
}
|
||||
if (value.length === 0) {
|
||||
option.disabled = false;
|
||||
}
|
||||
});
|
||||
}
|
||||
console.log(value);
|
||||
},
|
||||
dataChart(data) {
|
||||
let xData = [];
|
||||
let yData = [];
|
||||
|
@ -108,8 +109,8 @@ export default {
|
|||
formatter: function (params) {
|
||||
return params[0].name + '<br/>' +
|
||||
'<table>' +
|
||||
'<tr><td>' + params[0].marker + params[0].seriesName + '</td><td style="font-weight: bold;">'+' ' + params[0].value + '%' + '</td></tr>' +
|
||||
'<tr><td>' + params[1].marker + params[1].seriesName + '</td><td style="font-weight: bold;">'+' ' + params[1].value + '</td></tr>' +
|
||||
'<tr><td>' + params[0].marker + params[0].seriesName + '</td><td style="font-weight: bold;">' + ' ' + params[0].value + '%' + '</td></tr>' +
|
||||
'<tr><td>' + params[1].marker + params[1].seriesName + '</td><td style="font-weight: bold;">' + ' ' + params[1].value + '</td></tr>' +
|
||||
'</table>';
|
||||
}
|
||||
},
|
||||
|
@ -207,7 +208,7 @@ export default {
|
|||
let result = null;
|
||||
console.log(this.college, this.entrydate);
|
||||
//如果this.college和this.batch为null则先赋静态值
|
||||
if (this.college===null||this.college.length===0) {
|
||||
if (this.college === null || this.college.length === 0) {
|
||||
this.college = ['全校'];
|
||||
}
|
||||
if (!this.entrydate) {
|
||||
|
@ -221,7 +222,7 @@ export default {
|
|||
entrydate: this.entrydate,
|
||||
level: 'cet4'
|
||||
}
|
||||
console.log(params.college,"college")
|
||||
console.log(params.college, "college")
|
||||
result = await defHttp.post({ url: this.Url.getRate, params });
|
||||
//使数据按照passRate从大到小排序
|
||||
result.data.sort((a, b) => {
|
||||
|
|
|
@ -67,7 +67,7 @@ export default {
|
|||
data: xData,
|
||||
axisLabel: {
|
||||
interval: 0,//代表显示所有x轴标签显示
|
||||
rotate: -20,//代表倾斜30度显示
|
||||
rotate: -10,//代表倾斜30度显示
|
||||
}
|
||||
},
|
||||
tooltip: {
|
||||
|
|
|
@ -1,212 +1,221 @@
|
|||
<template>
|
||||
<div style="background: #ececec; padding: 15px">
|
||||
<a-card title="按批次对比分析" :loading="loading" :bordered="false">
|
||||
<template #extra>
|
||||
<a-select v-model:value="collegeMajor" style="width: 300px" :options="collegeMajorOptions" ></a-select>
|
||||
<a-select v-model:value="batch" :options="batchOptions" change-on-select style="margin-left: 10px;width: 100px" />
|
||||
<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">
|
||||
<div id="map1" style="width: 100%; height: 400px;"></div>
|
||||
</div>
|
||||
</a-col>
|
||||
</a-row>
|
||||
</div>
|
||||
</a-card>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { defHttp } from '/@/utils/http/axios';
|
||||
import * as echarts from 'echarts';
|
||||
|
||||
export default {
|
||||
name: "Analysis",
|
||||
|
||||
data() {
|
||||
return {
|
||||
Url: {
|
||||
getBatch: '/cet/getBatch',
|
||||
getCollege: '/cet/getCollege',
|
||||
getRate: '/cet/getRateByBatch',
|
||||
getCollegeMajor: '/cet/getCollegeMajor'
|
||||
<div style="background: #ececec; padding: 15px">
|
||||
<a-card title="按批次对比分析" :loading="loading" :bordered="false">
|
||||
<template #extra>
|
||||
<a-select v-model:value="collegeMajor" style="width: 300px" :options="collegeMajorOptions"></a-select>
|
||||
<a-select v-model:value="batch" :options="batchOptions" change-on-select
|
||||
style="margin-left: 10px;width: 100px" />
|
||||
<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">
|
||||
<div id="map1" style="width: 100%; height: 450px;"></div>
|
||||
</div>
|
||||
</a-col>
|
||||
</a-row>
|
||||
</div>
|
||||
</a-card>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { defHttp } from '/@/utils/http/axios';
|
||||
import * as echarts from 'echarts';
|
||||
|
||||
export default {
|
||||
name: "Analysis",
|
||||
|
||||
data() {
|
||||
return {
|
||||
Url: {
|
||||
getBatch: '/cet/getBatch',
|
||||
getCollege: '/cet/getCollege',
|
||||
getRate: '/cet/getRateByBatch',
|
||||
getCollegeMajor: '/cet/getCollegeMajor'
|
||||
},
|
||||
loading: false,
|
||||
collegeOptions: [],
|
||||
collegeMajorOptions: [],
|
||||
batchOptions: [],
|
||||
levelOptions: [
|
||||
{ value: 'cet4', label: '英语四级' },
|
||||
{ value: 'cet6', label: '英语六级' }
|
||||
],
|
||||
level: null,
|
||||
college: null,
|
||||
batch: null,
|
||||
collegeMajor: null
|
||||
};
|
||||
},
|
||||
methods: {
|
||||
dataChart(data) {
|
||||
let xData = [];
|
||||
let yData = [];
|
||||
console.log(data, "data")
|
||||
for (let key in data) {
|
||||
xData.push(key);
|
||||
// 将数据转换为百分比(加上%)
|
||||
yData.push((data[key]).toFixed(1));
|
||||
}
|
||||
xData = xData.map(label => label.split("").join("\n"));//将x轴竖着展示
|
||||
let myChart = echarts.init(document.getElementById("map1"));
|
||||
// 指定图表的配置项和数据
|
||||
let option = {
|
||||
title: {
|
||||
text: "学院 / 专业通过率变化",
|
||||
},
|
||||
loading: false,
|
||||
collegeOptions: [],
|
||||
collegeMajorOptions: [],
|
||||
batchOptions: [],
|
||||
levelOptions: [
|
||||
{ value: 'cet4', label: '英语四级' },
|
||||
{ value: 'cet6', label: '英语六级' }
|
||||
],
|
||||
level: null,
|
||||
college: null,
|
||||
batch: null,
|
||||
collegeMajor: null
|
||||
};
|
||||
},
|
||||
methods: {
|
||||
dataChart(data) {
|
||||
let xData = [];
|
||||
let yData = [];
|
||||
console.log(data,"data")
|
||||
for (let key in data) {
|
||||
xData.push(key);
|
||||
// 将数据转换为百分比(加上%)
|
||||
yData.push((data[key]).toFixed(1));
|
||||
}
|
||||
let myChart = echarts.init(document.getElementById("map1"));
|
||||
// 指定图表的配置项和数据
|
||||
let option = {
|
||||
title: {
|
||||
text: "学院 / 专业通过率变化",
|
||||
xAxis: {
|
||||
type: 'category',
|
||||
data: xData,
|
||||
axisLabel: {
|
||||
interval: 0,//代表显示所有x轴标签显示
|
||||
rotate: 0,//代表倾斜30度显示
|
||||
}
|
||||
},
|
||||
//提示框
|
||||
tooltip: {
|
||||
trigger: 'axis',
|
||||
axisPointer: {
|
||||
type: 'shadow'
|
||||
},
|
||||
xAxis: {
|
||||
type: 'category',
|
||||
data: xData,
|
||||
axisLabel: {
|
||||
interval: 0,//代表显示所有x轴标签显示
|
||||
rotate: -20,//代表倾斜30度显示
|
||||
}
|
||||
},
|
||||
tooltip: {
|
||||
trigger: 'axis',
|
||||
axisPointer: {
|
||||
type: 'shadow'
|
||||
},
|
||||
formatter: function (params) {
|
||||
return params[0].name + '<br/>' +
|
||||
'<table>' +
|
||||
'<tr><td>' + params[0].marker + '</td><td style="font-weight: bold;">' + ' ' + params[0].value + '%' + '</td></tr>' +
|
||||
'<tr>'
|
||||
+ '</table>';
|
||||
}
|
||||
},
|
||||
yAxis: {
|
||||
type: 'value',
|
||||
name: '通过率',
|
||||
axisLabel: {
|
||||
formatter: '{value} %'
|
||||
}
|
||||
},
|
||||
series: [
|
||||
{
|
||||
data: yData,
|
||||
type: 'line',
|
||||
itemStyle: {
|
||||
normal: {
|
||||
label: {
|
||||
show: true, //开启显示
|
||||
position: 'top', //在上方显示
|
||||
textStyle: { //数值样式
|
||||
color: 'black',
|
||||
fontSize: 12
|
||||
},
|
||||
formatter: '{c}%',
|
||||
}
|
||||
formatter: function (params) {
|
||||
return params[0].name + '<br/>' +
|
||||
'<table>' +
|
||||
'<tr><td>' + params[0].marker + '</td><td style="font-weight: bold;">' + ' ' + params[0].value + '%' + '</td></tr>' +
|
||||
'<tr>'
|
||||
+ '</table>';
|
||||
}
|
||||
},
|
||||
//网格
|
||||
grid: {
|
||||
left: '3%',
|
||||
right: '4%',
|
||||
bottom: '1%',//网格距离容器底部的距离是容器高度的3%
|
||||
containLabel: true
|
||||
},
|
||||
yAxis: {
|
||||
type: 'value',
|
||||
name: '通过率',
|
||||
axisLabel: {
|
||||
formatter: '{value} %'
|
||||
}
|
||||
},
|
||||
series: [
|
||||
{
|
||||
data: yData,
|
||||
type: 'line',
|
||||
itemStyle: {
|
||||
normal: {
|
||||
label: {
|
||||
show: true, //开启显示
|
||||
position: 'top', //在上方显示
|
||||
textStyle: { //数值样式
|
||||
color: 'black',
|
||||
fontSize: 12
|
||||
},
|
||||
formatter: '{c}%',
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
};
|
||||
// 使用刚指定的配置项和数据显示图表。
|
||||
myChart.setOption(option);
|
||||
},
|
||||
// 获取批次数据
|
||||
async getBatch() {
|
||||
const getBatch = await defHttp.get({ url: this.Url.getBatch });
|
||||
this.batchOptions = getBatch.batches.map(item => {
|
||||
return {
|
||||
value: item.value,
|
||||
label: item.label
|
||||
}
|
||||
});
|
||||
// const getCollege = await defHttp.get({ url: this.Url.getCollege });
|
||||
|
||||
// this.collegeOptions = getCollege.colleges;
|
||||
// this.college = this.collegeOptions[0].value;
|
||||
|
||||
this.level = this.levelOptions[0].value;
|
||||
|
||||
// this.query();
|
||||
},
|
||||
//获取学院专业级联数据
|
||||
async getCollegeMajorData() {
|
||||
const res = await defHttp.get({ url: this.Url.getCollegeMajor });
|
||||
|
||||
//通过map方法将数据转换为级联选择器需要的数据格式
|
||||
this.collegeMajorOptions = res.collegeMajor.map(item => {
|
||||
return {
|
||||
value: item.college,
|
||||
label: item.college,
|
||||
children: item.major.map(major => {
|
||||
return {
|
||||
value: major,
|
||||
label: major
|
||||
}
|
||||
})
|
||||
}
|
||||
});
|
||||
this.collegeMajorOptions.unshift({ value: '全校', label: '全校' });
|
||||
this.collegeMajor = this.collegeMajorOptions[0].value;
|
||||
console.log(this.collegeMajor)
|
||||
console.log(this.collegeMajorOptions);
|
||||
},
|
||||
// 查询数据
|
||||
async query() {
|
||||
let data = null;
|
||||
try {
|
||||
console.log("sb", this.batch);
|
||||
//如果this.batch为null则先赋个值
|
||||
if (!this.batch) {
|
||||
this.batch = '2017-12-01';
|
||||
}
|
||||
if (!this.collegeMajor) {
|
||||
this.collegeMajor = '全校';
|
||||
}
|
||||
//如果this.batch[1]不存在则设为null
|
||||
let major = this.batch.length > 1 ? this.batch[1] : "";
|
||||
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 });
|
||||
} finally {
|
||||
this.loading = false;
|
||||
this.$nextTick(() => {
|
||||
this.dataChart(data);
|
||||
]
|
||||
};
|
||||
// 使用刚指定的配置项和数据显示图表。
|
||||
myChart.setOption(option);
|
||||
},
|
||||
// 获取批次数据
|
||||
async getBatch() {
|
||||
const getBatch = await defHttp.get({ url: this.Url.getBatch });
|
||||
this.batchOptions = getBatch.batches.map(item => {
|
||||
return {
|
||||
value: item.value,
|
||||
label: item.label
|
||||
}
|
||||
});
|
||||
// const getCollege = await defHttp.get({ url: this.Url.getCollege });
|
||||
|
||||
// this.collegeOptions = getCollege.colleges;
|
||||
// this.college = this.collegeOptions[0].value;
|
||||
|
||||
this.level = this.levelOptions[0].value;
|
||||
|
||||
// this.query();
|
||||
},
|
||||
//获取学院专业级联数据
|
||||
async getCollegeMajorData() {
|
||||
const res = await defHttp.get({ url: this.Url.getCollegeMajor });
|
||||
|
||||
//通过map方法将数据转换为级联选择器需要的数据格式
|
||||
this.collegeMajorOptions = res.collegeMajor.map(item => {
|
||||
return {
|
||||
value: item.college,
|
||||
label: item.college,
|
||||
children: item.major.map(major => {
|
||||
return {
|
||||
value: major,
|
||||
label: major
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
});
|
||||
this.collegeMajorOptions.unshift({ value: '全校', label: '全校' });
|
||||
this.collegeMajor = this.collegeMajorOptions[0].value;
|
||||
console.log(this.collegeMajor)
|
||||
console.log(this.collegeMajorOptions);
|
||||
},
|
||||
mounted() {
|
||||
this.getCollegeMajorData();
|
||||
this.getBatch();
|
||||
this.query();
|
||||
// 查询数据
|
||||
async query() {
|
||||
let data = null;
|
||||
try {
|
||||
console.log("sb", this.batch);
|
||||
//如果this.batch为null则先赋个值
|
||||
if (!this.batch) {
|
||||
this.batch = '2017-12-01';
|
||||
}
|
||||
if (!this.collegeMajor) {
|
||||
this.collegeMajor = '全校';
|
||||
}
|
||||
//如果this.batch[1]不存在则设为null
|
||||
let major = this.batch.length > 1 ? this.batch[1] : "";
|
||||
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 });
|
||||
} finally {
|
||||
this.loading = false;
|
||||
this.$nextTick(() => {
|
||||
this.dataChart(data);
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
},
|
||||
mounted() {
|
||||
this.getCollegeMajorData();
|
||||
this.getBatch();
|
||||
this.query();
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="less" scoped>
|
||||
.container {
|
||||
display: flex;
|
||||
background-color: #fff;
|
||||
padding: 15px;
|
||||
border-radius: 4px;
|
||||
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.09);
|
||||
}
|
||||
|
||||
.title {
|
||||
font-size: 34px;
|
||||
color: rgb(8, 8, 8);
|
||||
font-weight: bold;
|
||||
}
|
||||
</style>
|
||||
|
||||
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="less" scoped>
|
||||
.container {
|
||||
display: flex;
|
||||
background-color: #fff;
|
||||
padding: 15px;
|
||||
border-radius: 4px;
|
||||
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.09);
|
||||
}
|
||||
|
||||
.title {
|
||||
font-size: 34px;
|
||||
color: rgb(8, 8, 8);
|
||||
font-weight: bold;
|
||||
}
|
||||
</style>
|
|
@ -19,10 +19,12 @@
|
|||
</a-tooltip>
|
||||
</template>
|
||||
</a-table>
|
||||
<span style="font-size: 15px;float: right;margin-top: 10px;" v-if="total && total > 0">
|
||||
学院 / 专业总人数: {{ total }}
|
||||
</span>
|
||||
|
||||
<div style="display: flex; justify-content: space-between; font-size: 15px; margin-top: 10px;"
|
||||
v-if="total && total > 0">
|
||||
<span>学院 / 专业总人数: {{ total }}</span>
|
||||
<span>累计通过人数: {{ passNumberBottom }}</span>
|
||||
<span>累计总通过率: {{ passRateBottom }}</span>
|
||||
</div>
|
||||
</div>
|
||||
</a-col>
|
||||
<a-col :xl="11">
|
||||
|
@ -99,6 +101,9 @@ export default {
|
|||
getCollegeMajor: '/cet/getCollegeMajor'
|
||||
},
|
||||
total: 0,
|
||||
passNumberBottom: 0,
|
||||
passRateBottom: 0,
|
||||
passRatePie: [],
|
||||
collegeOptions: [],
|
||||
collegeMajorOptions: [],
|
||||
entrydateOptions: [],
|
||||
|
@ -169,14 +174,13 @@ export default {
|
|||
passrate = parseFloat(item.gradepassrate).toFixed(3);
|
||||
}
|
||||
index++
|
||||
|
||||
tableData.push({
|
||||
grade: grade,
|
||||
attendNumber: item.attendNumber,
|
||||
batch: item.batch,
|
||||
gradepassrate: item.gradepassrate,
|
||||
gradepassrate: (item.gradepassrate * 100).toFixed(1) + '%',
|
||||
passNumber: item.passNumber,
|
||||
batchpassrate: item.batchpassrate
|
||||
batchpassrate: (item.batchpassrate * 100).toFixed(1) + '%'
|
||||
});
|
||||
});
|
||||
}
|
||||
|
@ -184,6 +188,13 @@ export default {
|
|||
console.log("tableData", tableData);
|
||||
this.dataSourceCet4 = tableData;
|
||||
this.total = result.total;
|
||||
this.passNumberBottom = result.passNumber;
|
||||
this.passRateBottom = (result.passRate * 100).toFixed(1) + '%';
|
||||
//内置饼图
|
||||
//清空数据
|
||||
this.passRatePie =[]
|
||||
this.passRatePie.push({ value: result.passRate, name: '已通过' });
|
||||
this.passRatePie.push({ value: 1 - result.passRate, name: '未通过' })
|
||||
piedata.push({ value: (1 - passrate).toFixed(3), name: '未通过' });
|
||||
setTimeout(() => {
|
||||
this.drawPieChart(piedata);
|
||||
|
@ -196,33 +207,21 @@ export default {
|
|||
test() {
|
||||
defHttp.get({ url: "/cet/getTest" });
|
||||
},
|
||||
renderGrade(record, index) {
|
||||
console.log(record, "record", index, "index");
|
||||
console.log(record.grade)
|
||||
if (index % 2 == 0) {
|
||||
return {
|
||||
children: record.grade,
|
||||
attrs: {
|
||||
rowSpan: 2
|
||||
}
|
||||
}
|
||||
|
||||
} else {
|
||||
return {
|
||||
children: record.grade,
|
||||
attrs: {
|
||||
rowSpan: 0
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
drawPieChart(piedata) {
|
||||
console.log(this.passRatePie)
|
||||
console.log("piedata", piedata)
|
||||
let myChart = echarts.init(document.getElementById('piechart'));
|
||||
let option = {
|
||||
tooltip: {
|
||||
trigger: 'item',
|
||||
confine: false,
|
||||
//字体大小
|
||||
itemStyle:{
|
||||
fontSize:100
|
||||
}
|
||||
},
|
||||
|
||||
title: {
|
||||
text: '四级通过率分析',
|
||||
left: 'left',
|
||||
|
@ -235,22 +234,60 @@ export default {
|
|||
top: '5%',
|
||||
left: 'center'
|
||||
},
|
||||
|
||||
series: [
|
||||
//内圈饼图
|
||||
{
|
||||
name: '四级通过率',
|
||||
type: 'pie',
|
||||
radius: ['40%', '70%'],
|
||||
radius: ['0', '30%'],
|
||||
avoidLabelOverlap: false,
|
||||
itemStyle: {
|
||||
borderRadius: 3,
|
||||
borderColor: '#fff',
|
||||
borderWidth: 2,
|
||||
normal: {
|
||||
color: function (colors) {
|
||||
var colorList = ['#00CD66', '#FF6A6A'];
|
||||
return colorList[colors.dataIndex];
|
||||
}
|
||||
},
|
||||
},
|
||||
label: {
|
||||
position: 'inner',
|
||||
fontSize: 14
|
||||
},
|
||||
emphasis: {
|
||||
label: {
|
||||
show: true,
|
||||
fontSize: 20,
|
||||
fontWeight: 'bold'
|
||||
}
|
||||
},
|
||||
data: this.passRatePie
|
||||
},
|
||||
//外圈饼图
|
||||
{
|
||||
name: '四级通过率',
|
||||
type: 'pie',
|
||||
radius: ['40%', '60%'],
|
||||
avoidLabelOverlap: false,
|
||||
itemStyle: {
|
||||
|
||||
borderRadius: 10,
|
||||
borderColor: '#fff',
|
||||
borderWidth: 2
|
||||
borderWidth: 2,
|
||||
normal: {
|
||||
color: function (colors) {
|
||||
var colorList = ['#008B45', '#00CD66', '#00EE76', '#00FF7F', '#FF6A6A'];
|
||||
return colorList[colors.dataIndex];
|
||||
}
|
||||
},
|
||||
},
|
||||
label: {
|
||||
show: true,
|
||||
fontSize:14,
|
||||
overflow: 'truncate'
|
||||
},
|
||||
// label: {
|
||||
// show: false,
|
||||
// position: 'center'
|
||||
// },
|
||||
emphasis: {
|
||||
label: {
|
||||
show: true,
|
||||
|
|
Loading…
Reference in New Issue