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([])