讲师管理bug

This commit is contained in:
zhangsir
2025-01-08 18:15:50 +08:00
parent 1d3a700ced
commit 0e1bb584b0
2 changed files with 12 additions and 6 deletions

View File

@@ -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)

View File

@@ -293,7 +293,7 @@
</div>
</div>
</a-drawer>
<AddOrgContent :Addtitle="'选择组织'" :isParent="formParam.isParent" v-model:showContent="showContent" v-model:AddContentList="formParam.affiliationOrgList" />
<AddOrgContent :Addtitle="'选择组织'" :isParent="formParam.isParent" v-model:showContent="showContent" :AddContentLists="formParam.affiliationOrgLists" v-model:AddContentList="formParam.affiliationOrgList"/>
</div>
</template>
<script lang="jsx">
@@ -354,6 +354,7 @@ export default{
code: null,
isContains: '0',
affiliationOrgList: [],
affiliationOrgLists: [],
locking: 1,
},
})
@@ -736,8 +737,8 @@ const getTableDate = (obj) => {
}
})
})
state.formParam.affiliationOrgLists = state.formParam.affiliationOrgList
state.formParam.isContains = String(state.formParam.isContains)
console.log(state.formParam.affiliationOrgList,'state.formParam.affiliationOrgList')
state.teacherdialog = true;
state.teacherdialogtitle = '编辑培训发生组织'
state.vf = false