@lm_fe/pages 0.2.5 → 0.2.7
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 +1 -1
- package/dist/a_chunks/index.js +30 -0
- package/dist/a_chunks/modals.entries./351/253/230/345/215/261/345/233/240/347/264/240/347/256/241/347/220/206.js +2 -1
- package/dist/a_chunks/src.components.Base_List.js +122 -87
- package/dist/a_chunks/src.components.MenuSearch.js +7 -8
- package/dist/components/Base_List/types.d.ts +1 -0
- package/package.json +8 -8
package/README.md
CHANGED
package/dist/a_chunks/index.js
CHANGED
|
@@ -796,6 +796,36 @@ var config_table_fd = function config_table_fd(props) {
|
|
|
796
796
|
dataIndex: 'showRowPrintBtn',
|
|
797
797
|
hidden: true,
|
|
798
798
|
layout: '1/4'
|
|
799
|
+
}, {
|
|
800
|
+
title: '显示行导出按钮',
|
|
801
|
+
inputType: 'MyCheckbox',
|
|
802
|
+
inputProps: {
|
|
803
|
+
uniqueKey: '否是',
|
|
804
|
+
marshal: 0
|
|
805
|
+
},
|
|
806
|
+
dataIndex: 'showRowExportBtn',
|
|
807
|
+
hidden: true,
|
|
808
|
+
layout: '1/4'
|
|
809
|
+
}, {
|
|
810
|
+
title: '显示行删除按钮',
|
|
811
|
+
inputType: 'MyCheckbox',
|
|
812
|
+
inputProps: {
|
|
813
|
+
uniqueKey: '否是',
|
|
814
|
+
marshal: 0
|
|
815
|
+
},
|
|
816
|
+
dataIndex: 'showRowDelBtn',
|
|
817
|
+
hidden: true,
|
|
818
|
+
layout: '1/4'
|
|
819
|
+
}, {
|
|
820
|
+
title: '显示行编辑按钮',
|
|
821
|
+
inputType: 'MyCheckbox',
|
|
822
|
+
inputProps: {
|
|
823
|
+
uniqueKey: '否是',
|
|
824
|
+
marshal: 0
|
|
825
|
+
},
|
|
826
|
+
dataIndex: 'showRowEditBtn',
|
|
827
|
+
hidden: true,
|
|
828
|
+
layout: '1/4'
|
|
799
829
|
}, {
|
|
800
830
|
title: '显示导出按钮',
|
|
801
831
|
inputType: 'MyCheckbox',
|
|
@@ -90,6 +90,7 @@ function HighriskSign_高危因素管理(props) {
|
|
|
90
90
|
selectTree = _e[0],
|
|
91
91
|
set_selectTree = _e[1];
|
|
92
92
|
var multiple = config.高危标记多选;
|
|
93
|
+
var 高危管理_允许手输传染病 = config.高危管理_允许手输传染病;
|
|
93
94
|
function getInitData(_h) {
|
|
94
95
|
var _a, _b;
|
|
95
96
|
if (_h === void 0) {
|
|
@@ -432,7 +433,7 @@ function HighriskSign_高危因素管理(props) {
|
|
|
432
433
|
infectionNote: v
|
|
433
434
|
});
|
|
434
435
|
},
|
|
435
|
-
mode:
|
|
436
|
+
mode: 高危管理_允许手输传染病 ? 'tags' : 'multiple',
|
|
436
437
|
marshal: 0,
|
|
437
438
|
value: initData === null || initData === void 0 ? void 0 : initData.infectionNote
|
|
438
439
|
})), /*#__PURE__*/React.createElement(Col, {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { s as styleInject, a as __assign, _ as __spreadArray, b as __awaiter, c as __generator, m as mchcModal__, d as __rest } from './index.js';
|
|
2
|
-
import { mchcConfig, mchcLogger, mchcEnv, mchcEvent } from '@lm_fe/env';
|
|
2
|
+
import { mchcConfig, mchcStorage, mchcLogger, mchcEnv, mchcEvent } from '@lm_fe/env';
|
|
3
3
|
import { SMchc_FormDescriptions, ModelService } from '@lm_fe/service';
|
|
4
4
|
import { safeGetFromFuncOrData, flat, safe_json_parse, safe_json_parse_arr, expect_array, Browser, downloadFile, formatDateTime, safe_async_call, sleep, cloneDeep } from '@lm_fe/utils';
|
|
5
5
|
import { Form, message, Space, Divider, Button } from 'antd';
|
|
@@ -35,22 +35,29 @@ function MyBaseListRenderFormSection(_a) {
|
|
|
35
35
|
var css_248z = ".index-module_base-list__AUHXA {\n height: 100%;\n overflow-y: auto;\n}\n.index-module_ant-table-ordinal__c8C7I {\n padding-left: 0 !important;\n padding-right: 0 !important;\n}\n";
|
|
36
36
|
styleInject(css_248z);
|
|
37
37
|
function formatProps(props) {
|
|
38
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _w, _x, _y, _z, _0, _1;
|
|
38
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _w, _x, _y, _z, _0, _1, _2, _3;
|
|
39
39
|
var _props = __assign({}, props);
|
|
40
|
-
|
|
40
|
+
var bf_conf = _props.bf_conf;
|
|
41
|
+
_props.handleBeforePopup = (_b = (_a = _props.handleBeforePopup) !== null && _a !== void 0 ? _a : bf_conf === null || bf_conf === void 0 ? void 0 : bf_conf.handleBeforePopup) !== null && _b !== void 0 ? _b : function (values) {
|
|
41
42
|
return values;
|
|
42
43
|
};
|
|
43
|
-
_props.beforeSubmit = (
|
|
44
|
+
_props.beforeSubmit = (_d = (_c = _props.beforeSubmit) !== null && _c !== void 0 ? _c : bf_conf === null || bf_conf === void 0 ? void 0 : bf_conf.beforeSubmit) !== null && _d !== void 0 ? _d : function (values) {
|
|
44
45
|
return values;
|
|
45
46
|
};
|
|
46
|
-
_props.name = (
|
|
47
|
-
_props.searchParams = safeGetFromFuncOrData((
|
|
48
|
-
_props.initialSearchValue = safeGetFromFuncOrData((
|
|
49
|
-
_props.searchConfig = safeGetFromFuncOrData((
|
|
50
|
-
_props.tableColumns = (
|
|
51
|
-
_props.showAction = (
|
|
52
|
-
_props.showAdd = (
|
|
53
|
-
_props.genColumns = (
|
|
47
|
+
_props.name = (_e = _props.name) !== null && _e !== void 0 ? _e : bf_conf === null || bf_conf === void 0 ? void 0 : bf_conf.name;
|
|
48
|
+
_props.searchParams = safeGetFromFuncOrData((_f = _props.searchParams) !== null && _f !== void 0 ? _f : bf_conf === null || bf_conf === void 0 ? void 0 : bf_conf.searchParams);
|
|
49
|
+
_props.initialSearchValue = safeGetFromFuncOrData((_g = _props.initialSearchValue) !== null && _g !== void 0 ? _g : bf_conf === null || bf_conf === void 0 ? void 0 : bf_conf.initialSearchValue);
|
|
50
|
+
_props.searchConfig = safeGetFromFuncOrData((_h = _props.searchConfig) !== null && _h !== void 0 ? _h : bf_conf === null || bf_conf === void 0 ? void 0 : bf_conf.searchConfig);
|
|
51
|
+
_props.tableColumns = (_j = _props.tableColumns) !== null && _j !== void 0 ? _j : bf_conf === null || bf_conf === void 0 ? void 0 : bf_conf.tableColumns;
|
|
52
|
+
_props.showAction = (_l = (_k = _props.showAction) !== null && _k !== void 0 ? _k : bf_conf === null || bf_conf === void 0 ? void 0 : bf_conf.showAction) !== null && _l !== void 0 ? _l : true;
|
|
53
|
+
_props.showAdd = (_o = (_m = _props.showAdd) !== null && _m !== void 0 ? _m : bf_conf === null || bf_conf === void 0 ? void 0 : bf_conf.showAdd) !== null && _o !== void 0 ? _o : true;
|
|
54
|
+
_props.genColumns = (_q = (_p = _props.genColumns) !== null && _p !== void 0 ? _p : bf_conf === null || bf_conf === void 0 ? void 0 : bf_conf.genColumns) !== null && _q !== void 0 ? _q : undefined;
|
|
55
|
+
_props.showExport = (_s = (_r = _props.showExport) !== null && _r !== void 0 ? _r : bf_conf === null || bf_conf === void 0 ? void 0 : bf_conf.showExport) !== null && _s !== void 0 ? _s : false;
|
|
56
|
+
_props.showPrint = (_u = (_t = _props.showPrint) !== null && _t !== void 0 ? _t : bf_conf === null || bf_conf === void 0 ? void 0 : bf_conf.showPrint) !== null && _u !== void 0 ? _u : false;
|
|
57
|
+
_props.showRowPrintBtn = (_x = (_w = _props.showRowPrintBtn) !== null && _w !== void 0 ? _w : bf_conf === null || bf_conf === void 0 ? void 0 : bf_conf.showRowPrintBtn) !== null && _x !== void 0 ? _x : false;
|
|
58
|
+
_props.showRowDelBtn = (_z = (_y = _props.showRowDelBtn) !== null && _y !== void 0 ? _y : bf_conf === null || bf_conf === void 0 ? void 0 : bf_conf.showRowDelBtn) !== null && _z !== void 0 ? _z : true;
|
|
59
|
+
_props.showRowExportBtn = (_1 = (_0 = _props.showRowExportBtn) !== null && _0 !== void 0 ? _0 : bf_conf === null || bf_conf === void 0 ? void 0 : bf_conf.showRowExportBtn) !== null && _1 !== void 0 ? _1 : false;
|
|
60
|
+
_props.showRowEditBtn = (_3 = (_2 = _props.showRowEditBtn) !== null && _2 !== void 0 ? _2 : bf_conf === null || bf_conf === void 0 ? void 0 : bf_conf.showRowEditBtn) !== null && _3 !== void 0 ? _3 : true;
|
|
54
61
|
return _props;
|
|
55
62
|
}
|
|
56
63
|
function tranformQueryData(values, searchConfig, isFuck) {
|
|
@@ -201,12 +208,10 @@ function _MyBaseList(_props) {
|
|
|
201
208
|
searchParams = _j === void 0 ? {} : _j,
|
|
202
209
|
_k = props.initialSearchValue,
|
|
203
210
|
initialSearchValue = _k === void 0 ? {} : _k,
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
_o = props.showRowPrintBtn,
|
|
209
|
-
showRowPrintBtn = _o === void 0 ? false : _o,
|
|
211
|
+
showRowDelBtn = props.showRowDelBtn,
|
|
212
|
+
showRowEditBtn = props.showRowEditBtn,
|
|
213
|
+
showRowPrintBtn = props.showRowPrintBtn,
|
|
214
|
+
showRowExportBtn = props.showRowExportBtn,
|
|
210
215
|
customModelService = props.customModelService,
|
|
211
216
|
genColumns = props.genColumns,
|
|
212
217
|
onAdd = props.onAdd,
|
|
@@ -214,17 +219,17 @@ function _MyBaseList(_props) {
|
|
|
214
219
|
onPrint = props.onPrint,
|
|
215
220
|
beforeSearch = props.beforeSearch,
|
|
216
221
|
handleClickRow = props.handleClickRow,
|
|
217
|
-
|
|
218
|
-
handleDoubleClickRow =
|
|
222
|
+
_l = props.handleDoubleClickRow,
|
|
223
|
+
handleDoubleClickRow = _l === void 0 ? function (item) {
|
|
219
224
|
return handleEdit(item);
|
|
220
|
-
} :
|
|
225
|
+
} : _l,
|
|
221
226
|
onModalOpen = props.onModalOpen,
|
|
222
|
-
|
|
223
|
-
printDefaultConfig =
|
|
224
|
-
|
|
225
|
-
beforeSubmit =
|
|
227
|
+
_m = props.printDefaultConfig,
|
|
228
|
+
printDefaultConfig = _m === void 0 ? {} : _m,
|
|
229
|
+
_o = props.beforeSubmit,
|
|
230
|
+
beforeSubmit = _o === void 0 ? function (v) {
|
|
226
231
|
return v;
|
|
227
|
-
} :
|
|
232
|
+
} : _o,
|
|
228
233
|
handleBeforePopup = props.handleBeforePopup,
|
|
229
234
|
effect_ctx = props.effect_ctx,
|
|
230
235
|
action_col = props.action_col;
|
|
@@ -243,7 +248,7 @@ function _MyBaseList(_props) {
|
|
|
243
248
|
var defaultQuery = useRef(defaultQueryValue);
|
|
244
249
|
var showSearch = !!searchConfig.length;
|
|
245
250
|
var table_columns = use_my_baselist(props).table_columns;
|
|
246
|
-
var actCellWidth = (+showRowDelBtn + +showRowEditBtn + +showRowPrintBtn) * 60;
|
|
251
|
+
var actCellWidth = (+showRowDelBtn + +showRowEditBtn + +showRowPrintBtn + +showRowExportBtn) * 60;
|
|
247
252
|
if (ActionAddonBefore) {
|
|
248
253
|
actCellWidth += 70;
|
|
249
254
|
}
|
|
@@ -263,51 +268,51 @@ function _MyBaseList(_props) {
|
|
|
263
268
|
ignore_usr: ignore_usr
|
|
264
269
|
});
|
|
265
270
|
}, [name, customModelService]);
|
|
266
|
-
var
|
|
267
|
-
total =
|
|
268
|
-
setTotal =
|
|
269
|
-
var
|
|
270
|
-
dataSource =
|
|
271
|
-
setDataSource =
|
|
272
|
-
var
|
|
273
|
-
visible =
|
|
274
|
-
setVisible =
|
|
275
|
-
var
|
|
276
|
-
editable =
|
|
277
|
-
setEditable =
|
|
278
|
-
var
|
|
279
|
-
___id =
|
|
280
|
-
set___Id =
|
|
281
|
-
var
|
|
282
|
-
extraModalData =
|
|
283
|
-
setExtraModalData =
|
|
284
|
-
var
|
|
285
|
-
editKey =
|
|
286
|
-
setEditKey =
|
|
287
|
-
var
|
|
288
|
-
loading =
|
|
289
|
-
setLoading =
|
|
290
|
-
var
|
|
291
|
-
longSearchForm =
|
|
292
|
-
setLongSearchForm =
|
|
293
|
-
var
|
|
294
|
-
tableHeight =
|
|
295
|
-
setTableHeight =
|
|
296
|
-
var
|
|
297
|
-
checkRows =
|
|
298
|
-
setCheckRows =
|
|
271
|
+
var _p = useState(0),
|
|
272
|
+
total = _p[0],
|
|
273
|
+
setTotal = _p[1];
|
|
274
|
+
var _q = useState([]),
|
|
275
|
+
dataSource = _q[0],
|
|
276
|
+
setDataSource = _q[1];
|
|
277
|
+
var _r = useState(false),
|
|
278
|
+
visible = _r[0],
|
|
279
|
+
setVisible = _r[1];
|
|
280
|
+
var _s = useState(false),
|
|
281
|
+
editable = _s[0],
|
|
282
|
+
setEditable = _s[1];
|
|
283
|
+
var _t = useState(),
|
|
284
|
+
___id = _t[0],
|
|
285
|
+
set___Id = _t[1];
|
|
286
|
+
var _u = useState(),
|
|
287
|
+
extraModalData = _u[0],
|
|
288
|
+
setExtraModalData = _u[1];
|
|
289
|
+
var _v = useState(0),
|
|
290
|
+
editKey = _v[0],
|
|
291
|
+
setEditKey = _v[1];
|
|
292
|
+
var _w = useState(false),
|
|
293
|
+
loading = _w[0],
|
|
294
|
+
setLoading = _w[1];
|
|
295
|
+
var _x = useState(false),
|
|
296
|
+
longSearchForm = _x[0],
|
|
297
|
+
setLongSearchForm = _x[1];
|
|
298
|
+
var _y = useState(500),
|
|
299
|
+
tableHeight = _y[0],
|
|
300
|
+
setTableHeight = _y[1];
|
|
301
|
+
var _z = useState([]),
|
|
302
|
+
checkRows = _z[0],
|
|
303
|
+
setCheckRows = _z[1];
|
|
299
304
|
var table_form = Form.useForm()[0];
|
|
300
305
|
var editKeyRef = useRef(0);
|
|
301
306
|
var formWrapper = useRef(null);
|
|
302
307
|
var propsCache = useRef(props);
|
|
303
308
|
propsCache.current = props;
|
|
304
309
|
var inited = useRef(false);
|
|
305
|
-
var
|
|
306
|
-
__pageSize =
|
|
307
|
-
set__pageSize =
|
|
308
|
-
var
|
|
309
|
-
__current =
|
|
310
|
-
set__current =
|
|
310
|
+
var _0 = useState(defaultQueryValue.size),
|
|
311
|
+
__pageSize = _0[0],
|
|
312
|
+
set__pageSize = _0[1];
|
|
313
|
+
var _1 = useState(1),
|
|
314
|
+
__current = _1[0],
|
|
315
|
+
set__current = _1[1];
|
|
311
316
|
function setPageSize(n) {
|
|
312
317
|
set__pageSize(n);
|
|
313
318
|
defaultQuery.current.size = n;
|
|
@@ -320,7 +325,12 @@ function _MyBaseList(_props) {
|
|
|
320
325
|
setEditKey(id);
|
|
321
326
|
editKeyRef.current = id;
|
|
322
327
|
}
|
|
328
|
+
var cache_key = "".concat(location.pathname, "@").concat(name);
|
|
323
329
|
useEffect(function () {
|
|
330
|
+
var a = mchcStorage.get(cache_key);
|
|
331
|
+
if (!isNil(a)) {
|
|
332
|
+
searchForm.setFieldsValue(a);
|
|
333
|
+
}
|
|
324
334
|
setTimeout(function () {
|
|
325
335
|
var _a, _b, _c, _d, _e, _f, _g;
|
|
326
336
|
var h = document.body.clientHeight;
|
|
@@ -360,12 +370,12 @@ function _MyBaseList(_props) {
|
|
|
360
370
|
useMyEffectSafe(effect_ctx)(function () {
|
|
361
371
|
if (inited.current) {
|
|
362
372
|
message.info('刷新成功!');
|
|
363
|
-
|
|
373
|
+
do_search();
|
|
364
374
|
}
|
|
365
375
|
}, []);
|
|
366
376
|
}
|
|
367
377
|
var actionCtx = {
|
|
368
|
-
handleSearch:
|
|
378
|
+
handleSearch: do_search,
|
|
369
379
|
getSearchParams: getSearchParams,
|
|
370
380
|
getCheckRows: function getCheckRows() {
|
|
371
381
|
return checkRows;
|
|
@@ -399,7 +409,7 @@ function _MyBaseList(_props) {
|
|
|
399
409
|
message.info(text + '成功!');
|
|
400
410
|
safe_set_edit_key(0);
|
|
401
411
|
set___Id(undefined);
|
|
402
|
-
|
|
412
|
+
do_search();
|
|
403
413
|
return [2, res];
|
|
404
414
|
}
|
|
405
415
|
});
|
|
@@ -410,7 +420,7 @@ function _MyBaseList(_props) {
|
|
|
410
420
|
rowData === null || rowData === void 0 ? void 0 : rowData.id;
|
|
411
421
|
if (onModalOpen) return onModalOpen({
|
|
412
422
|
rowData: rowData,
|
|
413
|
-
handleSearch:
|
|
423
|
+
handleSearch: do_search,
|
|
414
424
|
create_or_update: create_or_update,
|
|
415
425
|
table_columns: table_columns
|
|
416
426
|
});
|
|
@@ -471,7 +481,7 @@ function _MyBaseList(_props) {
|
|
|
471
481
|
handleView: handleView,
|
|
472
482
|
handleDelete: handleDelete,
|
|
473
483
|
handleEdit: handleEdit,
|
|
474
|
-
handleSearch:
|
|
484
|
+
handleSearch: do_search,
|
|
475
485
|
setExtraModalData: setExtraModalData,
|
|
476
486
|
setEditable: setEditable,
|
|
477
487
|
setVisible: setVisible,
|
|
@@ -537,6 +547,15 @@ function _MyBaseList(_props) {
|
|
|
537
547
|
onClick: function onClick(e) {
|
|
538
548
|
return handleRowPrint(rowData);
|
|
539
549
|
}
|
|
550
|
+
}) : null, showRowExportBtn ? /*#__PURE__*/React.createElement(OkButton, {
|
|
551
|
+
title: "\u5BFC\u51FA",
|
|
552
|
+
icon: /*#__PURE__*/React.createElement(MyIcon, {
|
|
553
|
+
value: 'ExportOutlined'
|
|
554
|
+
}),
|
|
555
|
+
size: "small",
|
|
556
|
+
onClick: function onClick(e) {
|
|
557
|
+
return handleRowExport(rowData);
|
|
558
|
+
}
|
|
540
559
|
}) : null, showRowDelBtn ? /*#__PURE__*/React.createElement(OkButton, {
|
|
541
560
|
title: "\u5220\u9664",
|
|
542
561
|
icon: /*#__PURE__*/React.createElement(MyIcon, {
|
|
@@ -557,7 +576,7 @@ function _MyBaseList(_props) {
|
|
|
557
576
|
var cal_columns = (_c = genColumns === null || genColumns === void 0 ? void 0 : genColumns({
|
|
558
577
|
handleEdit: handleEdit,
|
|
559
578
|
handleDelete: handleDelete,
|
|
560
|
-
handleSearch:
|
|
579
|
+
handleSearch: do_search,
|
|
561
580
|
handleItemCancel: handleItemCancel,
|
|
562
581
|
handleItemSave: handleItemSave,
|
|
563
582
|
editKey: editKey,
|
|
@@ -581,7 +600,7 @@ function _MyBaseList(_props) {
|
|
|
581
600
|
case 1:
|
|
582
601
|
_b.sent();
|
|
583
602
|
mchcEnv.success("\u5220\u9664".concat(baseTitle, "\u6210\u529F"));
|
|
584
|
-
|
|
603
|
+
do_search();
|
|
585
604
|
return [2];
|
|
586
605
|
}
|
|
587
606
|
});
|
|
@@ -602,6 +621,19 @@ function _MyBaseList(_props) {
|
|
|
602
621
|
});
|
|
603
622
|
});
|
|
604
623
|
}
|
|
624
|
+
function handleRowExport(rowData) {
|
|
625
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
626
|
+
var _a;
|
|
627
|
+
return __generator(this, function (_b) {
|
|
628
|
+
(_a = myBaseListService.current) === null || _a === void 0 ? void 0 : _a.row_export({
|
|
629
|
+
id: rowData === null || rowData === void 0 ? void 0 : rowData.id
|
|
630
|
+
}).then(function (r) {
|
|
631
|
+
downloadFile(r, "".concat(baseTitle).concat(formatDateTime(), ".xlsx"), 'application/vnd.ms-excel');
|
|
632
|
+
});
|
|
633
|
+
return [2];
|
|
634
|
+
});
|
|
635
|
+
});
|
|
636
|
+
}
|
|
605
637
|
function handleItemSave(d) {
|
|
606
638
|
return __awaiter(this, void 0, void 0, function () {
|
|
607
639
|
var old_data, _data, submitData;
|
|
@@ -720,6 +752,7 @@ function _MyBaseList(_props) {
|
|
|
720
752
|
var values = searchForm.getFieldsValue();
|
|
721
753
|
var data = tranformQueryData(values, searchConfig, isFuck);
|
|
722
754
|
var v = (_a = beforeSearch === null || beforeSearch === void 0 ? void 0 : beforeSearch(data)) !== null && _a !== void 0 ? _a : data;
|
|
755
|
+
mchcStorage.set(cache_key, values);
|
|
723
756
|
mchcLogger.log('getSearchParams', defaultQuery.current, {
|
|
724
757
|
values: values,
|
|
725
758
|
v: v,
|
|
@@ -727,7 +760,7 @@ function _MyBaseList(_props) {
|
|
|
727
760
|
});
|
|
728
761
|
return __assign(__assign({}, defaultQuery.current), v);
|
|
729
762
|
}
|
|
730
|
-
function
|
|
763
|
+
function do_search() {
|
|
731
764
|
return __awaiter(this, arguments, void 0, function (params) {
|
|
732
765
|
var res, data, pagination;
|
|
733
766
|
if (params === void 0) {
|
|
@@ -751,6 +784,10 @@ function _MyBaseList(_props) {
|
|
|
751
784
|
data = res.data, pagination = res.pagination;
|
|
752
785
|
setDataSource(data);
|
|
753
786
|
setTotal(pagination.total);
|
|
787
|
+
console.log('pagination', {
|
|
788
|
+
pagination: pagination,
|
|
789
|
+
defaultQuery: defaultQuery
|
|
790
|
+
});
|
|
754
791
|
mchcEvent.emit('BaseList_hook', {
|
|
755
792
|
type: 'search',
|
|
756
793
|
data: data,
|
|
@@ -765,7 +802,7 @@ function _MyBaseList(_props) {
|
|
|
765
802
|
mchcLogger.log('handlePageChange', current, size);
|
|
766
803
|
setPageSize(size);
|
|
767
804
|
setCurrent(current);
|
|
768
|
-
|
|
805
|
+
do_search();
|
|
769
806
|
};
|
|
770
807
|
var handleRowSelected = function handleRowSelected(keys, rows) {
|
|
771
808
|
setCheckRows(rows);
|
|
@@ -852,7 +889,7 @@ function _MyBaseList(_props) {
|
|
|
852
889
|
setCurrent(1);
|
|
853
890
|
q = getSearchParams();
|
|
854
891
|
defaultQuery.current = q;
|
|
855
|
-
|
|
892
|
+
do_search(q);
|
|
856
893
|
return [2];
|
|
857
894
|
});
|
|
858
895
|
});
|
|
@@ -886,9 +923,9 @@ function _MyBaseList(_props) {
|
|
|
886
923
|
cell: renderEditableCell
|
|
887
924
|
}
|
|
888
925
|
} : {};
|
|
889
|
-
var
|
|
890
|
-
|
|
891
|
-
|
|
926
|
+
var _2 = useState([]);
|
|
927
|
+
_2[0];
|
|
928
|
+
_2[1];
|
|
892
929
|
return /*#__PURE__*/React.createElement("div", {
|
|
893
930
|
ref: wrapRef,
|
|
894
931
|
style: {
|
|
@@ -929,10 +966,7 @@ function _MyBaseList(_props) {
|
|
|
929
966
|
}, showSearch ? (/*#__PURE__*/React.createElement(Form, {
|
|
930
967
|
initialValues: initialSearchValue,
|
|
931
968
|
form: searchForm,
|
|
932
|
-
layout: "inline"
|
|
933
|
-
onFinish: function onFinish() {
|
|
934
|
-
search();
|
|
935
|
-
}
|
|
969
|
+
layout: "inline"
|
|
936
970
|
}, searchConfig ? /*#__PURE__*/React.createElement(MyBaseListRenderFormSection, {
|
|
937
971
|
config: searchConfig,
|
|
938
972
|
disabled: loading
|
|
@@ -994,12 +1028,13 @@ function _MyBaseList(_props) {
|
|
|
994
1028
|
}),
|
|
995
1029
|
disabled: loading,
|
|
996
1030
|
onClick: function onClick() {
|
|
1031
|
+
mchcStorage.remove(cache_key);
|
|
997
1032
|
searchForm.resetFields();
|
|
998
1033
|
defaultQuery.current = defaultQueryValue;
|
|
999
1034
|
setDataSource([]);
|
|
1000
1035
|
setCurrent(1);
|
|
1001
1036
|
setPageSize(defaultQueryValue.size);
|
|
1002
|
-
|
|
1037
|
+
do_search();
|
|
1003
1038
|
}
|
|
1004
1039
|
}, "\u91CD\u7F6E"), /*#__PURE__*/React.createElement(OkButton, {
|
|
1005
1040
|
type: "primary",
|
|
@@ -1051,12 +1086,12 @@ function _MyBaseList(_props) {
|
|
|
1051
1086
|
extraModalData: extraModalData,
|
|
1052
1087
|
onCancel: function onCancel() {
|
|
1053
1088
|
handleCancel();
|
|
1054
|
-
|
|
1089
|
+
do_search();
|
|
1055
1090
|
},
|
|
1056
|
-
onSearch:
|
|
1091
|
+
onSearch: do_search,
|
|
1057
1092
|
onOk: function onOk() {
|
|
1058
1093
|
handleCancel();
|
|
1059
|
-
|
|
1094
|
+
do_search();
|
|
1060
1095
|
}
|
|
1061
1096
|
}))), children);
|
|
1062
1097
|
}
|
|
@@ -29,14 +29,13 @@ var id = 'MenuSearch'.split('').reduce(function (sum, a) {
|
|
|
29
29
|
return sum + a.charCodeAt(0);
|
|
30
30
|
}, 0);
|
|
31
31
|
function MenuSearch_Inner(props) {
|
|
32
|
-
var _a;
|
|
33
32
|
var _onSelect = props.onSelect;
|
|
34
|
-
var
|
|
35
|
-
permissions_tree =
|
|
36
|
-
toggle_collapsed =
|
|
37
|
-
var
|
|
38
|
-
menus =
|
|
39
|
-
set_menus =
|
|
33
|
+
var _a = use_perm_tree(),
|
|
34
|
+
permissions_tree = _a.permissions_tree,
|
|
35
|
+
toggle_collapsed = _a.toggle_collapsed;
|
|
36
|
+
var _b = useState(make_tag(permissions_tree)),
|
|
37
|
+
menus = _b[0],
|
|
38
|
+
set_menus = _b[1];
|
|
40
39
|
function make_tag(tree) {
|
|
41
40
|
if (tree === void 0) {
|
|
42
41
|
tree = [];
|
|
@@ -99,7 +98,7 @@ function MenuSearch_Inner(props) {
|
|
|
99
98
|
style: {}
|
|
100
99
|
}, /*#__PURE__*/React.createElement(Input, {
|
|
101
100
|
suffix: suffix,
|
|
102
|
-
placeholder:
|
|
101
|
+
placeholder: mchcMacro.LM_BUILD_AT,
|
|
103
102
|
onClick: open
|
|
104
103
|
}));
|
|
105
104
|
}
|
|
@@ -113,6 +113,7 @@ export interface MyBaseListProps<T extends {
|
|
|
113
113
|
searchConfig?: IMchc_FormDescriptions_Field_Nullable[];
|
|
114
114
|
showRowDelBtn?: boolean;
|
|
115
115
|
showRowPrintBtn?: boolean;
|
|
116
|
+
showRowExportBtn?: boolean;
|
|
116
117
|
showRowEditBtn?: boolean;
|
|
117
118
|
onAdd?: () => void;
|
|
118
119
|
onExport?: (ctx: IMyBaseList_ActionCtx<T>) => void;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lm_fe/pages",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.7",
|
|
4
4
|
"description": "",
|
|
5
5
|
"scripts": {
|
|
6
6
|
"test": "vitest",
|
|
@@ -51,14 +51,14 @@
|
|
|
51
51
|
"reconnecting-websocket": "4.x"
|
|
52
52
|
},
|
|
53
53
|
"dependencies": {
|
|
54
|
-
"@lm_fe/components": "^0.2.
|
|
55
|
-
"@lm_fe/components_m": "^0.2.
|
|
56
|
-
"@lm_fe/env": "^0.2.
|
|
57
|
-
"@lm_fe/provoke": "^0.2.
|
|
54
|
+
"@lm_fe/components": "^0.2.7",
|
|
55
|
+
"@lm_fe/components_m": "^0.2.7",
|
|
56
|
+
"@lm_fe/env": "^0.2.7",
|
|
57
|
+
"@lm_fe/provoke": "^0.2.7",
|
|
58
58
|
"@lm_fe/scripts": "*",
|
|
59
|
-
"@lm_fe/service": "^0.2.
|
|
60
|
-
"@lm_fe/utils": "^0.2.
|
|
59
|
+
"@lm_fe/service": "^0.2.7",
|
|
60
|
+
"@lm_fe/utils": "^0.2.7",
|
|
61
61
|
"react-perfect-scrollbar": "^1.5.8"
|
|
62
62
|
},
|
|
63
|
-
"gitHead": "
|
|
63
|
+
"gitHead": "cbfe489cdcf8912e643d63a729b08f2b5f02bf55"
|
|
64
64
|
}
|