zhangtao
laozt 1 year ago
parent 3795d3e8cd
commit c7841e2765

@ -39,8 +39,8 @@ export default {
this.arr1 = []; this.arr1 = [];
this.arr2 = []; this.arr2 = [];
this.newTable.forEach((value) => { this.newTable.forEach((value) => {
this.arr1.push(value.institutionName); this.arr1.push(value.lawAreas);
this.arr2.push(value.checkEnterpriseCount); this.arr2.push(value.count);
}); });
this.arr1.reverse(); this.arr1.reverse();
this.arr2.reverse(); this.arr2.reverse();

@ -36,14 +36,15 @@ export default {
getData() { getData() {
this.arr1 = []; this.arr1 = [];
this.arr2 = []; this.arr2 = [];
console.log( this.newTable);
this.newTable.forEach((value) => { this.newTable.forEach((value) => {
if (value.institutionName == "苏州市") { // if (value.institutionName == "") {
this.arr1.unshift(value.institutionName); // this.arr1.unshift(value.institutionName);
this.arr2.unshift(value.plannedEnterpriseCount); // this.arr2.unshift(value.plannedEnterpriseCount);
} else { // } else {
this.arr1.push(value.institutionName); this.arr1.push(value.lawAreas);
this.arr2.push(value.plannedEnterpriseCount); this.arr2.push(value.count);
} // }
}); });
this.init(); this.init();
}, },

@ -40,19 +40,19 @@ export default {
this.arr1 = []; this.arr1 = [];
this.arr2 = []; this.arr2 = [];
this.newTable.forEach((value1) => { this.newTable.forEach((value1) => {
if (value1.institutionName != "苏州市") { // if (value1.institutionName != "") {
this.arr1.push({ // this.arr1.push({
value: value1.checkEnterpriseCount, // value: value1.checkEnterpriseCount,
name: value1.institutionName, // name: value1.institutionName,
pt: value1.pt, // pt: value1.pt,
}); // });
} else { // } else {
this.arr2.push({ this.arr2.push({
value: value1.plannedEnterpriseCount, value: value1.count,
name: value1.institutionName, name: value1.lawAreas,
pt: value1.pt == "NaN" ? 0 : value1.pt.toFixed(2), pt: value1.completionRate == "NaN" ? 0 : value1.completionRate.toFixed(2),
}); });
} // }
}); });
this.initChart(); this.initChart();
}, },

@ -337,6 +337,7 @@ export default {
treeEnterprise(this.queryParams).then((response) => { treeEnterprise(this.queryParams).then((response) => {
// console.log(response); // console.log(response);
this.tableData = response.data; this.tableData = response.data;
this.newTable = response.data
}); });
}, },
// //

Loading…
Cancel
Save