diff --git a/src/views/equipment/analysis/exception/index.vue b/src/views/equipment/analysis/exception/index.vue index a7afb2df..c3d38562 100644 --- a/src/views/equipment/analysis/exception/index.vue +++ b/src/views/equipment/analysis/exception/index.vue @@ -155,7 +155,7 @@ export default { async getList() { this.loading = true; // 执行查询 - const { data } = await this.$axios({ + const { code, data } = await this.$axios({ url: '/analysis/equipment-analysis/efficiency', method: 'get', params: { @@ -163,6 +163,11 @@ export default { recordTime: this.queryParams.recordTime || null, }, }); + if (code === 0) { + this.list = data; + } else { + this.list.splice(0); + } }, handleSearchBarBtnClick(btn) { diff --git a/src/views/equipment/analysis/quality/components/lineChart.vue b/src/views/equipment/analysis/quality/components/lineChart.vue index 025af935..60107a51 100644 --- a/src/views/equipment/analysis/quality/components/lineChart.vue +++ b/src/views/equipment/analysis/quality/components/lineChart.vue @@ -43,7 +43,7 @@ export default { eq.okQuantity, eq.nokQuantity, eq.totalQuantity, - eq.passRate.toFixed(2), + eq.passRate.toFixed(4), ]); }); return { @@ -53,6 +53,30 @@ export default { axisPointer: { type: 'shadow', }, + formatter: (params) => { + const name = params[0].name; + const goodRate = opt.find((item) => item[0] == name)[4]; + return ` +