更新页面
This commit is contained in:
@@ -307,7 +307,7 @@ export default {
|
||||
that.showData = JSON.parse(JSON.stringify(that.showData).replace(/count/g,"count"))
|
||||
if(index == false){
|
||||
this.getRendererLiscense();
|
||||
}else{
|
||||
}if(index == true){
|
||||
this.$refs.totalContent.style.display = 'none';
|
||||
this.getPie();
|
||||
}
|
||||
@@ -315,13 +315,8 @@ export default {
|
||||
// 饼图:
|
||||
getPie(){
|
||||
var that = this;
|
||||
// let name = [];
|
||||
// let value = [];
|
||||
// for(let i=0;i < that.showData.length;i++){
|
||||
// name.push(that.showData[i]['license']);
|
||||
// value.push(that.showData[i]['count']);
|
||||
// }
|
||||
|
||||
that.licensesNum = JSON.parse(JSON.stringify(that.showData).replace(/license/g,"name"));
|
||||
that.licensesNum = JSON.parse(JSON.stringify(that.showData).replace(/count/g,"value"))
|
||||
that.MyOption = {
|
||||
tooltip: {
|
||||
trigger: 'item', //item数据项图形触发,主要在散点图,饼图等无类目轴的图表中使用。
|
||||
@@ -333,7 +328,7 @@ export default {
|
||||
},
|
||||
series: [{
|
||||
type: 'pie',
|
||||
data: that.showData,
|
||||
data: that.licensesNum,
|
||||
label: {//饼图文字的显示
|
||||
show: true, //默认 显示文字
|
||||
formatter: function (arg) {
|
||||
@@ -365,7 +360,7 @@ export default {
|
||||
let name = [];
|
||||
let value = [];
|
||||
for(let i=0;i < that.showData.length;i++){
|
||||
name.push(that.showData[i]['license']);
|
||||
name.push(that.showData[i]['name']);
|
||||
value.push(that.showData[i]['count']);
|
||||
}
|
||||
that.MyOption = {
|
||||
|
Reference in New Issue
Block a user