From dfdf952425b3d942472a4278c4a4179c5516369c Mon Sep 17 00:00:00 2001 From: dmy Date: Tue, 3 Mar 2026 15:16:33 +0800 Subject: [PATCH] =?UTF-8?q?feat:=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?=E8=AE=BE=E7=BD=AE=E5=BC=80=E5=85=B3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 在参数表单中添加开关控件,用于显示/隐藏雷电流概率密度系数输入项,并在关闭时自动重置为标准参数 --- webui/src/components/ParameterForm.vue | 24 +++++++++++++++++++++++- 1 file changed, 23 insertions(+), 1 deletion(-) diff --git a/webui/src/components/ParameterForm.vue b/webui/src/components/ParameterForm.vue index 8a9dadb..8d9d466 100644 --- a/webui/src/components/ParameterForm.vue +++ b/webui/src/components/ParameterForm.vue @@ -199,7 +199,15 @@ -
+ +
+ +
+
(null) const logRef = ref | null>(null) const fileInput = ref(null) +// 雷电流概率密度系数设置开关 +const showIpCoefficients = ref(false) const voltageOptions = [ '110kV', '220kV', '330kV', '500kV', '750kV','1000kV', @@ -410,6 +420,18 @@ watch( { immediate: true } ) +// 监听雷电流概率密度系数开关 +watch( + showIpCoefficients, + (show) => { + if (!show) { + // 关闭时重置为 -1(使用标准参数) + params.advance.Ip_a = -1 + params.advance.Ip_b = -1 + } + } +) + // 雷暴日与地闪密度相互转换,公式:ng = 0.023 * td^3 // 标志位避免循环更新 let isUpdatingFromWatch = false