yuang-framework-ui-common 1.0.74 → 1.0.77
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,3 +1,37 @@
|
|
1
|
+
import { nextTick } from 'vue';
|
2
|
+
import { http } from '../../../lib/config/httpConfig';
|
1
3
|
|
4
|
+
/**
|
5
|
+
* 处理分组树默认展开节点,由于树组件的默认展开节点是异步的,所以需要手动处理默认展开节点
|
6
|
+
*/
|
7
|
+
const handleFrameworkGroupTreeDefaultExpandNode = async ({ id, treeId }) => {
|
8
|
+
if (document.querySelectorAll(`#${treeId}`).length == 0) {
|
9
|
+
console.error(`参数[treeId]不存在`);
|
10
|
+
return;
|
11
|
+
}
|
12
|
+
const res = await http.post('/uims-api/core/framework-group/selectAncestorList', { idForEqual: id, isReverseAncestorList: true });
|
13
|
+
const ancestorList = res.data.data;
|
14
|
+
expandNodeImpl({ ancestorList, index: 0, treeId });
|
15
|
+
};
|
2
16
|
|
3
|
-
|
17
|
+
/** 默认展开节点实现 */
|
18
|
+
const expandNodeImpl = ({ ancestorList, index, treeId }) => {
|
19
|
+
if (index >= ancestorList.length) {
|
20
|
+
return;
|
21
|
+
}
|
22
|
+
const nodeList = document.querySelectorAll(`${!treeId ? '' : '#' + treeId}.el-tree [data-key='${ancestorList[index].id}'] .el-tree-node__expand-icon`) as any;
|
23
|
+
for (let i = 0; i < nodeList.length; i++) {
|
24
|
+
if (!nodeList[i].classList.contains('expanded')) {
|
25
|
+
nodeList[i] && nodeList[i].click();
|
26
|
+
}
|
27
|
+
}
|
28
|
+
nextTick(() => {
|
29
|
+
// 这里必须延迟一会运行,否则下级分组不会展开
|
30
|
+
setTimeout(() => {
|
31
|
+
index++;
|
32
|
+
expandNodeImpl({ ancestorList, index, treeId });
|
33
|
+
}, 200);
|
34
|
+
});
|
35
|
+
};
|
36
|
+
|
37
|
+
export { handleFrameworkGroupTreeDefaultExpandNode };
|
@@ -4,7 +4,7 @@ import { http } from '../../../lib/config/httpConfig';
|
|
4
4
|
/**
|
5
5
|
* 处理机构树默认展开节点,由于树组件的默认展开节点是异步的,所以需要手动处理默认展开节点
|
6
6
|
*/
|
7
|
-
const
|
7
|
+
const handleUimsOrganizationTreeDefaultExpandNode = async ({ id, treeId }) => {
|
8
8
|
if (document.querySelectorAll(`#${treeId}`).length == 0) {
|
9
9
|
console.error(`参数[treeId]不存在`);
|
10
10
|
return;
|
@@ -34,4 +34,4 @@ const expandNodeImpl = ({ ancestorList, index, treeId }) => {
|
|
34
34
|
});
|
35
35
|
};
|
36
36
|
|
37
|
-
export {
|
37
|
+
export { handleUimsOrganizationTreeDefaultExpandNode };
|
@@ -0,0 +1,17 @@
|
|
1
|
+
import type { FrameworkBase, FrameworkBaseQueryParam } from '../framework/frameworkBase';
|
2
|
+
|
3
|
+
/**
|
4
|
+
* sso用户
|
5
|
+
*/
|
6
|
+
export interface SsoUser extends FrameworkBase {
|
7
|
+
password?: string;
|
8
|
+
surePassword?: string;
|
9
|
+
rsaAesKey?: string;
|
10
|
+
}
|
11
|
+
|
12
|
+
/**
|
13
|
+
* sso用户搜索条件
|
14
|
+
*/
|
15
|
+
export interface SsoUserQueryParam extends FrameworkBaseQueryParam {
|
16
|
+
|
17
|
+
}
|
@@ -1,4 +1,5 @@
|
|
1
1
|
import type { FrameworkBase, FrameworkBaseQueryParam } from '../framework/frameworkBase';
|
2
|
+
import { SsoUser } from "../sso/ssoUser";
|
2
3
|
|
3
4
|
/**
|
4
5
|
* 用户
|
@@ -13,9 +14,6 @@ export interface UimsUser extends FrameworkBase {
|
|
13
14
|
status?: number;
|
14
15
|
/** 机构id */
|
15
16
|
organizationId?: string;
|
16
|
-
password?: string;
|
17
|
-
surePassword?: string;
|
18
|
-
rsaAesKey?: string;
|
19
17
|
|
20
18
|
isRecursiveOrganization?: Boolean;
|
21
19
|
mobile?: string;
|
@@ -26,6 +24,9 @@ export interface UimsUser extends FrameworkBase {
|
|
26
24
|
|
27
25
|
avatarCode?: string;
|
28
26
|
avatarUrl?: string;
|
27
|
+
|
28
|
+
/** 单点用户 */
|
29
|
+
ssoUser?: SsoUser;
|
29
30
|
}
|
30
31
|
|
31
32
|
/**
|