首页统计和跳转

zhangtao
laozt 1 year ago
parent 1f847b4990
commit 2ccd8faad4

@ -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: {

@ -108,7 +108,10 @@
</el-table-column>
<el-table-column prop="count" label="执法计划" header-align="center">
<template slot-scope="scope">
<span class="numb-hover" @click="openDialog(scope.row)"
<span v-if="scope.row.lawAreas == ''"
>{{ scope.row.count }}</span
>
<span v-else class="numb-hover" @click="openDialog(scope.row)"
>{{ scope.row.count }}</span
>
</template>
@ -128,9 +131,7 @@
header-align="center"
>
<template slot-scope="scope">
{{
scope.row.completionRate
}}%
{{ scope.row.completionRate }}%
</template>
</el-table-column>
</el-table>
@ -177,7 +178,10 @@
</el-table-column>
<el-table-column prop="count" label="执法计划" header-align="center">
<template slot-scope="scope">
<span class="numb-hover" @click="routerLink(scope.row)"
<span v-if="scope.row.lawAreas == ''"
>{{ scope.row.count }}</span
>
<span v-else class="numb-hover" @click="routerLink(scope.row)"
>{{ scope.row.count }}</span
>
</template>
@ -197,9 +201,7 @@
header-align="center"
>
<template slot-scope="scope">
{{
scope.row.completionRate
}}%
{{ scope.row.completionRate }}%
</template>
</el-table-column>
</el-table>
@ -349,8 +351,8 @@ export default {
this.tableInfoData = response.data;
});
},
routerLink(){
routerLink(row) {
this.$router.push(`/planManage?lawHierarchy=${row.lawAreas}`)
},
active(e) {
this.activeIndex = e;

Loading…
Cancel
Save