From 050a9571c431d9489d7072a3b2dad5cc9d161084 Mon Sep 17 00:00:00 2001 From: jingna <1264204245@qq.com> Date: Fri, 12 Jun 2026 15:10:02 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- frontend/src/components/NumericKeyboard.vue | 13 +- frontend/src/components/passwordValie.vue | 232 ++++++++++++++++++ frontend/src/views/aiAlarmSetting/index.vue | 49 ++-- frontend/src/views/aiChannelSetting/index.vue | 114 ++++----- frontend/src/views/aoChannelSetting/index.vue | 59 ++--- .../src/views/communicationSetting/index.vue | 90 ++++--- frontend/src/views/lineSetting/index.vue | 49 ++-- 7 files changed, 399 insertions(+), 207 deletions(-) create mode 100644 frontend/src/components/passwordValie.vue diff --git a/frontend/src/components/NumericKeyboard.vue b/frontend/src/components/NumericKeyboard.vue index a3f7293..89136a4 100644 --- a/frontend/src/components/NumericKeyboard.vue +++ b/frontend/src/components/NumericKeyboard.vue @@ -24,19 +24,8 @@ const keys = ['1', '2', '3', '4', '5', '6', '7', '8', '9', '.', '0', 'del'] const handleKeyPress = (key: string) => { if (key === 'del') { displayValue.value = displayValue.value.slice(0, -1) - } else if (key === '.') { - const parts = displayValue.value.split('.') - // 最多3个点(4段),且前一段不能为空且不能超过255 - if (parts.length < 4 && parts[parts.length - 1] !== '' && parseInt(parts[parts.length - 1]) <= 255) { - displayValue.value += key - } } else { - const parts = displayValue.value.split('.') - const currentPart = parts[parts.length - 1] - // 每段最多3位,且值不能超过255 - if (currentPart.length < 3 && parseInt(currentPart + key) <= 255) { - displayValue.value += key - } + displayValue.value += key } } diff --git a/frontend/src/components/passwordValie.vue b/frontend/src/components/passwordValie.vue new file mode 100644 index 0000000..30bcef8 --- /dev/null +++ b/frontend/src/components/passwordValie.vue @@ -0,0 +1,232 @@ + + + + + + + \ No newline at end of file diff --git a/frontend/src/views/aiAlarmSetting/index.vue b/frontend/src/views/aiAlarmSetting/index.vue index 1751471..f09aad3 100644 --- a/frontend/src/views/aiAlarmSetting/index.vue +++ b/frontend/src/views/aiAlarmSetting/index.vue @@ -1,7 +1,8 @@ @@ -433,6 +425,7 @@ const handleSave = () => { +