easy3wui 1.5.64-beta.10 → 1.5.64-beta.12

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.
@@ -276,7 +276,7 @@ var Easy3wEditBigTable = function (_Component) {
276
276
  });
277
277
  };
278
278
 
279
- _this.getToolbar = function () {
279
+ _this.touchGetToolbar = function () {
280
280
  var objToolbarProps = _this.props.objToolbarProps;
281
281
  var addRowFlag = objToolbarProps.addRowFlag,
282
282
  addRowButtonText = objToolbarProps.addRowButtonText,
@@ -424,7 +424,7 @@ var Easy3wEditBigTable = function (_Component) {
424
424
  } else {
425
425
  _this.saveEditBigTableModelZJ('deleteRow', arrRows);
426
426
  }
427
- _this.onSelectedRowsChange([], []); // 选择行清空
427
+ _this.touchSelectedRowsChange(new Set()); // 选择行清空
428
428
  } else {
429
429
  _modal2['default'].error({
430
430
  title: '错误',
@@ -625,15 +625,27 @@ var Easy3wEditBigTable = function (_Component) {
625
625
  }
626
626
  };
627
627
 
628
- _this.touchSelectedRowsChange = function (selectedRows) {
628
+ _this.touchSelectedRowsChange = function (selectedRows, a, b) {
629
629
  var _this$props7 = _this.props,
630
+ dataList = _this$props7.dataList,
630
631
  rowKey = _this$props7.rowKey,
631
632
  touchSelectedRowsChangeCB = _this$props7.touchSelectedRowsChangeCB;
632
633
 
633
- var arrValuesInfo = Array.from(selectedRows);
634
- var arrValues = [];
635
- arrValuesInfo.map(function (item) {
636
- arrValues.push(item[rowKey]);
634
+ var arrValues = Array.from(selectedRows);
635
+ var arrValuesInfo = [];
636
+ arrValues.map(function (item) {
637
+ var rowInfo = {};
638
+ if (rowKey === 'autoAddNumber_idx_edit') {
639
+ rowInfo = (0, _extends5['default'])({}, dataList[item]);
640
+ } else {
641
+ dataList.map(function (obj) {
642
+ if (obj[rowKey] === item[rowKey]) {
643
+ rowInfo = (0, _extends5['default'])({}, obj);
644
+ }
645
+ return obj;
646
+ });
647
+ }
648
+ arrValuesInfo.push(rowInfo);
637
649
  return item;
638
650
  });
639
651
  if (touchSelectedRowsChangeCB && typeof touchSelectedRowsChangeCB === 'function') {
@@ -653,6 +665,7 @@ var Easy3wEditBigTable = function (_Component) {
653
665
  bidPureComponent(_this);
654
666
  }
655
667
  _this.state = {
668
+ visible: false, // 隐藏批量录入Modal
656
669
  sortColumns: [], // 排序字段
657
670
  objFilters: {
658
671
  enabled: false // 是否启用筛选条件
@@ -754,7 +767,7 @@ var Easy3wEditBigTable = function (_Component) {
754
767
 
755
768
  // 批量录入--隐藏批量录入Modal
756
769
 
757
- // 批量录入--确认回调 ---待完善
770
+ // 批量录入--确认回调
758
771
 
759
772
  // #endregion 右上角按钮处理--toolbar
760
773
 
@@ -812,7 +825,7 @@ var Easy3wEditBigTable = function (_Component) {
812
825
  return _react2['default'].createElement(
813
826
  'div',
814
827
  { className: (0, _classnames2['default'])(['Easy3wEditBigTable']) },
815
- objToolbarProps ? this.getToolbar() : '',
828
+ objToolbarProps ? this.touchGetToolbar() : '',
816
829
  _react2['default'].createElement(_reactDataGrid2['default'], (0, _extends5['default'])({}, objPrps, {
817
830
  columns: this.touchCreateColumns(columns) // 表头
818
831
  , defaultColumnOptions: {
@@ -62,7 +62,7 @@ var Easy3wModal = function (_Component) {
62
62
  args[_key] = arguments[_key];
63
63
  }
64
64
 
65
- return _ret = (_temp = (_this = (0, _possibleConstructorReturn3['default'])(this, _Component.call.apply(_Component, [this].concat(args))), _this), _this.onClickFunc = function (e, func) {
65
+ return _ret = (_temp = (_this = (0, _possibleConstructorReturn3['default'])(this, _Component.call.apply(_Component, [this].concat(args))), _this), _this.modalRef = (0, _react.createRef)(), _this.onClickFunc = function (e, func) {
66
66
  var globalLoading = _this.props.loadingFlag.global;
67
67
  if (globalLoading) {
68
68
  _notification3['default'].warning({
@@ -100,6 +100,13 @@ var Easy3wModal = function (_Component) {
100
100
  }, _temp), (0, _possibleConstructorReturn3['default'])(_this, _ret);
101
101
  }
102
102
 
103
+ Easy3wModal.prototype.componentWillUnmount = function componentWillUnmount() {
104
+ // 确保在组件卸载后不会尝试访问 DOM 节点
105
+ if (this.modalRef.current) {
106
+ document.body.style.overflow = '';
107
+ }
108
+ };
109
+
103
110
  Easy3wModal.prototype.render = function render() {
104
111
  var _props = this.props,
105
112
  title = _props.title,
@@ -114,6 +121,7 @@ var Easy3wModal = function (_Component) {
114
121
  return _react2['default'].createElement(
115
122
  _modal2['default'],
116
123
  (0, _extends3['default'])({
124
+ ref: this.modalRef,
117
125
  title: title,
118
126
  visible: visible,
119
127
  confirmLoading: loadingFlag,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "easy3wui",
3
- "version": "1.5.64-beta.10",
3
+ "version": "1.5.64-beta.12",
4
4
  "description": "easy3wui components for react",
5
5
  "keywords": [
6
6
  "react",