easy3wui 1.5.64-beta.7 → 1.5.64-beta.8

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.
@@ -72,3 +72,6 @@
72
72
  color: #999;
73
73
  opacity: 1;
74
74
  }
75
+ .Easy3wEditBigTable .custom-edit-cell {
76
+ background-color: #f6ffed;
77
+ }
package/assets/index.css CHANGED
@@ -1556,3 +1556,6 @@ input.ant-input-number-input {
1556
1556
  color: #999;
1557
1557
  opacity: 1;
1558
1558
  }
1559
+ .Easy3wEditBigTable .custom-edit-cell {
1560
+ background-color: #f6ffed;
1561
+ }
@@ -189,26 +189,37 @@ var Easy3wEditBigTable = function (_Component) {
189
189
  return arr;
190
190
  };
191
191
 
192
- _this.touchcountTotal = function () {
193
- var rowsView = [].concat(_this.arrRows);
194
- var objTotal = {}; // 总计对象
192
+ _this.touchCountTotal = function (rowsView, columns) {
195
193
  rowsView.map(function (row, index) {
196
- _this.props.columns.map(function (item, idx) {
194
+ columns.map(function (item, idx) {
197
195
  var key = item.key,
198
- totalFlag = item.totalFlag;
196
+ totalFlag = item.totalFlag,
197
+ children = item.children;
199
198
 
200
- if (totalFlag && typeof totalFlag === 'boolean') {
199
+ if (children) {
200
+ _this.touchCountTotal(rowsView, children);
201
+ } else if (totalFlag && typeof totalFlag === 'boolean') {
201
202
  if (index === 0) {
202
- objTotal[key] = 0;
203
+ _this.objTotal[key] = 0;
203
204
  }
204
205
  var intData = Number(row[key]) || 0;
205
- objTotal[key] += intData;
206
+ _this.objTotal[key] += intData;
206
207
  }
207
208
  return idx;
208
209
  });
209
210
  return index;
210
211
  });
211
- return objTotal;
212
+ return _this.objTotal;
213
+ };
214
+
215
+ _this.touchSetState = function (objState, callback) {
216
+ // objState 要设置的state对象
217
+ // callback 回调函数 非必须
218
+ if (callback && typeof callback === 'function') {
219
+ _this.setState(objState, callback);
220
+ } else {
221
+ _this.setState(objState);
222
+ }
212
223
  };
213
224
 
214
225
  _this.touchFilters = function () {
@@ -218,6 +229,12 @@ var Easy3wEditBigTable = function (_Component) {
218
229
  objFilters: (0, _extends5['default'])({}, objFilters, {
219
230
  enabled: !objFilters.enabled
220
231
  })
232
+ }, function () {
233
+ var touchFiltersChangeState = _this.props.touchFiltersChangeState;
234
+
235
+ if (touchFiltersChangeState && typeof touchFiltersChangeState === 'function') {
236
+ touchFiltersChangeState((0, _extends5['default'])({}, _this.state.objFilters));
237
+ }
221
238
  });
222
239
  };
223
240
 
@@ -228,6 +245,12 @@ var Easy3wEditBigTable = function (_Component) {
228
245
 
229
246
  _this.setState({
230
247
  objFilters: (0, _extends5['default'])({}, objFilters, (_extends2 = {}, _extends2[fieldId] = value, _extends2))
248
+ }, function () {
249
+ var touchFiltersChangeState = _this.props.touchFiltersChangeState;
250
+
251
+ if (touchFiltersChangeState && typeof touchFiltersChangeState === 'function') {
252
+ touchFiltersChangeState((0, _extends5['default'])({}, _this.state.objFilters));
253
+ }
231
254
  });
232
255
  };
233
256
 
@@ -238,6 +261,12 @@ var Easy3wEditBigTable = function (_Component) {
238
261
  objFilters: {
239
262
  enabled: objFilters.enabled
240
263
  }
264
+ }, function () {
265
+ var touchFiltersChangeState = _this.props.touchFiltersChangeState;
266
+
267
+ if (touchFiltersChangeState && typeof touchFiltersChangeState === 'function') {
268
+ touchFiltersChangeState((0, _extends5['default'])({}, _this.state.objFilters));
269
+ }
241
270
  });
242
271
  };
243
272
 
@@ -674,6 +703,7 @@ var Easy3wEditBigTable = function (_Component) {
674
703
  // #region 表头列处理
675
704
 
676
705
  // #endregion 表头列处理
706
+
677
707
  // #region 数据处理
678
708
  // 数据处理
679
709
 
@@ -685,6 +715,11 @@ var Easy3wEditBigTable = function (_Component) {
685
715
 
686
716
  // #endregion 数据处理
687
717
 
718
+ // #region state变更
719
+ // 设置组件state
720
+
721
+ // #endregion state变更
722
+
688
723
  // #region 筛选
689
724
  // 切换筛选
690
725
 
@@ -763,13 +798,15 @@ var Easy3wEditBigTable = function (_Component) {
763
798
  this.arrRows = this.touchDP();
764
799
  var objPrps = {};
765
800
  // #region 总计行
766
- if (topTotalFlag) {
767
- var arrTotalRows = [this.touchcountTotal()];
768
- objPrps.topSummaryRows = arrTotalRows;
769
- }
770
- if (bottomTotalFlag) {
771
- var _arrTotalRows = [this.touchcountTotal()];
772
- objPrps.bottomSummaryRows = _arrTotalRows;
801
+ if (topTotalFlag || bottomTotalFlag) {
802
+ this.objTotal = {}; // 总计对象
803
+ var arrTotalRows = [this.touchCountTotal(this.arrRows, columns)];
804
+ if (topTotalFlag) {
805
+ objPrps.topSummaryRows = arrTotalRows;
806
+ }
807
+ if (bottomTotalFlag) {
808
+ objPrps.bottomSummaryRows = arrTotalRows;
809
+ }
773
810
  }
774
811
  // #endregion 总计行
775
812
  return _react2['default'].createElement(
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "easy3wui",
3
- "version": "1.5.64-beta.7",
3
+ "version": "1.5.64-beta.8",
4
4
  "description": "easy3wui components for react",
5
5
  "keywords": [
6
6
  "react",