From cee451914a9a4a009c6ca4add4fffc1e1ef3471d Mon Sep 17 00:00:00 2001 From: dmy Date: Tue, 3 Mar 2026 15:20:31 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E6=B7=BB=E5=8A=A0=E9=9B=B7=E7=94=B5?= =?UTF-8?q?=E6=B5=81=E6=A6=82=E7=8E=87=E5=AF=86=E5=BA=A6=E7=B3=BB=E6=95=B0?= =?UTF-8?q?=E9=AA=8C=E8=AF=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- webui/src/components/ParameterForm.vue | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/webui/src/components/ParameterForm.vue b/webui/src/components/ParameterForm.vue index 8d9d466..2294376 100644 --- a/webui/src/components/ParameterForm.vue +++ b/webui/src/components/ParameterForm.vue @@ -512,6 +512,17 @@ const removeGcX = () => { // 计算函数 const calculate = async () => { + // 验证雷电流概率密度系数 + if (showIpCoefficients.value) { + const ipA = Number(params.advance.Ip_a) + const ipB = Number(params.advance.Ip_b) + if (ipA < 0 && ipB < 0) { + error.value = '请检查参数:"雷电流概率密度曲线系数 a"和"雷电流概率密度曲线系数 b"的值应该大于 0' + logRef.value?.addLog('error', '请检查参数:"雷电流概率密度曲线系数 a"和"雷电流概率密度曲线系数 b"的值应该大于 0') + return + } + } + calculating.value = true result.value = null error.value = null