let resdata = res.data;
let newcityList = [];
resdata.map((item) => {
item.originCities.map((each, index) => {
newcityList.push({
name: this.itemChangeName(item)[index],
value: each.purchaseQuantity,
});
});
});
this.buildNewChart(newcityList);
itemChangeName(itemVal) {
let newChildCity = itemVal.originCities.map(function (each) {
var Cityname = "";
if (each.originCityName == "市辖区") {
Cityname = itemVal.originProvinceName;
} else {
Cityname = each.originCityName;
}
return Cityname;
});
return newChildCity;
},
网友评论