fmui-base 2.1.79 → 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,7 +3,8 @@
3
3
  ---npm publish
4
4
 
5
5
  ## 更新日志
6
- - 2.1.78:审批支持传阅范围设置
6
+ - 2.1.80:审批按钮扩展方法,公众号隐藏附件下载按钮,子表支持扩展按钮
7
+ - 2.1.79:审批支持传阅范围设置
7
8
  - 2.1.78:自动编号重复赋值问题处理
8
9
  - 2.1.77:转交报错处理
9
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) {
@@ -1486,7 +1486,7 @@ var PageHome = function (_React$Component) {
1486
1486
  content.buttons = buttons;
1487
1487
  }
1488
1488
  if (typeof FlowCommon.dealwithCommonButton === "function") {
1489
- FlowCommon.dealwithCommonButton(t.state, function (extensionButtonList, contentNew) {
1489
+ FlowCommon.dealwithCommonButton(t.state, content, function (extensionButtonList, contentNew) {
1490
1490
  //项目开发扩展
1491
1491
  if (!contentNew) {
1492
1492
  contentNew = content;
@@ -1498,7 +1498,7 @@ var PageHome = function (_React$Component) {
1498
1498
  }
1499
1499
  } catch (e) {}
1500
1500
  if (typeof mobileExt !== 'undefined' && typeof mobileExt["dealwithCommonButtonExt"] === "function") {
1501
- mobileExt["dealwithCommonButtonExt"](t.state, contentNew, extensionButtonList, function (contentNewExt, extensionButtonListExt) {
1501
+ mobileExt["dealwithCommonButtonExt"](t.state, contentNew, function (contentNewExt, extensionButtonListExt) {
1502
1502
  t.dealwithButtonsFunc(contentNewExt, extensionButtonListExt);
1503
1503
  });
1504
1504
  } else {
@@ -1511,7 +1511,20 @@ var PageHome = function (_React$Component) {
1511
1511
  });
1512
1512
  }, content);
1513
1513
  } else {
1514
- 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
+ }
1515
1528
  }
1516
1529
  }
1517
1530
 
@@ -6198,6 +6211,27 @@ var PageHome = function (_React$Component) {
6198
6211
  // this.setState({
6199
6212
 
6200
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
+
6201
6235
  var buttonCodeList = content;
6202
6236
  var actionSheetButtonOpt = [];
6203
6237
  var actionSheetButtonOptName = [];
@@ -6309,6 +6343,7 @@ var PageHome = function (_React$Component) {
6309
6343
  }
6310
6344
  }
6311
6345
  }
6346
+
6312
6347
  _this2.setState({
6313
6348
  buttonCodeList: content,
6314
6349
  buttonList: buttonList,
@@ -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.79",
3
+ "version": "2.1.80",
4
4
  "title": "fmui-base",
5
5
  "description": "fmui移动端组件",
6
6
  "main": "lib/index.js",