|
|
|
@ -40,19 +40,19 @@ export default {
|
|
|
|
|
this.arr1 = [];
|
|
|
|
|
this.arr2 = [];
|
|
|
|
|
this.newTable.forEach((value1) => {
|
|
|
|
|
// if (value1.institutionName != "苏州市") {
|
|
|
|
|
// this.arr1.push({
|
|
|
|
|
// value: value1.checkEnterpriseCount,
|
|
|
|
|
// name: value1.institutionName,
|
|
|
|
|
// pt: value1.pt,
|
|
|
|
|
// });
|
|
|
|
|
// } else {
|
|
|
|
|
if (value1.lawAreas != "合计") {
|
|
|
|
|
this.arr1.push({
|
|
|
|
|
value: value1.count,
|
|
|
|
|
name: value1.lawAreas,
|
|
|
|
|
pt: value1.completionRate,
|
|
|
|
|
});
|
|
|
|
|
} else {
|
|
|
|
|
this.arr2.push({
|
|
|
|
|
value: value1.count,
|
|
|
|
|
name: value1.lawAreas,
|
|
|
|
|
pt: value1.completionRate
|
|
|
|
|
});
|
|
|
|
|
// }
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
this.initChart();
|
|
|
|
|
},
|
|
|
|
@ -113,7 +113,7 @@ export default {
|
|
|
|
|
formatter: function (name) {
|
|
|
|
|
const item = option.legend.data.find((item) => item.name === name);
|
|
|
|
|
// return `{a|${name}}{b|${( item.value / arrA * 100)}%}`;
|
|
|
|
|
return `{a|${name}}{b|${(item.pt * 100).toFixed(2)}%}`;
|
|
|
|
|
return `{a|${name}}{b|${item.pt}%}`;
|
|
|
|
|
},
|
|
|
|
|
//将waiyuan的数据拿过来,就会只显示该外圆的数据
|
|
|
|
|
// data: [
|
|
|
|
@ -152,10 +152,8 @@ export default {
|
|
|
|
|
normal: {
|
|
|
|
|
position: "center",
|
|
|
|
|
formatter: function (params) {
|
|
|
|
|
console.log(params);
|
|
|
|
|
return `{a|${(Number(params.data.pt) * 100).toFixed(
|
|
|
|
|
2
|
|
|
|
|
)}%}\n{b|${params.data.name}完成率}`;
|
|
|
|
|
console.log(params.data.pt,params.data.name);
|
|
|
|
|
return `{a|${params.data.pt}%}\n{b|${params.data.name}完成率}`;
|
|
|
|
|
},
|
|
|
|
|
rich: {
|
|
|
|
|
a: {
|
|
|
|
|