From 3b0e2b86c1d78e197e3948419ee3a9a18dcdbca5 Mon Sep 17 00:00:00 2001 From: junjun Date: Fri, 22 Apr 2022 10:20:10 +0800 Subject: [PATCH] =?UTF-8?q?refactor:=20=E4=BB=AA=E8=A1=A8=E7=9B=98?= =?UTF-8?q?=E9=98=88=E5=80=BC=E8=8C=83=E5=9B=B4=E6=A0=A1=E9=AA=8C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- frontend/src/lang/en.js | 3 ++- frontend/src/lang/tw.js | 3 ++- frontend/src/lang/zh.js | 3 ++- .../src/views/chart/components/senior/Threshold.vue | 10 ++++++++++ 4 files changed, 16 insertions(+), 3 deletions(-) diff --git a/frontend/src/lang/en.js b/frontend/src/lang/en.js index 2ab6ac7ebf..6c0b6871c8 100644 --- a/frontend/src/lang/en.js +++ b/frontend/src/lang/en.js @@ -1088,7 +1088,8 @@ export default { unit_ten_thousand: 'Ten Thousand', unit_million: 'Million', unit_hundred_million: 'Hundred Million', - formatter_decimal_count_error: 'Range 0-10' + formatter_decimal_count_error: 'Range 0-10', + gauge_threshold_compare_error: 'Range must added' }, dataset: { sheet_warn: 'There are multiple sheet pages, and the first one is extracted by default', diff --git a/frontend/src/lang/tw.js b/frontend/src/lang/tw.js index ba96d54137..05e0b65709 100644 --- a/frontend/src/lang/tw.js +++ b/frontend/src/lang/tw.js @@ -1088,7 +1088,8 @@ export default { unit_ten_thousand: '萬', unit_million: '百萬', unit_hundred_million: '億', - formatter_decimal_count_error: '請輸入0-10的整數' + formatter_decimal_count_error: '請輸入0-10的整數', + gauge_threshold_compare_error: '阈值範圍需逐級遞增' }, dataset: { sheet_warn: '有多個 Sheet 頁,默認抽取第一個', diff --git a/frontend/src/lang/zh.js b/frontend/src/lang/zh.js index dccbecd8b7..31a07e9645 100644 --- a/frontend/src/lang/zh.js +++ b/frontend/src/lang/zh.js @@ -1091,7 +1091,8 @@ export default { unit_ten_thousand: '万', unit_million: '百万', unit_hundred_million: '亿', - formatter_decimal_count_error: '请输入0-10的整数' + formatter_decimal_count_error: '请输入0-10的整数', + gauge_threshold_compare_error: '阈值范围需逐级递增' }, dataset: { sheet_warn: '有多个 Sheet 页,默认抽取第一个', diff --git a/frontend/src/views/chart/components/senior/Threshold.vue b/frontend/src/views/chart/components/senior/Threshold.vue index e970c5349f..6b433b70fe 100644 --- a/frontend/src/views/chart/components/senior/Threshold.vue +++ b/frontend/src/views/chart/components/senior/Threshold.vue @@ -137,6 +137,16 @@ export default { }) return } + if (i > 0) { + if (parseFloat(ele) <= parseFloat(arr[i - 1])) { + this.$message({ + message: this.$t('chart.gauge_threshold_compare_error'), + type: 'error', + showClose: true + }) + return + } + } } } this.changeThreshold()