From 5f4b647bedd951c3d74604061dba41a167b88af2 Mon Sep 17 00:00:00 2001 From: sjl <1716605279@qq.com> Date: Thu, 23 Oct 2025 09:48:47 +0800 Subject: [PATCH] =?UTF-8?q?=E5=BE=AE=E8=B0=83?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../machine/device/components/monitorPopup.vue | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/frontend/src/views/machine/device/components/monitorPopup.vue b/frontend/src/views/machine/device/components/monitorPopup.vue index fa0ffd1..64722a2 100644 --- a/frontend/src/views/machine/device/components/monitorPopup.vue +++ b/frontend/src/views/machine/device/components/monitorPopup.vue @@ -356,7 +356,6 @@ const sendParameter = () => { // 打开弹窗,可能是新增,也可能是编辑 const open = async (sign: string, data: Monitor.ResPqMon, device: Device.ResPqDev, table: any[], options: any) => { - selectOptions.value = options titleType.value = sign dialogVisible.value = true @@ -378,7 +377,6 @@ const open = async (sign: string, data: Monitor.ResPqMon, device: Device.ResPqDe name: id.toString() } }).filter(item => !usedNums.has(item.id)) // 过滤掉已被使用的线路号 - if (sign == 'edit') { formContent.value = { ...data } originalNum.value = data.num // 记录原始线路号 @@ -397,18 +395,18 @@ const open = async (sign: string, data: Monitor.ResPqMon, device: Device.ResPqDe ctSecondary.value = secondary } } else { - // 重置表单 dialogFormRef.value?.resetFields() // 清空PT和CT的临时变量 - ptPrimary.value = '' - ptSecondary.value = '' - ctPrimary.value = '' - ctSecondary.value = '' - // 重置表单内容,但保留devId + ptPrimary.value = '' + ptSecondary.value = '' + ctPrimary.value = '' + ctSecondary.value = '' + // 重置表单内容,但保留devId const devId = formContent.value.devId resetFormContent() formContent.value.devId = devId originalNum.value = null + // 设置默认选中第一个线路号 if (lineNum.value.length > 0) {