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 ` +

${ + params[0].axisValue + } ${goodRate}%

+ + `; + }, }, legend: { itemWidth: 12, @@ -110,17 +134,17 @@ export default { stack: 's', data: opt.map((item) => item[2]), }, - { - name: '加工数量', - type: 'bar', - barWidth: 20, - data: opt.map((item) => item[3]), - }, - { - name: '合格率', - type: 'line', - data: opt.map((item) => item[4]), - }, + // { + // name: '加工数量', + // type: 'bar', + // barWidth: 20, + // data: opt.map((item) => item[3]), + // }, + // { + // name: '合格率', + // type: 'line', + // data: opt.map((item) => item[4]), + // }, ], }; }, diff --git a/src/views/equipment/analysis/quality/index.vue b/src/views/equipment/analysis/quality/index.vue index bec2ed0a..4c1d6d6c 100644 --- a/src/views/equipment/analysis/quality/index.vue +++ b/src/views/equipment/analysis/quality/index.vue @@ -31,7 +31,8 @@
各设备加工数量
- + +