From 3d2d77764487d71d62a6be440678b41fd46762f6 Mon Sep 17 00:00:00 2001
From: xuziqiang <1344691446@qq.com>
Date: Wed, 26 Jun 2024 16:57:42 +0800
Subject: [PATCH] =?UTF-8?q?fix:=20bug=E4=BF=AE=E5=A4=8D?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../view/organizationManage/departmentManage/index.vue | 18 ++++++++++++++----
.../src/view/organizationManage/usermanage/index.vue | 9 +++++++--
lib/component/tree/tree-api.vue | 2 +-
3 files changed, 22 insertions(+), 7 deletions(-)
diff --git a/hx-ai-intelligent/src/view/organizationManage/departmentManage/index.vue b/hx-ai-intelligent/src/view/organizationManage/departmentManage/index.vue
index 8456a04..03e2e75 100644
--- a/hx-ai-intelligent/src/view/organizationManage/departmentManage/index.vue
+++ b/hx-ai-intelligent/src/view/organizationManage/departmentManage/index.vue
@@ -78,7 +78,7 @@
-
+
新增角色
新增子角色
删除
@@ -366,12 +366,22 @@
};
};
- const addApartmentSon = () => {
+ const getParent = (data) => {
+ if (data?.parent) {
+ getParent(data.parent);
+ } else {
+ data;
+ }
+ };
+
+ const addApartmentSon = (data) => {
+ const { deptInfo } = data;
+
disabled.value = false;
opMap.type = 'addson';
formData.value = {};
let sourceOrgId = '';
- if (!currentOrgRef.value?.own && orgId !== selectRef.value.deptInfo?.orgId) {
+ if (deptInfo.orgId !== orgId) {
sourceOrgId = orgId;
}
opMap.fuc = (params) => {
@@ -380,7 +390,7 @@
...params,
orgId,
projectId,
- pdeptId: selectRef.value.deptInfo.deptId,
+ pdeptId: deptInfo.deptId,
sourceOrgId,
// deptName: selectRef.value.deptInfo.deptName,
});
diff --git a/hx-ai-intelligent/src/view/organizationManage/usermanage/index.vue b/hx-ai-intelligent/src/view/organizationManage/usermanage/index.vue
index 1daf894..d28165c 100644
--- a/hx-ai-intelligent/src/view/organizationManage/usermanage/index.vue
+++ b/hx-ai-intelligent/src/view/organizationManage/usermanage/index.vue
@@ -117,6 +117,7 @@
const userAuthList = ref([]);
const orgId = JSON.parse(sessionStorage.getItem('userInfo')).orgId;
const orgTreeConfig = ref({
+ selectedKeys: ['0-0'],
defaultExpandAll: true,
api: origanizemanage.queryOrgTree,
defaultParams: { orgId },
@@ -209,14 +210,18 @@
};
const tableFetch = (params) => {
- console.log(mainRef.value);
+ console.log(params, 'sdfasfasdfasdfasdf');
+
+ // console.log(mainRef.value);
tableConfig.value.params = {
...mainRef.value.params,
...params,
};
- mainRef.value?.nsTableRef.reload();
+ setTimeout(() => {
+ mainRef.value?.nsTableRef.reload();
+ }, 100);
};
const handleSelect = (selectedKeys: any, info: any) => {
diff --git a/lib/component/tree/tree-api.vue b/lib/component/tree/tree-api.vue
index c92cb4f..f49296c 100644
--- a/lib/component/tree/tree-api.vue
+++ b/lib/component/tree/tree-api.vue
@@ -32,7 +32,7 @@
const props = defineProps(treeProps);
const treeData = ref([]);
- const selectedKeys = ref(props.defaultSelectedKeys || []);
+ const selectedKeys = ref(props.selectedKeys || []);
const { httpRequest } = useApi();
const requestConfig: AxiosRequestConfig = { method: 'get' };
const route = useRoute();