diff --git a/src/components/project/OrgClass.vue b/src/components/project/OrgClass.vue index 73f44421..e5bd8f08 100644 --- a/src/components/project/OrgClass.vue +++ b/src/components/project/OrgClass.vue @@ -5,11 +5,15 @@ return triggerNode.parentNode || document.body; } " - v-model:value="id" + v-model:value="labelValue" style="width: 100%" :dropdown-style="{ maxHeight: '400px', overflow: 'auto' }" placeholder="请选择归属组织" + :labelInValue="true" allow-clear + v-model:treeExpandedKeys="stuTreeExpandedKeys" + :loading="orgLoading" + :load-data="onLoadData" :tree-data="options" :fieldNames="{ children: 'treeChildList', @@ -23,30 +27,50 @@ diff --git a/src/components/student/CommonStudent.vue b/src/components/student/CommonStudent.vue index 19f097dd..cc9ad30e 100644 --- a/src/components/student/CommonStudent.vue +++ b/src/components/student/CommonStudent.vue @@ -28,7 +28,7 @@ res.result.map(e => ({...e,isLeaf:false})), +}) const { data: audiData, fetch: searchAudi, @@ -578,9 +585,13 @@ const closeDrawer = () => { visiable.value = false; stuData.value = []; nameSearch.value.keyword = ""; - - }; +function onLoadData(treeNode){ + return request(ORG_CHILD_LIST, {keyword:'',orgId:treeNode.id}).then(r => { + treeNode.dataRef.treeChildList = r.result.directChildList + treeData.value = [...treeData.value] + }) +} const closeChangeModal = () => { stageVisible.value = false; }; @@ -588,9 +599,9 @@ const openDrawer = () => { visiable.value = true; }; //获取组织树 -const treeData = computed(() => { - return store.state.orgtreeList ? store.state.orgtreeList : []; -}); +// const treeData = computed(() => { +// return store.state.orgtreeList ? store.state.orgtreeList : []; +// }); function onSearchStu() { nameSearch.value.page = 1; @@ -654,6 +665,7 @@ const auditChangePagination = (page) => { audienceName.value.page = page; searchAudi(); }; + //重置 function peopleName(name) { console.log('people-name', name.target.value)