diff --git a/src/views/yingji/echarts/finishRate.vue b/src/views/yingji/echarts/finishRate.vue
index e3d60a8..a2aaa49 100644
--- a/src/views/yingji/echarts/finishRate.vue
+++ b/src/views/yingji/echarts/finishRate.vue
@@ -44,18 +44,27 @@ export default {
this.arr1.push({
value: value1.count,
name: value1.lawAreas,
- pt: value1.completionRate,
+ // pt: value1.completionRate,
+ pt: this.NumFilter(value1.completed,value1.count),
});
} else {
this.arr2.push({
value: value1.count,
name: value1.lawAreas,
- pt: value1.completionRate
+ // pt: value1.completionRate
+ pt: this.NumFilter(value1.completed,value1.count)
});
}
});
this.initChart();
},
+ NumFilter(numOne,numTwo){
+ // if(numOne == 0 || numTwo == 0) {
+ // return 0;
+ // }
+ let realVal = parseFloat((numOne / numTwo) * 100).toFixed(2)
+ return realVal;
+ },
initChart() {
var chartDom = document.getElementById("cakeBox");
var myChart = echarts.init(chartDom);
@@ -87,7 +96,7 @@ export default {
trigger: "item",
},
legend: {
- width: "45%",
+ width: "35%",
top: "25%",
right: "8%",
orient: "horizontal",
@@ -95,26 +104,26 @@ export default {
itemWidth: 10,
itemHeight: 10,
icon: "circle",
+ formatter: function (name) {
+ const item = option.legend.data.find((item) => item.name === name);
+ // return `{a|${name}}{b|${( item.value / arrA * 100)}%}`;
+ return `{a|${name}}{pt|${item.pt}%}`;
+ },
textStyle: {
rich: {
- a: {
+ 'a': {
color: "#525966",
width: 60,
- padding: [0, 0, 0, 5],
+ // padding: [0, 0, 0, 5],
},
- b: {
+ 'pt': {
color: "#495B7D",
fontWeight: "bold",
- // width: 60,
+ width: 60,
// padding: [0, 0, 0, 10],
},
},
},
- 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}%}`;
- },
//将waiyuan的数据拿过来,就会只显示该外圆的数据
// data: [
// { value: 15, name: "张家港市" },
diff --git a/src/views/yingji/home.vue b/src/views/yingji/home.vue
index 98f9b7d..817bfcc 100644
--- a/src/views/yingji/home.vue
+++ b/src/views/yingji/home.vue
@@ -130,7 +130,8 @@
header-align="center"
>
- {{ scope.row.cdCompletionRate }}%
+
+ {{ NumFilter(scope.row.cdFinish,scope.row.cdExecutionPlan) }}%
@@ -164,7 +165,8 @@
header-align="center"
>
- {{ scope.row.completionRate }}%
+
+ {{ NumFilter(scope.row.completed,scope.row.count) }}%
@@ -234,7 +236,8 @@
header-align="center"
>
- {{ scope.row.cdCompletionRate }}%
+
+ {{ NumFilter(scope.row.cdFinish,scope.row.cdExecutionPlan) }}%
@@ -265,7 +268,8 @@
header-align="center"
>
- {{ scope.row.completionRate }}%
+
+ {{ NumFilter(scope.row.completed,scope.row.count) }}%
@@ -420,6 +424,13 @@ export default {
resetPwd() {
this.isResetPwdDialog = true;
},
+ NumFilter(numOne,numTwo){
+ if(numOne == 0 || numTwo == 0) {
+ return 0;
+ }
+ let realVal = parseFloat((numOne / numTwo) * 100).toFixed(2)
+ return realVal;
+ },
// 导出
handelExport() {
this.download(
@@ -455,8 +466,10 @@ export default {
},
// 获取列表数据
getList() {
+ this.load1 = true;
treeEnterprise(this.queryParams).then((response) => {
// console.log(response);
+ this.load1 = false;
this.tableData = response.data;
this.newTable = response.data;
});