From 8145296f536da2bfaeb88b4005784e659b33c47f Mon Sep 17 00:00:00 2001 From: zhangsir Date: Thu, 21 Nov 2024 11:07:14 +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 | 31 +++++++++++++++++++++--- 1 file changed, 28 insertions(+), 3 deletions(-) diff --git a/src/components/project/AddOrgContent.vue b/src/components/project/AddOrgContent.vue index 21a03fea..6514e441 100644 --- a/src/components/project/AddOrgContent.vue +++ b/src/components/project/AddOrgContent.vue @@ -89,8 +89,16 @@ import * as lecturerApi from "@/api/Lecturer.js"; return request(ORG_CHILD_LIST, { keyword: "", orgId: treeNode.id }).then( (r) => { //等待接口联调 - // lecturerApi.getUnSelectOrg().then(res=>{}) - // r.data.map(item=>item.disabled = true) + r?.data?.map(item=>{ + notLists?.value?.some(i=>{ + if(i.orgId == item.id){ + item.disabled = true + item.name = item.name + '(' + i.orgName + ')' + return true + } + }) + return item + }) treeNode.dataRef.treeChildList = r.data; treeData.value = [...treeData.value]; } @@ -109,9 +117,26 @@ import * as lecturerApi from "@/api/Lecturer.js"; checkedKeys.value = props?.AddContentList?.map(item=>item.orgId) } }); + const notLists = ref([]) const getNot = () => { lecturerApi.getUnSelectOrg().then(res=>{ - console.log(res,'ressss') + if(res.data.code == 200){ + notLists.value = res.data.data + } + if(treeData.value.length){ + treeData.value.map(item=>{ + notLists.value.some(i=>{ + if(i.orgId == item.id){ + item.disabled = true + item.name = item.name + '(' + i.orgName + ')' + return true + } + }) + return item + }) + } + }).catch(err=>{ + message.error(err.data.msg) }) } const orgLists = ref([])