easy3wmui 0.0.43-beta5 → 0.0.43-beta6
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/lib/Easy3wMTable/index.js +41 -11
- package/package.json +1 -1
|
@@ -2,14 +2,14 @@
|
|
|
2
2
|
|
|
3
3
|
exports.__esModule = true;
|
|
4
4
|
|
|
5
|
-
var _form = require('antd-mobile/es/components/form');
|
|
6
|
-
|
|
7
|
-
var _form2 = _interopRequireDefault(_form);
|
|
8
|
-
|
|
9
5
|
var _button = require('antd-mobile/es/components/button');
|
|
10
6
|
|
|
11
7
|
var _button2 = _interopRequireDefault(_button);
|
|
12
8
|
|
|
9
|
+
var _form = require('antd-mobile/es/components/form');
|
|
10
|
+
|
|
11
|
+
var _form2 = _interopRequireDefault(_form);
|
|
12
|
+
|
|
13
13
|
var _extends2 = require('babel-runtime/helpers/extends');
|
|
14
14
|
|
|
15
15
|
var _extends3 = _interopRequireDefault(_extends2);
|
|
@@ -248,16 +248,23 @@ var Easy3wMTable = function (_PureComponent) {
|
|
|
248
248
|
};
|
|
249
249
|
|
|
250
250
|
_this.touchClearSV = function () {
|
|
251
|
-
_this
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
251
|
+
var _this$setState;
|
|
252
|
+
|
|
253
|
+
var queryCriteria = _this.props.queryCriteria;
|
|
254
|
+
|
|
255
|
+
_this.searchInfo[queryCriteria] = ''; // 关键字
|
|
256
|
+
_this.setState((_this$setState = {}, _this$setState[queryCriteria] = '', _this$setState.offset = 1, _this$setState), function () {
|
|
255
257
|
return _this.touchFetch();
|
|
256
258
|
});
|
|
257
259
|
};
|
|
258
260
|
|
|
259
261
|
_this.touchChangeSV = function (keywordsQry) {
|
|
260
|
-
_this
|
|
262
|
+
var _this$setState2;
|
|
263
|
+
|
|
264
|
+
var queryCriteria = _this.props.queryCriteria;
|
|
265
|
+
|
|
266
|
+
_this.searchInfo[queryCriteria] = keywordsQry;
|
|
267
|
+
_this.setState((_this$setState2 = {}, _this$setState2[queryCriteria] = keywordsQry, _this$setState2));
|
|
261
268
|
};
|
|
262
269
|
|
|
263
270
|
_this.touchSearch = function () {
|
|
@@ -269,12 +276,20 @@ var Easy3wMTable = function (_PureComponent) {
|
|
|
269
276
|
};
|
|
270
277
|
|
|
271
278
|
_this.showModal = function () {
|
|
279
|
+
console.log('queryCriteria', _this.searchInfo);
|
|
280
|
+
_this.state.form.setFieldsValue((0, _extends3['default'])({}, _this.searchInfo));
|
|
272
281
|
_this.setState({
|
|
273
282
|
visible: true // 显示更多筛选条件Modal
|
|
274
283
|
});
|
|
284
|
+
// setTimeout(() => {
|
|
285
|
+
// this.state.form.setFieldsValue({
|
|
286
|
+
// ...this.searchInfo,
|
|
287
|
+
// });
|
|
288
|
+
// }, 3000);
|
|
275
289
|
};
|
|
276
290
|
|
|
277
291
|
_this.hideModal = function () {
|
|
292
|
+
_this.state.form.resetFields();
|
|
278
293
|
_this.setState({
|
|
279
294
|
visible: false // 隐藏更多筛选条件Modal
|
|
280
295
|
});
|
|
@@ -288,6 +303,17 @@ var Easy3wMTable = function (_PureComponent) {
|
|
|
288
303
|
_this.hideModal();
|
|
289
304
|
};
|
|
290
305
|
|
|
306
|
+
_this.deleteFilter = function () {
|
|
307
|
+
var _this$setState3;
|
|
308
|
+
|
|
309
|
+
var queryCriteria = _this.props.queryCriteria;
|
|
310
|
+
|
|
311
|
+
console.log('queryCriteria', queryCriteria);
|
|
312
|
+
_this.searchInfo = {};
|
|
313
|
+
_this.touchFetch();
|
|
314
|
+
_this.setState((_this$setState3 = {}, _this$setState3[queryCriteria] = '', _this$setState3));
|
|
315
|
+
};
|
|
316
|
+
|
|
291
317
|
var bidPureComponent = _this.props.bidPureComponent;
|
|
292
318
|
|
|
293
319
|
if (bidPureComponent && typeof bidPureComponent === 'function') {
|
|
@@ -300,6 +326,7 @@ var Easy3wMTable = function (_PureComponent) {
|
|
|
300
326
|
_this.state = {
|
|
301
327
|
offset: 1, // 分页
|
|
302
328
|
visible: false, // 隐藏更多筛选条件Modal
|
|
329
|
+
queryCriteria: '', // 关键字
|
|
303
330
|
form: null // 表单实例
|
|
304
331
|
};
|
|
305
332
|
return _this;
|
|
@@ -381,8 +408,10 @@ var Easy3wMTable = function (_PureComponent) {
|
|
|
381
408
|
|
|
382
409
|
// 确定
|
|
383
410
|
|
|
384
|
-
|
|
385
411
|
// --------------------------------------------- 更多筛选条件 end -----------------------------------------------
|
|
412
|
+
// 清空查询条件
|
|
413
|
+
|
|
414
|
+
|
|
386
415
|
Easy3wMTable.prototype.render = function render() {
|
|
387
416
|
var _this2 = this;
|
|
388
417
|
|
|
@@ -425,6 +454,7 @@ var Easy3wMTable = function (_PureComponent) {
|
|
|
425
454
|
return _react2['default'].createElement(
|
|
426
455
|
'div',
|
|
427
456
|
{ id: 'Easy3wMTable' },
|
|
457
|
+
_react2['default'].createElement(_form2['default'], { ref: this.formRef }),
|
|
428
458
|
_react2['default'].createElement(
|
|
429
459
|
'div',
|
|
430
460
|
{ className: 'flipContainer' },
|
|
@@ -470,6 +500,7 @@ var Easy3wMTable = function (_PureComponent) {
|
|
|
470
500
|
, onCancel: function onCancel() {
|
|
471
501
|
return _this2.touchSearch();
|
|
472
502
|
} // 点击取消按钮时触发
|
|
503
|
+
, value: this.state[queryCriteria]
|
|
473
504
|
})
|
|
474
505
|
}) : '',
|
|
475
506
|
arrData ? arrData.map(function (item, index) {
|
|
@@ -622,7 +653,6 @@ var Easy3wMTable = function (_PureComponent) {
|
|
|
622
653
|
, bodyStyle: { height: '100vh', overflow: 'auto' },
|
|
623
654
|
getContainer: document.querySelector('.flipContainer')
|
|
624
655
|
},
|
|
625
|
-
_react2['default'].createElement(_form2['default'], { ref: this.formRef }),
|
|
626
656
|
this.state.form ? _react2['default'].createElement(_easy3wmui.Easy3wMFormPage, {
|
|
627
657
|
rowItems: arrFilter,
|
|
628
658
|
form: this.state.form
|