@hzab/flowlong-designer 0.2.3 → 0.2.4
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.
package/CHANGELOG.md
CHANGED
package/package.json
CHANGED
|
@@ -42,22 +42,20 @@ const GroupUserSelectorModal = (props) => {
|
|
|
42
42
|
}, [type]);
|
|
43
43
|
|
|
44
44
|
const onOk = () => {
|
|
45
|
-
let onOkValue =
|
|
46
|
-
|
|
47
|
-
deptUserLabel: null,
|
|
48
|
-
};
|
|
49
|
-
if (type === "dept") {
|
|
45
|
+
let onOkValue = null;
|
|
46
|
+
if (type === "dept" && groupUserSelectorRef.current?.selectedList?.length > 0) {
|
|
50
47
|
onOkValue = {
|
|
51
48
|
value: groupUserSelectorRef.current?.selectedList?.map((item) => item?.value)?.join(","),
|
|
52
49
|
deptUserLabel: groupUserSelectorRef.current?.selectedList?.map((item) => item?.label)?.join(","),
|
|
53
50
|
};
|
|
54
51
|
}
|
|
55
|
-
if (type === "assignee") {
|
|
52
|
+
if (type === "assignee" && groupUserSelectorRef.current?.selectedList?.length > 0) {
|
|
56
53
|
onOkValue = {
|
|
57
54
|
value: groupUserSelectorRef.current?.selectedList?.map((item) => item?.userId)?.join(","),
|
|
58
55
|
deptUserLabel: groupUserSelectorRef.current?.selectedList?.map((item) => item?.name)?.join(","),
|
|
59
56
|
};
|
|
60
57
|
}
|
|
58
|
+
|
|
61
59
|
onChange(onOkValue);
|
|
62
60
|
setOpen(false);
|
|
63
61
|
};
|
|
@@ -65,7 +63,7 @@ const GroupUserSelectorModal = (props) => {
|
|
|
65
63
|
const userListConfig = {
|
|
66
64
|
searchQueryKey: "userName",
|
|
67
65
|
labelKey: "name",
|
|
68
|
-
valueKey: "
|
|
66
|
+
valueKey: "userId",
|
|
69
67
|
};
|
|
70
68
|
/**选择组件回显 */
|
|
71
69
|
const groupUserSelectorValue = useMemo(() => {
|
|
@@ -78,16 +76,16 @@ const GroupUserSelectorModal = (props) => {
|
|
|
78
76
|
if (!value) {
|
|
79
77
|
return [];
|
|
80
78
|
}
|
|
81
|
-
if (type === "assignee") {
|
|
79
|
+
if (type === "assignee" && valueArr?.length > 0) {
|
|
82
80
|
return deptUserLabelArr?.map((item, index) => ({
|
|
83
81
|
name: item,
|
|
84
|
-
|
|
82
|
+
userId: valueArr?.length > 0 && valueArr[index],
|
|
85
83
|
isUser: true,
|
|
86
84
|
}));
|
|
87
85
|
}
|
|
88
86
|
return deptUserLabelArr?.map((item, index) => ({
|
|
89
87
|
label: item,
|
|
90
|
-
value: valueArr?.length && valueArr[index],
|
|
88
|
+
value: valueArr?.length > 0 && valueArr[index],
|
|
91
89
|
}));
|
|
92
90
|
}, [value, type]);
|
|
93
91
|
return (
|