From 0e1bb584b07fa205393d04aa3576a4578413af7e Mon Sep 17 00:00:00 2001 From: zhangsir Date: Wed, 8 Jan 2025 18:15:50 +0800 Subject: [PATCH] =?UTF-8?q?=E8=AE=B2=E5=B8=88=E7=AE=A1=E7=90=86bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/project/AddOrgContent.vue | 13 +++++++++---- src/views/lecturer/Organization.vue | 5 +++-- 2 files changed, 12 insertions(+), 6 deletions(-) diff --git a/src/components/project/AddOrgContent.vue b/src/components/project/AddOrgContent.vue index 2149781e..b8058096 100644 --- a/src/components/project/AddOrgContent.vue +++ b/src/components/project/AddOrgContent.vue @@ -78,6 +78,10 @@ import * as lecturerApi from "@/api/Lecturer.js"; type:Array, default: ()=>[], }, + AddContentLists:{ + type:Array, + default: ()=>[], + }, isParent:{ type:String, default: '', @@ -113,11 +117,12 @@ import * as lecturerApi from "@/api/Lecturer.js"; expandedKeys.value = [] selectedKeys.value = [] checkedKeys.value = [] + orgLists.value = [] }else{ - console.log(props.AddContentList,'xixiixix') getNot() + console.log(props?.AddContentList,'props?.AddContentList') treeAddData.value = props?.AddContentList - orgLists.value = props?.AddContentList + orgLists.value = props?.AddContentLists checkedKeys.value = props?.AddContentList?.map(item=>item.orgId) } }); @@ -134,7 +139,7 @@ import * as lecturerApi from "@/api/Lecturer.js"; if(i.orgId == item.id){ item.disabled = true item.name = item.name + '(' + i.affiliationName + ')' - return true + // return true } }) return item @@ -189,7 +194,7 @@ import * as lecturerApi from "@/api/Lecturer.js"; const isDuplicate = seen.has(item.orgId); seen.add(item.orgId); return !isDuplicate; - }); + }) treeAddData.value = uniqueEndLists?.filter(item => checkedKeys.value?.checked?.includes(item.orgId)); // treeAddData.value = checkedNodes; console.log(treeAddData.value,'checkedNodes',orgLists.value) diff --git a/src/views/lecturer/Organization.vue b/src/views/lecturer/Organization.vue index a79d1896..4b84f830 100644 --- a/src/views/lecturer/Organization.vue +++ b/src/views/lecturer/Organization.vue @@ -293,7 +293,7 @@ - +