fmui-base 2.2.99 → 2.3.2

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.2:流程设置支持配置流程转交是否填写批示意见
7
+ - 2.3.1:传阅节点设置的参与人默认全部选中
6
8
  - 2.2.99:移动端保存批示意见态度
7
9
  - 2.2.98:批示意见态度增加回调方法
8
10
  - 2.2.97:表单字段关联选人字段关联子表,没有触发关联时还原原来状态
@@ -129,6 +129,14 @@ var ButtonGroup = _Button2.default.ButtonGroup,
129
129
  TextButton = _Button2.default.TextButton;
130
130
  //import UserInfo from '../approval-details/UserInfo';
131
131
 
132
+ /** 转交批示意见系统设置是否必填;无 getSysSettingByMark 方法时视为不必填 */
133
+ function isSysTransferCommentRequired() {
134
+ if (typeof getSysSettingByMark !== 'function') {
135
+ return false;
136
+ }
137
+ return getSysSettingByMark('approveTransferComment') == '1';
138
+ }
139
+
132
140
  var isCaReload = false;
133
141
  window.addEventListener('pageshow', function () {
134
142
  console.log("isCaReload===" + isCaReload);
@@ -2175,7 +2183,11 @@ var PageHome = function (_React$Component) {
2175
2183
  }
2176
2184
  } else if (hasCommentField == '1' && defaultComValue == '') {
2177
2185
 
2178
- if (commentIsNull == '1' || commentIsNotNull == '1') {
2186
+ var commentRequired = commentIsNull == '1' || commentIsNotNull == '1';
2187
+ if (operate == 3) {
2188
+ commentRequired = commentRequired && isSysTransferCommentRequired();
2189
+ }
2190
+ if (commentRequired) {
2179
2191
  //不可为空
2180
2192
  var documentId = t.state.newspyj.documentId;
2181
2193
  if (t.state.commentField == 'default') {
@@ -2697,10 +2709,11 @@ var PageHome = function (_React$Component) {
2697
2709
  if (participantList[i].type != "user") {
2698
2710
  var children = participantList[i];
2699
2711
  for (var j = 0; j < children.length; j++) {
2712
+ var personValueItem = { scopeType: "user", scopeValue: children[j].id, scopeName: children[j].userName || children[j].name, imageId: "", orgNamePath: children[j].orgPath };
2700
2713
  if (commonUsedId.split(",").indexOf(children[j].id) == -1) {
2701
2714
  commonUsedId += children[j].id + ',';
2702
2715
  commonUsedData.push(personValueItem);
2703
- if (item.partType == '1') {
2716
+ if (item.partType == '1' || item.nodeType == 'readtask') {
2704
2717
  personValue.push(personValueItem);
2705
2718
  }
2706
2719
  }
@@ -2710,7 +2723,7 @@ var PageHome = function (_React$Component) {
2710
2723
  if (commonUsedId.split(",").indexOf(participantList[i].id) == -1) {
2711
2724
  commonUsedId += participantList[i].id + ',';
2712
2725
  commonUsedData.push(personValueItem);
2713
- if (item.partType == '1') {
2726
+ if (item.partType == '1' || item.nodeType == 'readtask') {
2714
2727
  personValue.push(personValueItem);
2715
2728
  }
2716
2729
  }
@@ -2720,7 +2733,7 @@ var PageHome = function (_React$Component) {
2720
2733
  popCode = "common,org,group";
2721
2734
  popCode = "common,org,group,duty,politicalOutlook";
2722
2735
  chooseType = "userNotOrg,userNotGroup,userNotDuty,userNotPoliticalOutlook";
2723
- if (commonUsedData.length == 1) {
2736
+ if (commonUsedData.length == 1 || item.nodeType == 'readtask') {
2724
2737
  personValue = commonUsedData;
2725
2738
  }
2726
2739
  } else {
@@ -2763,13 +2776,13 @@ var PageHome = function (_React$Component) {
2763
2776
  if (commonUsedId.split(",").indexOf(participantList[i].id) == -1) {
2764
2777
  commonUsedId += participantList[i].id + ',';
2765
2778
  commonUsedData.push(personValueItem);
2766
- if (item.partType == '1') {
2779
+ if (item.partType == '1' || item.nodeType == 'readtask') {
2767
2780
  personValue.push(personValueItem);
2768
2781
  }
2769
2782
  }
2770
2783
  }
2771
2784
  }
2772
- if (commonUsedData.length == 1) {
2785
+ if (commonUsedData.length == 1 || item.nodeType == 'readtask') {
2773
2786
  personValue = commonUsedData;
2774
2787
  }
2775
2788
  } else {
@@ -2787,8 +2800,13 @@ var PageHome = function (_React$Component) {
2787
2800
  chooseType = '';
2788
2801
  }
2789
2802
  if (item.nodeType == 'readtask') {
2790
- //如果是传阅节点
2803
+ //如果是传阅节点,默认选中配置的全部用户
2791
2804
  t.state.isHideRead = true;
2805
+ if (commonUsedData.length > 0) {
2806
+ personValue = commonUsedData.slice();
2807
+ } else if (personValues.length > 0) {
2808
+ personValue = personValues.slice();
2809
+ }
2792
2810
  }
2793
2811
  checkedItem.code = popCode;
2794
2812
  checkedItem.chooseType = chooseType;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "fmui-base",
3
- "version": "2.2.99",
3
+ "version": "2.3.2",
4
4
  "title": "fmui-base",
5
5
  "description": "fmui移动端组件",
6
6
  "main": "lib/index.js",