保留2位小数

lijinlong^2
laozt 2 years ago
parent fb31d57f57
commit 1891d9b951

@ -12,8 +12,8 @@ VUE_APP_TITLE = 苏州应急执法计划管理系统
ENV = 'development' ENV = 'development'
# 苏州应急执法计划管理系统/开发环境 # 苏州应急执法计划管理系统/开发环境
# VUE_APP_BASE_API = 'http://localhost:9028' VUE_APP_BASE_API = 'http://39.101.188.84:9033'
VUE_APP_BASE_API = '/api' # VUE_APP_BASE_API = '/api'
# 路由懒加载 # 路由懒加载

@ -111,16 +111,14 @@ export default {
type: "warning", type: "warning",
}) })
.then(() => { .then(() => {
// this.$store.dispatch("LogOut").then(() => { this.$store.dispatch("LogOut").then(() => {
// location.href = location.href =
// process.env.NODE_ENV === "production" // process.env.NODE_ENV === "production"
// ? "/demo/suzhouyingjiPC/" // ? "/demo/suzhouyingjiPC/"
// : "/"; // : "/";
// });
location.href = location.href =
process.env.NODE_ENV === "production" process.env.NODE_ENV === "production" ? "./" : "/";
? "./"
: "/";
}); });
}) })
.catch(() => {}); .catch(() => {});

@ -1,4 +1,4 @@
<template > <template>
<div style="height: 100%; height: 100%" v-loading="loadS"> <div style="height: 100%; height: 100%" v-loading="loadS">
<div id="cakeBox"></div> <div id="cakeBox"></div>
</div> </div>
@ -36,7 +36,7 @@ export default {
} else { } else {
this.arr2.push({ this.arr2.push({
value: value1.plannedEnterpriseCount, value: value1.plannedEnterpriseCount,
name: value1.institutionName , name: value1.institutionName,
pt: value1.pt == "NaN" ? 0 : value1.pt.toFixed(2), pt: value1.pt == "NaN" ? 0 : value1.pt.toFixed(2),
}); });
} }
@ -139,9 +139,9 @@ export default {
position: "center", position: "center",
formatter: function (params) { formatter: function (params) {
console.log(params); console.log(params);
return `{a|${Number(params.data.pt) * 100}%}\n{b|${ return `{a|${(Number(params.data.pt) * 100).toFixed(
params.data.name 2
}完成率}`; )}%}\n{b|${params.data.name}完成率}`;
}, },
rich: { rich: {
a: { a: {
@ -209,4 +209,4 @@ export default {
height: 100%; height: 100%;
width: 100%; width: 100%;
} }
</style> </style>

Loading…
Cancel
Save