From e34fb26a4ccd730c80cd35b949699fa5b4ff6fd1 Mon Sep 17 00:00:00 2001 From: zhujiyan <17812234322@163.com> Date: Thu, 26 Sep 2024 11:20:12 +0800 Subject: [PATCH] =?UTF-8?q?=E6=96=B9=E6=A1=88=E6=B5=8B=E8=AF=95=E9=A1=B9bu?= =?UTF-8?q?g=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../device/planData/components/popup.vue | 19 +++++++++---- .../device/planData/components/schemeTree.vue | 28 ++++++++++++------- src/views/govern/device/planData/index.vue | 19 +++++++++---- 3 files changed, 45 insertions(+), 21 deletions(-) diff --git a/src/views/govern/device/planData/components/popup.vue b/src/views/govern/device/planData/components/popup.vue index 7bafb7d..d0e0f94 100644 --- a/src/views/govern/device/planData/components/popup.vue +++ b/src/views/govern/device/planData/components/popup.vue @@ -22,7 +22,6 @@ - {{ popupType }} { form.value = { itemName: '', //方案名称 describe: '' //方案描述 - //测试项数据 - // records: [ - // ] } //测试项数据 form1.value = { @@ -392,6 +388,17 @@ const popupType: any = ref(null) const planId: any = ref('') //回显方案、测试项操作 const details = (val: any) => { + console.log(val, '回显方案测试项操作66666') + if (val.records && val.records.length != 0) { + form.value = { + describe: val.describe, + itemName: val.itemName + } + } else { + form1.value = val + } + + return //修改方案回显 if (popupType.value == 1) { form.value = JSON.parse(JSON.stringify(val)) @@ -491,7 +498,7 @@ const close = () => { const submit = () => { //新增方案 if (popupType.value == 0) { - ruleFormRef1.value.validate(valid => { + ruleFormRef1.value.validate((valid: any) => { if (valid) { const subForm = { itemName: form.value.itemName, diff --git a/src/views/govern/device/planData/components/schemeTree.vue b/src/views/govern/device/planData/components/schemeTree.vue index 4636f01..f878cf6 100644 --- a/src/views/govern/device/planData/components/schemeTree.vue +++ b/src/views/govern/device/planData/components/schemeTree.vue @@ -81,7 +81,7 @@