diff --git a/src/utils/baseUrl.js b/src/utils/baseUrl.js
index 2e575c51e..72be3b2f1 100644
--- a/src/utils/baseUrl.js
+++ b/src/utils/baseUrl.js
@@ -3,8 +3,8 @@ export function getBaseUrl() {
let BASE_API;
if (process.env.NODE_ENV === 'development') {
// BASE_API = 'https://joylink.club/jlcloud';
- BASE_API = 'https://test.joylink.club/jlcloud';
- // BASE_API = 'http://192.168.3.5:9000'; // 袁琪
+ // BASE_API = 'https://test.joylink.club/jlcloud';
+ BASE_API = 'http://192.168.3.5:9000'; // 袁琪
// BASE_API = 'http://192.168.3.6:9000'; // 旭强
// BASE_API = 'http://192.168.3.4:9000' // 琰培
} else {
diff --git a/src/views/dashboard/echarts/permission.vue b/src/views/dashboard/echarts/permission.vue
index ab9608a7a..108f08584 100644
--- a/src/views/dashboard/echarts/permission.vue
+++ b/src/views/dashboard/echarts/permission.vue
@@ -45,20 +45,19 @@ export default {
left: 10,
containLabel: true
}],
- xAxis: [{
- type: 'value'
- }],
- yAxis: [{
+ xAxis: {
+ type: 'value',
+ show: false
+ },
+ yAxis: {
type: 'category',
- data: [],
+ show: false,
axisLabel: {
interval: 0,
rotate: 30
},
- splitLine: {
- show: false
- }
- }],
+ data: []
+ },
series: [{
type: 'bar',
stack: 'chart',
@@ -69,6 +68,7 @@ export default {
position: 'right'
}
},
+ barWidth: 30,
tooltip: {
formatter: params => { return `${params.marker} ${params.name}: ${params.value}个`; }
},
@@ -83,7 +83,7 @@ export default {
data: []
}]
},
- mapName: '',
+ mapName: null,
mapNameList: [],
permissionList: [],
chart: null
@@ -110,32 +110,41 @@ export default {
methods: {
initChart() {
listUserPermision({pageSize: 9000, pageNum: 1}).then(resp => {
- this.permissionList = resp.data.list;
- this.mapNameList = [...new Set(this.permissionList.map(elem => { return elem.mapName; }))];
+ this.permissionList = resp.data.list.filter(elem => { return parseInt(elem.status) > 0; });
+ this.mapNameList = [...new Set(this.permissionList.map(elem => { return elem.mapName; })), ''];
this.$nextTick(() => { this.mapName = this.mapNameList[0] || ''; });
});
this.chart = echarts.init(document.getElementById(this.id));
this.chart.setOption(this.option);
},
async loadExamData(mapName) {
- var data = {};
- var list = this.permissionList.filter(elem => { return elem.mapName == mapName; });
- list.forEach(elem => {
- if (!data[elem.mapProductName]) {
- data[elem.mapProductName] = elem.remains;
- } else {
- data[elem.mapProductName] += elem.remains;
- }
- });
-
- const keys = Object.keys(data);
- const values = Object.values(data);
- const sum = values.reduce((total, num) => total + num);
this.option.title.text = '所属用户剩余权限分布图';
- 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]}; });
+ if (mapName) {
+ var data = {};
+ var list = this.permissionList.filter(elem => { return elem.mapName == mapName; });
+ list.forEach(elem => {
+ if (!data[elem.mapProductName]) {
+ data[elem.mapProductName] = elem.remains;
+ } else {
+ data[elem.mapProductName] += elem.remains;
+ }
+ });
+
+ 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.subtext = `权限总计${sum}个`;
+ this.option.xAxis.show = true;
+ this.option.yAxis.show = true;
+ this.option.yAxis.data = keys;
+ this.option.series[0].data = values;
+ this.option.series[1].data = keys.map(name => { return {name, value: data[name]}; });
+ } else {
+ this.option.xAxis.show = false;
+ this.option.yAxis.show = false;
+ this.option.title.subtext = `暂无数据`;
+ }
+
this.chart.setOption(this.option);
}
}
diff --git a/src/views/jointTraining/menuDraft/chooseRole.vue b/src/views/jointTraining/menuDraft/chooseRole.vue
index 426cf67e6..de40d3eed 100644
--- a/src/views/jointTraining/menuDraft/chooseRole.vue
+++ b/src/views/jointTraining/menuDraft/chooseRole.vue
@@ -1,63 +1,69 @@
-
-
- 暂无数据
-
-
+
+ 暂无数据
+
+