diff --git a/src/views/govern/device/planData/components/popup.vue b/src/views/govern/device/planData/components/popup.vue index 6ad46ac..a43c664 100644 --- a/src/views/govern/device/planData/components/popup.vue +++ b/src/views/govern/device/planData/components/popup.vue @@ -399,16 +399,19 @@ const detailsType = (val: any) => { } //回显方案、测试项操作 const details = (val: any) => { - if (val.records && val.records.length != 0) { + console.log(val,"88888"); + if (val) { form.value = { describe: val.describe, itemName: val.itemName } - } else { + } + if(val){ form1.value = val - checkedIdList.value=form1.value.list + checkedIdList.value = form1.value.list } + return //修改方案回显 if (popupType.value == 1) { diff --git a/src/views/govern/device/planData/index.vue b/src/views/govern/device/planData/index.vue index 1d428df..8c984cb 100644 --- a/src/views/govern/device/planData/index.vue +++ b/src/views/govern/device/planData/index.vue @@ -352,8 +352,6 @@ const nodeClick = async (e: anyObj) => { .catch(e => { loading.value = false }) - } else { - schemeTreeRef.value.getTreeList() } } const dialogRef = ref() @@ -363,7 +361,7 @@ const handleOpen = (val: any) => { dialogRef.value.open(val, '') return } - deviceData.value.records.map((item: any) => { + deviceData.value?.records?.map((item: any) => { if (item.id == activeName.value) { dailogForm.value = item }