uepay-mesh 4.0.20 → 4.0.21
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/bpm/builder.js +9 -31
- package/bpm/config/serverEnums.js +19 -56
- package/bpm/data/bpm.js +0 -4
- package/bpm/data/bpmDefined.js +50 -111
- package/bpm/data/bpmInstance.js +68 -132
- package/bpm/data/exists/listUtils.js +1 -5
- package/bpm/data/request.js +11 -40
- package/bpm/form/bpmSteps.js +4 -14
- package/bpm/form/collect.js +6 -26
- package/bpm/form/flow.js +25 -59
- package/bpm/form/info.js +17 -42
- package/bpm/form/options/approve.js +29 -48
- package/bpm/form/options/close.js +2 -10
- package/bpm/form/options/comment.js +4 -15
- package/bpm/form/options/end.js +2 -10
- package/bpm/form/options/revoke.js +1 -9
- package/bpm/form/options/save.js +1 -9
- package/bpm/form/options/submit.js +2 -10
- package/bpm/form/options.js +2 -14
- package/bpm/form/processor.js +13 -35
- package/bpm/form/title.js +7 -22
- package/bpm/form.js +21 -59
- package/bpm/list/applicantTable.js +3 -15
- package/bpm/list/completeTable.js +4 -16
- package/bpm/list/draftTable.js +6 -17
- package/bpm/list/noticeTable.js +4 -16
- package/bpm/list/numTip.js +2 -8
- package/bpm/list/waitTable.js +4 -16
- package/bpm/list.js +15 -53
- package/bpm/util/dateFormat.js +0 -2
- package/common/loading.js +1 -7
- package/common/local.js +1 -4
- package/common/model/delayTip.js +4 -21
- package/common/model/errorTip.js +9 -18
- package/common/model/loadTip.js +20 -29
- package/index.js +0 -11
- package/mesh/cell/compare/input/standardCompare.js +1 -9
- package/mesh/cell/compare/picker/imageUpdatePickerCompare.js +1 -9
- package/mesh/cell/compare/picker/timestampDatePickerCompare.js +3 -11
- package/mesh/cell/compare/select/standardSelectCompare.js +1 -8
- package/mesh/cell/compare/switch/standardSwitchCompare.js +1 -8
- package/mesh/cell/compare.js +4 -15
- package/mesh/cell/edit/input/standardInput.js +11 -25
- package/mesh/cell/edit/input/standardNumber.js +5 -17
- package/mesh/cell/edit/picker/imageUpdatePicker.js +66 -101
- package/mesh/cell/edit/picker/timestampDatePicker.js +12 -31
- package/mesh/cell/edit/picker/uploader.js +7 -19
- package/mesh/cell/edit/select/standardSelect.js +18 -28
- package/mesh/cell/edit/switch/standardSwitch.js +7 -13
- package/mesh/cell/edit.js +5 -19
- package/mesh/cell/image/imagePopView.js +4 -12
- package/mesh/cell/image/imageView.js +14 -29
- package/mesh/cell/index.js +1 -7
- package/mesh/cell/search/input/standardInputSearch.js +1 -9
- package/mesh/cell/search/input/standardNumberSearch.js +3 -13
- package/mesh/cell/search/picker/timestampDatePickerSearch.js +35 -58
- package/mesh/cell/search/searchContain/column.js +17 -31
- package/mesh/cell/search/searchContain/condSelect.js +2 -10
- package/mesh/cell/search/searchContain.js +2 -17
- package/mesh/cell/search/select/standardSelectSearch.js +3 -13
- package/mesh/cell/search/switch/standardSwitchSearch.js +4 -14
- package/mesh/cell/search.js +4 -15
- package/mesh/cell/view/input/jsonView.js +12 -45
- package/mesh/cell/view/input/standardNumberView.js +1 -12
- package/mesh/cell/view/input/standardView.js +1 -9
- package/mesh/cell/view/matchView.js +3 -10
- package/mesh/cell/view/picker/imageUpdatePickerView.js +1 -9
- package/mesh/cell/view/picker/timestampDatePickerView.js +9 -21
- package/mesh/cell/view/select/standardSelectView.js +7 -18
- package/mesh/cell/view/switch/standardSwitchView.js +1 -8
- package/mesh/cell/view.js +4 -17
- package/mesh/config/authOptions.js +9 -17
- package/mesh/config/clientEnums.js +2 -6
- package/mesh/config/combineConfig.js +0 -10
- package/mesh/config/serverEnums.js +31 -49
- package/mesh/crud/remove.js +10 -26
- package/mesh/data/localStore.js +0 -9
- package/mesh/data/reduxSearch.js +8 -23
- package/mesh/data/reduxTableLabel.js +7 -29
- package/mesh/data/request.js +16 -51
- package/mesh/data/sessionStore.js +0 -9
- package/mesh/define/collect/extension.js +4 -15
- package/mesh/define/column.js +2 -6
- package/mesh/define/config.js +2 -9
- package/mesh/excel/backup.js +5 -33
- package/mesh/excel/optionsAbleExcel.js +44 -114
- package/mesh/excel/processor.js +164 -230
- package/mesh/excel/standardExcel.js +11 -31
- package/mesh/form/configs.js +2 -4
- package/mesh/form/editAbleForm.js +72 -159
- package/mesh/form/editCompareForm.js +41 -75
- package/mesh/form/item/aliasCellItem.js +17 -34
- package/mesh/form/item/cellItem/title.js +1 -11
- package/mesh/form/item/compareCellItem.js +9 -20
- package/mesh/form/item/editCellItem.js +19 -31
- package/mesh/form/item/redundanceCellItem.js +9 -20
- package/mesh/form/item/viewCellItem.js +7 -18
- package/mesh/form/loading/parentPosLoading.js +1 -7
- package/mesh/form/options/bpm/BpmOptBtn.js +3 -20
- package/mesh/form/options/bpm/collectStateResponse.js +5 -22
- package/mesh/form/options/btn/bpmFlowTimeline.js +9 -28
- package/mesh/form/options/btn/bpmFormLink.js +1 -7
- package/mesh/form/options/btn/tip.js +6 -26
- package/mesh/form/options/confirmBtn.js +1 -8
- package/mesh/form/options/deleteBtn.js +3 -15
- package/mesh/form/options/extendsBtn.js +21 -45
- package/mesh/form/options/insertBtn.js +3 -17
- package/mesh/form/options/submitBtn.js +3 -17
- package/mesh/form/options.js +17 -81
- package/mesh/form/standardAddForm.js +25 -56
- package/mesh/form/standardCompareForm.js +1 -10
- package/mesh/form/standardEditForm.js +20 -43
- package/mesh/form/standardForm.js +13 -35
- package/mesh/form/standardViewForm/viewItem.js +1 -10
- package/mesh/form/standardViewForm.js +7 -22
- package/mesh/form/support/modifyFormProcessor.js +7 -16
- package/mesh/form/tabs/relateTabs.js +13 -35
- package/mesh/hoc/withReduxSearch.js +45 -67
- package/mesh/pages/collectEntry.js +8 -19
- package/mesh/pages/page.js +23 -17
- package/mesh/table/context/queryAbleTableContext.js +4 -11
- package/mesh/table/formQueryAbleTable.js +25 -40
- package/mesh/table/optionsFormQueryAbleTable.js +13 -30
- package/mesh/table/popSelectQueryAbleTable.js +5 -14
- package/mesh/table/queryAbleTable/bridgingDrawer.js +5 -18
- package/mesh/table/queryAbleTable/excelBridging.js +1 -13
- package/mesh/table/queryAbleTable/formBridging.js +1 -12
- package/mesh/table/queryAbleTable.js +61 -128
- package/mesh/table/selectQueryAbleTable.js +7 -21
- package/mesh/table/standardTable/actionColumnForm/actionDefOptions.js +3 -17
- package/mesh/table/standardTable/actionColumnForm/deleteRow.js +8 -28
- package/mesh/table/standardTable/actionColumnForm.js +6 -28
- package/mesh/table/standardTable/actionColumnFormOptions.js +7 -19
- package/mesh/table/standardTable/actionColumnSelect.js +2 -9
- package/mesh/table/standardTable/innerTable.js +7 -18
- package/mesh/table/standardTable/searchExtend/searchExtendOptions.js +1 -9
- package/mesh/table/standardTable/searchExtend.js +21 -44
- package/mesh/table/standardTable/tableLabelExtend.js +9 -20
- package/mesh/table/standardTable/tableOptions.js +36 -70
- package/mesh/table/standardTable/tableOptons/multiOptions.js +1 -10
- package/mesh/table/standardTable/thColumn/rowEditAbleCell.js +78 -80
- package/mesh/table/standardTable/thColumn.js +21 -43
- package/mesh/table/standardTable.js +120 -201
- package/mesh/table/webAddFormQueryAbleTable.js +7 -24
- package/mesh/util/apolloConfig.js +3 -10
- package/mesh/util/net.js +15 -37
- package/mesh/util/token.js +5 -9
- package/package.json +1 -1
package/bpm/builder.js
CHANGED
|
@@ -12,19 +12,12 @@ exports.refuse = refuse;
|
|
|
12
12
|
exports.revoke = revoke;
|
|
13
13
|
exports.save = save;
|
|
14
14
|
exports.submit = submit;
|
|
15
|
-
|
|
16
15
|
var _bpmInstance = _interopRequireDefault(require("./data/bpmInstance"));
|
|
17
|
-
|
|
18
16
|
var _bpmDefined = _interopRequireDefault(require("./data/bpmDefined"));
|
|
19
|
-
|
|
20
17
|
var _request = require("./data/request");
|
|
21
|
-
|
|
22
18
|
var _uepayOps = require("uepay-ops2");
|
|
23
|
-
|
|
24
19
|
var _serverEnums = require("./config/serverEnums");
|
|
25
|
-
|
|
26
20
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
27
|
-
|
|
28
21
|
function responseProcess(res) {
|
|
29
22
|
if (res && 0 < res.code) {
|
|
30
23
|
return {
|
|
@@ -39,18 +32,18 @@ function responseProcess(res) {
|
|
|
39
32
|
};
|
|
40
33
|
}
|
|
41
34
|
}
|
|
35
|
+
|
|
42
36
|
/**
|
|
43
37
|
*
|
|
44
38
|
* @param insId
|
|
45
39
|
* @return {Promise<unknown>}
|
|
46
40
|
*/
|
|
47
|
-
|
|
48
|
-
|
|
49
41
|
function getInstanceByInsId(insId) {
|
|
50
42
|
return (0, _request.getBpmForm)(insId).then(res => {
|
|
51
43
|
return responseProcess(res);
|
|
52
44
|
});
|
|
53
45
|
}
|
|
46
|
+
|
|
54
47
|
/**
|
|
55
48
|
* 通過數據集和流程的關聯關係進行異步構建
|
|
56
49
|
* @param collectId
|
|
@@ -63,19 +56,15 @@ function getInstanceByInsId(insId) {
|
|
|
63
56
|
usrDict : {Object} 用戶字典
|
|
64
57
|
* msg: String 錯誤信息}>}
|
|
65
58
|
*/
|
|
66
|
-
|
|
67
|
-
|
|
68
59
|
function collectState(collectId, pkData) {
|
|
69
60
|
return (0, _request.bpmCollectState)((0, _uepayOps.getHost)(), collectId, pkData).then(res => {
|
|
70
61
|
let ret;
|
|
71
|
-
|
|
72
62
|
if (res && res.code > 0) {
|
|
73
63
|
const {
|
|
74
64
|
bpmDefined,
|
|
75
65
|
bpmInstance,
|
|
76
66
|
usrDict
|
|
77
67
|
} = res;
|
|
78
|
-
|
|
79
68
|
switch (res.state) {
|
|
80
69
|
case _serverEnums.BpmAccessState.Related:
|
|
81
70
|
case _serverEnums.BpmAccessState.Draft:
|
|
@@ -88,13 +77,11 @@ function collectState(collectId, pkData) {
|
|
|
88
77
|
});
|
|
89
78
|
ret.state = res.state;
|
|
90
79
|
break;
|
|
91
|
-
|
|
92
80
|
case _serverEnums.BpmAccessState.None:
|
|
93
81
|
ret = {
|
|
94
82
|
state: _serverEnums.BpmAccessState.None
|
|
95
83
|
};
|
|
96
84
|
break;
|
|
97
|
-
|
|
98
85
|
default:
|
|
99
86
|
ret = {
|
|
100
87
|
status: _serverEnums.BpmAccessState.Error,
|
|
@@ -108,10 +95,10 @@ function collectState(collectId, pkData) {
|
|
|
108
95
|
msg: res && res.msg || '獲取審批狀態失敗!'
|
|
109
96
|
};
|
|
110
97
|
}
|
|
111
|
-
|
|
112
98
|
return ret;
|
|
113
99
|
});
|
|
114
100
|
}
|
|
101
|
+
|
|
115
102
|
/**
|
|
116
103
|
* 保存
|
|
117
104
|
* @param insId
|
|
@@ -119,8 +106,6 @@ function collectState(collectId, pkData) {
|
|
|
119
106
|
* @param formData {Object|Boolean}
|
|
120
107
|
* @return {Promise<{suc: boolean, curUsr: *, bpmCacheId: (number|boolean), bpm: (InstanceBpmImpl|DefinedBpmImpl)} | {suc: boolean}>}
|
|
121
108
|
*/
|
|
122
|
-
|
|
123
|
-
|
|
124
109
|
function save(_ref) {
|
|
125
110
|
let {
|
|
126
111
|
insId,
|
|
@@ -131,6 +116,7 @@ function save(_ref) {
|
|
|
131
116
|
return responseProcess(res);
|
|
132
117
|
});
|
|
133
118
|
}
|
|
119
|
+
|
|
134
120
|
/**
|
|
135
121
|
* 異步提交流程
|
|
136
122
|
* @param insId {Number}
|
|
@@ -138,8 +124,6 @@ function save(_ref) {
|
|
|
138
124
|
* @param formData {Object|Boolean} {{formNodeId: {Number}, 流程执行表单的主键, formData: {String}, 对应的JSON字符串}[]}
|
|
139
125
|
* @return {Promise<{suc: boolean, curUsr: *, bpmCacheId: (number|boolean), bpm: (InstanceBpmImpl|DefinedBpmImpl)} | {suc: boolean}>}
|
|
140
126
|
*/
|
|
141
|
-
|
|
142
|
-
|
|
143
127
|
function submit(_ref2) {
|
|
144
128
|
let {
|
|
145
129
|
insId,
|
|
@@ -150,13 +134,12 @@ function submit(_ref2) {
|
|
|
150
134
|
return responseProcess(res);
|
|
151
135
|
});
|
|
152
136
|
}
|
|
137
|
+
|
|
153
138
|
/**
|
|
154
139
|
* 终止流程
|
|
155
140
|
* @param insId
|
|
156
141
|
* @return {Promise<>}
|
|
157
142
|
*/
|
|
158
|
-
|
|
159
|
-
|
|
160
143
|
function end(_ref3) {
|
|
161
144
|
let {
|
|
162
145
|
insId
|
|
@@ -165,6 +148,7 @@ function end(_ref3) {
|
|
|
165
148
|
return responseProcess(res);
|
|
166
149
|
});
|
|
167
150
|
}
|
|
151
|
+
|
|
168
152
|
/**
|
|
169
153
|
* 審批流程
|
|
170
154
|
* @param insId {Number}
|
|
@@ -173,8 +157,6 @@ function end(_ref3) {
|
|
|
173
157
|
* @param tos
|
|
174
158
|
* @return {Promise<{suc: boolean, curUsr: *, bpmCacheId: (number|boolean), bpm: (InstanceBpmImpl|DefinedBpmImpl)} | {suc: boolean}>}
|
|
175
159
|
*/
|
|
176
|
-
|
|
177
|
-
|
|
178
160
|
function approved(_ref4) {
|
|
179
161
|
let {
|
|
180
162
|
insId,
|
|
@@ -186,6 +168,7 @@ function approved(_ref4) {
|
|
|
186
168
|
return responseProcess(res);
|
|
187
169
|
});
|
|
188
170
|
}
|
|
171
|
+
|
|
189
172
|
/**
|
|
190
173
|
* 拒絕
|
|
191
174
|
* @param insId
|
|
@@ -193,8 +176,6 @@ function approved(_ref4) {
|
|
|
193
176
|
* @param tos
|
|
194
177
|
* @return {Promise<{suc: boolean, curUsr: *, bpmCacheId: (number|boolean), bpm: (InstanceBpmImpl|DefinedBpmImpl)}|{suc: boolean, msg: *}>}
|
|
195
178
|
*/
|
|
196
|
-
|
|
197
|
-
|
|
198
179
|
function refuse(_ref5) {
|
|
199
180
|
let {
|
|
200
181
|
insId,
|
|
@@ -204,14 +185,13 @@ function refuse(_ref5) {
|
|
|
204
185
|
return responseProcess(res);
|
|
205
186
|
});
|
|
206
187
|
}
|
|
188
|
+
|
|
207
189
|
/**
|
|
208
190
|
* 異步提交流程
|
|
209
191
|
* @param insId {Number}
|
|
210
192
|
* @param opinion {String|Boolean} 撤回意见
|
|
211
193
|
* @return {Promise<{suc: boolean, curUsr: *, bpmCacheId: (number|boolean), bpm: (InstanceBpmImpl|DefinedBpmImpl)} | {suc: boolean}>}
|
|
212
194
|
*/
|
|
213
|
-
|
|
214
|
-
|
|
215
195
|
function revoke(_ref6) {
|
|
216
196
|
let {
|
|
217
197
|
insId,
|
|
@@ -221,6 +201,7 @@ function revoke(_ref6) {
|
|
|
221
201
|
return responseProcess(res);
|
|
222
202
|
});
|
|
223
203
|
}
|
|
204
|
+
|
|
224
205
|
/**
|
|
225
206
|
* @param bpmDefined: {BpmDefined}|boolean 流程定義信息:,
|
|
226
207
|
* @param bpmInstance: {BpmInstance}|boolean 流程實例信息,
|
|
@@ -241,15 +222,12 @@ function revoke(_ref6) {
|
|
|
241
222
|
* isDef(); 返回 true
|
|
242
223
|
* }
|
|
243
224
|
*/
|
|
244
|
-
|
|
245
|
-
|
|
246
225
|
function build(_ref7) {
|
|
247
226
|
let {
|
|
248
227
|
bpmDefined,
|
|
249
228
|
bpmInstance,
|
|
250
229
|
usrDict
|
|
251
230
|
} = _ref7;
|
|
252
|
-
|
|
253
231
|
if (bpmInstance) {
|
|
254
232
|
const {
|
|
255
233
|
instance,
|
|
@@ -4,86 +4,73 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.InsStatus = exports.InsFormTypeName = exports.InsFormType = exports.ExeUsrType = exports.ExeNodeUserOptionsName = exports.ExeNodeUserOptions = exports.ExeNodeStatus = exports.DefNodeType = exports.DefNodeApprovalType = exports.BpmFormOptions = exports.BpmAccessState = void 0;
|
|
7
|
-
|
|
8
7
|
/**
|
|
9
8
|
* 數據集和流程的關聯狀態
|
|
10
9
|
* @type {{Execute: string, Access: string, Error: string, None: string}}
|
|
11
10
|
*/
|
|
12
|
-
const BpmAccessState = {
|
|
11
|
+
const BpmAccessState = exports.BpmAccessState = {
|
|
13
12
|
/**
|
|
14
13
|
* 存在關聯流程
|
|
15
14
|
*/
|
|
16
15
|
Related: 'Related',
|
|
17
|
-
|
|
18
16
|
/**
|
|
19
17
|
* 流程正在执行
|
|
20
18
|
*/
|
|
21
19
|
Execute: 'Execute',
|
|
22
|
-
|
|
23
20
|
/**
|
|
24
21
|
* 流程处于待提交状态
|
|
25
22
|
*/
|
|
26
23
|
Draft: 'Draft',
|
|
27
|
-
|
|
28
24
|
/**
|
|
29
25
|
* 数据集存在关联流程,提交后将会开始审批
|
|
30
26
|
*/
|
|
31
27
|
Access: 'Access',
|
|
32
|
-
|
|
33
28
|
/**
|
|
34
29
|
* 无关联流程
|
|
35
30
|
*/
|
|
36
31
|
None: 'None',
|
|
37
|
-
|
|
38
32
|
/**
|
|
39
33
|
* 信息出现错误
|
|
40
34
|
*/
|
|
41
35
|
Error: 'Error'
|
|
42
36
|
};
|
|
37
|
+
|
|
43
38
|
/**
|
|
44
39
|
* 流程實例狀態
|
|
45
40
|
* @type {{EXECUTE: string, COMBINE: string, REVOKE: string, DRAFT: string, END: string, FINISHED: string}}
|
|
46
41
|
*/
|
|
47
|
-
|
|
48
|
-
exports.BpmAccessState = BpmAccessState;
|
|
49
|
-
const InsStatus = {
|
|
42
|
+
const InsStatus = exports.InsStatus = {
|
|
50
43
|
/**
|
|
51
44
|
* 草稿
|
|
52
45
|
*/
|
|
53
46
|
DRAFT: 'DRAFT',
|
|
54
|
-
|
|
55
47
|
/**
|
|
56
48
|
* 执行中
|
|
57
49
|
*/
|
|
58
50
|
EXECUTE: 'EXECUTE',
|
|
59
|
-
|
|
60
51
|
/**
|
|
61
52
|
* 撤销
|
|
62
53
|
*/
|
|
63
54
|
REVOKE: 'REVOKE',
|
|
64
|
-
|
|
65
55
|
/**
|
|
66
56
|
* 结束
|
|
67
57
|
*/
|
|
68
58
|
FINISHED: 'FINISHED',
|
|
69
|
-
|
|
70
59
|
/**
|
|
71
60
|
* 非正常终止
|
|
72
61
|
*/
|
|
73
62
|
END: 'END'
|
|
74
63
|
};
|
|
64
|
+
|
|
75
65
|
/**
|
|
76
66
|
* 流程执行节点状态
|
|
77
67
|
* @type {{COMPLETE: string, WAITING: string}}
|
|
78
68
|
*/
|
|
79
|
-
|
|
80
|
-
exports.InsStatus = InsStatus;
|
|
81
|
-
const ExeNodeStatus = {
|
|
69
|
+
const ExeNodeStatus = exports.ExeNodeStatus = {
|
|
82
70
|
/**
|
|
83
71
|
* 等待
|
|
84
72
|
*/
|
|
85
73
|
WAITING: 'WAITING',
|
|
86
|
-
|
|
87
74
|
/**
|
|
88
75
|
* 完成
|
|
89
76
|
*/
|
|
@@ -93,142 +80,120 @@ const ExeNodeStatus = {
|
|
|
93
80
|
* 流程定义的节点类型
|
|
94
81
|
* @type {{PROCESS: string, START: string, END: string}}
|
|
95
82
|
*/
|
|
96
|
-
|
|
97
|
-
exports.ExeNodeStatus = ExeNodeStatus;
|
|
98
|
-
const DefNodeType = {
|
|
83
|
+
const DefNodeType = exports.DefNodeType = {
|
|
99
84
|
/**
|
|
100
85
|
* 开始节点
|
|
101
86
|
*/
|
|
102
87
|
START: 'START',
|
|
103
|
-
|
|
104
88
|
/**
|
|
105
89
|
* 结束节点
|
|
106
90
|
*/
|
|
107
91
|
END: 'END',
|
|
108
|
-
|
|
109
92
|
/**
|
|
110
93
|
* 过程节点
|
|
111
94
|
*/
|
|
112
95
|
PROCESS: 'PROCESS'
|
|
113
96
|
};
|
|
114
|
-
exports.
|
|
115
|
-
const DefNodeApprovalType = {
|
|
97
|
+
const DefNodeApprovalType = exports.DefNodeApprovalType = {
|
|
116
98
|
/**
|
|
117
99
|
* 单人审批
|
|
118
100
|
*/
|
|
119
101
|
SINGLE: 'SINGLE',
|
|
120
|
-
|
|
121
102
|
/**
|
|
122
103
|
* 会签
|
|
123
104
|
*/
|
|
124
105
|
JOINTLY: 'JOINTLY',
|
|
125
|
-
|
|
126
106
|
/**
|
|
127
107
|
* 并签
|
|
128
108
|
*/
|
|
129
109
|
ORTLY: 'ORTLY',
|
|
130
|
-
|
|
131
110
|
/**
|
|
132
111
|
* 该节点审批人有上一节点选择
|
|
133
112
|
*/
|
|
134
113
|
SELECT: 'SELECT'
|
|
135
114
|
};
|
|
115
|
+
|
|
136
116
|
/**
|
|
137
117
|
* 表單類型
|
|
138
118
|
* @type {{Insert: string, Update: string}}
|
|
139
119
|
*/
|
|
140
|
-
|
|
141
|
-
exports.DefNodeApprovalType = DefNodeApprovalType;
|
|
142
|
-
const InsFormType = {
|
|
120
|
+
const InsFormType = exports.InsFormType = {
|
|
143
121
|
Insert: 'Insert',
|
|
144
122
|
Update: 'Update'
|
|
145
123
|
};
|
|
124
|
+
|
|
146
125
|
/**
|
|
147
126
|
*
|
|
148
127
|
* @type {{Insert: string, Update: string}}
|
|
149
128
|
*/
|
|
150
|
-
|
|
151
|
-
exports.InsFormType = InsFormType;
|
|
152
|
-
const InsFormTypeName = {
|
|
129
|
+
const InsFormTypeName = exports.InsFormTypeName = {
|
|
153
130
|
Insert: '新增',
|
|
154
131
|
Update: '修改'
|
|
155
132
|
};
|
|
133
|
+
|
|
156
134
|
/**
|
|
157
135
|
* 審批頁面操作選項
|
|
158
136
|
* @type {{Comment: number, Revoke: number, Submit: number, Close: number, Approve: number}}
|
|
159
137
|
*/
|
|
160
|
-
|
|
161
|
-
exports.InsFormTypeName = InsFormTypeName;
|
|
162
|
-
const BpmFormOptions = {
|
|
138
|
+
const BpmFormOptions = exports.BpmFormOptions = {
|
|
163
139
|
/**
|
|
164
140
|
* 可審批
|
|
165
141
|
*/
|
|
166
142
|
Approve: 1,
|
|
167
|
-
|
|
168
143
|
/**
|
|
169
144
|
* 可关闭
|
|
170
145
|
*/
|
|
171
146
|
Close: 2,
|
|
172
|
-
|
|
173
147
|
/**
|
|
174
148
|
* 可评论
|
|
175
149
|
*/
|
|
176
150
|
Comment: 3,
|
|
177
|
-
|
|
178
151
|
/**
|
|
179
152
|
* 可撤销
|
|
180
153
|
*/
|
|
181
154
|
Revoke: 4,
|
|
182
|
-
|
|
183
155
|
/**
|
|
184
156
|
* 可以提交
|
|
185
157
|
*/
|
|
186
158
|
Submit: 5,
|
|
187
|
-
|
|
188
159
|
/**
|
|
189
160
|
* 可以停止
|
|
190
161
|
*/
|
|
191
162
|
End: 6,
|
|
192
|
-
|
|
193
163
|
/**
|
|
194
164
|
* 可以保存
|
|
195
165
|
*/
|
|
196
166
|
Save: 7
|
|
197
167
|
};
|
|
168
|
+
|
|
198
169
|
/**
|
|
199
170
|
* 流程執行人类型
|
|
200
171
|
* @type {{TODO: string, COMPLETE: string, NOTICE: string, APPLICANT: string}}
|
|
201
172
|
*/
|
|
202
|
-
|
|
203
|
-
exports.BpmFormOptions = BpmFormOptions;
|
|
204
|
-
const ExeUsrType = {
|
|
173
|
+
const ExeUsrType = exports.ExeUsrType = {
|
|
205
174
|
/**
|
|
206
175
|
* 发起
|
|
207
176
|
*/
|
|
208
177
|
APPLICANT: 'APPLICANT',
|
|
209
|
-
|
|
210
178
|
/**
|
|
211
179
|
* 已处理
|
|
212
180
|
*/
|
|
213
181
|
COMPLETE: 'COMPLETE',
|
|
214
|
-
|
|
215
182
|
/**
|
|
216
183
|
* 待处理
|
|
217
184
|
*/
|
|
218
185
|
TODO: 'TODO',
|
|
219
|
-
|
|
220
186
|
/**
|
|
221
187
|
* 通知
|
|
222
188
|
*/
|
|
223
189
|
NOTICE: 'NOTICE'
|
|
224
190
|
};
|
|
191
|
+
|
|
225
192
|
/**
|
|
226
193
|
* 流程节点处理人的关联状态
|
|
227
194
|
* @type {{REVOKE: string, SUBMIT: string, APPROVE: string, NONE: string, WAIT: string, REFUSE: string}}
|
|
228
195
|
*/
|
|
229
|
-
|
|
230
|
-
exports.ExeUsrType = ExeUsrType;
|
|
231
|
-
const ExeNodeUserOptions = {
|
|
196
|
+
const ExeNodeUserOptions = exports.ExeNodeUserOptions = {
|
|
232
197
|
SUBMIT: 'SUBMIT',
|
|
233
198
|
APPROVE: 'APPROVE',
|
|
234
199
|
REFUSE: 'REFUSE',
|
|
@@ -236,13 +201,11 @@ const ExeNodeUserOptions = {
|
|
|
236
201
|
REVOKE: 'REVOKE',
|
|
237
202
|
NONE: 'NONE'
|
|
238
203
|
};
|
|
239
|
-
exports.
|
|
240
|
-
const ExeNodeUserOptionsName = {
|
|
204
|
+
const ExeNodeUserOptionsName = exports.ExeNodeUserOptionsName = {
|
|
241
205
|
SUBMIT: '提交',
|
|
242
206
|
APPROVE: '通過',
|
|
243
207
|
REFUSE: '拒絕',
|
|
244
208
|
WAIT: '審批中',
|
|
245
209
|
REVOKE: '撤回',
|
|
246
210
|
NONE: '未處理'
|
|
247
|
-
};
|
|
248
|
-
exports.ExeNodeUserOptionsName = ExeNodeUserOptionsName;
|
|
211
|
+
};
|
package/bpm/data/bpm.js
CHANGED
package/bpm/data/bpmDefined.js
CHANGED
|
@@ -4,180 +4,119 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.default = void 0;
|
|
7
|
-
|
|
8
7
|
require("core-js/modules/web.dom.iterable.js");
|
|
9
|
-
|
|
10
8
|
var _bpm = _interopRequireDefault(require("./bpm"));
|
|
11
|
-
|
|
12
9
|
var _serverEnums = require("../config/serverEnums");
|
|
13
|
-
|
|
14
10
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
15
|
-
|
|
16
11
|
function _classPrivateFieldInitSpec(obj, privateMap, value) { _checkPrivateRedeclaration(obj, privateMap); privateMap.set(obj, value); }
|
|
17
|
-
|
|
18
12
|
function _checkPrivateRedeclaration(obj, privateCollection) { if (privateCollection.has(obj)) { throw new TypeError("Cannot initialize the same private elements twice on an object"); } }
|
|
19
|
-
|
|
20
|
-
function
|
|
21
|
-
|
|
22
|
-
function _classApplyDescriptorGet(receiver, descriptor) { if (descriptor.get) { return descriptor.get.call(receiver); } return descriptor.value; }
|
|
23
|
-
|
|
24
|
-
function _classPrivateFieldSet(receiver, privateMap, value) { var descriptor = _classExtractFieldDescriptor(receiver, privateMap, "set"); _classApplyDescriptorSet(receiver, descriptor, value); return value; }
|
|
25
|
-
|
|
26
|
-
function _classExtractFieldDescriptor(receiver, privateMap, action) { if (!privateMap.has(receiver)) { throw new TypeError("attempted to " + action + " private field on non-instance"); } return privateMap.get(receiver); }
|
|
27
|
-
|
|
28
|
-
function _classApplyDescriptorSet(receiver, descriptor, value) { if (descriptor.set) { descriptor.set.call(receiver, value); } else { if (!descriptor.writable) { throw new TypeError("attempted to set read only private field"); } descriptor.value = value; } }
|
|
29
|
-
|
|
13
|
+
function _classPrivateFieldGet(s, a) { return s.get(_assertClassBrand(s, a)); }
|
|
14
|
+
function _classPrivateFieldSet(s, a, r) { return s.set(_assertClassBrand(s, a), r), r; }
|
|
15
|
+
function _assertClassBrand(e, t, n) { if ("function" == typeof e ? e === t : e.has(t)) return arguments.length < 3 ? t : n; throw new TypeError("Private element is not present on this object"); }
|
|
30
16
|
var _defined = /*#__PURE__*/new WeakMap();
|
|
31
|
-
|
|
32
17
|
var _usrDict = /*#__PURE__*/new WeakMap();
|
|
33
|
-
|
|
34
18
|
var _firstUsrList = /*#__PURE__*/new WeakMap();
|
|
35
|
-
|
|
36
19
|
var _startNode = /*#__PURE__*/new WeakMap();
|
|
37
|
-
|
|
38
20
|
var _firstNode = /*#__PURE__*/new WeakMap();
|
|
39
|
-
|
|
40
21
|
class BpmDefined extends _bpm.default {
|
|
41
|
-
/**
|
|
42
|
-
* 流程定義
|
|
43
|
-
* @type {{
|
|
44
|
-
* defNodes:[{id, pid, bpmFk, name, step, nodeType, approvalType}],
|
|
45
|
-
* defNodeUsers:[{id, usrFk, bpmFk, nodeFk}]
|
|
46
|
-
* }|null}
|
|
47
|
-
*/
|
|
48
|
-
//用户字典
|
|
49
|
-
|
|
50
|
-
/**
|
|
51
|
-
*
|
|
52
|
-
* @type {[{id, usrFk, bpmFk, nodeFk}]}
|
|
53
|
-
*/
|
|
54
|
-
|
|
55
|
-
/**
|
|
56
|
-
*
|
|
57
|
-
* @type {{id, pid,bpmFk,name,step,nodeType,approvalType}}
|
|
58
|
-
*/
|
|
59
|
-
|
|
60
|
-
/**
|
|
61
|
-
*
|
|
62
|
-
* @type {{id, pid,bpmFk,name,step,nodeType,approvalType}}
|
|
63
|
-
*/
|
|
64
22
|
constructor(_ref) {
|
|
65
23
|
let {
|
|
66
24
|
defined,
|
|
67
25
|
usrDict
|
|
68
26
|
} = _ref;
|
|
69
27
|
super();
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
_classPrivateFieldSet(
|
|
97
|
-
|
|
98
|
-
_classPrivateFieldSet(this, _usrDict, usrDict);
|
|
28
|
+
/**
|
|
29
|
+
* 流程定義
|
|
30
|
+
* @type {{
|
|
31
|
+
* defNodes:[{id, pid, bpmFk, name, step, nodeType, approvalType}],
|
|
32
|
+
* defNodeUsers:[{id, usrFk, bpmFk, nodeFk}]
|
|
33
|
+
* }|null}
|
|
34
|
+
*/
|
|
35
|
+
_classPrivateFieldInitSpec(this, _defined, null);
|
|
36
|
+
//用户字典
|
|
37
|
+
_classPrivateFieldInitSpec(this, _usrDict, null);
|
|
38
|
+
/**
|
|
39
|
+
*
|
|
40
|
+
* @type {[{id, usrFk, bpmFk, nodeFk}]}
|
|
41
|
+
*/
|
|
42
|
+
_classPrivateFieldInitSpec(this, _firstUsrList, null);
|
|
43
|
+
/**
|
|
44
|
+
*
|
|
45
|
+
* @type {{id, pid,bpmFk,name,step,nodeType,approvalType}}
|
|
46
|
+
*/
|
|
47
|
+
_classPrivateFieldInitSpec(this, _startNode, null);
|
|
48
|
+
/**
|
|
49
|
+
*
|
|
50
|
+
* @type {{id, pid,bpmFk,name,step,nodeType,approvalType}}
|
|
51
|
+
*/
|
|
52
|
+
_classPrivateFieldInitSpec(this, _firstNode, null);
|
|
53
|
+
_classPrivateFieldSet(_defined, this, defined);
|
|
54
|
+
_classPrivateFieldSet(_usrDict, this, usrDict);
|
|
99
55
|
}
|
|
56
|
+
|
|
100
57
|
/**
|
|
101
58
|
* 獲取流程定義信息
|
|
102
59
|
* @return {{defNodes: [{id, pid, bpmFk, name, step, nodeType, approvalType}], defNodeUsers: [{id, usrFk, bpmFk, nodeFk}]}|null}
|
|
103
60
|
*/
|
|
104
|
-
|
|
105
|
-
|
|
106
61
|
getDefined() {
|
|
107
|
-
return _classPrivateFieldGet(
|
|
62
|
+
return _classPrivateFieldGet(_defined, this);
|
|
108
63
|
}
|
|
109
|
-
|
|
110
64
|
getUsrDict() {
|
|
111
|
-
return _classPrivateFieldGet(
|
|
65
|
+
return _classPrivateFieldGet(_usrDict, this);
|
|
112
66
|
}
|
|
113
|
-
|
|
114
67
|
isIns() {
|
|
115
68
|
return false;
|
|
116
69
|
}
|
|
117
|
-
|
|
118
70
|
isDef() {
|
|
119
71
|
return true;
|
|
120
72
|
}
|
|
121
|
-
|
|
122
73
|
/**
|
|
123
74
|
* 獲取流程啟動節點
|
|
124
75
|
* @return {{id, pid, bpmFk, name, step, nodeType, approvalType}}
|
|
125
76
|
*/
|
|
126
77
|
getStartNode() {
|
|
127
|
-
if (!_classPrivateFieldGet(
|
|
128
|
-
for (let node of _classPrivateFieldGet(
|
|
78
|
+
if (!_classPrivateFieldGet(_startNode, this)) {
|
|
79
|
+
for (let node of _classPrivateFieldGet(_defined, this).defNodes) {
|
|
129
80
|
if (_serverEnums.DefNodeType.START === node.nodeType) {
|
|
130
|
-
_classPrivateFieldSet(
|
|
81
|
+
_classPrivateFieldSet(_startNode, this, node);
|
|
131
82
|
}
|
|
132
83
|
}
|
|
133
84
|
}
|
|
134
|
-
|
|
135
|
-
return _classPrivateFieldGet(this, _startNode);
|
|
85
|
+
return _classPrivateFieldGet(_startNode, this);
|
|
136
86
|
}
|
|
87
|
+
|
|
137
88
|
/**
|
|
138
89
|
* 獲取第一個審批節點
|
|
139
90
|
* @return {{id, pid, bpmFk, name, step, nodeType, approvalType}}
|
|
140
91
|
*/
|
|
141
|
-
|
|
142
|
-
|
|
143
92
|
getFirstNode() {
|
|
144
|
-
if (!_classPrivateFieldGet(
|
|
93
|
+
if (!_classPrivateFieldGet(_firstNode, this)) {
|
|
145
94
|
const startNode = this.getStartNode();
|
|
146
|
-
|
|
147
|
-
for (let node of _classPrivateFieldGet(this, _defined).defNodes) {
|
|
95
|
+
for (let node of _classPrivateFieldGet(_defined, this).defNodes) {
|
|
148
96
|
if (startNode.id === node.pid) {
|
|
149
|
-
_classPrivateFieldSet(
|
|
97
|
+
_classPrivateFieldSet(_firstNode, this, node);
|
|
150
98
|
}
|
|
151
99
|
}
|
|
152
100
|
}
|
|
153
|
-
|
|
154
|
-
return _classPrivateFieldGet(this, _firstNode);
|
|
101
|
+
return _classPrivateFieldGet(_firstNode, this);
|
|
155
102
|
}
|
|
103
|
+
|
|
156
104
|
/**
|
|
157
105
|
* 获取第一個審批節點的人員信息
|
|
158
106
|
* @return {{id, usrFk, bpmFk, nodeFk, name}[]}
|
|
159
107
|
*/
|
|
160
|
-
|
|
161
|
-
|
|
162
108
|
getFirstUsrList() {
|
|
163
|
-
if (!_classPrivateFieldGet(
|
|
164
|
-
_classPrivateFieldSet(
|
|
165
|
-
|
|
109
|
+
if (!_classPrivateFieldGet(_firstUsrList, this)) {
|
|
110
|
+
_classPrivateFieldSet(_firstUsrList, this, []);
|
|
166
111
|
const node = this.getFirstNode();
|
|
167
|
-
|
|
168
|
-
for (let usr of _classPrivateFieldGet(this, _defined).defNodeUsers) {
|
|
112
|
+
for (let usr of _classPrivateFieldGet(_defined, this).defNodeUsers) {
|
|
169
113
|
if (usr.nodeFk === node.id) {
|
|
170
|
-
usr.name = _classPrivateFieldGet(
|
|
171
|
-
|
|
172
|
-
_classPrivateFieldGet(this, _firstUsrList).push(usr);
|
|
114
|
+
usr.name = _classPrivateFieldGet(_usrDict, this)[usr.usrFk];
|
|
115
|
+
_classPrivateFieldGet(_firstUsrList, this).push(usr);
|
|
173
116
|
}
|
|
174
117
|
}
|
|
175
118
|
}
|
|
176
|
-
|
|
177
|
-
return _classPrivateFieldGet(this, _firstUsrList);
|
|
119
|
+
return _classPrivateFieldGet(_firstUsrList, this);
|
|
178
120
|
}
|
|
179
|
-
|
|
180
121
|
}
|
|
181
|
-
|
|
182
|
-
var _default = BpmDefined;
|
|
183
|
-
exports.default = _default;
|
|
122
|
+
var _default = exports.default = BpmDefined;
|