讲师管理bug

This commit is contained in:
zhangsir
2024-11-21 11:07:14 +08:00
parent b5388ddbaf
commit 8145296f53

View File

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