fmui-base 2.3.73 → 2.3.74

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,7 @@
3
3
  ---npm publish
4
4
 
5
5
  ## 更新日志
6
+ - 2.3.74:移动端流程办理支持流程办理人增加由所选活动指定办理人员
6
7
  - 2.3.73:移动端流程表单增加退回后重新提交前的批示意见在表单下方显示
7
8
  - 2.3.72:移动端表单设置自定义样式时图标乱码问题
8
9
  - 2.3.71:移动端办理列表缓急标签样式
@@ -342,6 +342,35 @@ var PageHome = function (_React$Component) {
342
342
  if (typeof radomList == 'undefined' || radomList == null || radomList == '') {
343
343
  radomList = [];
344
344
  }
345
+ // 跨跳预指定并入(与单条 processInfo 一致)
346
+ var preAssignTargets = content.preAssignTargets || [];
347
+ if (preAssignTargets && preAssignTargets.length > 0) {
348
+ for (var pti = 0; pti < preAssignTargets.length; pti++) {
349
+ var pt = preAssignTargets[pti];
350
+ var exists = false;
351
+ for (var ptj = 0; ptj < nextList.length; ptj++) {
352
+ if (nextList[ptj].id == pt.id) {
353
+ nextList[ptj].preAssign = true;
354
+ nextList[ptj].preAssignAlsoNext = true;
355
+ nextList[ptj].must = true;
356
+ var curType = nextList[ptj].type;
357
+ var curPids = nextList[ptj].pids;
358
+ if (curType == 3 && (curPids == null || curPids === '')) {
359
+ nextList[ptj].type = 1;
360
+ }
361
+ exists = true;
362
+ break;
363
+ }
364
+ }
365
+ if (!exists) {
366
+ pt.preAssign = true;
367
+ pt.preAssignAlsoNext = false;
368
+ pt.type = 1;
369
+ pt.must = true;
370
+ nextList.push(pt);
371
+ }
372
+ }
373
+ }
345
374
 
346
375
  var param = {
347
376
  taskIds: t.state.taskIds,
@@ -672,8 +701,10 @@ var PageHome = function (_React$Component) {
672
701
  checkedItem.participants = participants;
673
702
  checkedItem.parallelGatewayId = item.parallelGatewayId;
674
703
  checkedItem.noPar = item.noPar;
675
- if (item.must == true && (maxOutgoing == 1 && checkActi == 0 || maxOutgoing == 0)) {
676
- //必须
704
+ checkedItem.preAssign = item.preAssign;
705
+ checkedItem.preAssignAlsoNext = item.preAssignAlsoNext;
706
+ if (item.must == true && (maxOutgoing == 1 && checkActi == 0 || maxOutgoing == 0 || item.preAssign)) {
707
+ //必须(含预指定)
677
708
  checkedItem.disable = false;
678
709
  checkedItem.checked = true;
679
710
  //nextSelectType = 'next';
@@ -1032,10 +1063,12 @@ var PageHome = function (_React$Component) {
1032
1063
  var nextActivityListSelect = this.state.nextActivityList;
1033
1064
  var nextSelectType = this.state.nextSelectType; //选择随机还是普通
1034
1065
  var selectedActivity = '';
1066
+ var preAssignActivity = '';
1035
1067
  if (nextRadomListSelect.length > 0 || nextActivityListSelect.length > 0) {
1036
1068
  //下一个节点不为空时
1037
1069
 
1038
1070
  selectedActivity = '';
1071
+ preAssignActivity = '';
1039
1072
  var nextActivityList = [];
1040
1073
  if (nextSelectType == 'radom') {
1041
1074
  nextActivityList = nextRadomListSelect;
@@ -1051,6 +1084,13 @@ var PageHome = function (_React$Component) {
1051
1084
  var isEnd = nextActivityList[i].end;
1052
1085
 
1053
1086
  if (personValue.length <= 0 && !isEnd) {
1087
+ if (nextActivityList[i].preAssign) {
1088
+ _Toast2.default.show({
1089
+ type: 'error',
1090
+ content: '请选择预指定环节【' + (nextActivityList[i].name || '') + '】的办理人'
1091
+ });
1092
+ return false;
1093
+ }
1054
1094
  var noParVal = nextActivityList[i].noPar;
1055
1095
  var noParPass = noParVal == '1' || noParVal == 1 || noParVal == '2' || noParVal == 2;
1056
1096
  if (!(nextActivityList[i].type == 3 && noParPass)) {
@@ -1062,7 +1102,10 @@ var PageHome = function (_React$Component) {
1062
1102
  }
1063
1103
  }
1064
1104
  var participantMode = nextActivityList[i].participantMode;
1065
- if (participantMode == 0) {
1105
+ if (participantMode == null || participantMode === '' || typeof participantMode === 'undefined' || participantMode === 'undefined') {
1106
+ participantMode = '1';
1107
+ }
1108
+ if (participantMode == 0 || participantMode === '0') {
1066
1109
  if (personValue.length > 1) {
1067
1110
  _Toast2.default.show({
1068
1111
  type: 'error',
@@ -1073,6 +1116,7 @@ var PageHome = function (_React$Component) {
1073
1116
  }
1074
1117
  if (!isEnd) {
1075
1118
  var level;
1119
+ var actJsonItem;
1076
1120
 
1077
1121
  (function () {
1078
1122
  var selectUserIds = '';
@@ -1092,7 +1136,16 @@ var PageHome = function (_React$Component) {
1092
1136
  if (level == null) {
1093
1137
  level = "";
1094
1138
  }
1095
- selectedActivity += '{"id":"' + nextActivityList[i].value + '","name":"' + nextActivityList[i].name + '","participants":"' + auditorUserIds + '","participantNames":"' + auditorUserNames + '","level":"' + level + '"},';
1139
+ actJsonItem = '{"id":"' + nextActivityList[i].value + '","name":"' + nextActivityList[i].name + '","participants":"' + auditorUserIds + '","participantNames":"' + auditorUserNames + '","level":"' + level + '"},';
1140
+
1141
+ if (nextActivityList[i].preAssign) {
1142
+ preAssignActivity += actJsonItem;
1143
+ if (nextActivityList[i].preAssignAlsoNext && checked) {
1144
+ selectedActivity += actJsonItem;
1145
+ }
1146
+ } else {
1147
+ selectedActivity += actJsonItem;
1148
+ }
1096
1149
  })();
1097
1150
  } else {
1098
1151
  var level = nextActivityList[i].level;
@@ -1103,10 +1156,14 @@ var PageHome = function (_React$Component) {
1103
1156
  }
1104
1157
  }
1105
1158
  }
1159
+ if (preAssignActivity != '') {
1160
+ preAssignActivity = preAssignActivity.substring(0, preAssignActivity.length - 1);
1161
+ preAssignActivity = '[' + preAssignActivity + ']';
1162
+ }
1106
1163
  if (selectedActivity != '') {
1107
1164
  selectedActivity = selectedActivity.substring(0, selectedActivity.length - 1);
1108
1165
  selectedActivity = '[' + selectedActivity + ']';
1109
- } else {
1166
+ } else if (preAssignActivity == '') {
1110
1167
  _Toast2.default.show({
1111
1168
  type: 'error',
1112
1169
  content: '请选择节点'
@@ -1129,6 +1186,7 @@ var PageHome = function (_React$Component) {
1129
1186
  taskIds: t.state.taskIds,
1130
1187
  processInstanceIds: t.state.processInstanceIds,
1131
1188
  selectedActivity: selectedActivity,
1189
+ preAssignActivity: preAssignActivity,
1132
1190
  module: t.state.module,
1133
1191
  comment: t.state.spyj,
1134
1192
  hasCommentField: t.state.hasCommentField,
@@ -2877,6 +2877,35 @@ var PageHome = function (_React$Component) {
2877
2877
  if (typeof nextList == 'undefined' || nextList == null || nextList == '') {
2878
2878
  nextList = [];
2879
2879
  }
2880
+ // 跨跳预指定并入;重叠保留后继原 type,仅指定且无人时改 type=1
2881
+ var preAssignTargets = content.preAssignTargets || [];
2882
+ if (preAssignTargets && preAssignTargets.length > 0) {
2883
+ for (var pti = 0; pti < preAssignTargets.length; pti++) {
2884
+ var pt = preAssignTargets[pti];
2885
+ var exists = false;
2886
+ for (var ptj = 0; ptj < nextList.length; ptj++) {
2887
+ if (nextList[ptj].id == pt.id) {
2888
+ nextList[ptj].preAssign = true;
2889
+ nextList[ptj].preAssignAlsoNext = true;
2890
+ nextList[ptj].must = true;
2891
+ var curType = nextList[ptj].type;
2892
+ var curPids = nextList[ptj].pids;
2893
+ if (curType == 3 && (curPids == null || curPids === '')) {
2894
+ nextList[ptj].type = 1;
2895
+ }
2896
+ exists = true;
2897
+ break;
2898
+ }
2899
+ }
2900
+ if (!exists) {
2901
+ pt.preAssign = true;
2902
+ pt.preAssignAlsoNext = false;
2903
+ pt.type = 1;
2904
+ pt.must = true;
2905
+ nextList.push(pt);
2906
+ }
2907
+ }
2908
+ }
2880
2909
  radomList = content.radomList;
2881
2910
  if (typeof radomList == 'undefined' || radomList == null || radomList == '') {
2882
2911
  radomList = [];
@@ -3026,6 +3055,10 @@ var PageHome = function (_React$Component) {
3026
3055
  var personValue = []; //选中的人
3027
3056
  var personValues = []; //备选的人
3028
3057
  var participantMode = item.participantMode; //判断选人是单选还是多选
3058
+ // 预指定合成项后端未带 participantMode,默认多选(1)
3059
+ if (participantMode == null || participantMode === '' || typeof participantMode === 'undefined') {
3060
+ participantMode = item.preAssign ? '1' : participantMode;
3061
+ }
3029
3062
  var commonUsedData = []; //自定义选人的范围,常用
3030
3063
  var commonTreeData = [];
3031
3064
  var popCode = "";
@@ -3204,8 +3237,9 @@ var PageHome = function (_React$Component) {
3204
3237
  checkedItem.maxOutgoing = maxOutgoing;
3205
3238
  checkedItem.parallelGatewayId = item.parallelGatewayId;
3206
3239
  checkedItem.noPar = item.noPar;
3207
- if (item.must == true && (maxOutgoing == 1 && checkActi == 0 || maxOutgoing == 0)) {
3208
- //必须
3240
+ checkedItem.preAssign = item.preAssign;
3241
+ if (item.must == true && (maxOutgoing == 1 && checkActi == 0 || maxOutgoing == 0 || item.preAssign)) {
3242
+ //必须(含预指定)
3209
3243
  checkedItem.disable = false;
3210
3244
  checkedItem.checked = true;
3211
3245
  //nextSelectType = 'next';
@@ -4341,7 +4375,7 @@ var PageHome = function (_React$Component) {
4341
4375
  if (operate == 1) {
4342
4376
  //审批提交
4343
4377
  _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee2() {
4344
- 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;
4378
+ var editFormData, nextRadomListSelect, nextActivityListSelect, selectedActivity, preAssignActivity, nextActivityList, i, auditorUserIds, auditorUserNames, checked, personValue, isEnd, noParVal, noParPass, participantMode, orgUserList, orgUserids, orgUsernames, j, groupUserList, gj, gid, gname, dutyUserList, dj, did, dname, level, actJsonItem, urgentListSelect, urgent, sshortMessage, sendShortMessage, cshortMessage, circulateShortMessage, allEditIds, dataId, param, dealActionName;
4345
4379
  return regeneratorRuntime.wrap(function _callee2$(_context2) {
4346
4380
  while (1) {
4347
4381
  switch (_context2.prev = _context2.next) {
@@ -4350,9 +4384,10 @@ var PageHome = function (_React$Component) {
4350
4384
  nextRadomListSelect = _this3.state.nextRadomList;
4351
4385
  nextActivityListSelect = _this3.state.nextActivityList;
4352
4386
  selectedActivity = '';
4387
+ preAssignActivity = '';
4353
4388
 
4354
4389
  if (!(nextRadomListSelect.length > 0 || nextActivityListSelect.length > 0)) {
4355
- _context2.next = 57;
4390
+ _context2.next = 67;
4356
4391
  break;
4357
4392
  }
4358
4393
 
@@ -4360,15 +4395,16 @@ var PageHome = function (_React$Component) {
4360
4395
  nextActivityList = [];
4361
4396
 
4362
4397
  selectedActivity = '';
4398
+ preAssignActivity = '';
4363
4399
  nextRadomListSelect.map(function (item) {
4364
4400
  nextActivityList = nextActivityList.concat(item.subRandomList);
4365
4401
  });
4366
4402
  nextActivityList = nextActivityList.concat(nextActivityListSelect);
4367
4403
  i = 0;
4368
4404
 
4369
- case 10:
4405
+ case 12:
4370
4406
  if (!(i < nextActivityList.length)) {
4371
- _context2.next = 50;
4407
+ _context2.next = 58;
4372
4408
  break;
4373
4409
  }
4374
4410
 
@@ -4377,7 +4413,7 @@ var PageHome = function (_React$Component) {
4377
4413
  checked = nextActivityList[i].checked;
4378
4414
 
4379
4415
  if (!checked) {
4380
- _context2.next = 47;
4416
+ _context2.next = 55;
4381
4417
  break;
4382
4418
  }
4383
4419
 
@@ -4387,16 +4423,28 @@ var PageHome = function (_React$Component) {
4387
4423
  console.log("personValue:" + JSON.stringify(personValue));
4388
4424
 
4389
4425
  if (!(personValue.length <= 0 && !isEnd)) {
4390
- _context2.next = 29;
4426
+ _context2.next = 34;
4391
4427
  break;
4392
4428
  }
4393
4429
 
4430
+ if (!nextActivityList[i].preAssign) {
4431
+ _context2.next = 24;
4432
+ break;
4433
+ }
4434
+
4435
+ _Toast2.default.show({
4436
+ type: 'error',
4437
+ content: '请选择预指定环节【' + (nextActivityList[i].name || '') + '】的办理人'
4438
+ });
4439
+ return _context2.abrupt('return', false);
4440
+
4441
+ case 24:
4394
4442
  // 设计器 noPar=1=审批通过(兼容误写 2):指定办理人为空时放行
4395
4443
  noParVal = nextActivityList[i].noPar;
4396
4444
  noParPass = noParVal == '1' || noParVal == 1 || noParVal == '2' || noParVal == 2;
4397
4445
 
4398
4446
  if (!(nextActivityList[i].type == 3 && !noParPass)) {
4399
- _context2.next = 26;
4447
+ _context2.next = 31;
4400
4448
  break;
4401
4449
  }
4402
4450
 
@@ -4406,9 +4454,9 @@ var PageHome = function (_React$Component) {
4406
4454
  });
4407
4455
  return _context2.abrupt('return', false);
4408
4456
 
4409
- case 26:
4457
+ case 31:
4410
4458
  if (!(nextActivityList[i].type != 3)) {
4411
- _context2.next = 29;
4459
+ _context2.next = 34;
4412
4460
  break;
4413
4461
  }
4414
4462
 
@@ -4418,16 +4466,21 @@ var PageHome = function (_React$Component) {
4418
4466
  });
4419
4467
  return _context2.abrupt('return', false);
4420
4468
 
4421
- case 29:
4469
+ case 34:
4422
4470
  participantMode = nextActivityList[i].participantMode;
4471
+ // 预指定合成项可能无 participantMode,避免序列化成 "undefined"
4472
+
4473
+ if (participantMode == null || participantMode === '' || participantMode === undefined || participantMode === 'undefined') {
4474
+ participantMode = '1';
4475
+ }
4423
4476
 
4424
- if (!(participantMode == 0)) {
4425
- _context2.next = 36;
4477
+ if (!(participantMode == 0 || participantMode === '0')) {
4478
+ _context2.next = 43;
4426
4479
  break;
4427
4480
  }
4428
4481
 
4429
4482
  if (!(personValue.length > 1)) {
4430
- _context2.next = 34;
4483
+ _context2.next = 40;
4431
4484
  break;
4432
4485
  }
4433
4486
 
@@ -4437,11 +4490,12 @@ var PageHome = function (_React$Component) {
4437
4490
  });
4438
4491
  return _context2.abrupt('return', false);
4439
4492
 
4440
- case 34:
4441
- _context2.next = 40;
4493
+ case 40:
4494
+ participantMode = '0';
4495
+ _context2.next = 48;
4442
4496
  break;
4443
4497
 
4444
- case 36:
4498
+ case 43:
4445
4499
  participantMode = participantMode + "";
4446
4500
  if (participantMode.indexOf('1') > -1) {
4447
4501
  participantMode = '1';
@@ -4452,10 +4506,13 @@ var PageHome = function (_React$Component) {
4452
4506
  if (participantMode.indexOf('2') > -1) {
4453
4507
  participantMode = '2';
4454
4508
  }
4509
+ if (participantMode === 'undefined' || participantMode === 'null' || participantMode === '') {
4510
+ participantMode = '1';
4511
+ }
4455
4512
 
4456
- case 40:
4513
+ case 48:
4457
4514
  if (isEnd) {
4458
- _context2.next = 44;
4515
+ _context2.next = 52;
4459
4516
  break;
4460
4517
  }
4461
4518
 
@@ -4561,21 +4618,31 @@ var PageHome = function (_React$Component) {
4561
4618
  level = "";
4562
4619
  }
4563
4620
 
4564
- selectedActivity += '{"id":"' + nextActivityList[i].value + '","name":"' + nextActivityList[i].name + '","participants":"' + auditorUserIds + '","participantNames":"' + auditorUserNames + '","level":"' + level + '","participantType":"' + participantMode + '"},';
4621
+ actJsonItem = '{"id":"' + nextActivityList[i].value + '","name":"' + nextActivityList[i].name + '","participants":"' + auditorUserIds + '","participantNames":"' + auditorUserNames + '","level":"' + level + '","participantType":"' + participantMode + '"},';
4622
+
4623
+ if (nextActivityList[i].preAssign) {
4624
+ preAssignActivity += actJsonItem;
4625
+ // 同时是后继且勾选:双写 selectedActivity
4626
+ if (nextActivityList[i].preAssignAlsoNext && checked) {
4627
+ selectedActivity += actJsonItem;
4628
+ }
4629
+ } else {
4630
+ selectedActivity += actJsonItem;
4631
+ }
4565
4632
 
4566
- case 22:
4633
+ case 23:
4567
4634
  case 'end':
4568
4635
  return _context.stop();
4569
4636
  }
4570
4637
  }
4571
4638
  }, _callee, _this3);
4572
- })(), 't0', 42);
4639
+ })(), 't0', 50);
4573
4640
 
4574
- case 42:
4575
- _context2.next = 47;
4641
+ case 50:
4642
+ _context2.next = 55;
4576
4643
  break;
4577
4644
 
4578
- case 44:
4645
+ case 52:
4579
4646
  level = nextActivityList[i].level;
4580
4647
 
4581
4648
  if (level == null) {
@@ -4583,30 +4650,40 @@ var PageHome = function (_React$Component) {
4583
4650
  }
4584
4651
  selectedActivity += '{"id":"' + nextActivityList[i].value + '","name":"' + nextActivityList[i].name + '","level":"' + level + '","participantType":"' + participantMode + '"},';
4585
4652
 
4586
- case 47:
4653
+ case 55:
4587
4654
  i++;
4588
- _context2.next = 10;
4655
+ _context2.next = 12;
4589
4656
  break;
4590
4657
 
4591
- case 50:
4658
+ case 58:
4659
+ if (preAssignActivity != '') {
4660
+ preAssignActivity = preAssignActivity.substring(0, preAssignActivity.length - 1);
4661
+ preAssignActivity = '[' + preAssignActivity + ']';
4662
+ }
4663
+
4592
4664
  if (!(selectedActivity != '')) {
4593
- _context2.next = 55;
4665
+ _context2.next = 64;
4594
4666
  break;
4595
4667
  }
4596
4668
 
4597
4669
  selectedActivity = selectedActivity.substring(0, selectedActivity.length - 1);
4598
4670
  selectedActivity = '[' + selectedActivity + ']';
4599
- _context2.next = 57;
4671
+ _context2.next = 67;
4600
4672
  break;
4601
4673
 
4602
- case 55:
4674
+ case 64:
4675
+ if (!(preAssignActivity == '')) {
4676
+ _context2.next = 67;
4677
+ break;
4678
+ }
4679
+
4603
4680
  _Toast2.default.show({
4604
4681
  type: 'error',
4605
4682
  content: '请选择节点'
4606
4683
  });
4607
4684
  return _context2.abrupt('return', false);
4608
4685
 
4609
- case 57:
4686
+ case 67:
4610
4687
  urgentListSelect = t.state.urgentSelectList;
4611
4688
  urgent = '';
4612
4689
 
@@ -4638,6 +4715,7 @@ var PageHome = function (_React$Component) {
4638
4715
  param = {
4639
4716
  taskId: _this3.state.taskId,
4640
4717
  selectedActivity: selectedActivity,
4718
+ preAssignActivity: preAssignActivity,
4641
4719
  allEditIds: allEditIds,
4642
4720
  corpId: corpid,
4643
4721
  code: _this3.state.code,
@@ -4667,7 +4745,7 @@ var PageHome = function (_React$Component) {
4667
4745
  param.dealActionName = dealActionName;
4668
4746
  _this3.sendFlow(param);
4669
4747
 
4670
- case 73:
4748
+ case 83:
4671
4749
  case 'end':
4672
4750
  return _context2.stop();
4673
4751
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "fmui-base",
3
- "version": "2.3.73",
3
+ "version": "2.3.74",
4
4
  "title": "fmui-base",
5
5
  "description": "fmui移动端组件",
6
6
  "main": "lib/index.js",