fmui-base 2.1.29 → 2.1.31

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.1.31:表单组件支持对单行文本进行关联字段赋值
7
+ - 2.1.30:宏值字段可编辑时根据当前人变化
6
8
  - 2.1.29:委托办理被委托人批示,显示被委托人的签名
7
9
  - 2.1.28:统一审批跳转问题处理
8
10
  - 2.1.27:流程列表党纪工跳转
package/lib/db/db.js CHANGED
@@ -919,6 +919,21 @@ context.create('FlowModuleAPI', {
919
919
  duration: 800
920
920
  });
921
921
  }
922
+ },
923
+ getUserInfo: {
924
+ url: _variables2.default.URLS.getUserInfo,
925
+ method: 'GET',
926
+ postDataFomat: 'FORM',
927
+ header: {
928
+ Authorization: 'Bearer ' + getLoginUserInfo().token
929
+ },
930
+ /* header:{'content-Type':'application/x-www-form-urlencoded'},*/
931
+ willFetch: function willFetch() {
932
+ _Toast2.default.show({
933
+ content: _react2.default.createElement(_loading2.default, null),
934
+ duration: 800
935
+ });
936
+ }
922
937
  }
923
938
 
924
939
  });
@@ -121,7 +121,8 @@ exports.default = {
121
121
  getAllActivity: approveUrlPrefix + "getAllActivity" + '?', //获取所有节点
122
122
  getCategoryListByModule: approveUrlPrefix + "getCategoryListByModule" + '?', //获取所有节点
123
123
  cancelLimit: approveUrlPrefix + "cancelLimit" + '?', //取消超时
124
- getCanCancelLimit: approveUrlPrefix + "getCanCancelLimit" + '?' //是否可以取消超时
124
+ getCanCancelLimit: approveUrlPrefix + "getCanCancelLimit" + '?', //是否可以取消超时
125
+ getUserInfo: approveUrlPrefix + "getUserInfo" + '?' //获取用户信息
125
126
  },
126
127
  nodataIcon: context + "/mobile/fmui/images/noData.png",
127
128
  loadingIcon: context + "/mobile/fmui/images/loading.gif",
package/lib/form/form.js CHANGED
@@ -641,6 +641,9 @@ var PageHome = function (_React$Component) {
641
641
  alert("265====="+itemParam.dataAttr.textLineFeed);
642
642
  }*/
643
643
  //宏值签名图片
644
+ if (itemParam.dataAttr && itemParam.dataAttr.dataSrc == '2' && !readOnly) {
645
+ value = form.defaultValue;
646
+ }
644
647
  if (itemParam.dataAttr && itemParam.dataAttr.dataSrc == '2' && itemParam.dataAttr.fromMacro.value == 'currentUserSignPic') {
645
648
 
646
649
  if (value) {
@@ -2472,6 +2475,14 @@ var PageHome = function (_React$Component) {
2472
2475
  }, {
2473
2476
  key: 'popuserChange',
2474
2477
  value: function popuserChange(code, newValue, oldValue) {
2478
+ console.log("===popuserChange===");
2479
+ var t = this;
2480
+ var userId = "";
2481
+ for (var i = 0; i < newValue.length; i++) {
2482
+ if (newValue[i] && newValue[i].scopeType == 'user') {
2483
+ userId = newValue[i].scopeValue;
2484
+ }
2485
+ }
2475
2486
  //alert(JSON.stringify(newValue));
2476
2487
  var data = this.props.data;
2477
2488
  if (newValue) {
@@ -2483,6 +2494,45 @@ var PageHome = function (_React$Component) {
2483
2494
  } else {
2484
2495
  newValue = "";
2485
2496
  }
2497
+ var formItem = data.formItem;
2498
+ var mainTblData = data.mainTblData;
2499
+ if (userId) {
2500
+ // t.refs[mainTblName+"_"+itemExt.key].reloadItemParam(itemExt.value);
2501
+ _db2.default.FlowModuleAPI.getUserInfo({ userId: userId }).then(function (content) {
2502
+ if (content && content.length > 0) {
2503
+ var userInfo = content[0];
2504
+ for (var i = 0; i < formItem.length; i++) {
2505
+ var item = formItem[i];
2506
+ if (item.dataAttr && item.dataAttr.relatepopuserField && item.dataAttr.relatepopuserField == code) {
2507
+ var relatepopuservalue = item.dataAttr.relatepopuserValue;
2508
+ for (var j = 0; j < mainTblData.length; j++) {
2509
+ var mainTblDataItem = mainTblData[j];
2510
+ if (mainTblDataItem.key == item.itemCode) {
2511
+ if (relatepopuservalue == 'relateuserorg') {
2512
+ mainTblDataItem.value = userInfo.orgName;
2513
+ } else if (relatepopuservalue == 'relateusercode') {
2514
+ mainTblDataItem.value = userInfo.userCode;
2515
+ } else if (relatepopuservalue == 'relateusertelphone') {
2516
+ mainTblDataItem.value = userInfo.telephone;
2517
+ } else if (relatepopuservalue == 'relateuserdutyname') {
2518
+ mainTblDataItem.value = userInfo.dutyName;
2519
+ } else if (relatepopuservalue == 'relateusercardid') {
2520
+ mainTblDataItem.value = userInfo.cardId;
2521
+ }
2522
+ t.props.reloadItemParam(data.mainTblName + "_" + mainTblDataItem.key, mainTblDataItem.value);
2523
+ }
2524
+ }
2525
+ }
2526
+ }
2527
+ } else {}
2528
+ }).catch(function (error) {
2529
+ _Toast2.default.show({
2530
+ type: 'error',
2531
+ content: error.errorMsg
2532
+ });
2533
+ });
2534
+ }
2535
+
2486
2536
  data = this.editData(code, newValue, data);
2487
2537
  var itemParam = this.state.itemParam;
2488
2538
  itemParam.value = newValue;
package/lib/form/table.js CHANGED
@@ -309,6 +309,17 @@ var PageHome = function (_React$Component) {
309
309
  // formData:formData
310
310
  // });
311
311
  }
312
+ }, {
313
+ key: 'reloadItemParam',
314
+ value: function reloadItemParam(key, value) {
315
+ var t = this;
316
+ var textValue = '';
317
+ var valueMap = {};
318
+ valueMap.key = 'value';
319
+ valueMap.value = value;
320
+
321
+ t.refs[key].reloadItemParam([valueMap]);
322
+ }
312
323
  }, {
313
324
  key: 'change',
314
325
  value: function change(data, itemParam, subTblNo) {
@@ -1667,7 +1678,7 @@ var PageHome = function (_React$Component) {
1667
1678
  return _react2.default.createElement(
1668
1679
  'div',
1669
1680
  { className: "form_" + item2.uniqueName },
1670
- _react2.default.createElement(_form2.default, { keyNo: j, ref: item2.uniqueName, newspyj: t.props.newspyj, hasCommentField: t.props.hasCommentField, commentUpload: t.props.commentUpload, commentField: t.props.commentField, module: t.props.module, formKey: t.props.allForm.formcode, status: t.props.status, form: item2, 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, isRemoveCommentFormHtml: t.props.isRemoveCommentFormHtml, onChange: this.change.bind(this) })
1681
+ _react2.default.createElement(_form2.default, { keyNo: j, ref: item2.uniqueName, newspyj: t.props.newspyj, hasCommentField: t.props.hasCommentField, commentUpload: t.props.commentUpload, commentField: t.props.commentField, module: t.props.module, formKey: t.props.allForm.formcode, status: t.props.status, form: item2, 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, isRemoveCommentFormHtml: t.props.isRemoveCommentFormHtml, onChange: this.change.bind(this), reloadItemParam: this.reloadItemParam.bind(this) })
1671
1682
  );
1672
1683
  }.bind(this)) : item.itemType == 'detail' ? _react2.default.createElement(
1673
1684
  'div',
@@ -1676,7 +1687,7 @@ var PageHome = function (_React$Component) {
1676
1687
  ) : _react2.default.createElement(
1677
1688
  'div',
1678
1689
  { className: "form_" + item.uniqueName },
1679
- _react2.default.createElement(_form2.default, { ref: item.uniqueName, keyNo: i, operate: t.props.operate, newspyj: t.props.newspyj, hasCommentField: t.props.hasCommentField, commentUpload: t.props.commentUpload, 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, isRemoveCommentFormHtml: t.props.isRemoveCommentFormHtml, onChange: this.change.bind(this) })
1690
+ _react2.default.createElement(_form2.default, { ref: item.uniqueName, keyNo: i, operate: t.props.operate, newspyj: t.props.newspyj, hasCommentField: t.props.hasCommentField, commentUpload: t.props.commentUpload, 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, isRemoveCommentFormHtml: t.props.isRemoveCommentFormHtml, onChange: this.change.bind(this), reloadItemParam: this.reloadItemParam.bind(this) })
1680
1691
  );
1681
1692
  }.bind(this)) : "" : _react2.default.createElement(
1682
1693
  'div',
@@ -1703,7 +1714,7 @@ var PageHome = function (_React$Component) {
1703
1714
  return _react2.default.createElement(
1704
1715
  'div',
1705
1716
  { className: t.state.active == item.tabCode ? "" : "t-DN" },
1706
- _react2.default.createElement(_form2.default, { className: "form_" + item.uniqueName, keyNo: j, ref: item.uniqueName, operate: t.props.operate, hasCommentField: t.props.hasCommentField, commentUpload: t.props.commentUpload, newspyj: t.props.newspyj, commentField: t.props.commentField, module: t.props.module, formKey: t.props.allForm.formcode, status: t.props.status, form: item2, allForm: t.props.allForm, formStyle: t.props.formStyleObj, commentList: t.props.commentFieldList, data: t.props.data, fieldControll: t.props.fieldControll, onChange: this.change.bind(this) })
1717
+ _react2.default.createElement(_form2.default, { className: "form_" + item.uniqueName, keyNo: j, ref: item.uniqueName, operate: t.props.operate, hasCommentField: t.props.hasCommentField, commentUpload: t.props.commentUpload, newspyj: t.props.newspyj, commentField: t.props.commentField, module: t.props.module, formKey: t.props.allForm.formcode, status: t.props.status, form: item2, allForm: t.props.allForm, formStyle: t.props.formStyleObj, commentList: t.props.commentFieldList, data: t.props.data, fieldControll: t.props.fieldControll, onChange: this.change.bind(this), reloadItemParam: this.reloadItemParam.bind(this) })
1707
1718
  );
1708
1719
  }.bind(this)) : item.itemType == 'detail' ? _react2.default.createElement(
1709
1720
  'div',
@@ -1712,7 +1723,7 @@ var PageHome = function (_React$Component) {
1712
1723
  ) : _react2.default.createElement(
1713
1724
  'div',
1714
1725
  { className: t.state.active == item.tabCode ? "" : "t-DN" },
1715
- _react2.default.createElement(_form2.default, { className: "form_" + item.uniqueName, ref: item.uniqueName, keyNo: i, operate: t.props.operate, newspyj: t.props.newspyj, hasCommentField: t.props.hasCommentField, commentUpload: t.props.commentUpload, 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, data: t.props.data, fieldControll: t.props.fieldControll, onChange: this.change.bind(this) })
1726
+ _react2.default.createElement(_form2.default, { className: "form_" + item.uniqueName, ref: item.uniqueName, keyNo: i, operate: t.props.operate, newspyj: t.props.newspyj, hasCommentField: t.props.hasCommentField, commentUpload: t.props.commentUpload, 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, data: t.props.data, fieldControll: t.props.fieldControll, onChange: this.change.bind(this), reloadItemParam: this.reloadItemParam.bind(this) })
1716
1727
  );
1717
1728
  }.bind(this))
1718
1729
  )
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "fmui-base",
3
- "version": "2.1.29",
3
+ "version": "2.1.31",
4
4
  "title": "fmui-base",
5
5
  "description": "fmui移动端组件",
6
6
  "main": "lib/index.js",