From dbd6c4f7023a0811ebb33fd175fbcc4ac8bb8601 Mon Sep 17 00:00:00 2001 From: dmy Date: Mon, 2 Mar 2026 21:58:09 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E9=99=90=E5=88=B6=E5=AF=BC=E7=BA=BF?= =?UTF-8?q?=E5=92=8C=E5=9C=B0=E7=BA=BF=E5=9D=90=E6=A0=87=E6=95=B0=E7=BB=84?= =?UTF-8?q?=E7=9A=84=E6=9C=80=E5=A4=A7=E9=95=BF=E5=BA=A6=E5=B9=B6=E6=9B=B4?= =?UTF-8?q?=E6=96=B0=E6=A0=87=E7=AD=BE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 限制导线和地线坐标数组的最大长度为4(1地线+3导线),更新相关按钮的禁用逻辑 更新坐标输入框的标签文本 --- webui/src/components/ParameterForm.vue | 30 +++++++++++++++----------- 1 file changed, 17 insertions(+), 13 deletions(-) diff --git a/webui/src/components/ParameterForm.vue b/webui/src/components/ParameterForm.vue index b6796da..d46c2b0 100644 --- a/webui/src/components/ParameterForm.vue +++ b/webui/src/components/ParameterForm.vue @@ -105,7 +105,7 @@
- 导、地线挂点垂直距离 (m) - 第一个值为地线挂点高度 + 导、地线挂点垂直坐标 (m)
@@ -118,10 +118,10 @@ />
- +
- +
@@ -129,7 +129,7 @@
- 导、地线水平坐标 (m) + 导、地线挂点水平坐标 (m)
@@ -142,10 +142,10 @@ />
- +
- +
@@ -357,25 +357,29 @@ const voltageOptions = [ '±500kV', '±660kV', '±800kV', '±1100kV' ] -// 数组操作函数 +// 数组操作函数(最多3条导线,即数组最多4个元素:1地线+3导线) const addHArm = () => { - const last = params.parameter.h_arm[params.parameter.h_arm.length - 1] || 100 - params.parameter.h_arm.push(last - 20) + if (params.parameter.h_arm.length < 4) { + const last = params.parameter.h_arm[params.parameter.h_arm.length - 1] || 100 + params.parameter.h_arm.push(last - 20) + } } const removeHArm = () => { - if (params.parameter.h_arm.length > 1) { + if (params.parameter.h_arm.length > 2) { params.parameter.h_arm.pop() } } const addGcX = () => { - const last = params.parameter.gc_x[params.parameter.gc_x.length - 1] || 10 - params.parameter.gc_x.push(last) + if (params.parameter.gc_x.length < 4) { + const last = params.parameter.gc_x[params.parameter.gc_x.length - 1] || 10 + params.parameter.gc_x.push(last) + } } const removeGcX = () => { - if (params.parameter.gc_x.length > 1) { + if (params.parameter.gc_x.length > 2) { params.parameter.gc_x.pop() } }