From 483f7ac12bfdd861c90119ddfb77451cb418af22 Mon Sep 17 00:00:00 2001
From: ival <610568032@qq.com>
Date: Fri, 16 Aug 2019 16:55:16 +0800
Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E4=B8=BB=E9=A1=B5=E7=95=8C?=
=?UTF-8?q?=E9=9D=A2?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/views/dashboard/echarts/permission.vue | 11 ++++++++---
1 file changed, 8 insertions(+), 3 deletions(-)
diff --git a/src/views/dashboard/echarts/permission.vue b/src/views/dashboard/echarts/permission.vue
index 6205fa426..2c1ef5620 100644
--- a/src/views/dashboard/echarts/permission.vue
+++ b/src/views/dashboard/echarts/permission.vue
@@ -2,7 +2,7 @@
-
+
@@ -32,6 +32,9 @@ export default {
title: {
text: '',
subtext: '',
+ subtextStyle: {
+ color: '#909399'
+ },
y: 10,
left: 'center',
textAlign: 'center'
@@ -112,6 +115,7 @@ export default {
initChart() {
listUserPermision({pageSize: 9000, pageNum: 1}).then(resp => {
this.permissionList = resp.data.list.filter(elem => { return parseInt(elem.status) > 0; });
+ this.permissionList = [];
this.mapNameList = [...new Set(this.permissionList.map(elem => { return elem.mapName; })), ''];
this.$nextTick(() => { this.mapName = this.mapNameList[0] || ''; });
});
@@ -119,7 +123,6 @@ export default {
this.chart.setOption(this.option);
},
async loadExamData(mapName) {
- this.option.title.text = '所属用户剩余权限分布图';
if (mapName) {
var data = {};
var list = this.permissionList.filter(elem => { return elem.mapName == mapName; });
@@ -134,6 +137,7 @@ export default {
const keys = Object.keys(data);
const values = Object.values(data);
const sum = keys.length > 0? values.reduce((total, num) => total + num) : 0;
+ this.option.title.text = `剩余权限分布图(${mapName})`;
this.option.title.subtext = `权限总计${sum}个`;
this.option.xAxis.show = true;
this.option.yAxis.show = true;
@@ -143,7 +147,8 @@ export default {
} else {
this.option.xAxis.show = false;
this.option.yAxis.show = false;
- this.option.title.subtext = `暂无数据`;
+ this.option.title.text = `剩余权限分布图(暂无地图线路数据)`;
+ this.option.title.subtext = `权限总计0个`;
}
this.chart.setOption(this.option);