@cloud-app-dev/vidc 1.0.39 → 1.0.43
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/.fatherrc.js +3 -0
- package/.umirc.ts +3 -0
- package/es/AppLayout/AppHeader/index.d.ts +18 -0
- package/es/AppLayout/AppHeader/index.js +5 -6
- package/es/AppLayout/AppHorizontalMenu/MenuEmptyBox.d.ts +1 -0
- package/es/AppLayout/AppHorizontalMenu/SubGroup.d.ts +9 -0
- package/es/AppLayout/AppHorizontalMenu/index.d.ts +13 -0
- package/es/AppLayout/AppHorizontalMenu/index.js +10 -16
- package/es/AppLayout/AppInlineMenu/SubGroup.d.ts +9 -0
- package/es/AppLayout/AppInlineMenu/SubGroup.js +29 -70
- package/es/AppLayout/AppInlineMenu/index.d.ts +12 -0
- package/es/AppLayout/AppInlineMenu/index.js +14 -18
- package/es/AppLayout/AppLogo/index.d.ts +13 -0
- package/es/AppLayout/AppLogo/index.js +11 -12
- package/es/AppLayout/AppTools/index.d.ts +7 -9
- package/es/AppLayout/FunctionPreview/index.d.ts +22 -0
- package/es/AppLayout/FunctionPreview/index.js +35 -40
- package/es/AppLayout/Header/ListenceRoute.d.ts +5 -0
- package/es/AppLayout/Header/ListenceRoute.js +1 -1
- package/es/AppLayout/Header/ModifyPassword/index.d.ts +6 -0
- package/es/AppLayout/Header/ModifyPassword/index.js +72 -38
- package/es/AppLayout/Header/ModifyUserAvatar/index.d.ts +10 -0
- package/es/AppLayout/Header/ModifyUserAvatar/index.js +4 -10
- package/es/AppLayout/Header/NotifyAlarm.js +14 -9
- package/es/AppLayout/Header/Tools.d.ts +11 -0
- package/es/AppLayout/Header/Tools.js +4 -5
- package/es/AppLayout/Header/ToolsItem.d.ts +1 -0
- package/es/AppLayout/Header/ToolsItem.js +7 -14
- package/es/AppLayout/Header/UserAction.d.ts +10 -0
- package/es/AppLayout/Header/UserAction.js +30 -36
- package/es/AppLayout/Header/index.d.ts +9 -0
- package/es/AppLayout/Header/index.js +10 -22
- package/es/AppLayout/index.d.ts +10 -12
- package/es/AppLayout/index.js +2 -1
- package/es/AppLayout/service/index.js +5 -5
- package/es/AppLayout/utils.d.ts +4 -0
- package/es/AppLayout/utils.js +12 -37
- package/es/DagInitialRequest/utils.js +7 -8
- package/es/InitialRequest/index.js +2 -2
- package/es/InitialRequest/utils.js +8 -9
- package/es/OrgUserTree/index.d.ts +6 -0
- package/es/OrgUserTree/index.js +6 -2
- package/es/PlaceTree/index.js +4 -3
- package/es/TreeMode/index.d.ts +1 -0
- package/es/TreeMode/index.js +12 -3
- package/es/UserSelect/demo.d.ts +2 -0
- package/es/UserSelect/demo.js +20 -0
- package/es/UserSelect/index.js +8 -5
- package/es/WorkerFlow/Demo.js +4 -33
- package/es/WorkerFlow/Form/Approver.d.ts +3 -2
- package/es/WorkerFlow/Form/Approver.js +14 -3
- package/es/WorkerFlow/Form/Condition.js +4 -1
- package/es/WorkerFlow/Form/FormAuth.js +1 -1
- package/es/WorkerFlow/Form/GroupSelectModalContent.js +25 -13
- package/es/WorkerFlow/Form/Handle.d.ts +3 -2
- package/es/WorkerFlow/Form/Handle.js +13 -3
- package/es/WorkerFlow/Form/Notifier.js +2 -1
- package/es/WorkerFlow/Form/UserAndGroupSelect.js +41 -2
- package/es/WorkerFlow/Form/UserSelectModalContent.js +12 -2
- package/es/WorkerFlow/Form/UserSet.d.ts +3 -2
- package/es/WorkerFlow/Form/UserSet.js +8 -5
- package/es/WorkerFlow/Form/UsersHandleType.js +3 -1
- package/es/WorkerFlow/Nodes/Add.js +16 -5
- package/es/WorkerFlow/Nodes/AddOptionList.d.ts +3 -4
- package/es/WorkerFlow/Nodes/AddOptionList.js +6 -6
- package/es/WorkerFlow/Nodes/Approver.js +1 -1
- package/es/WorkerFlow/Nodes/Condition.js +8 -11
- package/es/WorkerFlow/Nodes/Handle.js +1 -1
- package/es/WorkerFlow/Nodes/Notifier.js +1 -1
- package/es/WorkerFlow/Nodes/TitleElement.js +1 -1
- package/es/WorkerFlow/Tools.d.ts +1 -1
- package/es/WorkerFlow/Tools.js +3 -2
- package/es/WorkerFlow/XML/utils.d.ts +1 -0
- package/es/WorkerFlow/XML/utils.js +30 -0
- package/es/WorkerFlow/index.css +12 -2
- package/es/WorkerFlow/index.js +9 -2
- package/es/WorkerFlow/interface.d.ts +5 -2
- package/es/WorkerFlow/utils.d.ts +2 -2
- package/es/WorkerFlow/utils.js +16 -4
- package/es/utils.js +2 -2
- package/package.json +3 -3
- package/scripts/entry.js +1 -1
package/es/WorkerFlow/Tools.js
CHANGED
|
@@ -20,7 +20,8 @@ var ZOOM = {
|
|
|
20
20
|
|
|
21
21
|
function ZoomLayout(_ref) {
|
|
22
22
|
var children = _ref.children,
|
|
23
|
-
exportBpmnFile = _ref.exportBpmnFile
|
|
23
|
+
exportBpmnFile = _ref.exportBpmnFile,
|
|
24
|
+
hasTools = _ref.hasTools;
|
|
24
25
|
|
|
25
26
|
// 放大比例, 按百分制给 100 为 100%
|
|
26
27
|
var _useState = useState(100),
|
|
@@ -60,7 +61,7 @@ function ZoomLayout(_ref) {
|
|
|
60
61
|
onClick: function onClick() {
|
|
61
62
|
return zoomSize(ZOOM.UP);
|
|
62
63
|
}
|
|
63
|
-
})), /*#__PURE__*/React.createElement("div", {
|
|
64
|
+
})), hasTools && /*#__PURE__*/React.createElement("div", {
|
|
64
65
|
className: "tools"
|
|
65
66
|
}, /*#__PURE__*/React.createElement("button", {
|
|
66
67
|
onClick: exportBpmnFile
|
|
@@ -2,4 +2,5 @@ import { NodeItem } from '../interface';
|
|
|
2
2
|
export declare function createId(type: string): string;
|
|
3
3
|
export declare function getEndEventId(data: NodeItem): string;
|
|
4
4
|
export declare function getNodeById(data: NodeItem, id: string): NodeItem;
|
|
5
|
+
export declare function getParentNodeById(data: NodeItem, id: string): NodeItem;
|
|
5
6
|
export declare function transformArray(data: NodeItem): NodeItem[];
|
|
@@ -45,6 +45,36 @@ export function getNodeById(data, id) {
|
|
|
45
45
|
runGetNode(data);
|
|
46
46
|
return nodeItem;
|
|
47
47
|
}
|
|
48
|
+
export function getParentNodeById(data, id) {
|
|
49
|
+
var nodeItem;
|
|
50
|
+
|
|
51
|
+
var runGetNode = function runGetNode(node) {
|
|
52
|
+
if (!node || !!nodeItem) {
|
|
53
|
+
return;
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
if (!node.childNode) {
|
|
57
|
+
return;
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
if (node.childNode.id === id) {
|
|
61
|
+
nodeItem = node;
|
|
62
|
+
} else {
|
|
63
|
+
if (node.conditionNodes && node.conditionNodes.length > 0) {
|
|
64
|
+
node.conditionNodes.forEach(function (item) {
|
|
65
|
+
runGetNode(item);
|
|
66
|
+
});
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
if (node.childNode) {
|
|
70
|
+
runGetNode(node.childNode);
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
};
|
|
74
|
+
|
|
75
|
+
runGetNode(data);
|
|
76
|
+
return nodeItem;
|
|
77
|
+
}
|
|
48
78
|
export function transformArray(data) {
|
|
49
79
|
var arr = [];
|
|
50
80
|
|
package/es/WorkerFlow/index.css
CHANGED
|
@@ -246,10 +246,18 @@
|
|
|
246
246
|
}
|
|
247
247
|
.worker-flow-design .auto-judge .title-wrapper .editable-title {
|
|
248
248
|
display: inline-block;
|
|
249
|
-
max-width: 120px;
|
|
250
249
|
overflow: hidden;
|
|
251
250
|
white-space: nowrap;
|
|
252
251
|
text-overflow: ellipsis;
|
|
252
|
+
margin-right: 10px;
|
|
253
|
+
height: 20px;
|
|
254
|
+
}
|
|
255
|
+
.worker-flow-design .auto-judge .title-wrapper .editable-title-input {
|
|
256
|
+
margin-right: 10px;
|
|
257
|
+
height: 20px;
|
|
258
|
+
}
|
|
259
|
+
.worker-flow-design .auto-judge .title-wrapper .anticon {
|
|
260
|
+
color: #333;
|
|
253
261
|
}
|
|
254
262
|
.worker-flow-design .auto-judge .content {
|
|
255
263
|
font-size: 14px;
|
|
@@ -400,7 +408,9 @@
|
|
|
400
408
|
top: 30px;
|
|
401
409
|
z-index: 1;
|
|
402
410
|
}
|
|
403
|
-
.auto-judge:hover .editable-title
|
|
411
|
+
.auto-judge:hover .editable-title {
|
|
412
|
+
border-bottom: 1px dashed #15bc83;
|
|
413
|
+
}
|
|
404
414
|
.node-wrap-box:hover .editable-title {
|
|
405
415
|
border-bottom: 1px dashed #fff;
|
|
406
416
|
}
|
package/es/WorkerFlow/index.js
CHANGED
|
@@ -166,7 +166,7 @@ function WorkerFlow(_ref, ref) {
|
|
|
166
166
|
} // 获取节点
|
|
167
167
|
|
|
168
168
|
|
|
169
|
-
function onSelectNode(node, index) {
|
|
169
|
+
function onSelectNode(node, parentNode, index) {
|
|
170
170
|
if (readOnly) {
|
|
171
171
|
return;
|
|
172
172
|
}
|
|
@@ -209,13 +209,20 @@ function WorkerFlow(_ref, ref) {
|
|
|
209
209
|
return v.id !== node.conditionNodes[index].id ? v.conditionList : [];
|
|
210
210
|
})).flat() : [];
|
|
211
211
|
var nodeItem = node.type === 4 ? node.conditionNodes[index] : node;
|
|
212
|
+
var from = nodeItem.form ? form.map(function (v) {
|
|
213
|
+
return nodeItem.form.find(function (v2) {
|
|
214
|
+
return v2.name === v.name;
|
|
215
|
+
}) || v;
|
|
216
|
+
}) : form;
|
|
212
217
|
drawer.open({
|
|
213
218
|
title: nodeName,
|
|
214
219
|
width: 640,
|
|
215
220
|
content: /*#__PURE__*/React.createElement(FormContent, {
|
|
216
221
|
useConditionFields: useConditionFields,
|
|
217
|
-
form:
|
|
222
|
+
form: from,
|
|
218
223
|
item: nodeItem,
|
|
224
|
+
config: config,
|
|
225
|
+
parentNode: parentNode,
|
|
219
226
|
onChange: onChange,
|
|
220
227
|
index: index
|
|
221
228
|
}),
|
|
@@ -15,6 +15,7 @@ export type NodeUserType = {
|
|
|
15
15
|
export type WorkerFlowFormType = {
|
|
16
16
|
name: string;
|
|
17
17
|
label: string;
|
|
18
|
+
fromType: 'SINGLE_TEXT' | 'MULTIPLE_TEXT' | 'SINGLE_SELECTION' | 'MULTIPLE_SELECTION' | 'IMAGE';
|
|
18
19
|
type: string;
|
|
19
20
|
value: string;
|
|
20
21
|
auth?: FormAuthType;
|
|
@@ -51,7 +52,7 @@ export interface WorkerFlowContext {
|
|
|
51
52
|
form: WorkerFlowFormType[];
|
|
52
53
|
onInsertNode: (type: NodeType, node: NodeItem) => void;
|
|
53
54
|
onDeleteNode: (parentNode: NodeItem, node: NodeItem, type?: NodeType, index?: number) => void;
|
|
54
|
-
onSelectNode: (node: NodeItem, index?: number) => void;
|
|
55
|
+
onSelectNode: (node: NodeItem, parentNode: NodeItem, index?: number) => void;
|
|
55
56
|
updateNode: () => void;
|
|
56
57
|
readOnly?: boolean;
|
|
57
58
|
}
|
|
@@ -84,6 +85,8 @@ export type SubmitFlowItemType = {
|
|
|
84
85
|
export type SubmitData = {
|
|
85
86
|
config: WorkerFlowRequest;
|
|
86
87
|
bpmnBlob: Blob;
|
|
87
|
-
useFormKeys:
|
|
88
|
+
useFormKeys: ConditionItemType[];
|
|
88
89
|
taskList: SubmitFlowItemType[];
|
|
89
90
|
};
|
|
91
|
+
|
|
92
|
+
export type AddNodeType = 1 | 2 | 3 | 4; //1审核人,2抄送人,3办理人,4条件分支
|
package/es/WorkerFlow/utils.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { NodeItem, SubmitFlowItemType } from './interface';
|
|
1
|
+
import { ConditionItemType, NodeItem, SubmitFlowItemType } from './interface';
|
|
2
2
|
export declare function getJAVATaskData(data: NodeItem): SubmitFlowItemType[];
|
|
3
3
|
export declare function getNextTaskId(node: NodeItem): string | undefined;
|
|
4
4
|
export declare function getNextNode(node: NodeItem): NodeItem | undefined;
|
|
5
5
|
export declare function filterNoticeNode(data: NodeItem): NodeItem;
|
|
6
|
-
export declare function getUserFormKeys(data: NodeItem):
|
|
6
|
+
export declare function getUserFormKeys(data: NodeItem): ConditionItemType[];
|
package/es/WorkerFlow/utils.js
CHANGED
|
@@ -11,6 +11,7 @@ function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToAr
|
|
|
11
11
|
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
|
|
12
12
|
|
|
13
13
|
import _ from 'lodash';
|
|
14
|
+
import { getNodeById } from './XML/utils';
|
|
14
15
|
export function getJAVATaskData(data) {
|
|
15
16
|
var arr = [];
|
|
16
17
|
|
|
@@ -76,7 +77,8 @@ export function getJAVATaskData(data) {
|
|
|
76
77
|
}
|
|
77
78
|
|
|
78
79
|
arr.push(item);
|
|
79
|
-
}
|
|
80
|
+
} // 检查最后一个nextTaskId
|
|
81
|
+
|
|
80
82
|
|
|
81
83
|
var nextNode = getNextNode(node.childNode);
|
|
82
84
|
|
|
@@ -95,6 +97,17 @@ export function getJAVATaskData(data) {
|
|
|
95
97
|
|
|
96
98
|
if (arr[0]) {
|
|
97
99
|
arr[0].taskFirstBlank = 1;
|
|
100
|
+
} // 修正最后一个节点的nextid
|
|
101
|
+
|
|
102
|
+
|
|
103
|
+
var lastNextId = arr[arr.length - 1].nextTaskId;
|
|
104
|
+
|
|
105
|
+
if (lastNextId) {
|
|
106
|
+
var lastNode = getNodeById(data, lastNextId);
|
|
107
|
+
|
|
108
|
+
if (lastNode.type === 2 || lastNode.bpmnType === 'endEvent') {
|
|
109
|
+
arr[arr.length - 1].nextTaskId = undefined;
|
|
110
|
+
}
|
|
98
111
|
}
|
|
99
112
|
|
|
100
113
|
return arr;
|
|
@@ -154,9 +167,8 @@ export function getUserFormKeys(data) {
|
|
|
154
167
|
|
|
155
168
|
var fn = function fn(node) {
|
|
156
169
|
if (node.bpmnType == 'sequenceFlow') {
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
})));
|
|
170
|
+
console.log(node.conditionList);
|
|
171
|
+
arr.push.apply(arr, _toConsumableArray(node.conditionList));
|
|
160
172
|
}
|
|
161
173
|
|
|
162
174
|
if (node.conditionNodes) {
|
package/es/utils.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import
|
|
1
|
+
import _cache from "@cloud-app-dev/utils/es/cache";
|
|
2
2
|
export var getHeader = function getHeader() {
|
|
3
3
|
return {
|
|
4
|
-
Authorization:
|
|
4
|
+
Authorization: _cache.getCache('token', 'session')
|
|
5
5
|
};
|
|
6
6
|
};
|
|
7
7
|
/**
|
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"private": false,
|
|
3
3
|
"name": "@cloud-app-dev/vidc",
|
|
4
4
|
"description": "Video Image Data Componennts",
|
|
5
|
-
"version": "1.0.
|
|
5
|
+
"version": "1.0.43",
|
|
6
6
|
"scripts": {
|
|
7
7
|
"start": "dumi dev",
|
|
8
8
|
"docs:build": "dumi build",
|
|
@@ -30,7 +30,6 @@
|
|
|
30
30
|
]
|
|
31
31
|
},
|
|
32
32
|
"dependencies": {
|
|
33
|
-
"@cloud-app-dev/utils": "^1.0.2",
|
|
34
33
|
"chroma-js": "^2.1.2",
|
|
35
34
|
"jsencrypt": "^3.2.1",
|
|
36
35
|
"lodash": "^4.17.21",
|
|
@@ -38,7 +37,8 @@
|
|
|
38
37
|
"rc-queue-anim": "^2.0.0"
|
|
39
38
|
},
|
|
40
39
|
"devDependencies": {
|
|
41
|
-
"@cloud-app-dev/
|
|
40
|
+
"@cloud-app-dev/utils": "^2.0.1",
|
|
41
|
+
"@cloud-app-dev/basic-components": "^1.0.54",
|
|
42
42
|
"@types/chroma-js": "^2.1.3",
|
|
43
43
|
"@types/lodash": "^4.14.172",
|
|
44
44
|
"@umijs/test": "^3.0.5",
|
package/scripts/entry.js
CHANGED