From d15931a5bff8c762e34e0408b5a4c0040edc42b3 Mon Sep 17 00:00:00 2001 From: zhangyu Date: Sat, 27 Nov 2021 10:40:47 +0800 Subject: [PATCH] =?UTF-8?q?NEZ-1364=20fix=EF=BC=9A=20Chart=20=E7=82=B9?= =?UTF-8?q?=E5=87=BB=E9=80=89=E6=8B=A9=200=20=E5=80=BC=E6=9B=B2=E7=BA=BF?= =?UTF-8?q?=EF=BC=8C=E5=88=87=E6=8D=A2=E5=85=B6=E4=BB=96=E6=9B=B2=E7=BA=BF?= =?UTF-8?q?=EF=BC=8C=E5=8F=91=E7=8E=B0=E6=97=A0=E6=B3=95=E6=98=BE=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../components/charts/line-chart-block.vue | 28 +++++++++++++------ .../components/page/alert/alertMessage.vue | 2 +- 2 files changed, 20 insertions(+), 10 deletions(-) diff --git a/nezha-fronted/src/components/charts/line-chart-block.vue b/nezha-fronted/src/components/charts/line-chart-block.vue index 23a131d4e..5ebe40687 100644 --- a/nezha-fronted/src/components/charts/line-chart-block.vue +++ b/nezha-fronted/src/components/charts/line-chart-block.vue @@ -445,6 +445,8 @@ export default { if (!maxValueCopies.copies) { option.yAxis.min = 0 option.yAxis.max = 1 + } else { + option.yAxis.max = undefined } if (unit.type == 'Time' || option.yAxis.maxInterval === 1) { delete option.yAxis.maxInterval @@ -559,6 +561,8 @@ export default { if (!maxValueCopies.copies) { option.yAxis.min = 0 option.yAxis.max = 1 + } else { + option.yAxis.max = undefined } if (unit.type == 'Time' || option.yAxis.maxInterval === 1) { delete option.yAxis.maxInterval @@ -1000,9 +1004,11 @@ export default { series: dataArg } if (!maxValueCopies.copies) { - option.yAxis.min = 0 - option.yAxis.max = 1 - } + option.yAxis.min = 0 + option.yAxis.max = 1 + } else { + option.yAxis.max = undefined + } if (unit.type == 'Time') { delete option.yAxis.maxInterval } @@ -1912,9 +1918,11 @@ export default { } } if (!maxValueCopies.copies) { - option.yAxis.min = 0 - option.yAxis.max = 1 - } + option.yAxis.min = 0 + option.yAxis.max = 1 + } else { + option.yAxis.max = undefined + } if (unit.type == 'Time' || option.yAxis.maxInterval === 1) { delete option.yAxis.maxInterval } @@ -1957,9 +1965,11 @@ export default { } } if (!maxValueCopies.copies) { - option.yAxis.min = 0 - option.yAxis.max = 1 - } + option.yAxis.min = 0 + option.yAxis.max = 1 + } else { + option.yAxis.max = undefined + } if (unit.type == 'Time' || option.yAxis.maxInterval === 1) { delete option.yAxis.maxInterval } diff --git a/nezha-fronted/src/components/page/alert/alertMessage.vue b/nezha-fronted/src/components/page/alert/alertMessage.vue index ae7af9a8f..6ec821419 100644 --- a/nezha-fronted/src/components/page/alert/alertMessage.vue +++ b/nezha-fronted/src/components/page/alert/alertMessage.vue @@ -191,7 +191,7 @@ export default { dialogText: '', url: 'alert/message', // 导出相关 - importBox: { show: false, title: this.$t('overall.importExcel'), type: 1, record: 'all', format: 1 }, + importBox: { show: false, title: this.$t('overall.exportExcel'), type: 1, record: 'all', format: 1 }, deleteBox: { show: false, ids: '', remark: '', state: 2 }, // 详情相关 graphShow: false,