fmui-base 2.3.26 → 2.3.28

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/README.md CHANGED
@@ -3,6 +3,8 @@
3
3
  ---npm publish
4
4
 
5
5
  ## 更新日志
6
+ - 2.3.28:传阅支持群发控制,支持禁选组织、职务、群组,管理员跳转选泽的用户用户替换跳转所在的节点办理人,指定办理的环节且后续节点是固定的办理人员的情况下支持无参与者自动通过,流程办理支持多次撤回
7
+ - 2.3.27:批示意见附件样式调整
6
8
  - 2.3.26:月日字符时间类型不回显,办理后丢失问题修复
7
9
  - 2.3.25:表单乐观锁只有自定义流程生效 非approve流程不生效
8
10
  - 2.3.24:流程办理选人组件支持选择群组和职务
@@ -23,6 +23,10 @@ var _db = require('../db/db');
23
23
 
24
24
  var _db2 = _interopRequireDefault(_db);
25
25
 
26
+ var _upload = require('../upload/upload');
27
+
28
+ var _upload2 = _interopRequireDefault(_upload);
29
+
26
30
  require('whatwg-fetch');
27
31
 
28
32
  require('es6-promise');
@@ -31,8 +35,6 @@ require('./List.less');
31
35
 
32
36
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
33
37
 
34
- function _asyncToGenerator(fn) { return function () { var gen = fn.apply(this, arguments); return new Promise(function (resolve, reject) { function step(key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { return Promise.resolve(value).then(function (value) { step("next", value); }, function (err) { step("throw", err); }); } } return step("next"); }); }; }
35
-
36
38
  function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
37
39
 
38
40
  function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
@@ -51,27 +53,9 @@ var PageHome = function (_React$Component) {
51
53
 
52
54
  var _this = _possibleConstructorReturn(this, (PageHome.__proto__ || Object.getPrototypeOf(PageHome)).call(this, props));
53
55
 
54
- var setting = getSysAttachSetting();
55
-
56
- //预览类型,view:永中预览,download:下载
57
- var viewType = 'view';
58
-
59
- if (setting.sysAttachmentView == 0) {
60
- //如果设置中预览关闭则默认下载
61
- viewType = "download";
62
- }
63
-
64
- // let startUserName = decodeURI(this.props.params.startUserName);//创建人用户
65
- // let startUserGroupName = decodeURI(this.props.params.startUserGroupName);//创建人组织
66
- //let startUserId = this.props.params.startUserId;
67
- var token = document.getElementById('token').value;
68
56
  _this.state = {
69
- // attachId:props.attachId,
70
57
  loadImg: _variables2.default.loadImg + "&fid=",
71
- // imgUrl:getImagePreUrl()+'/attachment/download?token='+token+'&',
72
- // queryUrl: context + '/api/m/plugin/attachment/mobile/getAttachmentByIds?token='+token+'&ids=',
73
- commentList: [],
74
- viewType: viewType
58
+ commentList: props.list || []
75
59
  };
76
60
 
77
61
  return _this;
@@ -81,13 +65,10 @@ var PageHome = function (_React$Component) {
81
65
  key: 'componentDidMount',
82
66
  value: function componentDidMount() {
83
67
  var t = this;
84
- var token = document.getElementById('token').value;
85
- this.initData(token, function (commentList) {
86
- t.setState({
87
- commentList: commentList
88
- }, function () {
89
- t.casigin();
90
- });
68
+ t.setState({
69
+ commentList: t.props.list || []
70
+ }, function () {
71
+ t.casigin();
91
72
  });
92
73
  }
93
74
 
@@ -168,149 +149,15 @@ var PageHome = function (_React$Component) {
168
149
  }
169
150
  }
170
151
 
171
- //初始化ids
152
+ /** 批示意见 attachId 多为 | 分隔,Upload 组件 initIds 用逗号 */
172
153
 
173
154
  }, {
174
- key: 'initData',
175
- value: function () {
176
- var _ref = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee(token, sucess) {
177
- var t, context, url, commentList, attachIds;
178
- return regeneratorRuntime.wrap(function _callee$(_context) {
179
- while (1) {
180
- switch (_context.prev = _context.next) {
181
- case 0:
182
- t = this;
183
- context = document.getElementById("context").value;
184
- url = context + '/api/m/plugin/attachment/mobile/getAttachmentByIds?token=' + token + '&ids=';
185
- commentList = this.props.list;
186
- attachIds = "";
187
-
188
- if (!commentList || typeof commentList == 'undefined' || commentList.length == 0) {
189
- commentList = [];
190
- }
191
- // var attachMap = {};
192
- commentList.map(function (item) {
193
- // var commentId = item.id;
194
- var attachId = item.attachId;
195
- if (attachId) {
196
- attachId = attachId.replaceAll("|", ",");
197
- attachIds = attachIds + "," + attachId;
198
- // attachMap[commentId] = attachId;
199
- }
200
- });
201
-
202
- if (!attachIds) {
203
- _context.next = 14;
204
- break;
205
- }
206
-
207
- attachIds = attachIds.substring(1);
208
- _context.next = 11;
209
- return t.promises(url + attachIds).then(function (e) {
210
- commentList.map(function (item) {
211
- // var commentId = item.id;
212
- var attachId = item.attachId;
213
- if (attachId) {
214
- var fileList = [];
215
- var attachArray = attachId.split("|");
216
- attachArray.map(function (attachItem) {
217
- for (var i = 0; i < e.length; i++) {
218
- if (attachItem == e[i].id) {
219
- fileList.push(e[i]);
220
- }
221
- }
222
- });
223
- item.fileList = fileList;
224
- }
225
- });
226
- });
227
-
228
- case 11:
229
- sucess(commentList);
230
- _context.next = 15;
231
- break;
232
-
233
- case 14:
234
- sucess(commentList);
235
-
236
- case 15:
237
- case 'end':
238
- return _context.stop();
239
- }
240
- }
241
- }, _callee, this);
242
- }));
243
-
244
- function initData(_x, _x2) {
245
- return _ref.apply(this, arguments);
246
- }
247
-
248
- return initData;
249
- }()
250
- }, {
251
- key: 'promises',
252
- value: function promises(url) {
253
- return new Promise(function (resolve, reject) {
254
- try {
255
- fetch(url, {
256
- method: "POST",
257
- headers: {
258
- 'Content-Type': 'application/x-www-form-urlencoded'
259
- }
260
- }).then(function (res) {
261
- if (res.ok) {
262
- res.json().then(function (obj) {
263
- var objList = obj.data;
264
- resolve(objList);
265
- });
266
- } else if (res.status == 401) {
267
- // To do with res
268
- }
269
- });
270
- } catch (e) {
271
- console.log(e);
272
- }
273
- });
274
- }
275
-
276
- //预览
277
-
278
- }, {
279
- key: 'view',
280
- value: function view(file) {
281
- var id = file.id;
282
- if (this.state.viewType == 'view') {
283
- var fileExt = file.fileExt;
284
- downloadFile(id, 'android', fileExt);
285
- } else {
286
- downloadFile(id);
287
- }
288
- }
289
-
290
- //下载批示意见附件
291
-
292
- }, {
293
- key: 'downloadAttach',
294
- value: function downloadAttach(file, e) {
295
- if (e && e.stopPropagation) {
296
- e.stopPropagation();
297
- }
298
- if (e && e.preventDefault) {
299
- e.preventDefault();
300
- }
301
- // 公众号不支持下载
302
- if (getLoginUserInfo().thirdMenuType == 'WeChat') {
303
- return;
304
- }
305
- var id = file.id;
306
- var fileExt = file.fileExt;
307
- if (typeof downloadFile === 'function') {
308
- try {
309
- downloadFile(id, 'download', fileExt);
310
- } catch (err) {
311
- downloadFile(id);
312
- }
155
+ key: 'getAttachInitIds',
156
+ value: function getAttachInitIds(attachId) {
157
+ if (!attachId) {
158
+ return '';
313
159
  }
160
+ return String(attachId).replace(/\|/g, ',');
314
161
  }
315
162
  }, {
316
163
  key: 'getCommentSign',
@@ -404,49 +251,18 @@ var PageHome = function (_React$Component) {
404
251
  { className: 't-PR16' },
405
252
  _react2.default.createElement('img', { width: '100%', height: '128', src: t.state.loadImg + item.fullMessage })
406
253
  ),
407
- _react2.default.createElement(
254
+ item.attachId ? _react2.default.createElement(
408
255
  'div',
409
- { className: 'comment-attach-list' },
410
- item.fileList && item.fileList.length > 0 ? item.fileList.map(function (item2, i) {
411
- function calculate(no) {
412
- var a = no / 1024;
413
- if (a < 1) {
414
- return no + 'B';
415
- }
416
- var b = a / 1024;
417
- if (b < 1) {
418
- return Math.round(a * 100) / 100 + 'KB';
419
- }
420
- return Math.round(b * 100) / 100 + 'MB';
421
- }
422
- var showDownload = getLoginUserInfo().thirdMenuType != 'WeChat';
423
- return _react2.default.createElement(
424
- 'div',
425
- { className: 't-FBH comment-attach-item', key: i },
426
- _react2.default.createElement(
427
- 'div',
428
- { className: 'dd-t-border t-P6 t-MB10 t-FB1', onClick: t.view.bind(t, item2) },
429
- _react2.default.createElement('i', { className: 'iconfont icon-file t-FC9 t-FL t-MR6' }),
430
- _react2.default.createElement(
431
- 'div',
432
- { className: 'dd-t-list-text-content' },
433
- _react2.default.createElement(
434
- 'div',
435
- { className: 't-list-title comment-attach-name t-LH1_4' },
436
- typeof item2.fileDisplayName == 'undefined' ? item2.name : item2.fileDisplayName
437
- ),
438
- _react2.default.createElement(
439
- 'div',
440
- { className: 'dd-t-list-time t-FBAC' },
441
- calculate(typeof item2.fileSize == 'undefined' ? item2.size : item2.fileSize)
442
- )
443
- )
444
- ),
445
- _react2.default.createElement('i', { className: showDownload ? 'iconfont icon-download1 comment-attach-download' : 't-DN',
446
- onClick: t.downloadAttach.bind(t, item2) })
447
- );
448
- }) : ""
449
- ),
256
+ { className: 'comment-attach-list t-PR16' },
257
+ _react2.default.createElement(_upload2.default, {
258
+ key: 'comment_attach_' + item.id,
259
+ required: false,
260
+ canAdd: false,
261
+ canDel: false,
262
+ canDownload: true,
263
+ initIds: t.getAttachInitIds(item.attachId)
264
+ })
265
+ ) : null,
450
266
  _react2.default.createElement(
451
267
  Box,
452
268
  { vAlign: 'start', hAlign: 'end', id: 'commentSign-' + item.id, className: 't-FBH t-PR16' },
@@ -5,45 +5,7 @@
5
5
  padding-right:0px;
6
6
  }
7
7
 
8
- /* 批示意见附件:名称完整换行显示 */
8
+ /* 批示意见附件复用 Upload 组件样式,仅保留容器间距 */
9
9
  .comment-attach-list {
10
- .comment-attach-item {
11
- align-items: flex-start;
12
- }
13
-
14
- .comment-attach-name,
15
- .t-list-title.comment-attach-name {
16
- display: block !important;
17
- white-space: normal !important;
18
- word-break: break-all !important;
19
- overflow-wrap: break-word !important;
20
- word-wrap: break-word !important;
21
- overflow: visible !important;
22
- text-overflow: clip !important;
23
- -webkit-line-clamp: unset !important;
24
- line-clamp: unset !important;
25
- -webkit-box-orient: horizontal !important;
26
- max-width: 100%;
27
- line-height: 1.4;
28
- }
29
-
30
- .dd-t-list-text-content {
31
- min-width: 0;
32
- overflow: visible;
33
- }
34
-
35
- /* 与表单附件下载按钮保持一致:普通图标,无蓝色圆底 */
36
- .comment-attach-download {
37
- flex-shrink: 0;
38
- margin-right: 5px;
39
- margin-top: 8px;
40
- font-size: 16px;
41
- background: transparent;
42
- color: inherit;
43
- width: auto;
44
- height: auto;
45
- line-height: inherit;
46
- border-radius: 0;
47
- text-align: center;
48
- }
10
+ margin-top: 4px;
49
11
  }
@@ -1703,6 +1703,7 @@ var PageHome = function (_React$Component) {
1703
1703
  checkedItem.end = item.end;
1704
1704
  checkedItem.must = item.must;
1705
1705
  checkedItem.participants = participants;
1706
+ checkedItem.noPar = item.noPar;
1706
1707
  if (item.end == true) {
1707
1708
  isEnd = true;
1708
1709
  }
@@ -2205,6 +2206,7 @@ var PageHome = function (_React$Component) {
2205
2206
  checkedItem.end = item.end;
2206
2207
  checkedItem.level = item.level;
2207
2208
  checkedItem.maxOutgoing = maxOutgoing;
2209
+ checkedItem.noPar = item.noPar;
2208
2210
  if (no == 0 && m == 0) {
2209
2211
  //随机节点第一个默认选中
2210
2212
  if (maxOutgoing != 1 || maxOutgoing == 1 && checkActi == '0') {
@@ -2446,7 +2448,7 @@ var PageHome = function (_React$Component) {
2446
2448
  if (operate == 1) {
2447
2449
  //审批提交
2448
2450
  _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee2() {
2449
- var editFormData, nextRadomListSelect, nextActivityListSelect, selectedActivity, nextActivityList, i, auditorUserIds, auditorUserNames, checked, personValue, isEnd, participantMode, orgUserList, orgUserids, orgUsernames, j, groupUserList, gj, gid, gname, dutyUserList, dj, did, dname, level, urgentListSelect, urgent, _i, sshortMessage, sendShortMessage, cshortMessage, circulateShortMessage, param, dealActionName;
2451
+ var editFormData, nextRadomListSelect, nextActivityListSelect, selectedActivity, nextActivityList, i, auditorUserIds, auditorUserNames, checked, personValue, isEnd, noParVal, noParPass, participantMode, orgUserList, orgUserids, orgUsernames, j, groupUserList, gj, gid, gname, dutyUserList, dj, did, dname, level, urgentListSelect, urgent, _i, sshortMessage, sendShortMessage, cshortMessage, circulateShortMessage, param, dealActionName;
2450
2452
 
2451
2453
  return regeneratorRuntime.wrap(function _callee2$(_context2) {
2452
2454
  while (1) {
@@ -2458,7 +2460,7 @@ var PageHome = function (_React$Component) {
2458
2460
  selectedActivity = '';
2459
2461
 
2460
2462
  if (!(nextRadomListSelect.length > 0 || nextActivityListSelect.length > 0)) {
2461
- _context2.next = 48;
2463
+ _context2.next = 51;
2462
2464
  break;
2463
2465
  }
2464
2466
 
@@ -2474,7 +2476,7 @@ var PageHome = function (_React$Component) {
2474
2476
 
2475
2477
  case 10:
2476
2478
  if (!(i < nextActivityList.length)) {
2477
- _context2.next = 41;
2479
+ _context2.next = 44;
2478
2480
  break;
2479
2481
  }
2480
2482
 
@@ -2483,7 +2485,7 @@ var PageHome = function (_React$Component) {
2483
2485
  checked = nextActivityList[i].checked;
2484
2486
 
2485
2487
  if (!checked) {
2486
- _context2.next = 38;
2488
+ _context2.next = 41;
2487
2489
  break;
2488
2490
  }
2489
2491
 
@@ -2491,26 +2493,34 @@ var PageHome = function (_React$Component) {
2491
2493
  isEnd = nextActivityList[i].end;
2492
2494
 
2493
2495
  if (!(personValue.length <= 0 && !isEnd)) {
2494
- _context2.next = 20;
2496
+ _context2.next = 23;
2497
+ break;
2498
+ }
2499
+
2500
+ noParVal = nextActivityList[i].noPar;
2501
+ noParPass = noParVal == '1' || noParVal == 1 || noParVal == '2' || noParVal == 2;
2502
+
2503
+ if (nextActivityList[i].type == 3 && noParPass) {
2504
+ _context2.next = 23;
2495
2505
  break;
2496
2506
  }
2497
2507
 
2498
2508
  _Toast2.default.show({
2499
2509
  type: 'error',
2500
- content: '请选择审批人'
2510
+ content: nextActivityList[i].type == 3 ? '未找到办理人员,不允许提交' : '请选择审批人'
2501
2511
  });
2502
2512
  return _context2.abrupt('return', false);
2503
2513
 
2504
- case 20:
2514
+ case 23:
2505
2515
  participantMode = nextActivityList[i].participantMode;
2506
2516
 
2507
2517
  if (!(participantMode == 0)) {
2508
- _context2.next = 27;
2518
+ _context2.next = 30;
2509
2519
  break;
2510
2520
  }
2511
2521
 
2512
2522
  if (!(personValue.length > 1)) {
2513
- _context2.next = 25;
2523
+ _context2.next = 28;
2514
2524
  break;
2515
2525
  }
2516
2526
 
@@ -2520,11 +2530,11 @@ var PageHome = function (_React$Component) {
2520
2530
  });
2521
2531
  return _context2.abrupt('return', false);
2522
2532
 
2523
- case 25:
2524
- _context2.next = 31;
2533
+ case 28:
2534
+ _context2.next = 34;
2525
2535
  break;
2526
2536
 
2527
- case 27:
2537
+ case 30:
2528
2538
  participantMode = participantMode + "";
2529
2539
  if (participantMode.indexOf('1') > -1) {
2530
2540
  participantMode = '1';
@@ -2536,9 +2546,9 @@ var PageHome = function (_React$Component) {
2536
2546
  participantMode = '2';
2537
2547
  }
2538
2548
 
2539
- case 31:
2549
+ case 34:
2540
2550
  if (isEnd) {
2541
- _context2.next = 35;
2551
+ _context2.next = 38;
2542
2552
  break;
2543
2553
  }
2544
2554
 
@@ -2652,13 +2662,13 @@ var PageHome = function (_React$Component) {
2652
2662
  }
2653
2663
  }
2654
2664
  }, _callee, _this2);
2655
- })(), 't0', 33);
2665
+ })(), 't0', 36);
2656
2666
 
2657
- case 33:
2658
- _context2.next = 38;
2667
+ case 36:
2668
+ _context2.next = 41;
2659
2669
  break;
2660
2670
 
2661
- case 35:
2671
+ case 38:
2662
2672
  level = nextActivityList[i].level;
2663
2673
 
2664
2674
  if (level == null) {
@@ -2666,30 +2676,30 @@ var PageHome = function (_React$Component) {
2666
2676
  }
2667
2677
  selectedActivity += '{"id":"' + nextActivityList[i].value + '","name":"' + nextActivityList[i].name + '","level":"' + level + '","participantType":"' + participantMode + '"},';
2668
2678
 
2669
- case 38:
2679
+ case 41:
2670
2680
  i++;
2671
2681
  _context2.next = 10;
2672
2682
  break;
2673
2683
 
2674
- case 41:
2684
+ case 44:
2675
2685
  if (!(selectedActivity != '')) {
2676
- _context2.next = 46;
2686
+ _context2.next = 49;
2677
2687
  break;
2678
2688
  }
2679
2689
 
2680
2690
  selectedActivity = selectedActivity.substring(0, selectedActivity.length - 1);
2681
2691
  selectedActivity = '[' + selectedActivity + ']';
2682
- _context2.next = 48;
2692
+ _context2.next = 51;
2683
2693
  break;
2684
2694
 
2685
- case 46:
2695
+ case 49:
2686
2696
  _Toast2.default.show({
2687
2697
  type: 'error',
2688
2698
  content: '请选择节点'
2689
2699
  });
2690
2700
  return _context2.abrupt('return', false);
2691
2701
 
2692
- case 48:
2702
+ case 51:
2693
2703
  urgentListSelect = t.state.urgentSelectList;
2694
2704
  urgent = '';
2695
2705
 
@@ -2744,7 +2754,7 @@ var PageHome = function (_React$Component) {
2744
2754
 
2745
2755
  _this2.sendFlow(param);
2746
2756
 
2747
- case 62:
2757
+ case 65:
2748
2758
  case 'end':
2749
2759
  return _context2.stop();
2750
2760
  }
@@ -668,6 +668,7 @@ var PageHome = function (_React$Component) {
668
668
  checkedItem.maxOutgoing = maxOutgoing;
669
669
  checkedItem.participants = participants;
670
670
  checkedItem.parallelGatewayId = item.parallelGatewayId;
671
+ checkedItem.noPar = item.noPar;
671
672
  if (item.must == true && (maxOutgoing == 1 && checkActi == 0 || maxOutgoing == 0)) {
672
673
  //必须
673
674
  checkedItem.disable = false;
@@ -928,6 +929,7 @@ var PageHome = function (_React$Component) {
928
929
  checkedItem.end = item.end;
929
930
  checkedItem.level = item.level;
930
931
  checkedItem.maxOutgoing = maxOutgoing;
932
+ checkedItem.noPar = item.noPar;
931
933
  if (no == 0 && m == 0) {
932
934
  //随机节点第一个默认选中
933
935
  if (maxOutgoing != 1 || maxOutgoing == 1 && checkActi == '0') {
@@ -1038,11 +1040,15 @@ var PageHome = function (_React$Component) {
1038
1040
  var isEnd = nextActivityList[i].end;
1039
1041
 
1040
1042
  if (personValue.length <= 0 && !isEnd) {
1041
- _Toast2.default.show({
1042
- type: 'error',
1043
- content: '请选择审批人'
1044
- });
1045
- return false;
1043
+ var noParVal = nextActivityList[i].noPar;
1044
+ var noParPass = noParVal == '1' || noParVal == 1 || noParVal == '2' || noParVal == 2;
1045
+ if (!(nextActivityList[i].type == 3 && noParPass)) {
1046
+ _Toast2.default.show({
1047
+ type: 'error',
1048
+ content: nextActivityList[i].type == 3 ? '未找到办理人员,不允许提交' : '请选择审批人'
1049
+ });
1050
+ return false;
1051
+ }
1046
1052
  }
1047
1053
  var participantMode = nextActivityList[i].participantMode;
1048
1054
  if (participantMode == 0) {
@@ -509,6 +509,9 @@ var PageHome = function (_React$Component) {
509
509
  readScopeId: '',
510
510
  readScopeList: [],
511
511
  readRangeType: '', //传阅范围 0全部 2本组织及下属组织 4自定义
512
+ readAllowOrg: '0', // 传阅允许选组织 1允许 其它禁止
513
+ readAllowGroup: '0',
514
+ readAllowDuty: '0',
512
515
  readRangeList: '', //传阅范围为自定义时的limitData
513
516
  isRemoveCommentFormHtml: '0', //是否隐藏无数据的批示意见 1隐藏
514
517
  allActivity: [], //所有环节名称
@@ -522,7 +525,7 @@ var PageHome = function (_React$Component) {
522
525
  selectProcessCode: '', //选中的子流程
523
526
  subProcessType: '', //子流程类型 0串行 1并行
524
527
  urgencyList: [], //紧急程度列表
525
- urgency: '' }, _defineProperty(_param, 'urgent', ''), _defineProperty(_param, 'backInitiatorEndFlow', '0'), _defineProperty(_param, 'oauthWindowURL', ''), _defineProperty(_param, 'signDataId', ''), _defineProperty(_param, 'isCaUser', '0'), _defineProperty(_param, 'caFirm', ''), _defineProperty(_param, 'caESignatureName', ''), _defineProperty(_param, 'caFormSign', ''), _defineProperty(_param, 'addlotsReturn', ''), _defineProperty(_param, 'inscriptionShow', ''), _defineProperty(_param, 'showOrgSwitcher', false), _defineProperty(_param, 'approveOrgOptions', []), _defineProperty(_param, 'approveOrgSelectValue', {}), _defineProperty(_param, 'approveFormParttimeOrgEnabled', true), _defineProperty(_param, 'approveCurOrgId', ''), _defineProperty(_param, 'startUserOrgId', ''), _defineProperty(_param, 'taskAssignOrgId', ''), _defineProperty(_param, 'approveOrgApiUnavailable', false), _param);
528
+ urgency: '' }, _defineProperty(_param, 'urgent', ''), _defineProperty(_param, 'backInitiatorEndFlow', '0'), _defineProperty(_param, 'oauthWindowURL', ''), _defineProperty(_param, 'signDataId', ''), _defineProperty(_param, 'isCaUser', '0'), _defineProperty(_param, 'caFirm', ''), _defineProperty(_param, 'caESignatureName', ''), _defineProperty(_param, 'caFormSign', ''), _defineProperty(_param, 'addlotsReturn', ''), _defineProperty(_param, 'inscriptionShow', ''), _defineProperty(_param, 'showOrgSwitcher', false), _defineProperty(_param, 'approveOrgOptions', []), _defineProperty(_param, 'approveOrgSelectValue', {}), _defineProperty(_param, 'approveOrgLocked', false), _defineProperty(_param, 'approveFormParttimeOrgEnabled', true), _defineProperty(_param, 'approveCurOrgId', ''), _defineProperty(_param, 'startUserOrgId', ''), _defineProperty(_param, 'taskAssignOrgId', ''), _defineProperty(_param, 'approveOrgApiUnavailable', false), _param);
526
529
  FlowCommon = require('pages/flow_common/' + module).default ? require('pages/flow_common/' + module).default : require('pages/flow_common/' + module);
527
530
 
528
531
  //处理特有参数
@@ -891,6 +894,18 @@ var PageHome = function (_React$Component) {
891
894
  if (content.readRangeType && typeof content.readRangeType != "undefined") {
892
895
  readRangeType = content.readRangeType;
893
896
  }
897
+ var readAllowOrg = '0';
898
+ var readAllowGroup = '0';
899
+ var readAllowDuty = '0';
900
+ if (content.readAllowOrg === '1' || content.readAllowOrg === 1) {
901
+ readAllowOrg = '1';
902
+ }
903
+ if (content.readAllowGroup === '1' || content.readAllowGroup === 1) {
904
+ readAllowGroup = '1';
905
+ }
906
+ if (content.readAllowDuty === '1' || content.readAllowDuty === 1) {
907
+ readAllowDuty = '1';
908
+ }
894
909
  if (content.readRangeList && typeof content.readRangeList != "undefined") {
895
910
  readRangeList = content.readRangeList;
896
911
  }
@@ -1583,6 +1598,9 @@ var PageHome = function (_React$Component) {
1583
1598
  readScopeList: readScopeList,
1584
1599
  readRangeType: readRangeType,
1585
1600
  readRangeList: readRangeList,
1601
+ readAllowOrg: readAllowOrg,
1602
+ readAllowGroup: readAllowGroup,
1603
+ readAllowDuty: readAllowDuty,
1586
1604
  isRemoveCommentFormHtml: isRemoveCommentFormHtml,
1587
1605
  commentUpload: commentUpload,
1588
1606
  subProcessCode: subProcessCode,
@@ -2926,6 +2944,7 @@ var PageHome = function (_React$Component) {
2926
2944
  checkedItem.level = item.level;
2927
2945
  checkedItem.maxOutgoing = maxOutgoing;
2928
2946
  checkedItem.parallelGatewayId = item.parallelGatewayId;
2947
+ checkedItem.noPar = item.noPar;
2929
2948
  if (item.must == true && (maxOutgoing == 1 && checkActi == 0 || maxOutgoing == 0)) {
2930
2949
  //必须
2931
2950
  checkedItem.disable = false;
@@ -3823,6 +3842,21 @@ var PageHome = function (_React$Component) {
3823
3842
  }, 500);
3824
3843
  }
3825
3844
 
3845
+ /** 传阅选人:按节点允许配置拼 chooseType,缺省禁止组织/群组/职务 */
3846
+
3847
+ }, {
3848
+ key: 'getCirculateChooseType',
3849
+ value: function getCirculateChooseType() {
3850
+ var choose = [];
3851
+ choose.push(this.state.readAllowOrg === '1' ? 'userAndOrg' : 'userNotOrg');
3852
+ choose.push(this.state.readAllowGroup === '1' ? 'userAndGroup' : 'userNotGroup');
3853
+ choose.push(this.state.readAllowDuty === '1' ? 'userAndDuty' : 'userNotDuty');
3854
+ choose.push('userNotPoliticalOutlook');
3855
+ choose.push('userAndStation');
3856
+ choose.push('userAndPersonGroup');
3857
+ return choose.join(',');
3858
+ }
3859
+
3826
3860
  //获取所有表单id,包括子表id
3827
3861
 
3828
3862
  }, {
@@ -3993,7 +4027,7 @@ var PageHome = function (_React$Component) {
3993
4027
  if (operate == 1) {
3994
4028
  //审批提交
3995
4029
  _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee2() {
3996
- var editFormData, nextRadomListSelect, nextActivityListSelect, selectedActivity, nextActivityList, i, auditorUserIds, auditorUserNames, checked, personValue, isEnd, participantMode, orgUserList, orgUserids, orgUsernames, j, groupUserList, gj, gid, gname, dutyUserList, dj, did, dname, level, urgentListSelect, urgent, sshortMessage, sendShortMessage, cshortMessage, circulateShortMessage, allEditIds, dataId, param, dealActionName;
4030
+ var editFormData, nextRadomListSelect, nextActivityListSelect, selectedActivity, nextActivityList, i, auditorUserIds, auditorUserNames, checked, personValue, isEnd, noParVal, noParPass, participantMode, orgUserList, orgUserids, orgUsernames, j, groupUserList, gj, gid, gname, dutyUserList, dj, did, dname, level, urgentListSelect, urgent, sshortMessage, sendShortMessage, cshortMessage, circulateShortMessage, allEditIds, dataId, param, dealActionName;
3997
4031
  return regeneratorRuntime.wrap(function _callee2$(_context2) {
3998
4032
  while (1) {
3999
4033
  switch (_context2.prev = _context2.next) {
@@ -4004,7 +4038,7 @@ var PageHome = function (_React$Component) {
4004
4038
  selectedActivity = '';
4005
4039
 
4006
4040
  if (!(nextRadomListSelect.length > 0 || nextActivityListSelect.length > 0)) {
4007
- _context2.next = 54;
4041
+ _context2.next = 57;
4008
4042
  break;
4009
4043
  }
4010
4044
 
@@ -4020,7 +4054,7 @@ var PageHome = function (_React$Component) {
4020
4054
 
4021
4055
  case 10:
4022
4056
  if (!(i < nextActivityList.length)) {
4023
- _context2.next = 47;
4057
+ _context2.next = 50;
4024
4058
  break;
4025
4059
  }
4026
4060
 
@@ -4029,7 +4063,7 @@ var PageHome = function (_React$Component) {
4029
4063
  checked = nextActivityList[i].checked;
4030
4064
 
4031
4065
  if (!checked) {
4032
- _context2.next = 44;
4066
+ _context2.next = 47;
4033
4067
  break;
4034
4068
  }
4035
4069
 
@@ -4039,12 +4073,16 @@ var PageHome = function (_React$Component) {
4039
4073
  console.log("personValue:" + JSON.stringify(personValue));
4040
4074
 
4041
4075
  if (!(personValue.length <= 0 && !isEnd)) {
4042
- _context2.next = 26;
4076
+ _context2.next = 29;
4043
4077
  break;
4044
4078
  }
4045
4079
 
4046
- if (!(nextActivityList[i].type == 3)) {
4047
- _context2.next = 24;
4080
+ // 设计器 noPar=1=审批通过(兼容误写 2):指定办理人为空时放行
4081
+ noParVal = nextActivityList[i].noPar;
4082
+ noParPass = noParVal == '1' || noParVal == 1 || noParVal == '2' || noParVal == 2;
4083
+
4084
+ if (!(nextActivityList[i].type == 3 && !noParPass)) {
4085
+ _context2.next = 26;
4048
4086
  break;
4049
4087
  }
4050
4088
 
@@ -4054,23 +4092,28 @@ var PageHome = function (_React$Component) {
4054
4092
  });
4055
4093
  return _context2.abrupt('return', false);
4056
4094
 
4057
- case 24:
4095
+ case 26:
4096
+ if (!(nextActivityList[i].type != 3)) {
4097
+ _context2.next = 29;
4098
+ break;
4099
+ }
4100
+
4058
4101
  _Toast2.default.show({
4059
4102
  type: 'error',
4060
4103
  content: '请选择审批人'
4061
4104
  });
4062
4105
  return _context2.abrupt('return', false);
4063
4106
 
4064
- case 26:
4107
+ case 29:
4065
4108
  participantMode = nextActivityList[i].participantMode;
4066
4109
 
4067
4110
  if (!(participantMode == 0)) {
4068
- _context2.next = 33;
4111
+ _context2.next = 36;
4069
4112
  break;
4070
4113
  }
4071
4114
 
4072
4115
  if (!(personValue.length > 1)) {
4073
- _context2.next = 31;
4116
+ _context2.next = 34;
4074
4117
  break;
4075
4118
  }
4076
4119
 
@@ -4080,11 +4123,11 @@ var PageHome = function (_React$Component) {
4080
4123
  });
4081
4124
  return _context2.abrupt('return', false);
4082
4125
 
4083
- case 31:
4084
- _context2.next = 37;
4126
+ case 34:
4127
+ _context2.next = 40;
4085
4128
  break;
4086
4129
 
4087
- case 33:
4130
+ case 36:
4088
4131
  participantMode = participantMode + "";
4089
4132
  if (participantMode.indexOf('1') > -1) {
4090
4133
  participantMode = '1';
@@ -4096,9 +4139,9 @@ var PageHome = function (_React$Component) {
4096
4139
  participantMode = '2';
4097
4140
  }
4098
4141
 
4099
- case 37:
4142
+ case 40:
4100
4143
  if (isEnd) {
4101
- _context2.next = 41;
4144
+ _context2.next = 44;
4102
4145
  break;
4103
4146
  }
4104
4147
 
@@ -4212,13 +4255,13 @@ var PageHome = function (_React$Component) {
4212
4255
  }
4213
4256
  }
4214
4257
  }, _callee, _this3);
4215
- })(), 't0', 39);
4258
+ })(), 't0', 42);
4216
4259
 
4217
- case 39:
4218
- _context2.next = 44;
4260
+ case 42:
4261
+ _context2.next = 47;
4219
4262
  break;
4220
4263
 
4221
- case 41:
4264
+ case 44:
4222
4265
  level = nextActivityList[i].level;
4223
4266
 
4224
4267
  if (level == null) {
@@ -4226,30 +4269,30 @@ var PageHome = function (_React$Component) {
4226
4269
  }
4227
4270
  selectedActivity += '{"id":"' + nextActivityList[i].value + '","name":"' + nextActivityList[i].name + '","level":"' + level + '","participantType":"' + participantMode + '"},';
4228
4271
 
4229
- case 44:
4272
+ case 47:
4230
4273
  i++;
4231
4274
  _context2.next = 10;
4232
4275
  break;
4233
4276
 
4234
- case 47:
4277
+ case 50:
4235
4278
  if (!(selectedActivity != '')) {
4236
- _context2.next = 52;
4279
+ _context2.next = 55;
4237
4280
  break;
4238
4281
  }
4239
4282
 
4240
4283
  selectedActivity = selectedActivity.substring(0, selectedActivity.length - 1);
4241
4284
  selectedActivity = '[' + selectedActivity + ']';
4242
- _context2.next = 54;
4285
+ _context2.next = 57;
4243
4286
  break;
4244
4287
 
4245
- case 52:
4288
+ case 55:
4246
4289
  _Toast2.default.show({
4247
4290
  type: 'error',
4248
4291
  content: '请选择节点'
4249
4292
  });
4250
4293
  return _context2.abrupt('return', false);
4251
4294
 
4252
- case 54:
4295
+ case 57:
4253
4296
  urgentListSelect = t.state.urgentSelectList;
4254
4297
  urgent = '';
4255
4298
 
@@ -4310,7 +4353,7 @@ var PageHome = function (_React$Component) {
4310
4353
  param.dealActionName = dealActionName;
4311
4354
  _this3.sendFlow(param);
4312
4355
 
4313
- case 70:
4356
+ case 73:
4314
4357
  case 'end':
4315
4358
  return _context2.stop();
4316
4359
  }
@@ -7849,6 +7892,7 @@ var PageHome = function (_React$Component) {
7849
7892
  value: function hideApproveOrgSwitcherSilently() {
7850
7893
  this.setState({
7851
7894
  showOrgSwitcher: false,
7895
+ approveOrgLocked: false,
7852
7896
  approveOrgOptions: [],
7853
7897
  approveOrgSelectValue: {},
7854
7898
  approveCurOrgId: '',
@@ -7905,10 +7949,13 @@ var PageHome = function (_React$Component) {
7905
7949
  }
7906
7950
  }, {
7907
7951
  key: 'renderApproveOrgSwitcher',
7908
- value: function renderApproveOrgSwitcher(orgList, selectedOrgId) {
7909
- if (!this.isApproveFormParttimeOrgEnabled() || !orgList || orgList.length <= 1) {
7952
+ value: function renderApproveOrgSwitcher(orgList, selectedOrgId, locked) {
7953
+ var lockOrg = !!locked;
7954
+ // 普通:需启用兼职切换且多于1个;锁定:有组织即可展示(只读)
7955
+ if (!lockOrg && (!this.isApproveFormParttimeOrgEnabled() || !orgList || orgList.length <= 1) || lockOrg && (!orgList || orgList.length == 0)) {
7910
7956
  this.setState({
7911
7957
  showOrgSwitcher: false,
7958
+ approveOrgLocked: false,
7912
7959
  approveOrgOptions: [],
7913
7960
  approveOrgSelectValue: {},
7914
7961
  approveCurOrgId: ''
@@ -7930,6 +7977,7 @@ var PageHome = function (_React$Component) {
7930
7977
  }
7931
7978
  this.setState({
7932
7979
  showOrgSwitcher: true,
7980
+ approveOrgLocked: lockOrg,
7933
7981
  approveOrgOptions: options,
7934
7982
  approveOrgSelectValue: selectValue,
7935
7983
  approveCurOrgId: selectedOrgId || ''
@@ -7948,6 +7996,7 @@ var PageHome = function (_React$Component) {
7948
7996
  window.approveOrgSwitcherSeq++;
7949
7997
  var currentSeq = window.approveOrgSwitcherSeq;
7950
7998
  var autoSwitchKey = t.state.taskId || t.state.processInstanceId || '';
7999
+ var lockAssignOrg = !!(t.state.taskAssignOrgId && (t.state.taskAssignOrgId + '').length > 0);
7951
8000
  if (!window.approveOrgAutoSwitchedMap) {
7952
8001
  window.approveOrgAutoSwitchedMap = {};
7953
8002
  }
@@ -7966,10 +8015,11 @@ var PageHome = function (_React$Component) {
7966
8015
  userInfo = userInfo.content;
7967
8016
  }
7968
8017
  var orgList = userInfo.orgList || [];
7969
- var showSwitcher = parttimeOrgEnabled !== false && orgList && orgList.length > 1;
8018
+ // 跳转锁定:有组织就展示只读;否则按兼职开关 + 多于1个组织
8019
+ var showSwitcher = lockAssignOrg ? orgList && orgList.length > 0 : parttimeOrgEnabled !== false && orgList && orgList.length > 1;
7970
8020
  if (!orgList || orgList.length == 0 || !showSwitcher) {
7971
8021
  // 开关禁用但有兼职时,仍可静默切到目标组织,仅隐藏切换区
7972
- if (orgList && orgList.length > 1 && parttimeOrgEnabled === false) {
8022
+ if (orgList && orgList.length > 1 && parttimeOrgEnabled === false && !lockAssignOrg) {
7973
8023
  var curOrgIdHide = userInfo.curOrgId || '';
7974
8024
  var hideTargetOrgId = t.resolveApproveOrgTargetId(orgList, curOrgIdHide, t.state.taskAssignOrgId, t.state.startUserOrgId);
7975
8025
  if (hideTargetOrgId && hideTargetOrgId != curOrgIdHide && !window.approveOrgAutoSwitchedMap[autoSwitchKey]) {
@@ -7978,17 +8028,17 @@ var PageHome = function (_React$Component) {
7978
8028
  return;
7979
8029
  }
7980
8030
  window.approveOrgAutoSwitchedMap[autoSwitchKey] = true;
7981
- t.setState({ showOrgSwitcher: false });
8031
+ t.setState({ showOrgSwitcher: false, approveOrgLocked: false });
7982
8032
  }, function () {
7983
8033
  if (currentSeq != window.approveOrgSwitcherSeq) {
7984
8034
  return;
7985
8035
  }
7986
- t.setState({ showOrgSwitcher: false });
8036
+ t.setState({ showOrgSwitcher: false, approveOrgLocked: false });
7987
8037
  }, { silent: true });
7988
8038
  return;
7989
8039
  }
7990
8040
  }
7991
- t.setState({ showOrgSwitcher: false });
8041
+ t.setState({ showOrgSwitcher: false, approveOrgLocked: false });
7992
8042
  return;
7993
8043
  }
7994
8044
  var curOrgId = userInfo.curOrgId || '';
@@ -7999,7 +8049,7 @@ var PageHome = function (_React$Component) {
7999
8049
  return;
8000
8050
  }
8001
8051
  window.approveOrgAutoSwitchedMap[autoSwitchKey] = true;
8002
- t.renderApproveOrgSwitcher(orgList, targetOrgId);
8052
+ t.renderApproveOrgSwitcher(orgList, targetOrgId, lockAssignOrg);
8003
8053
  }, function () {
8004
8054
  if (currentSeq != window.approveOrgSwitcherSeq) {
8005
8055
  return;
@@ -8008,7 +8058,7 @@ var PageHome = function (_React$Component) {
8008
8058
  }, { silent: true });
8009
8059
  return;
8010
8060
  }
8011
- t.renderApproveOrgSwitcher(orgList, targetOrgId || curOrgId);
8061
+ t.renderApproveOrgSwitcher(orgList, targetOrgId || curOrgId, lockAssignOrg);
8012
8062
  }).catch(function (err) {
8013
8063
  if (currentSeq == window.approveOrgSwitcherSeq) {
8014
8064
  t.hideApproveOrgSwitcherSilently();
@@ -8039,6 +8089,10 @@ var PageHome = function (_React$Component) {
8039
8089
  if (t.state.approveOrgApiUnavailable) {
8040
8090
  return;
8041
8091
  }
8092
+ // 管理员跳转指定组织:只读,禁止手动切换
8093
+ if (t.state.approveOrgLocked || t.state.taskAssignOrgId) {
8094
+ return;
8095
+ }
8042
8096
  if (!value || !value.value) {
8043
8097
  return;
8044
8098
  }
@@ -8633,7 +8687,7 @@ var PageHome = function (_React$Component) {
8633
8687
  null,
8634
8688
  _react2.default.createElement(_SelectField2.default, {
8635
8689
  label: '\u5F53\u524D\u7EC4\u7EC7',
8636
- readOnly: false,
8690
+ readOnly: !!this.state.approveOrgLocked,
8637
8691
  options: this.state.approveOrgOptions,
8638
8692
  placeholder: '\u8BF7\u9009\u62E9',
8639
8693
  onSelect: this.handleApproveOrgSelect.bind(this),
@@ -9018,7 +9072,7 @@ var PageHome = function (_React$Component) {
9018
9072
  label: '传阅人',
9019
9073
  placeholder: '\u8BF7\u9009\u62E9',
9020
9074
  code: 'user,org,group,duty,politicalOutlook,station,personGroup',
9021
- chooseType: 'userAndOrg,userAndGroup,userAndDuty,userNotPoliticalOutlook,userAndStation,userAndPersonGroup',
9075
+ chooseType: this.getCirculateChooseType(),
9022
9076
  checkType: 'checkbox',
9023
9077
  defaultValue: this.state.readScopeList,
9024
9078
  limitData: this.state.readRangeList,
@@ -9287,7 +9341,7 @@ var PageHome = function (_React$Component) {
9287
9341
  label: '传阅人',
9288
9342
  placeholder: '\u8BF7\u9009\u62E9',
9289
9343
  code: 'user,org,group,duty,politicalOutlook,station,personGroup',
9290
- chooseType: 'userAndOrg,userAndGroup,userAndDuty,userNotPoliticalOutlook,userAndStation,userAndPersonGroup',
9344
+ chooseType: this.getCirculateChooseType(),
9291
9345
  checkType: 'checkbox',
9292
9346
  defaultValue: this.state.readScopeList,
9293
9347
  limitData: this.state.readRangeList,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "fmui-base",
3
- "version": "2.3.26",
3
+ "version": "2.3.28",
4
4
  "title": "fmui-base",
5
5
  "description": "fmui移动端组件",
6
6
  "main": "lib/index.js",