提交 73814a85 编写于 作者: guangjun.yang's avatar guangjun.yang

所有%号前保留一位小数

上级 89be27a4
......@@ -40,13 +40,13 @@ export default {
series1Data = [];
yAxisData = newVal.map(item => {
return this.shortName(item.classifyName);
// return (item.classifyName || 0).toFixed(0) * 100 + '%'
// return (item.classifyName || 0).toFixed(1) * 100 + '%'
});
series0Data = this.dataList.map(item => {
return ((item.beforeRate || 0) * 100).toFixed(0);
return ((item.beforeRate || 0) * 100).toFixed(1);
});
series1Data = this.dataList.map(item => {
return ((item.afterRate || 0) * 100).toFixed(0);
return ((item.afterRate || 0) * 100).toFixed(1);
});
this.drawColumn(
yAxisData.splice(0, 5),
......@@ -64,7 +64,7 @@ export default {
window.outerWidth ||
document.body.clientWidth ||
document.documentElement.clientWidth;
this.chartWidth = (clientWidth * 0.9).toFixed(0) + "px";
this.chartWidth = (clientWidth * 0.9).toFixed(1) + "px";
}
},
......
......@@ -144,7 +144,7 @@ export default {
window.outerWidth ||
document.body.clientWidth ||
document.documentElement.clientWidth;
this.chartWidth = (clientWidth * 0.9).toFixed(0) + 'px';
this.chartWidth = (clientWidth * 0.9).toFixed(1) + 'px';
console.log(clientWidth);
// if (clientWidth <= 320) {
// this.chartWidth = "260px";
......@@ -155,7 +155,7 @@ export default {
// } else if (clientWidth <= 414) {
// this.chartWidth = "375px";
// } else {
// this.chartWidth = (clientWidth * 0.8).toFixed(0) + 'px';
// this.chartWidth = (clientWidth * 0.8).toFixed(1) + 'px';
// }
}
},
......
......@@ -46,7 +46,7 @@ export default {
window.outerWidth ||
document.body.clientWidth ||
document.documentElement.clientWidth;
this.chartWidth = (clientWidth * 0.9).toFixed(0) + 'px';
this.chartWidth = (clientWidth * 0.9).toFixed(1) + 'px';
console.log(clientWidth);
}
},
......@@ -58,10 +58,10 @@ export default {
return this.shortName(item.classifyName)
})
series0Data = this.dataList.map( item => {
return ((item.beforeRate|| 0) * 100).toFixed(0);
return ((item.beforeRate|| 0) * 100).toFixed(1);
})
series1Data = this.dataList.map( item => {
return ((item.afterRate|| 0) * 100).toFixed(0);
return ((item.afterRate|| 0) * 100).toFixed(1);
})
this.drawColumn(yAxisData.splice(0, 5), series0Data.splice(0, 5), series1Data.splice(0, 5));
},
......
......@@ -8,7 +8,7 @@
<ul class="list">
<li v-for="(item, index) in dataList" :key="index">
<span>{{item.examName}}</span>
<span>{{(item.joinRate * 100).toFixed(0)}}%</span>
<span>{{(item.joinRate * 100).toFixed(1)}}%</span>
</li>
</ul>
</div>
......
......@@ -8,7 +8,7 @@
</ul>
<ul class="list">
<li v-for="(item, index) in dataList" :key="index">
<span>{{item.timesStr}}</span>
<span>{{item.times}}</span>
<span>{{item.count}}</span>
</li>
</ul>
......
......@@ -12,7 +12,7 @@
<span class="desc-2">{{certFlag ? '获证人数' : '完成人数'}} {{item.certCount}} | 参与人数 {{item.joinCount}}</span>
</div>
<div class="ratio">
<span class="desc-1">{{(item.certRate * 100).toFixed(0)}}%</span>
<span class="desc-1">{{(item.certRate * 100).toFixed(1)}}%</span>
<span class="desc-2">完成比例</span>
</div>
</li>
......
......@@ -506,8 +506,8 @@ export default {
await getStudyEffect(params).then(res => {
if (res.code === "000000") {
this.studyEffect = res.data;
this.effectCardList[0].count = (res.data.beforeRate * 100).toFixed(0);
this.effectCardList[1].count = (res.data.afterRate * 100).toFixed(0);
this.effectCardList[0].count = (res.data.beforeRate * 100).toFixed(1);
this.effectCardList[1].count = (res.data.afterRate * 100).toFixed(1);
}
});
},
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册