fmui-base 2.1.78 → 2.1.80

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.80:审批按钮扩展方法,公众号隐藏附件下载按钮,子表支持扩展按钮
7
+ - 2.1.79:审批支持传阅范围设置
6
8
  - 2.1.78:自动编号重复赋值问题处理
7
9
  - 2.1.77:转交报错处理
8
10
  - 2.1.76:扩展选人回显选中
@@ -161,6 +161,7 @@ var PageHome = function (_React$Component) {
161
161
 
162
162
  itemParam.children = form['children'];
163
163
  itemParam.fieldControll = this.props.fieldControll;
164
+ itemParam.extButtonList = form['extButtonList'] ? form['extButtonList'] : [];
164
165
 
165
166
  //判断字段属性
166
167
  var fieldControllJson = this.props.fieldControll;
@@ -731,6 +732,7 @@ var PageHome = function (_React$Component) {
731
732
  { flex: 1, className: _this2.state.isHideSubTblHeadTblList.indexOf(subTblName) == -1 ? "t-LH46 t-FC9" : "t-DN" },
732
733
  i + 1
733
734
  ),
735
+ _this2.getDetaiExtOperate(i),
734
736
  _react2.default.createElement(
735
737
  Box,
736
738
  { 'data-key': i, onClick: _this2.detailDel.bind(_this2, i), className: t.state.itemParam.subtableReadonly || subForm.length == 1 ? 't-DN' : 't-P16 theme-color' },
@@ -747,6 +749,44 @@ var PageHome = function (_React$Component) {
747
749
  );
748
750
  });
749
751
  }
752
+ //子表扩展按钮
753
+
754
+ }, {
755
+ key: 'getDetaiExtOperate',
756
+ value: function getDetaiExtOperate(index) {
757
+ var _this3 = this;
758
+
759
+ var t = this;
760
+ console.log("getDetaiExtOperate===");
761
+ var subForm = this.state.itemParam.subForm;
762
+ var extButtonList = this.state.itemParam.extButtonList;
763
+ // extButtonList = [{'buttonName':'扩展1','buttonFun':'kuozhan1'},{'buttonName':'扩展3','buttonFun':'kuozhan3'}];
764
+ if (!extButtonList) {
765
+ extButtonList = [];
766
+ }
767
+
768
+ return extButtonList.map(function (item, i) {
769
+ return _react2.default.createElement(
770
+ 'div',
771
+ { className: 'dd-drug-list' },
772
+ _react2.default.createElement(
773
+ Box,
774
+ { 'data-key': i, onClick: _this3.extOperate.bind(_this3, index, _this3.state.itemParam, item.buttonFun), className: 't-P16 theme-color' },
775
+ item.buttonName
776
+ )
777
+ );
778
+ });
779
+ }
780
+
781
+ //子表扩展按钮方法
782
+
783
+ }, {
784
+ key: 'extOperate',
785
+ value: function extOperate(i, itemParam, buttonFun) {
786
+ if (typeof FlowCommon.subFormItemExtOperate === "function") {
787
+ FlowCommon.subFormItemExtOperate(this.state, i, itemParam, buttonFun, this);
788
+ }
789
+ }
750
790
  }, {
751
791
  key: 'replaceDollar',
752
792
  value: function replaceDollar(str) {
@@ -444,6 +444,8 @@ var PageHome = function (_React$Component) {
444
444
  mobileFlowChar: '0', //是否开启流程图 1开启 0禁用
445
445
  readScopeId: '',
446
446
  readScopeList: [],
447
+ readRangeType: '', //传阅范围 0全部 2本组织及下属组织 4自定义
448
+ readRangeList: '', //传阅范围为自定义时的limitData
447
449
  isRemoveCommentFormHtml: '0', //是否隐藏无数据的批示意见 1隐藏
448
450
  allActivity: [], //所有环节名称
449
451
  designActivity: '', //选择的提醒环节id
@@ -794,6 +796,8 @@ var PageHome = function (_React$Component) {
794
796
  var form = content.form;
795
797
  var readScopeId = '';
796
798
  var readScopeList = [];
799
+ var readRangeType = '';
800
+ var readRangeList = '';
797
801
  var isRemoveCommentFormHtml = '0';
798
802
  var subProcessCode = '';
799
803
  var dataInherit = '';
@@ -807,6 +811,12 @@ var PageHome = function (_React$Component) {
807
811
  if (content.readScopeList && typeof content.readScopeList != "undefined") {
808
812
  readScopeList = content.readScopeList;
809
813
  }
814
+ if (content.readRangeType && typeof content.readRangeType != "undefined") {
815
+ readRangeType = content.readRangeType;
816
+ }
817
+ if (content.readRangeList && typeof content.readRangeList != "undefined") {
818
+ readRangeList = content.readRangeList;
819
+ }
810
820
  var commentUpload = '';
811
821
  if (content.commentUpload && typeof content.commentUpload != "undefined") {
812
822
  commentUpload = content.commentUpload;
@@ -1382,6 +1392,8 @@ var PageHome = function (_React$Component) {
1382
1392
  mobileFlowChar: mobileFlowChar,
1383
1393
  readScopeId: readScopeId,
1384
1394
  readScopeList: readScopeList,
1395
+ readRangeType: readRangeType,
1396
+ readRangeList: readRangeList,
1385
1397
  isRemoveCommentFormHtml: isRemoveCommentFormHtml,
1386
1398
  commentUpload: commentUpload,
1387
1399
  subProcessCode: subProcessCode,
@@ -1474,7 +1486,7 @@ var PageHome = function (_React$Component) {
1474
1486
  content.buttons = buttons;
1475
1487
  }
1476
1488
  if (typeof FlowCommon.dealwithCommonButton === "function") {
1477
- FlowCommon.dealwithCommonButton(t.state, function (extensionButtonList, contentNew) {
1489
+ FlowCommon.dealwithCommonButton(t.state, content, function (extensionButtonList, contentNew) {
1478
1490
  //项目开发扩展
1479
1491
  if (!contentNew) {
1480
1492
  contentNew = content;
@@ -1486,7 +1498,7 @@ var PageHome = function (_React$Component) {
1486
1498
  }
1487
1499
  } catch (e) {}
1488
1500
  if (typeof mobileExt !== 'undefined' && typeof mobileExt["dealwithCommonButtonExt"] === "function") {
1489
- mobileExt["dealwithCommonButtonExt"](t.state, contentNew, extensionButtonList, function (contentNewExt, extensionButtonListExt) {
1501
+ mobileExt["dealwithCommonButtonExt"](t.state, contentNew, function (contentNewExt, extensionButtonListExt) {
1490
1502
  t.dealwithButtonsFunc(contentNewExt, extensionButtonListExt);
1491
1503
  });
1492
1504
  } else {
@@ -1499,7 +1511,20 @@ var PageHome = function (_React$Component) {
1499
1511
  });
1500
1512
  }, content);
1501
1513
  } else {
1502
- t.dealwithButtonsFunc(content, []);
1514
+ // t.dealwithButtonsFunc(content,[]);
1515
+ var mobileExt;
1516
+ try {
1517
+ if (formKey) {
1518
+ mobileExt = typeof eval(module + "_" + formKey + "_mobileExt") !== 'undefined' ? eval(module + "_" + formKey + "_mobileExt") : null;
1519
+ }
1520
+ } catch (e) {}
1521
+ if (typeof mobileExt !== 'undefined' && typeof mobileExt["dealwithCommonButtonExt"] === "function") {
1522
+ mobileExt["dealwithCommonButtonExt"](t.state, content, function (contentNewExt, extensionButtonListExt) {
1523
+ t.dealwithButtonsFunc(contentNewExt, extensionButtonListExt);
1524
+ });
1525
+ } else {
1526
+ t.dealwithButtonsFunc(content, []);
1527
+ }
1503
1528
  }
1504
1529
  }
1505
1530
 
@@ -6186,6 +6211,27 @@ var PageHome = function (_React$Component) {
6186
6211
  // this.setState({
6187
6212
 
6188
6213
  // });
6214
+ var mobileExt;
6215
+ var mobileFormExt;
6216
+ var formKey = _this2.state.formKey;
6217
+ var module = _this2.state.module;
6218
+ try {
6219
+ if (module) {
6220
+ mobileExt = typeof eval(module + "_mobileExt") !== 'undefined' ? eval(module + "_mobileExt") : null;
6221
+ }
6222
+ } catch (e) {}
6223
+ if (typeof mobileExt !== 'undefined' && typeof mobileExt["dealwithCommonButtonEndExt"] === "function") {
6224
+ content = mobileExt["dealwithCommonButtonEndExt"](content);
6225
+ }
6226
+ try {
6227
+ if (formKey) {
6228
+ mobileFormExt = typeof eval(module + "_" + formKey + "_mobileExt") !== 'undefined' ? eval(module + "_" + formKey + "_mobileExt") : null;
6229
+ }
6230
+ } catch (e) {}
6231
+ if (typeof mobileFormExt !== 'undefined' && typeof mobileFormExt["dealwithCommonButtonEndExt"] === "function") {
6232
+ content = mobileFormExt["dealwithCommonButtonEndExt"](content);
6233
+ }
6234
+
6189
6235
  var buttonCodeList = content;
6190
6236
  var actionSheetButtonOpt = [];
6191
6237
  var actionSheetButtonOptName = [];
@@ -6297,6 +6343,7 @@ var PageHome = function (_React$Component) {
6297
6343
  }
6298
6344
  }
6299
6345
  }
6346
+
6300
6347
  _this2.setState({
6301
6348
  buttonCodeList: content,
6302
6349
  buttonList: buttonList,
@@ -7724,6 +7771,8 @@ var PageHome = function (_React$Component) {
7724
7771
  chooseType: 'userAndOrg,userAndGroup,userAndDuty,userNotPoliticalOutlook,userAndStation,userAndPersonGroup',
7725
7772
  checkType: 'checkbox',
7726
7773
  defaultValue: this.state.readScopeList,
7774
+ limitData: this.state.readRangeList,
7775
+ queryLimit: this.state.readRangeList && this.state.readRangeList != '' ? '5' : '',
7727
7776
  ref: "selectMember_circulate1",
7728
7777
  isDelete: true,
7729
7778
  onChange: this.getCirculatePerson.bind(this)
@@ -7952,6 +8001,8 @@ var PageHome = function (_React$Component) {
7952
8001
  chooseType: 'userAndOrg,userAndGroup,userAndDuty,userNotPoliticalOutlook,userAndStation,userAndPersonGroup',
7953
8002
  checkType: 'checkbox',
7954
8003
  defaultValue: this.state.readScopeList,
8004
+ limitData: this.state.readRangeList,
8005
+ queryLimit: this.state.readRangeList && this.state.readRangeList != '' ? '5' : '',
7955
8006
  ref: "selectMember_circulate",
7956
8007
  isDelete: true,
7957
8008
  onChange: this.circulateCallback.bind(this)
@@ -120,6 +120,10 @@ var PageHome = function (_React$Component) {
120
120
  var canDel = props.canDel;
121
121
  //可下载
122
122
  var canDownload = props.canDownload;
123
+ // 公众号不展示下载按钮
124
+ if (getLoginUserInfo().thirdMenuType == 'WeChat') {
125
+ canDownload = false;
126
+ }
123
127
 
124
128
  //单次返回,默认返回所有
125
129
  var returnOnce = props.returnOnce;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "fmui-base",
3
- "version": "2.1.78",
3
+ "version": "2.1.80",
4
4
  "title": "fmui-base",
5
5
  "description": "fmui移动端组件",
6
6
  "main": "lib/index.js",