| | |
| | | }, |
| | | 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; |
| | |
| | | } |
| | | }); |
| | | } 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) => { |