湖里大屏(质量管理):更改即时整改率

This commit is contained in:
Jack 2022-08-13 11:01:44 +08:00
parent 545b34bb11
commit c39af50010

View File

@ -14,7 +14,7 @@
</div> </div>
<div class="chart"> <div class="chart">
<JRingChart <JRingChart
:title="{ text: total.ratioNum, subTitle: '即时整改问题率' }" :title="{ text: total.ratioNum, subTitle: '即时整改率' }"
:color="['#557DEE', '#43D7B5']" :color="['#557DEE', '#43D7B5']"
:data="[ :data="[
{ value: 1, name: '' }, { value: 1, name: '' },
@ -43,24 +43,23 @@ export default {
totalNum: 0, totalNum: 0,
notCloseNum: 0, notCloseNum: 0,
closeNum: 0, closeNum: 0,
rectificationNum:0, rectificationNum: 0,
ratioNum:0, ratioNum: 0
}, }
} }
}, },
created(){ created() {
this.getData() this.getData()
}, },
methods:{ methods: {
// //
getData() { getData() {
let data = { let data = {
projectSn: this.projectSn projectSn: this.projectSn
} }
selectQualityStatisticsApi(data).then(res => { selectQualityStatisticsApi(data).then(res => {
this.total = res.result.total this.total = res.result.total
let ratio = this.total.totalNum ? ((this.total.closeNum / this.total.totalNum) * 100).toFixed(2) : 0 let ratio = this.total.totalNum ? ((this.total.closeNum / this.total.totalNum) * 100).toFixed(2) : 0
this.total.ratioNum = ratio + '%' this.total.ratioNum = ratio + '%'
}) })
} }