修改主页参数

This commit is contained in:
ival 2019-08-16 14:40:42 +08:00
parent aae4d4d162
commit 5612c9b1e4

View File

@ -2,7 +2,7 @@
<div>
<div :id="id" :style="{height: size.height+'px', width: size.width+'px'}" />
<div class="lesson-select">
<el-select v-model="mapName" placeholder="请选择课程">
<el-select v-model="mapName" placeholder="请选择课程" size="mini" style="width: 300px">
<el-option v-for="name in mapNameList" :key="name" :label="name" :value="name" />
</el-select>
</div>
@ -32,7 +32,7 @@ export default {
title: {
text: '',
subtext: '',
y: 20,
y: 10,
left: 'center',
textAlign: 'center'
},
@ -132,7 +132,7 @@ export default {
const values = Object.values(data);
const sum = values.reduce((total, num) => total + num);
this.option.title.text = '所属用户剩余权限分布图';
this.option.title.subtext = `总计${sum}`;
this.option.title.subtext = `权限总计${sum}`;
this.option.yAxis[0].data = keys;
this.option.series[0].data = values;
this.option.series[1].data = keys.map(name => { return {name, value: data[name]}; });
@ -145,7 +145,7 @@ export default {
.lesson-select {
position: absolute;
display: flex;
top: 40px;
right: 40px;
top: 30px;
right: 30px;
}
</style>