fmui-base 2.2.34 → 2.2.35

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.2.35: 流程选人去重问题,时分字段丢失修复
6
7
  - 2.2.34: 北京CA授权后刷新表单页
7
8
  - 2.2.33: 下移动端结束流程,结束原因提示
8
9
  - 2.2.32: 下拉多选支持联动
package/lib/form/form.js CHANGED
@@ -928,6 +928,16 @@ var PageHome = function (_React$Component) {
928
928
  }
929
929
  var dateFormat = form.dateFormat;
930
930
  var dateFormatShow = "";
931
+
932
+ // 获取年月日
933
+ var now = new Date();
934
+ var year = now.getFullYear();
935
+ var month = ('0' + (now.getMonth() + 1)).slice(-2); // 月份从0开始,需要+1
936
+ var day = ('0' + now.getDate()).slice(-2);
937
+
938
+ // 格式化为 YYYY-MM-DD
939
+ var formattedDate = year + '-' + month + '-' + day;
940
+
931
941
  if (form.dataAttr && typeof form.dataAttr != "undefined") {
932
942
  var dateDisplayFormat = form.dataAttr.dateDisplayFormat;
933
943
  if (dateDisplayFormat == "STime" || dateFormat == "YMDHM") {
@@ -941,7 +951,11 @@ var PageHome = function (_React$Component) {
941
951
  } else if (dateDisplayFormat == "ODate") {
942
952
  dateFormat = "YMD";
943
953
  } else if (dateDisplayFormat == "HourMin") {
944
- dateFormat = "HM";
954
+ dateFormat = "YMDHM";
955
+ if (value && value.length == 5) {
956
+ value = formattedDate + " " + value + ":00";
957
+ }
958
+ dateFormatShow = "HourMin";
945
959
  } else if (dateDisplayFormat == "zhDate") {
946
960
  dateFormat = "YMD";
947
961
  dateFormatShow = "zhDate";
@@ -2416,6 +2430,7 @@ var PageHome = function (_React$Component) {
2416
2430
  }, {
2417
2431
  key: 'handleChangeDate',
2418
2432
  value: function handleChangeDate(code, value) {
2433
+ console.log("handleChangeDate===" + JSON.stringify(value));
2419
2434
  var data = this.props.data;
2420
2435
  var itemParam = this.state.itemParam;
2421
2436
  var dateFormat = itemParam.dateFormat;
@@ -2520,6 +2535,11 @@ var PageHome = function (_React$Component) {
2520
2535
  } else {
2521
2536
  return year + '年' + month + '月' + dates + '日 下午';
2522
2537
  }
2538
+ } else if (dateFormatShow == 'HourMin') {
2539
+ //时分
2540
+ var hour = this.dealwithDate(date.getHours());
2541
+ var min = this.dealwithDate(date.getMinutes());
2542
+ return hour + ':' + min;
2523
2543
  }
2524
2544
  }
2525
2545
  if (formatStr == 'YMD') {
@@ -127,12 +127,12 @@ var ButtonGroup = _Button2.default.ButtonGroup,
127
127
  TextButton = _Button2.default.TextButton;
128
128
  //import UserInfo from '../approval-details/UserInfo';
129
129
 
130
- var isReload = false;
130
+ var isCaReload = false;
131
131
  window.addEventListener('pageshow', function () {
132
- console.log("isReload===" + isReload);
133
- isReload = this.localStorage.getItem("isReload");
134
- this.localStorage.setItem("isReload", false);
135
- if (isReload) {
132
+ console.log("isCaReload===" + isCaReload);
133
+ isCaReload = this.localStorage.getItem("isCaReload");
134
+ this.localStorage.setItem("isCaReload", false);
135
+ if (isCaReload == '1') {
136
136
  window.location.reload();
137
137
  }
138
138
  });
@@ -2637,7 +2637,7 @@ var PageHome = function (_React$Component) {
2637
2637
  if (participantList[i].type != "user") {
2638
2638
  var children = participantList[i];
2639
2639
  for (var j = 0; j < children.length; j++) {
2640
- if (commonUsedId.indexOf(children[j].id) == -1) {
2640
+ if (commonUsedId.split(",").indexOf(children[j].id) == -1) {
2641
2641
  commonUsedId += children[j].id + ',';
2642
2642
  commonUsedData.push(personValueItem);
2643
2643
  if (item.partType == '1') {
@@ -2647,7 +2647,7 @@ var PageHome = function (_React$Component) {
2647
2647
  }
2648
2648
  } else {
2649
2649
  var personValueItem = { scopeType: participantList[i].type, scopeValue: participantList[i].id, scopeName: participantList[i].name, imageId: "", orgNamePath: participantList[i].orgPath };
2650
- if (("," + commonUsedId + ",").indexOf("," + participantList[i].id + ',') == -1) {
2650
+ if (commonUsedId.split(",").indexOf(participantList[i].id) == -1) {
2651
2651
  commonUsedId += participantList[i].id + ',';
2652
2652
  commonUsedData.push(personValueItem);
2653
2653
  if (item.partType == '1') {
@@ -2700,7 +2700,7 @@ var PageHome = function (_React$Component) {
2700
2700
  }*/
2701
2701
  } else if (participantList[i].secretLevel == 0 || participantList[i].secretLevel || !participantList[i].orgId) {
2702
2702
  var personValueItem = { scopeType: "user", scopeValue: participantList[i].id, scopeName: participantList[i].name, imageId: "", orgNamePath: participantList[i].orgPath };
2703
- if (("," + commonUsedId + ",").indexOf("," + participantList[i].id + ',') == -1) {
2703
+ if (commonUsedId.split(",").indexOf(participantList[i].id) == -1) {
2704
2704
  commonUsedId += participantList[i].id + ',';
2705
2705
  commonUsedData.push(personValueItem);
2706
2706
  if (item.partType == '1') {
@@ -3398,7 +3398,7 @@ var PageHome = function (_React$Component) {
3398
3398
  var children = participantList[i];
3399
3399
  for (var j = 0; j < children.length; j++) {
3400
3400
  var personValueItem = { scopeType: "user", scopeValue: children[j].id, scopeName: children[j].userName, imageId: "", orgNamePath: children[j].orgPath };
3401
- if (commonUsedId.indexOf(children[j].id) == -1) {
3401
+ if (commonUsedId.split(',').indexOf(children[j].id) == -1) {
3402
3402
  commonUsedId += children[j].id + ',';
3403
3403
  commonUsedData.push(personValueItem);
3404
3404
  if (item.partType == '1') {
@@ -3408,7 +3408,7 @@ var PageHome = function (_React$Component) {
3408
3408
  }
3409
3409
  } else {
3410
3410
  var personValueItem = { scopeType: "user", scopeValue: participantList[i].id, scopeName: participantList[i].name, imageId: "", orgNamePath: participantList[i].orgPath };
3411
- if (commonUsedId.indexOf(participantList[i].id) == -1) {
3411
+ if (commonUsedId.split(',').indexOf(participantList[i].id) == -1) {
3412
3412
  commonUsedId += participantList[i].id + ',';
3413
3413
  commonUsedData.push(personValueItem);
3414
3414
  if (item.partType == '1') {
@@ -3442,7 +3442,7 @@ var PageHome = function (_React$Component) {
3442
3442
  var children = participantList[i];
3443
3443
  for (var j = 0; j < children.length; j++) {
3444
3444
  var personValueItem = { scopeType: "user", scopeValue: children[j].id, scopeName: children[j].userName, imageId: "", orgNamePath: children[j].orgPath };
3445
- if (commonUsedId.indexOf(children[j].id) == -1) {
3445
+ if (commonUsedId.split(',').indexOf(children[j].id) == -1) {
3446
3446
  commonUsedId += children[j].id + ',';
3447
3447
  commonUsedData.push(personValueItem);
3448
3448
  if (item.partType == '1') {
@@ -3452,7 +3452,7 @@ var PageHome = function (_React$Component) {
3452
3452
  }
3453
3453
  } else {
3454
3454
  var personValueItem = { scopeType: "user", scopeValue: participantList[i].id, scopeName: participantList[i].name, imageId: "", orgNamePath: participantList[i].orgPath };
3455
- if (commonUsedId.indexOf(participantList[i].id) == -1) {
3455
+ if (commonUsedId.split(',').indexOf(participantList[i].id) == -1) {
3456
3456
  commonUsedId += participantList[i].id + ',';
3457
3457
  commonUsedData.push(personValueItem);
3458
3458
  if (item.partType == '1') {
@@ -3839,7 +3839,7 @@ var PageHome = function (_React$Component) {
3839
3839
  var selectUserIds = '';
3840
3840
  var selectOrgIds = '';
3841
3841
  personValue.map(function (item, index) {
3842
- if (selectUserIds.indexOf(item.scopeValue) == -1) {
3842
+ if (selectUserIds.split(',').indexOf(item.scopeValue) == -1) {
3843
3843
  if (item.scopeType == 'user') {
3844
3844
  //用户
3845
3845
  selectUserIds += item.scopeValue + ",";
@@ -3858,7 +3858,7 @@ var PageHome = function (_React$Component) {
3858
3858
  orgUsernames = '';
3859
3859
 
3860
3860
  for (j = 0; j < orgUserList.length; j++) {
3861
- if (auditorUserIds.indexOf(orgUserList[j].id) < 0) {
3861
+ if (auditorUserIds.split(',').indexOf(orgUserList[j].id) < 0) {
3862
3862
  orgUserids += orgUserList[j].id + ",";
3863
3863
  orgUsernames += orgUserList[j].userName + ",";
3864
3864
  }
@@ -5838,7 +5838,7 @@ var PageHome = function (_React$Component) {
5838
5838
  var orgUserids = '';
5839
5839
  var orgUsernames = '';
5840
5840
  for (var j = 0; j < orgUserList.length; j++) {
5841
- if (targetUserIds.indexOf(orgUserList[j].id) < 0) {
5841
+ if (targetUserIds.split(',').indexOf(orgUserList[j].id) < 0) {
5842
5842
  orgUserids += orgUserList[j].id + ",";
5843
5843
  orgUsernames += orgUserList[j].userName + ",";
5844
5844
  }
@@ -5961,7 +5961,7 @@ var PageHome = function (_React$Component) {
5961
5961
  var orgUserids = '';
5962
5962
  var orgUsernames = '';
5963
5963
  for (var j = 0; j < orgUserList.length; j++) {
5964
- if (chaosongId.indexOf(orgUserList[j].id) < 0) {
5964
+ if (chaosongId.split(',').indexOf(orgUserList[j].id) < 0) {
5965
5965
  orgUserids += orgUserList[j].id + ",";
5966
5966
  }
5967
5967
  }
@@ -5985,7 +5985,7 @@ var PageHome = function (_React$Component) {
5985
5985
  var orgUserids = '';
5986
5986
  var orgUsernames = '';
5987
5987
  for (var j = 0; j < orgUserList.length; j++) {
5988
- if (targetUserIds.indexOf(orgUserList[j].id) < 0) {
5988
+ if (targetUserIds.split(',').indexOf(orgUserList[j].id) < 0) {
5989
5989
  orgUserids += orgUserList[j].id + ",";
5990
5990
  orgUsernames += orgUserList[j].userName + ",";
5991
5991
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "fmui-base",
3
- "version": "2.2.34",
3
+ "version": "2.2.35",
4
4
  "title": "fmui-base",
5
5
  "description": "fmui移动端组件",
6
6
  "main": "lib/index.js",