mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/fe-manage.git
synced 2025-12-17 14:56:46 +08:00
讲师管理bug
This commit is contained in:
@@ -77,6 +77,10 @@ import * as lecturerApi from "@/api/Lecturer.js";
|
||||
AddContentList:{
|
||||
type:Array,
|
||||
default: ()=>[],
|
||||
},
|
||||
isParent:{
|
||||
type:String,
|
||||
default: '',
|
||||
}
|
||||
})
|
||||
const emit = defineEmits({})
|
||||
@@ -119,7 +123,7 @@ import * as lecturerApi from "@/api/Lecturer.js";
|
||||
});
|
||||
const notLists = ref([])
|
||||
const getNot = () => {
|
||||
lecturerApi.getUnSelectOrg().then(res=>{
|
||||
lecturerApi.getUnSelectOrg(props.isParent).then(res=>{
|
||||
if(res.data.code == 200){
|
||||
notLists.value = res.data.data
|
||||
}
|
||||
@@ -144,7 +148,10 @@ import * as lecturerApi from "@/api/Lecturer.js";
|
||||
const onCheck = async (checkedKey, {checked: bool, checkedNodes, node, event}) => {
|
||||
// "965356037047586816"
|
||||
let length = treeAddData.value.length
|
||||
if(checkedNodes.length > length){
|
||||
const checkedNodeIds = checkedNodes.map(item => item.id);
|
||||
const treeAddDataOrgIds = treeAddData.value.map(item => item.orgId);
|
||||
const combinedUniqueIds = [...new Set([...checkedNodeIds, ...treeAddDataOrgIds])];
|
||||
if(combinedUniqueIds.length > length){
|
||||
await lecturerApi.getSelectOrg(node.id).then(res=>{
|
||||
const targetNode = checkedNodes.find(item=>item.id == res?.data?.data[0]?.orgId)
|
||||
if(targetNode){
|
||||
|
||||
Reference in New Issue
Block a user