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