|
@@ -4,7 +4,7 @@
|
|
|
<splitpanes class="h100" Vertical>
|
|
|
<pane min-size="16" max-size="25" size="16">
|
|
|
<el-input v-model="filterOrg" placeholder="请输入部门名称" class="input-with-select mb10" clearable @input="onQueryChanged"> </el-input>
|
|
|
- <el-scrollbar style="height: calc(100% - 40px);'" ref="scrollBarRef">
|
|
|
+ <el-scrollbar style="height: calc(100% - 40px);'" noresize ref="scrollBarRef">
|
|
|
<el-skeleton :loading="state.loading" animated :rows="10">
|
|
|
<template #default>
|
|
|
<el-tree-v2
|
|
@@ -113,7 +113,7 @@
|
|
|
</template>
|
|
|
|
|
|
<script lang="tsx" setup name="systemUser">
|
|
|
-import { defineAsyncComponent, nextTick, onActivated, onMounted, reactive, ref } from 'vue';
|
|
|
+import { defineAsyncComponent, nextTick, onActivated, onBeforeUnmount, onMounted, reactive, ref } from 'vue';
|
|
|
import type { FormInstance } from 'element-plus';
|
|
|
import { ElButton, ElMessage, ElMessageBox } from 'element-plus';
|
|
|
import { formatDate } from '@/utils/formatTime';
|
|
@@ -304,13 +304,15 @@ const scrollBarRef = ref<RefType>(); // 滚动条ref
|
|
|
const treeHeight = ref(0);
|
|
|
onMounted(async () => {
|
|
|
await nextTick();
|
|
|
- treeHeight.value = scrollBarRef.value?.wrapRef?.clientHeight;
|
|
|
+ treeHeight.value = scrollBarRef.value?.wrapRef?.clientHeight - 20;
|
|
|
window.addEventListener('resize', () => {
|
|
|
- treeHeight.value = scrollBarRef.value?.wrapRef?.clientHeight;
|
|
|
+ treeHeight.value = scrollBarRef.value?.wrapRef?.clientHeight - 20;
|
|
|
});
|
|
|
});
|
|
|
-onActivated(() => {
|
|
|
- treRef.value.setData(state.orgData);
|
|
|
+onActivated(async () => {
|
|
|
+});
|
|
|
+onBeforeUnmount(() => {
|
|
|
+ window.removeEventListener('resize', () => {});
|
|
|
});
|
|
|
</script>
|
|
|
<style lang="scss" scoped>
|