From 00edd369c99cdc0d9a4a168212d8b8fdf9d489a8 Mon Sep 17 00:00:00 2001
From: he wei <858544502@qq.com>
Date: 星期四, 27 三月 2025 17:25:40 +0800
Subject: [PATCH] U all 分级评价旧问题修复

---
 src/components/menuList.vue |   61 +++++++++++++++++++++++-------
 1 files changed, 47 insertions(+), 14 deletions(-)

diff --git a/src/components/menuList.vue b/src/components/menuList.vue
index 7ead894..e675198 100644
--- a/src/components/menuList.vue
+++ b/src/components/menuList.vue
@@ -1152,8 +1152,55 @@
     },
     paramsOk() {
       this.$refs.paramsForm.validate((valid, info) => {
+        const field = {
+          vol1d2LowCoeK1: this.$t("LowvoltageThreshold") + "(1.2V)",
+          vol1d2HighCoeK2: this.$t("HighvoltageThreshold") + "(1.2V)",
+          vol2LowCoeK1: this.$t("LowvoltageThreshold") + "(2V)",
+          vol2HighCoeK2: this.$t("HighvoltageThreshold") + "(2V)",
+          vol6LowCoeK1: this.$t("LowvoltageThreshold") + "(6V)",
+          vol6HighCoeK2: this.$t("HighvoltageThreshold") + "(6V)",
+          vol12LowCoeK1: this.$t("LowvoltageThreshold") + "(12V)",
+          vol12HighCoeK2: this.$t("HighvoltageThreshold") + "(12V)",
+          resGoodCoeK3: this.$t("ResistanceAlarmFactor"),
+          resBadCoeK4: this.$t("ResistanceFailFactor"),
+          chainResCoeK5: this.$t("ConnectionBarAlarmFactor"),
+          chainResChange: this.$t("ConnectionBarFailFactor"),
+        };
+
         // 鏍¢獙閫氳繃
         if (valid) {
+          let params = this.p_params;
+          // 娣诲姞閫昏緫 涓ラ噸鍛婅蹇呴』澶т簬娆¤鍛婅 (鐢靛鐩歌繑)
+          if (params.vol1d2LowCoeK1 >= params.vol1d2HighCoeK2) {
+            this.$message.error(field['vol1d2LowCoeK1'] + this.$t('MustBe')  + '< ' + field['vol1d2HighCoeK2']);
+            return false;
+          }
+
+          if (params.vol2LowCoeK1 >= params.vol2HighCoeK2) {
+            this.$message.error(field['vol2LowCoeK1'] + this.$t('MustBe')  + '< ' + field['vol2HighCoeK2']);
+            return false;
+          }
+
+          if (params.vol6LowCoeK1 >= params.vol6HighCoeK2) {
+            this.$message.error(field['vol6LowCoeK1'] + this.$t('MustBe')  + '< ' + field['vol6HighCoeK2']);
+            return false;
+          }
+
+          if (params.vol12LowCoeK1 >= params.vol12HighCoeK2) {
+            this.$message.error(field['vol12LowCoeK1'] + this.$t('MustBe')  + '< ' + field['vol12HighCoeK2']);
+            return false;
+          }
+
+          if (params.resGoodCoeK3 >= params.resBadCoeK4) {
+            this.$message.error(field['resGoodCoeK3'] + this.$t('MustBe')  + '< ' + field['resBadCoeK4']);
+            return false;
+          }
+
+          if (params.chainResCoeK5 >= params.chainResChange) {
+            this.$message.error(field['chainResCoeK5'] + this.$t('MustBe')  + '< ' + field['chainResChange']);
+            return false;
+          }
+
           // 鏇存柊鍒嗙骇鍙傛暟
           setParams(this.p_params).then((res) => {
             const { code, data } = res.data;
@@ -1167,20 +1214,6 @@
             }
           });
         } else {
-          const field = {
-            vol1d2LowCoeK1: this.$t("LowvoltageThreshold") + "(1.2V)",
-            vol1d2HighCoeK2: this.$t("HighvoltageThreshold") + "(1.2V)",
-            vol2LowCoeK1: this.$t("LowvoltageThreshold") + "(2V)",
-            vol2HighCoeK2: this.$t("HighvoltageThreshold") + "(2V)",
-            vol6LowCoeK1: this.$t("LowvoltageThreshold") + "(6V)",
-            vol6HighCoeK2: this.$t("HighvoltageThreshold") + "(6V)",
-            vol12LowCoeK1: this.$t("LowvoltageThreshold") + "(12V)",
-            vol12HighCoeK2: this.$t("HighvoltageThreshold") + "(12V)",
-            resGoodCoeK3: this.$t("ResistanceAlarmFactor"),
-            resBadCoeK4: this.$t("ResistanceFailFactor"),
-            chainResCoeK5: this.$t("ConnectionBarAlarmFactor"),
-            chainResChange: this.$t("ConnectionBarFailFactor"),
-          };
           let errStr = "";
           Object.keys(info).forEach((val) => {
             info[val].forEach((v) => {

--
Gitblit v1.9.1