fmui-base 2.0.3 → 2.0.4

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.0.4: 表单组件错误优化;政治面貌全选问题修改
6
7
  - 2.0.3: 增加流程图;表单按钮功能扩展
7
8
  - 2.0.2: 时间字段增加“xxxx年xx月xx日”中文显示
8
9
  - 2.0.1: 流程表单选人组件联动开发
@@ -97,33 +97,35 @@ var PageHome = function (_React$Component) {
97
97
  key: 'casigin',
98
98
  value: function casigin() {
99
99
  var commentList = this.props.list;
100
- commentList.map(function (item) {
101
- var param = {};
102
- param.bizSn = item.id;
103
- param.relationId = getLoginUserInfo().mobile;
104
- param.msg = item.fullMessage;
105
- // setTimeout(function(){
106
- // $("#"+item.id+"_sucess").show();
107
- // },1000)
108
- _db2.default.FlowApproval.verifySign(param).then(function (content) {
109
- var result = content.verifySignRes;
110
- if (result == 'success') {
111
- $("#commentSign-" + item.id).removeClass('t-PR16');
112
- $("#" + item.id + "_sucess").show();
113
- }
114
- }).catch(function (error) {
115
- if (error.errorMsg == "签名值与原文不匹配") {
116
- $("#commentSign-" + item.id).removeClass('t-PR16');
117
- $("#" + item.id + "_fail").show();
118
- }
119
- // else{
120
- // Toast.show({
121
- // type: 'error',
122
- // content: error.errorMsg,
123
- // });
124
- // }
100
+ if (commentList) {
101
+ commentList.map(function (item) {
102
+ var param = {};
103
+ param.bizSn = item.id;
104
+ param.relationId = getLoginUserInfo().mobile;
105
+ param.msg = item.fullMessage;
106
+ // setTimeout(function(){
107
+ // $("#"+item.id+"_sucess").show();
108
+ // },1000)
109
+ _db2.default.FlowApproval.verifySign(param).then(function (content) {
110
+ var result = content.verifySignRes;
111
+ if (result == 'success') {
112
+ $("#commentSign-" + item.id).removeClass('t-PR16');
113
+ $("#" + item.id + "_sucess").show();
114
+ }
115
+ }).catch(function (error) {
116
+ if (error.errorMsg == "签名值与原文不匹配") {
117
+ $("#commentSign-" + item.id).removeClass('t-PR16');
118
+ $("#" + item.id + "_fail").show();
119
+ }
120
+ // else{
121
+ // Toast.show({
122
+ // type: 'error',
123
+ // content: error.errorMsg,
124
+ // });
125
+ // }
126
+ });
125
127
  });
126
- });
128
+ }
127
129
  }
128
130
 
129
131
  //初始化ids
package/lib/form/form.js CHANGED
@@ -1040,6 +1040,10 @@ var PageHome = function (_React$Component) {
1040
1040
  if (form.popuserMap.chooseScope == 5) {
1041
1041
  itemParam.queryLimit = form.popuserMap.chooseScope;
1042
1042
  itemParam.limitData = getLoginUserInfo().orgId;
1043
+ } else if (form.popuserMap.chooseScope == "4") {
1044
+ //查上级
1045
+ itemParam.queryLimit = "3";
1046
+ itemParam.limitData = form.popuserMap.chooseScopeVal;
1043
1047
  } else if (form.popuserMap.chooseScope == "all") {} else {
1044
1048
  itemParam.queryLimit = 5;
1045
1049
  itemParam.limitData = form.popuserMap.chooseScope;
package/lib/form/table.js CHANGED
@@ -86,8 +86,8 @@ var PageHome = function (_React$Component) {
86
86
  var defaultValue = props.defaultValue;
87
87
  var status = props.status;
88
88
  var formRelaField = props.formRelaField; //关联字段
89
- var linkFields = props.allForm.linkFields; //级联字段
90
- var formId = props.data.formId; //表单id
89
+ var linkFields = props.allForm ? props.allForm.linkFields : ""; //级联字段
90
+ var formId = props.data ? props.data.formId : ""; //表单id
91
91
 
92
92
  //关联字段
93
93
  var formRelaFieldMapsNew = {};
@@ -230,7 +230,9 @@ var PageHome = function (_React$Component) {
230
230
  };
231
231
 
232
232
  var module = props.module && props.module != "undefined" ? props.module : "approve";
233
- FlowCommon = require('pages/flow_common/' + module).default ? require('pages/flow_common/' + module).default : require('pages/flow_common/' + module);
233
+ try {
234
+ FlowCommon = require('pages/flow_common/' + module).default ? require('pages/flow_common/' + module).default : require('pages/flow_common/' + module);
235
+ } catch (error) {}
234
236
 
235
237
  // DB.form.getRelaFieldsMap({
236
238
  // formId: formId,
@@ -302,8 +304,8 @@ var PageHome = function (_React$Component) {
302
304
  value: function change(data, itemParam) {
303
305
  var t = this;
304
306
  var module = t.props.module;
305
- var formKey = t.props.allForm.formcode;
306
- var formTblId = t.props.allForm.formTblId;
307
+ var formKey = t.props.allForm ? t.props.allForm.formcode : "";
308
+ var formTblId = t.props.allForm ? t.props.allForm.formTblId : "";
307
309
  if (itemParam && itemParam.key) {
308
310
  //修改事件的时候
309
311
 
@@ -1472,15 +1474,19 @@ var PageHome = function (_React$Component) {
1472
1474
 
1473
1475
  var t = this;
1474
1476
  var allForm = this.props.allForm;
1475
- var tabCodes = allForm.tabCodes;
1476
- var tabNames = allForm.tabNames;
1477
+ var tabCodes = [];
1478
+ var tabNames = [];
1479
+ if (allForm) {
1480
+ tabCodes = allForm.tabCodes;
1481
+ tabNames = allForm.tabNames;
1482
+ }
1477
1483
  return _react2.default.createElement(
1478
1484
  'div',
1479
1485
  null,
1480
1486
  _react2.default.createElement(
1481
1487
  'div',
1482
1488
  null,
1483
- tabCodes == null || tabCodes.length < 2 ? this.props.form.map(function (item, i) {
1489
+ tabCodes == null || tabCodes.length < 2 ? this.props.form ? this.props.form.map(function (item, i) {
1484
1490
  return item.itemType == 'twocolumns' || item.itemType == 'threecolumns' ? item.children.map(function (item2, j) {
1485
1491
  return _react2.default.createElement(
1486
1492
  'div',
@@ -1496,7 +1502,7 @@ var PageHome = function (_React$Component) {
1496
1502
  null,
1497
1503
  _react2.default.createElement(_form2.default, { ref: item.uniqueName, keyNo: i, operate: t.props.operate, newspyj: t.props.newspyj, hasCommentField: t.props.hasCommentField, commentField: t.props.commentField, module: t.props.module, formKey: t.props.allForm.formcode, status: t.props.status, form: item, allForm: t.props.allForm, formStyle: t.props.formStyleObj, commentList: t.props.commentFieldList, defaultValue: t.props.defaultValue, data: t.props.data, fieldControll: t.props.fieldControll, caIsPrd: t.props.caIsPrd, preCaFields: t.props.preCaFields, formRelaFieldMaps: t.state.formRelaFieldMaps, linkFields: t.state.linkFields, onChange: this.change.bind(this) })
1498
1504
  );
1499
- }.bind(this)) : _react2.default.createElement(
1505
+ }.bind(this)) : "" : _react2.default.createElement(
1500
1506
  'div',
1501
1507
  null,
1502
1508
  _react2.default.createElement(
@@ -1536,10 +1542,10 @@ var PageHome = function (_React$Component) {
1536
1542
  )
1537
1543
  )
1538
1544
  ),
1539
- _react2.default.createElement('div', { className: t.props.commentBackList.length > 0 ? "t-H10 t-BCf7" : 't-DN' }),
1545
+ _react2.default.createElement('div', { className: t.props.commentBackList && t.props.commentBackList.length > 0 ? "t-H10 t-BCf7" : 't-DN' }),
1540
1546
  _react2.default.createElement(
1541
1547
  'div',
1542
- { className: t.props.commentBackList.length > 0 ? '' : 't-DN' },
1548
+ { className: t.props.commentBackList && t.props.commentBackList.length > 0 ? '' : 't-DN' },
1543
1549
  _react2.default.createElement(
1544
1550
  HBox,
1545
1551
  { className: 't-field-box' },
@@ -1555,10 +1561,10 @@ var PageHome = function (_React$Component) {
1555
1561
  )
1556
1562
  )
1557
1563
  ),
1558
- _react2.default.createElement('div', { className: t.props.commentDefaultList.length > 0 ? "t-H10 t-BCf7" : 't-DN' }),
1564
+ _react2.default.createElement('div', { className: t.props.commentDefaultList && t.props.commentDefaultList.length > 0 ? "t-H10 t-BCf7" : 't-DN' }),
1559
1565
  _react2.default.createElement(
1560
1566
  'div',
1561
- { className: t.props.commentDefaultList.length > 0 ? '' : 't-DN' },
1567
+ { className: t.props.commentDefaultList && t.props.commentDefaultList.length > 0 ? '' : 't-DN' },
1562
1568
  _react2.default.createElement(
1563
1569
  HBox,
1564
1570
  { className: 'flex-comment t-field-box' },
@@ -1615,10 +1621,10 @@ var PageHome = function (_React$Component) {
1615
1621
  )
1616
1622
  )
1617
1623
  ),
1618
- _react2.default.createElement('div', { className: t.props.commentDefaultList.length == 0 ? "t-H10 t-BCf7" : 't-DN' }),
1624
+ _react2.default.createElement('div', { className: t.props.commentDefaultList && t.props.commentDefaultList.length == 0 ? "t-H10 t-BCf7" : 't-DN' }),
1619
1625
  _react2.default.createElement(
1620
1626
  'div',
1621
- { className: t.props.commentDefaultList.length == 0 && t.props.commentField == "default" ? '' : 't-DN' },
1627
+ { className: t.props.commentDefaultList && t.props.commentDefaultList.length == 0 && t.props.commentField == "default" ? '' : 't-DN' },
1622
1628
  _react2.default.createElement(
1623
1629
  HBox,
1624
1630
  { className: 't-field-box' },
@@ -424,7 +424,11 @@ var PageHome = function (_React$Component) {
424
424
  commentBackAlert: [], //退回批示意见弹出
425
425
  showCommentBackAlert: true //显示退回批示意见弹出
426
426
  };
427
- FlowCommon = require('pages/flow_common/' + module).default ? require('pages/flow_common/' + module).default : require('pages/flow_common/' + module);
427
+ try {
428
+ FlowCommon = require('pages/flow_common/' + module).default ? require('pages/flow_common/' + module).default : require('pages/flow_common/' + module);
429
+ } catch (error) {
430
+ alert("流程缺少扩展js," + error);
431
+ }
428
432
 
429
433
  //处理特有参数
430
434
  if (typeof FlowCommon.dealwithCommonParam === "function") {
@@ -1517,15 +1517,28 @@ var Page = function (_React$Component) {
1517
1517
 
1518
1518
  for (var i = 0; i < politicalOutlookUserList.length; i++) {
1519
1519
  if (politicalOutlookUserList[i].isSameOrg == "1") {
1520
- if (!politicalOutlookUserList[i].checked) {
1521
- politicalOutlookUserList[i].checked = true;
1522
- total++;
1523
- selectPoliticalOutlookUserNum++;
1520
+ if (navList[index].checkThisOrg) {
1521
+ if (!politicalOutlookUserList[i].checked) {
1522
+ politicalOutlookUserList[i].checked = true;
1523
+ total++;
1524
+ selectPoliticalOutlookUserNum++;
1525
+ }
1524
1526
  } else {
1525
- politicalOutlookUserList[i].checked = false;
1526
- total--;
1527
- selectPoliticalOutlookUserNum--;
1527
+ if (politicalOutlookUserList[i].checked) {
1528
+ politicalOutlookUserList[i].checked = false;
1529
+ total--;
1530
+ selectPoliticalOutlookUserNum--;
1531
+ }
1528
1532
  }
1533
+ // if (!politicalOutlookUserList[i].checked) {
1534
+ // politicalOutlookUserList[i].checked = true;
1535
+ // total++;
1536
+ // selectPoliticalOutlookUserNum++;
1537
+ // }else{
1538
+ // politicalOutlookUserList[i].checked = false;
1539
+ // total--;
1540
+ // selectPoliticalOutlookUserNum--;
1541
+ // }
1529
1542
 
1530
1543
  var flag = true;
1531
1544
  for (var j = 0; j < selectUsers.length; j++) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "fmui-base",
3
- "version": "2.0.3",
3
+ "version": "2.0.4",
4
4
  "title": "fmui-base",
5
5
  "description": "fmui移动端组件",
6
6
  "main": "lib/index.js",