@lm_fe/pages 0.1.201 → 0.2.5

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.
Files changed (191) hide show
  1. package/README.md +1 -1
  2. package/dist/a_chunks/{.root5.js → components.doctor_end.ExemplaryCase.js} +36 -68
  3. package/dist/a_chunks/components.doctor_end.HeaderInfo.js +635 -0
  4. package/dist/a_chunks/curve.components.BmiCanvas.js +242 -0
  5. package/dist/a_chunks/curve.components.FetusCanvas.js +259 -0
  6. package/dist/a_chunks/curve.components.FetusCanvasNICHD.js +1907 -0
  7. package/dist/a_chunks/curve.components.Pregnogram.js +166 -0
  8. package/dist/a_chunks/data.js +572 -0
  9. package/dist/a_chunks/func.js +86 -0
  10. package/dist/a_chunks/index.js +1049 -286
  11. package/dist/a_chunks/modals.entries.BF_Form.js +41 -0
  12. package/dist/a_chunks/modals.entries.StupidTemplateModal2.js +22 -0
  13. package/dist/a_chunks/modals.entries.box.js +23 -0
  14. package/dist/a_chunks/{.root11.js → modals.entries.modal_form.js} +99 -70
  15. package/dist/a_chunks/modals.entries.modal_page.js +143 -0
  16. package/dist/a_chunks/{.root13.js → modals.entries.print_modal.js} +22 -48
  17. package/dist/a_chunks/modals.entries.result_template.js +201 -0
  18. package/dist/a_chunks/{.root14.js → modals.entries.template_modal3.js} +80 -124
  19. package/dist/a_chunks/modals.entries.test.js +30 -0
  20. package/dist/a_chunks/{.root16.js → modals.entries.text_search.js} +20 -49
  21. package/dist/a_chunks/{.root17.js → modals.entries./344/271/231/350/202/235/347/256/241/347/220/206.js} +17 -45
  22. package/dist/a_chunks/{.root18.js → modals.entries./345/255/220/347/227/253/345/211/215/346/234/237/351/243/216/351/231/251/350/257/204/344/274/260/350/241/250.js} +68 -93
  23. package/dist/a_chunks/modals.entries./346/213/223/345/261/225/351/207/217/350/241/250.js +257 -0
  24. package/dist/a_chunks/{.root19.js → modals.entries./346/242/205/346/257/222/347/256/241/347/220/206.js} +58 -90
  25. package/dist/a_chunks/{.root20.js → modals.entries./346/267/261/351/235/231/350/204/211/350/241/200/346/240/223/351/253/230/345/215/261/345/233/240/347/264/240/345/255/225/346/234/237/347/224/250/350/215/257/347/255/233/346/237/245/350/241/250.js} +144 -154
  26. package/dist/a_chunks/{.root21.js → modals.entries./347/230/242/347/227/225/345/255/220/345/256/253/351/230/264/351/201/223/350/257/225/344/272/247/350/241/250.js} +27 -48
  27. package/dist/a_chunks/{.root22.js → modals.entries./350/257/212/346/226/255/345/216/206/345/217/262.js} +9 -37
  28. package/dist/a_chunks/{.root23.js → modals.entries./351/242/204/350/255/246/346/217/220/351/206/222_/351/253/230/345/215/261/345/277/253/350/256/257.js} +127 -172
  29. package/dist/a_chunks/{.root24.js → modals.entries./351/253/230/345/215/261/345/233/240/347/264/240/347/256/241/347/220/206.js} +438 -336
  30. package/dist/a_chunks/modals.entries./351/253/230/345/215/261/351/232/217/350/256/277.js +102 -0
  31. package/dist/a_chunks/modals.entries./351/253/230/345/215/261/351/232/217/350/256/2772.js +157 -0
  32. package/dist/a_chunks/{.root8.js → src.block./346/243/200/351/252/214/346/243/200/346/237/245.js} +69 -208
  33. package/dist/a_chunks/{.root3.js → src.components.Base_List.js} +329 -320
  34. package/dist/a_chunks/src.components.Layout_Sider.js +101 -0
  35. package/dist/a_chunks/src.components.Layout_TabButton.js +69 -0
  36. package/dist/a_chunks/src.components.Login.js +151 -0
  37. package/dist/a_chunks/src.components.MenuSearch.js +106 -0
  38. package/dist/a_chunks/{.root7.js → src.components.QuickDocButton.js} +1 -2
  39. package/dist/a_chunks/src.pages.questionnaire.js +1633 -0
  40. package/dist/a_chunks/use_fetus.js +138 -0
  41. package/dist/a_chunks/utils.js +100 -0
  42. package/dist/a_chunks/utils2.js +36 -0
  43. package/dist/block//346/243/200/351/252/214/346/243/200/346/237/245/Inner.d.ts +1 -0
  44. package/dist/components/BF_Form/Wrap.d.ts +2 -2
  45. package/dist/components/BF_Form/index.d.ts +4 -2
  46. package/dist/components/BF_Form/types.d.ts +7 -0
  47. package/dist/components/BF_Form/use_table_config.d.ts +1 -5
  48. package/dist/components/Base_List/Helper.d.ts +0 -5
  49. package/dist/components/Base_List/_MyBaseList.d.ts +1 -0
  50. package/dist/components/Base_List/index.d.ts +2 -1
  51. package/dist/components/Base_List/types.d.ts +6 -3
  52. package/dist/components/Base_List/use_MyBaseList.d.ts +10 -0
  53. package/dist/components/Base_List/utils.d.ts +11 -0
  54. package/dist/components/HighRiskTableEntry/utils.d.ts +4 -3
  55. package/dist/components/IdNOButton/index copy.d.ts +1 -1
  56. package/dist/components/Layout_Sider/Inner.d.ts +2 -4
  57. package/dist/components/Layout_Sider/index.d.ts +2 -2
  58. package/dist/components/Layout_Sider/utils.d.ts +13 -0
  59. package/dist/components/Layout_TabButton/Inner.d.ts +2 -10
  60. package/dist/components/Layout_TabButton/index.d.ts +3 -8
  61. package/dist/components/Layout_TabButton/types.d.ts +8 -0
  62. package/dist/components/Login/Inner.d.ts +0 -1
  63. package/dist/components/Login/index.d.ts +2 -1
  64. package/dist/components/MenuSearch/Inner.d.ts +6 -0
  65. package/dist/components/MenuSearch/index.d.ts +2 -0
  66. package/dist/components/QuickDocButton/index.d.ts +5 -1
  67. package/dist/components/doctor_end/HeaderInfo/FuckTag.d.ts +6 -0
  68. package/dist/components/doctor_end/HeaderInfo/index.d.ts +1 -0
  69. package/dist/components/doctor_end/HeaderInfo/types.d.ts +1 -3
  70. package/dist/components/doctor_end/HeaderInfo/use_headinfo_color.d.ts +8 -0
  71. package/dist/components/exception/index.d.ts +1 -0
  72. package/dist/components/index.d.ts +1 -0
  73. package/dist/curve/components/BmiCanvas/index.d.ts +11 -0
  74. package/dist/curve/components/FetusCanvas/FetuGrowsEdit.d.ts +7 -0
  75. package/dist/curve/components/FetusCanvas/config.d.ts +3 -0
  76. package/dist/curve/components/FetusCanvas/index.d.ts +4 -0
  77. package/dist/curve/components/FetusCanvas/requestMethods.d.ts +7 -0
  78. package/dist/curve/components/FetusCanvas/use_fetus.d.ts +33 -0
  79. package/dist/curve/components/FetusCanvasNICHD/config.d.ts +3 -0
  80. package/dist/curve/components/FetusCanvasNICHD/data.d.ts +84 -0
  81. package/dist/curve/components/FetusCanvasNICHD/index.d.ts +4 -0
  82. package/dist/curve/components/Pregnogram/index.d.ts +11 -0
  83. package/dist/curve/components/api.d.ts +17 -0
  84. package/dist/curve/components-new/BmiCanvas/index.d.ts +23 -0
  85. package/dist/curve/components-new/FetusCanvas/config.d.ts +2 -0
  86. package/dist/curve/components-new/FetusCanvas/index.d.ts +19 -0
  87. package/dist/curve/components-new/FetusCanvas/requestMethods.d.ts +7 -0
  88. package/dist/curve/components-new/FetusCanvasNICHD/config.d.ts +2 -0
  89. package/dist/curve/components-new/FetusCanvasNICHD/data.d.ts +84 -0
  90. package/dist/curve/components-new/FetusCanvasNICHD/index.d.ts +21 -0
  91. package/dist/curve/components-new/Pregnogram/index.d.ts +13 -0
  92. package/dist/curve/data.d.ts +125 -0
  93. package/dist/curve/func.d.ts +12 -0
  94. package/dist/curve/func.test.d.ts +1 -0
  95. package/dist/curve/index.d.ts +7 -0
  96. package/dist/curve/intro-steps.d.ts +7 -0
  97. package/dist/curve/utils.d.ts +8 -0
  98. package/dist/form_config/conceiveMode.d.ts +2 -0
  99. package/dist/form_config/index.d.ts +4 -0
  100. package/dist/form_config/mlUltrasounds.d.ts +2 -0
  101. package/dist/form_config/not_yes_input.d.ts +4 -0
  102. package/dist/form_config/pressure.d.ts +4 -0
  103. package/dist/hooks/index.d.ts +1 -0
  104. package/dist/hooks/use_duck_form.d.ts +18 -0
  105. package/dist/index.d.ts +2 -0
  106. package/dist/index.js +8 -33
  107. package/dist/modals/entries/StupidTemplateModal2/index copy.d.ts +22 -0
  108. package/dist/modals/entries/StupidTemplateModal2/index.d.ts +1 -2
  109. package/dist/modals/entries/StupidTemplateModal2/methods/index.d.ts +7 -1
  110. package/dist/modals/entries/box/index.d.ts +6 -0
  111. package/dist/modals/entries/modal_form/index.d.ts +1 -1
  112. package/dist/modals/entries/result_template/index.d.ts +24 -0
  113. package/dist/modals/entries/template_modal3/components/TemplateSelect.d.ts +2 -1
  114. package/dist/modals/entries/template_modal3/index copy 2.d.ts +1 -1
  115. package/dist/modals/entries/template_modal3/index.d.ts +6 -3
  116. package/dist/modals/entries/text_search/index.d.ts +1 -1
  117. package/dist/modals/entries//344/271/231/350/202/235/347/256/241/347/220/206/index.d.ts +1 -1
  118. package/dist/modals/entries//345/255/220/347/227/253/345/211/215/346/234/237/351/243/216/351/231/251/350/257/204/344/274/260/350/241/250/utils.d.ts +5 -0
  119. package/dist/modals/entries//346/213/223/345/261/225/351/207/217/350/241/250/History.d.ts +10 -0
  120. package/dist/modals/entries//346/213/223/345/261/225/351/207/217/350/241/250/index.d.ts +9 -0
  121. package/dist/modals/entries//346/267/261/351/235/231/350/204/211/350/241/200/346/240/223/351/253/230/345/215/261/345/233/240/347/264/240/345/255/225/346/234/237/347/224/250/350/215/257/347/255/233/346/237/245/350/241/250/2015RCOG/351/231/215/344/275/216/345/246/212/345/250/240/345/217/212/344/272/247/350/244/245/346/234/237/351/235/231/350/204/211/350/241/200/346/240/223/346/240/223/345/241/236/347/232/204/351/243/216/351/231/251_/345/271/277/344/270/211/ThrombusGysy.d.ts +2 -7
  122. package/dist/modals/entries//346/267/261/351/235/231/350/204/211/350/241/200/346/240/223/351/253/230/345/215/261/345/233/240/347/264/240/345/255/225/346/234/237/347/224/250/350/215/257/347/255/233/346/237/245/350/241/250/2015RCOG/351/231/215/344/275/216/345/246/212/345/250/240/345/217/212/344/272/247/350/244/245/346/234/237/351/235/231/350/204/211/350/241/200/346/240/223/346/240/223/345/241/236/347/232/204/351/243/216/351/231/251_/345/271/277/344/270/211/config.d.ts +2 -1
  123. package/dist/modals/entries//346/267/261/351/235/231/350/204/211/350/241/200/346/240/223/351/253/230/345/215/261/345/233/240/347/264/240/345/255/225/346/234/237/347/224/250/350/215/257/347/255/233/346/237/245/350/241/250/Default/ThrombusDefault.d.ts +2 -7
  124. package/dist/modals/entries//346/267/261/351/235/231/350/204/211/350/241/200/346/240/223/351/253/230/345/215/261/345/233/240/347/264/240/345/255/225/346/234/237/347/224/250/350/215/257/347/255/233/346/237/245/350/241/250/index.d.ts +2 -2
  125. package/dist/modals/entries//346/267/261/351/235/231/350/204/211/350/241/200/346/240/223/351/253/230/345/215/261/345/233/240/347/264/240/345/255/225/346/234/237/347/224/250/350/215/257/347/255/233/346/237/245/350/241/250/types.d.ts +3 -3
  126. package/dist/modals/entries//347/230/242/347/227/225/345/255/220/345/256/253/351/230/264/351/201/223/350/257/225/344/272/247/350/241/250/index.d.ts +2 -2
  127. package/dist/modals/entries//351/253/230/345/215/261/345/233/240/347/264/240/347/256/241/347/220/206/HighriskSign.d.ts +4 -5
  128. package/dist/modals/entries//351/253/230/345/215/261/345/233/240/347/264/240/347/256/241/347/220/206/HighriskTimeline.d.ts +1 -1
  129. package/dist/modals/entries//351/253/230/345/215/261/345/233/240/347/264/240/347/256/241/347/220/206/Tag.d.ts +12 -0
  130. package/dist/modals/entries//351/253/230/345/215/261/345/233/240/347/264/240/347/256/241/347/220/206/utils.d.ts +8 -0
  131. package/dist/modals/entries//351/253/230/345/215/261/351/232/217/350/256/277/form_config.d.ts +4 -2
  132. package/dist/modals/index.d.ts +4 -1
  133. package/dist/modals/meta.d.ts +4 -1
  134. package/dist/pages/doc_record/index.d.ts +1 -1
  135. package/dist/pages/index.d.ts +1 -0
  136. package/dist/pages/questionnaire/Inner.d.ts +4 -0
  137. package/dist/pages/questionnaire/Qn.d.ts +3 -0
  138. package/dist/pages/questionnaire/SelectButton.d.ts +4 -0
  139. package/dist/pages/questionnaire/create/Step2Right.d.ts +11 -0
  140. package/dist/pages/questionnaire/create/common.d.ts +46 -0
  141. package/dist/pages/questionnaire/create/fakeData.d.ts +6 -0
  142. package/dist/pages/questionnaire/create/question-item.d.ts +14 -0
  143. package/dist/pages/questionnaire/create/step1.d.ts +12 -0
  144. package/dist/pages/questionnaire/create/step2.d.ts +10 -0
  145. package/dist/pages/questionnaire/create/step3.d.ts +8 -0
  146. package/dist/pages/questionnaire/create/step4.d.ts +8 -0
  147. package/dist/pages/questionnaire/index.d.ts +3 -0
  148. package/dist/pages/questionnaire/types.d.ts +10 -0
  149. package/dist/utils/helper.d.ts +5 -0
  150. package/dist/utils/index.d.ts +2 -1
  151. package/package.json +34 -16
  152. package/dist/a_chunks/.root.js +0 -245
  153. package/dist/a_chunks/.root.js.map +0 -1
  154. package/dist/a_chunks/.root10.js +0 -474
  155. package/dist/a_chunks/.root10.js.map +0 -1
  156. package/dist/a_chunks/.root11.js.map +0 -1
  157. package/dist/a_chunks/.root12.js +0 -200
  158. package/dist/a_chunks/.root12.js.map +0 -1
  159. package/dist/a_chunks/.root13.js.map +0 -1
  160. package/dist/a_chunks/.root14.js.map +0 -1
  161. package/dist/a_chunks/.root15.js +0 -58
  162. package/dist/a_chunks/.root15.js.map +0 -1
  163. package/dist/a_chunks/.root16.js.map +0 -1
  164. package/dist/a_chunks/.root17.js.map +0 -1
  165. package/dist/a_chunks/.root18.js.map +0 -1
  166. package/dist/a_chunks/.root19.js.map +0 -1
  167. package/dist/a_chunks/.root2.js +0 -76
  168. package/dist/a_chunks/.root2.js.map +0 -1
  169. package/dist/a_chunks/.root20.js.map +0 -1
  170. package/dist/a_chunks/.root21.js.map +0 -1
  171. package/dist/a_chunks/.root22.js.map +0 -1
  172. package/dist/a_chunks/.root23.js.map +0 -1
  173. package/dist/a_chunks/.root24.js.map +0 -1
  174. package/dist/a_chunks/.root25.js +0 -281
  175. package/dist/a_chunks/.root25.js.map +0 -1
  176. package/dist/a_chunks/.root3.js.map +0 -1
  177. package/dist/a_chunks/.root4.js +0 -629
  178. package/dist/a_chunks/.root4.js.map +0 -1
  179. package/dist/a_chunks/.root5.js.map +0 -1
  180. package/dist/a_chunks/.root6.js +0 -164
  181. package/dist/a_chunks/.root6.js.map +0 -1
  182. package/dist/a_chunks/.root7.js.map +0 -1
  183. package/dist/a_chunks/.root8.js.map +0 -1
  184. package/dist/a_chunks/.root9.js +0 -69
  185. package/dist/a_chunks/.root9.js.map +0 -1
  186. package/dist/a_chunks/extends.js +0 -11
  187. package/dist/a_chunks/extends.js.map +0 -1
  188. package/dist/a_chunks/index.js.map +0 -1
  189. package/dist/components/BF_Form/use_table_config copy.d.ts +0 -13
  190. package/dist/index.js.map +0 -1
  191. package/dist/modals/entries//351/253/230/345/215/261/345/233/240/347/264/240/347/256/241/347/220/206/index copy.d.ts" +0 -12
@@ -1,59 +1,20 @@
1
- import 'antd/es/button/style';
2
- import _Button from 'antd/es/button';
3
- import 'antd/es/divider/style';
4
- import _Divider from 'antd/es/divider';
5
- import { _ as _extends } from './extends.js';
6
- import 'antd/es/space/style';
7
- import _Space from 'antd/es/space';
8
- import 'antd/es/message/style';
9
- import _message from 'antd/es/message';
10
- import 'antd/es/form/style';
11
- import _Form from 'antd/es/form';
12
- import _omit from 'lodash/omit';
13
- import _isString from 'lodash/isString';
14
- import _isNil from 'lodash/isNil';
15
- import _isFunction from 'lodash/isFunction';
16
- import _get from 'lodash/get';
17
- import { s as styleInject, b as __assign, c as __spreadArray, _ as __awaiter, a as __generator, m as mchcModal__, d as __rest } from './index.js';
18
- import { EditOutlined, CopyOutlined, PrinterOutlined, DeleteOutlined, ExportOutlined, PlusOutlined, ReloadOutlined, SearchOutlined } from '@ant-design/icons';
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';
19
2
  import { mchcConfig, mchcLogger, mchcEnv, mchcEvent } from '@lm_fe/env';
20
3
  import { SMchc_FormDescriptions, ModelService } from '@lm_fe/service';
21
- import { safe_json_parse, safe_json_parse_arr, expect_array, Browser, sleep, downloadFile, formatDateTime, safe_async_call } from '@lm_fe/utils';
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
+ import { Form, message, Space, Divider, Button } from 'antd';
6
+ import { get, isObject, isString, isNil, omit, isFunction } from 'lodash';
22
7
  import React, { useState, useEffect, useRef } from 'react';
23
- import 'antd/es/switch/style';
24
- import 'antd/es/switch';
25
- import 'antd/es/input/style';
26
- import 'antd/es/input';
27
- import { LazyAntd, MyFormSection, OkButton, MyBaseListComponents, getDefaultRequiredRules, InterceptDisplayFC } from '@lm_fe/components_m';
28
- import _isObject from 'lodash/isObject';
29
- import { LazyAntd as LazyAntd$1, useMyEffectSafe } from '@lm_fe/components';
30
- import 'antd/es/row/style';
31
- import 'antd/es/row';
32
- import 'antd/es/col/style';
33
- import 'antd/es/col';
34
- import 'antd/es/list/style';
35
- import 'antd/es/list';
36
- import 'antd/es/tooltip/style';
37
- import 'antd/es/tooltip';
8
+ import { MyFormSection, OkButton, MyBaseListComponents, getDefaultRequiredRules, InterceptDisplayFC } from '@lm_fe/components_m';
9
+ import { useMyEffectSafe, MyIcon, Table_L } from '@lm_fe/components';
10
+ import { use_provoke } from '@lm_fe/provoke';
38
11
  import 'classnames';
39
- import 'antd/es/spin/style';
40
- import 'antd/es/spin';
41
- import 'antd/es/result/style';
42
- import 'antd/es/result';
43
- import 'antd/es/menu/style';
44
- import 'antd/es/menu';
45
- import 'lodash/keys';
46
- LazyAntd.Tree;
47
- LazyAntd.TreeSelect;
48
- LazyAntd.Select;
49
- LazyAntd.Table;
50
- LazyAntd.Dropdown;
51
- LazyAntd.Pagination;
52
12
  function MyBaseListRenderFormSection(_a) {
53
13
  var config = _a.config,
54
14
  disabled = _a.disabled,
55
15
  form = _a.form;
56
16
  return /*#__PURE__*/React.createElement(MyFormSection, {
17
+ size: 'small',
57
18
  form: form,
58
19
  defaultOptions: {},
59
20
  inline: true,
@@ -71,13 +32,29 @@ function MyBaseListRenderFormSection(_a) {
71
32
  disableAll: disabled
72
33
  });
73
34
  }
74
- var css_248z = ".index-module_base-list__AUHXA {\n height: 100%;\n overflow-y: hidden;\n}\n.index-module_ant-table-ordinal__c8C7I {\n padding-left: 0 !important;\n padding-right: 0 !important;\n}\n";
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";
75
36
  styleInject(css_248z);
76
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;
77
39
  var _props = __assign({}, props);
40
+ _props.handleBeforePopup = (_c = (_a = _props.handleBeforePopup) !== null && _a !== void 0 ? _a : (_b = _props.bf_conf) === null || _b === void 0 ? void 0 : _b.handleBeforePopup) !== null && _c !== void 0 ? _c : function (values) {
41
+ return values;
42
+ };
43
+ _props.beforeSubmit = (_f = (_d = _props.beforeSubmit) !== null && _d !== void 0 ? _d : (_e = _props.bf_conf) === null || _e === void 0 ? void 0 : _e.beforeSubmit) !== null && _f !== void 0 ? _f : function (values) {
44
+ return values;
45
+ };
46
+ _props.name = (_g = _props.name) !== null && _g !== void 0 ? _g : (_h = _props.bf_conf) === null || _h === void 0 ? void 0 : _h.name;
47
+ _props.searchParams = safeGetFromFuncOrData((_j = _props.searchParams) !== null && _j !== void 0 ? _j : (_k = _props.bf_conf) === null || _k === void 0 ? void 0 : _k.searchParams);
48
+ _props.initialSearchValue = safeGetFromFuncOrData((_l = _props.initialSearchValue) !== null && _l !== void 0 ? _l : (_m = _props.bf_conf) === null || _m === void 0 ? void 0 : _m.initialSearchValue);
49
+ _props.searchConfig = safeGetFromFuncOrData((_o = _props.searchConfig) !== null && _o !== void 0 ? _o : (_p = _props.bf_conf) === null || _p === void 0 ? void 0 : _p.searchConfig);
50
+ _props.tableColumns = (_q = _props.tableColumns) !== null && _q !== void 0 ? _q : (_r = _props.bf_conf) === null || _r === void 0 ? void 0 : _r.tableColumns;
51
+ _props.showAction = (_u = (_s = _props.showAction) !== null && _s !== void 0 ? _s : (_t = _props.bf_conf) === null || _t === void 0 ? void 0 : _t.showAction) !== null && _u !== void 0 ? _u : true;
52
+ _props.showAdd = (_y = (_w = _props.showAdd) !== null && _w !== void 0 ? _w : (_x = _props.bf_conf) === null || _x === void 0 ? void 0 : _x.showAdd) !== null && _y !== void 0 ? _y : true;
53
+ _props.genColumns = (_1 = (_z = _props.genColumns) !== null && _z !== void 0 ? _z : (_0 = _props.bf_conf) === null || _0 === void 0 ? void 0 : _0.genColumns) !== null && _1 !== void 0 ? _1 : undefined;
78
54
  return _props;
79
55
  }
80
56
  function tranformQueryData(values, searchConfig, isFuck) {
57
+ var _a;
81
58
  if (searchConfig === void 0) {
82
59
  searchConfig = [];
83
60
  }
@@ -85,11 +62,21 @@ function tranformQueryData(values, searchConfig, isFuck) {
85
62
  isFuck = false;
86
63
  }
87
64
  var newValues = __assign({}, values);
88
- var kvArr = searchConfig.filter(function (_) {
65
+ var straws = flat((_a = searchConfig.filter(function (_) {
66
+ return (_ === null || _ === void 0 ? void 0 : _.inputType) === 'straw';
67
+ })) === null || _a === void 0 ? void 0 : _a.map(function (_) {
68
+ var _a;
69
+ return (_a = _ === null || _ === void 0 ? void 0 : _.children) !== null && _a !== void 0 ? _a : [];
70
+ })).map(function (_) {
71
+ return __assign(__assign({}, _), {
72
+ straw_children: true
73
+ });
74
+ });
75
+ var kvArr = __spreadArray(__spreadArray([], searchConfig, true), straws, true).filter(function (_) {
89
76
  return _;
90
77
  }).map(function (conf) {
91
78
  var k = SMchc_FormDescriptions.get_form_item_name_str(conf);
92
- var v = _get(newValues, k);
79
+ var v = get(newValues, k);
93
80
  return [k, v, conf];
94
81
  });
95
82
  return kvArr.reduce(function (sum, _a) {
@@ -98,37 +85,37 @@ function tranformQueryData(values, searchConfig, isFuck) {
98
85
  v = _a[1],
99
86
  conf = _a[2];
100
87
  if (isFuck) return __assign(__assign({}, sum), (_b = {}, _b[k] = v, _b));
101
- var res = conf ? calcKeyByType(k, v, conf) : (_c = {}, _c[k] = v, _c);
88
+ var res = conf && !get(conf, 'straw_children') ? calcKeyByType(k, v, conf) : (_c = {}, _c[k] = v, _c);
102
89
  return __assign(__assign({}, sum), res);
103
90
  }, {});
104
91
  }
105
92
  function calcKeyByType(k, v, config) {
106
93
  var _a, _b, _c, _d, _e, _f, _g;
107
- var _h, _j, _k, _l, _m;
94
+ var _h, _j, _k, _l, _m, _o;
108
95
  var input_type = (_h = config.inputType) !== null && _h !== void 0 ? _h : 'input';
109
96
  var filterType = (_l = (_k = (_j = config.filterType) === null || _j === void 0 ? void 0 : _j.split) === null || _k === void 0 ? void 0 : _k.call(_j, ',')) !== null && _l !== void 0 ? _l : [];
110
- var type = (_m = config.inputProps) === null || _m === void 0 ? void 0 : _m.type;
97
+ var type = ((_m = config.inputProps) === null || _m === void 0 ? void 0 : _m.type) || ((_o = config.inputProps) === null || _o === void 0 ? void 0 : _o.mode);
111
98
  var is_multiple = type === 'multiple' || type === 'tags';
112
99
  var f1 = filterType[0];
113
100
  var f2 = filterType[1];
114
- if (['input', 'Input', 'MyInput', 'address', 'MyAddress'].includes(input_type)) {
101
+ if (['input', 'Input', 'MyInput', 'address', 'MyAddress', 'MA'].includes(input_type)) {
115
102
  return _a = {}, _a["".concat(k, ".").concat(f1 || 'contains')] = v, _a;
116
103
  }
117
- if (['input_number', 'InputNumber', 'DatePicker'].includes(input_type)) {
104
+ if (['input_number', 'InputNumber', 'DatePicker', 'MSW', 'MySwitch', 'switch'].includes(input_type)) {
118
105
  return _b = {}, _b["".concat(k, ".").concat(f1 || 'equals')] = v, _b;
119
106
  }
120
107
  if (['select', 'Select', 'MySelect', 'MS'].includes(input_type)) {
121
108
  var obj = safe_json_parse(v, v);
122
109
  if (Array.isArray(obj)) {
123
110
  var arr = obj.map(function (_) {
124
- return _isObject(_) ? _.value : _;
111
+ return isObject(_) ? _.value : _;
125
112
  });
126
113
  var _v = arr.length > 1 ? arr.join(',') : arr[0];
127
- var has_comma = _isString(_v) && _v.includes(',');
114
+ var has_comma = isString(_v) && _v.includes(',');
128
115
  var _df = is_multiple || has_comma ? 'in' : 'equals';
129
116
  return _c = {}, _c["".concat(k, ".").concat(f1 || _df)] = _v, _c;
130
117
  } else {
131
- var has_comma = _isString(v) && v.includes(',');
118
+ var has_comma = isString(v) && v.includes(',');
132
119
  var _df = is_multiple || has_comma ? 'in' : 'equals';
133
120
  return _d = {}, _d["".concat(k, ".").concat(f1 || _df)] = v, _d;
134
121
  }
@@ -142,7 +129,7 @@ function calcKeyByType(k, v, config) {
142
129
  function get_dataIndex(record) {
143
130
  var _a, _b;
144
131
  var _dataIndex = (_b = (_a = record === null || record === void 0 ? void 0 : record.dataIndex) !== null && _a !== void 0 ? _a : record === null || record === void 0 ? void 0 : record.name) !== null && _b !== void 0 ? _b : record === null || record === void 0 ? void 0 : record.key;
145
- if (_isString(_dataIndex) && _dataIndex.includes('.')) {
132
+ if (isString(_dataIndex) && _dataIndex.includes('.')) {
146
133
  return _dataIndex.split('.');
147
134
  }
148
135
  return _dataIndex;
@@ -160,7 +147,7 @@ function use_my_baselist(props) {
160
147
  useEffect(function () {
161
148
  SMchc_FormDescriptions.extract_form_config(tableColumns).then(function (conf) {
162
149
  set_table_columns(expect_array(conf).filter(function (_) {
163
- return !_isNil(_);
150
+ return !isNil(_);
164
151
  }));
165
152
  });
166
153
  return function () {};
@@ -170,20 +157,11 @@ function use_my_baselist(props) {
170
157
  };
171
158
  }
172
159
  var browserClient = Browser.client || {};
173
- LazyAntd$1.Tree;
174
- LazyAntd$1.TreeSelect;
175
- LazyAntd$1.Select;
176
- var Table = LazyAntd$1.Table;
177
- LazyAntd$1.Dropdown;
178
- LazyAntd$1.Pagination;
179
160
  function _MyBaseList(_props) {
180
161
  var _a, _b, _c;
181
- var staticDefaultQuery = {
182
- page: 0,
183
- size: mchcConfig.get('列表一页显示条数') || 14,
184
- sort: 'id,desc',
185
- 'deleteFlag.equals': 0
186
- };
162
+ var sys_theme = use_provoke(function (s) {
163
+ return s.sys_theme;
164
+ });
187
165
  var props = formatProps(_props);
188
166
  var dbg_dataSource = props.dbg_dataSource,
189
167
  _d = props.needPagination,
@@ -199,7 +177,8 @@ function _MyBaseList(_props) {
199
177
  ignore_env = props.ignore_env,
200
178
  get_fuck_page = props.get_fuck_page,
201
179
  ModalForm = props.ModalForm,
202
- baseTitle = props.baseTitle,
180
+ _g = props.baseTitle,
181
+ baseTitle = _g === void 0 ? '' : _g,
203
182
  rowKey = props.rowKey,
204
183
  showExport = props.showExport,
205
184
  showPrint = props.showPrint,
@@ -209,24 +188,25 @@ function _MyBaseList(_props) {
209
188
  needChecked = props.needChecked,
210
189
  requestBeforeEdit = props.requestBeforeEdit,
211
190
  addText = props.addText,
191
+ editText = props.editText,
212
192
  name = props.name,
213
193
  apiPrefix = props.apiPrefix,
214
194
  ActionAddonBefore = props.ActionAddonBefore,
215
195
  RenderAction = props.RenderAction,
216
196
  RenderBtns = props.RenderBtns,
217
197
  RenderSearchBtns = props.RenderSearchBtns,
218
- _g = props.searchConfig,
219
- searchConfig = _g === void 0 ? [] : _g,
220
- _h = props.searchParams,
221
- searchParams = _h === void 0 ? {} : _h,
222
- _j = props.initialSearchValue,
223
- initialSearchValue = _j === void 0 ? {} : _j,
224
- _k = props.showRowDelBtn,
225
- showRowDelBtn = _k === void 0 ? true : _k,
226
- _l = props.showRowEditBtn,
227
- showRowEditBtn = _l === void 0 ? true : _l,
228
- _m = props.showRowPrintBtn,
229
- showRowPrintBtn = _m === void 0 ? false : _m,
198
+ _h = props.searchConfig,
199
+ searchConfig = _h === void 0 ? [] : _h,
200
+ _j = props.searchParams,
201
+ searchParams = _j === void 0 ? {} : _j,
202
+ _k = props.initialSearchValue,
203
+ initialSearchValue = _k === void 0 ? {} : _k,
204
+ _l = props.showRowDelBtn,
205
+ showRowDelBtn = _l === void 0 ? true : _l,
206
+ _m = props.showRowEditBtn,
207
+ showRowEditBtn = _m === void 0 ? true : _m,
208
+ _o = props.showRowPrintBtn,
209
+ showRowPrintBtn = _o === void 0 ? false : _o,
230
210
  customModelService = props.customModelService,
231
211
  genColumns = props.genColumns,
232
212
  onAdd = props.onAdd,
@@ -234,22 +214,28 @@ function _MyBaseList(_props) {
234
214
  onPrint = props.onPrint,
235
215
  beforeSearch = props.beforeSearch,
236
216
  handleClickRow = props.handleClickRow,
237
- _o = props.handleDoubleClickRow,
238
- handleDoubleClickRow = _o === void 0 ? function (item) {
217
+ _p = props.handleDoubleClickRow,
218
+ handleDoubleClickRow = _p === void 0 ? function (item) {
239
219
  return handleEdit(item);
240
- } : _o,
220
+ } : _p,
241
221
  onModalOpen = props.onModalOpen,
242
- _p = props.printDefaultConfig,
243
- printDefaultConfig = _p === void 0 ? {} : _p,
244
- _q = props.beforeSubmit,
245
- beforeSubmit = _q === void 0 ? function (v) {
222
+ _q = props.printDefaultConfig,
223
+ printDefaultConfig = _q === void 0 ? {} : _q,
224
+ _r = props.beforeSubmit,
225
+ beforeSubmit = _r === void 0 ? function (v) {
246
226
  return v;
247
- } : _q,
227
+ } : _r,
248
228
  handleBeforePopup = props.handleBeforePopup,
249
229
  effect_ctx = props.effect_ctx,
250
230
  action_col = props.action_col;
231
+ var staticDefaultQuery = {
232
+ page: 0,
233
+ size: needPagination ? mchcConfig.get('列表一页显示条数') || 14 : 999,
234
+ sort: 'id,desc',
235
+ 'deleteFlag.equals': 0
236
+ };
251
237
  var myBaseListService = useRef();
252
- var _searchForm = _Form.useForm()[0];
238
+ var _searchForm = Form.useForm()[0];
253
239
  var children = props.children;
254
240
  var queryRef = useRef(null);
255
241
  var wrapRef = useRef(null);
@@ -257,10 +243,13 @@ function _MyBaseList(_props) {
257
243
  var defaultQuery = useRef(defaultQueryValue);
258
244
  var showSearch = !!searchConfig.length;
259
245
  var table_columns = use_my_baselist(props).table_columns;
260
- var actCellWidth = (+showRowDelBtn + +showRowEditBtn + +showRowPrintBtn) * 50;
246
+ var actCellWidth = (+showRowDelBtn + +showRowEditBtn + +showRowPrintBtn) * 60;
261
247
  if (ActionAddonBefore) {
262
248
  actCellWidth += 70;
263
249
  }
250
+ if (editText) {
251
+ actCellWidth += editText.length * 14;
252
+ }
264
253
  var searchForm = (_a = props.searchForm) !== null && _a !== void 0 ? _a : _searchForm;
265
254
  useEffect(function () {
266
255
  myBaseListService.current = customModelService || new ModelService({
@@ -274,51 +263,51 @@ function _MyBaseList(_props) {
274
263
  ignore_usr: ignore_usr
275
264
  });
276
265
  }, [name, customModelService]);
277
- var _r = useState(0),
278
- total = _r[0],
279
- setTotal = _r[1];
280
- var _s = useState([]),
281
- dataSource = _s[0],
282
- setDataSource = _s[1];
283
- var _t = useState(false),
284
- visible = _t[0],
285
- setVisible = _t[1];
266
+ var _s = useState(0),
267
+ total = _s[0],
268
+ setTotal = _s[1];
269
+ var _t = useState([]),
270
+ dataSource = _t[0],
271
+ setDataSource = _t[1];
286
272
  var _u = useState(false),
287
- editable = _u[0],
288
- setEditable = _u[1];
289
- var _v = useState(),
290
- ___id = _v[0],
291
- set___Id = _v[1];
273
+ visible = _u[0],
274
+ setVisible = _u[1];
275
+ var _v = useState(false),
276
+ editable = _v[0],
277
+ setEditable = _v[1];
292
278
  var _w = useState(),
293
- extraModalData = _w[0],
294
- setExtraModalData = _w[1];
295
- var _x = useState(0),
296
- editKey = _x[0],
297
- setEditKey = _x[1];
298
- var _y = useState(false),
299
- loading = _y[0],
300
- setLoading = _y[1];
279
+ ___id = _w[0],
280
+ set___Id = _w[1];
281
+ var _x = useState(),
282
+ extraModalData = _x[0],
283
+ setExtraModalData = _x[1];
284
+ var _y = useState(0),
285
+ editKey = _y[0],
286
+ setEditKey = _y[1];
301
287
  var _z = useState(false),
302
- longSearchForm = _z[0],
303
- setLongSearchForm = _z[1];
304
- var _0 = useState(500),
305
- tableHeight = _0[0],
306
- setTableHeight = _0[1];
307
- var _1 = useState([]),
308
- checkRows = _1[0],
309
- setCheckRows = _1[1];
310
- var form = _Form.useForm()[0];
288
+ loading = _z[0],
289
+ setLoading = _z[1];
290
+ var _0 = useState(false),
291
+ longSearchForm = _0[0],
292
+ setLongSearchForm = _0[1];
293
+ var _1 = useState(500),
294
+ tableHeight = _1[0],
295
+ setTableHeight = _1[1];
296
+ var _2 = useState([]),
297
+ checkRows = _2[0],
298
+ setCheckRows = _2[1];
299
+ var table_form = Form.useForm()[0];
311
300
  var editKeyRef = useRef(0);
312
301
  var formWrapper = useRef(null);
313
302
  var propsCache = useRef(props);
314
303
  propsCache.current = props;
315
304
  var inited = useRef(false);
316
- var _2 = useState(defaultQueryValue.size),
317
- __pageSize = _2[0],
318
- set__pageSize = _2[1];
319
- var _3 = useState(1),
320
- __current = _3[0],
321
- set__current = _3[1];
305
+ var _3 = useState(defaultQueryValue.size),
306
+ __pageSize = _3[0],
307
+ set__pageSize = _3[1];
308
+ var _4 = useState(1),
309
+ __current = _4[0],
310
+ set__current = _4[1];
322
311
  function setPageSize(n) {
323
312
  set__pageSize(n);
324
313
  defaultQuery.current.size = n;
@@ -334,11 +323,11 @@ function _MyBaseList(_props) {
334
323
  useEffect(function () {
335
324
  setTimeout(function () {
336
325
  var _a, _b, _c, _d, _e, _f, _g;
337
- var h = browserClient.clientHeight;
326
+ var h = document.body.clientHeight;
338
327
  var formHeight = (_b = (_a = formWrapper.current) === null || _a === void 0 ? void 0 : _a.clientHeight) !== null && _b !== void 0 ? _b : 0;
339
328
  var queryHeight = (_d = (_c = queryRef.current) === null || _c === void 0 ? void 0 : _c.clientHeight) !== null && _d !== void 0 ? _d : 0;
340
329
  var tableHeaderHeight = (_g = (_f = (_e = wrapRef.current) === null || _e === void 0 ? void 0 : _e.querySelector('.ant-table-header')) === null || _f === void 0 ? void 0 : _f.clientHeight) !== null && _g !== void 0 ? _g : 0;
341
- setTableHeight(h - queryHeight - tableHeaderHeight - 100 - 80);
330
+ setTableHeight(h - queryHeight - tableHeaderHeight - 118 - 60);
342
331
  if (formHeight > 40) {
343
332
  setLongSearchForm(true);
344
333
  }
@@ -370,7 +359,7 @@ function _MyBaseList(_props) {
370
359
  if (effect_ctx) {
371
360
  useMyEffectSafe(effect_ctx)(function () {
372
361
  if (inited.current) {
373
- _message.info('刷新成功!');
362
+ message.info('刷新成功!');
374
363
  handleSearch();
375
364
  }
376
365
  }, []);
@@ -389,7 +378,7 @@ function _MyBaseList(_props) {
389
378
  return __generator(this, function (_e) {
390
379
  switch (_e.label) {
391
380
  case 0:
392
- if (_isFunction(props.create_or_update)) {
381
+ if (isFunction(props.create_or_update)) {
393
382
  return [2, props.create_or_update(submitData)];
394
383
  }
395
384
  service = myBaseListService.current;
@@ -407,7 +396,7 @@ function _MyBaseList(_props) {
407
396
  res = _e.sent();
408
397
  _e.label = 4;
409
398
  case 4:
410
- _message.info(text + '成功!');
399
+ message.info(text + '成功!');
411
400
  safe_set_edit_key(0);
412
401
  set___Id(undefined);
413
402
  handleSearch();
@@ -436,14 +425,14 @@ function _MyBaseList(_props) {
436
425
  }
437
426
  }, modalFormConfig === null || modalFormConfig === void 0 ? void 0 : modalFormConfig.modal_data), {
438
427
  formDescriptions: cal_columns,
439
- onSubmit: function onSubmit(values) {
428
+ onSubmit: function onSubmit(new_data, old_data) {
440
429
  return __awaiter(this, void 0, void 0, function () {
441
430
  var _data, submitData;
442
431
  return __generator(this, function (_a) {
443
432
  switch (_a.label) {
444
433
  case 0:
445
- _data = Object.assign({}, rowData, values);
446
- return [4, safe_async_call(beforeSubmit, _data)];
434
+ _data = Object.assign({}, rowData, new_data);
435
+ return [4, safe_async_call(beforeSubmit, _data, old_data)];
447
436
  case 1:
448
437
  submitData = _a.sent();
449
438
  mchcLogger.log('submitData', submitData);
@@ -461,7 +450,7 @@ function _MyBaseList(_props) {
461
450
  switch (_b.label) {
462
451
  case 0:
463
452
  fn = handleBeforePopup;
464
- _data = rowData !== null && rowData !== void 0 ? rowData : {};
453
+ _data = cloneDeep(rowData !== null && rowData !== void 0 ? rowData : {});
465
454
  if (!((rowData === null || rowData === void 0 ? void 0 : rowData.id) && requestBeforeEdit)) return [3, 2];
466
455
  return [4, (_a = myBaseListService.current) === null || _a === void 0 ? void 0 : _a.getOne(rowData === null || rowData === void 0 ? void 0 : rowData.id)];
467
456
  case 1:
@@ -490,18 +479,16 @@ function _MyBaseList(_props) {
490
479
  create_or_update: create_or_update
491
480
  };
492
481
  var actionCol = (_b = action_col === null || action_col === void 0 ? void 0 : action_col(render_props)) !== null && _b !== void 0 ? _b : {
493
- title: '操作',
482
+ title: __DEV__ ? actCellWidth + '' : '操作',
494
483
  dataIndex: '__operation',
495
484
  fixed: 'right',
496
485
  align: 'center',
497
486
  isActive: 0,
498
- showSorter: false,
499
- showFilter: false,
500
487
  width: actCellWidth,
501
488
  render: function render(value, rowData, index) {
502
489
  var editable = isEditing(rowData);
503
490
  if (needEditInTable && editable) {
504
- return /*#__PURE__*/React.createElement(_Space, null, /*#__PURE__*/React.createElement(OkButton, {
491
+ return /*#__PURE__*/React.createElement(Space, null, /*#__PURE__*/React.createElement(OkButton, {
505
492
  size: "small",
506
493
  onClick: function onClick() {
507
494
  return handleItemSave();
@@ -514,38 +501,47 @@ function _MyBaseList(_props) {
514
501
  }, "\u53D6\u6D88"));
515
502
  }
516
503
  if (RenderAction) {
517
- return /*#__PURE__*/React.createElement(RenderAction, _extends({
504
+ return /*#__PURE__*/React.createElement(RenderAction, __assign({
518
505
  rowData: rowData
519
506
  }, render_props));
520
507
  }
521
- return /*#__PURE__*/React.createElement(_Space, {
522
- size: "small"
523
- }, ActionAddonBefore && /*#__PURE__*/React.createElement(ActionAddonBefore, _extends({
508
+ return /*#__PURE__*/React.createElement(Space, {
509
+ size: 'small'
510
+ }, ActionAddonBefore && /*#__PURE__*/React.createElement(ActionAddonBefore, __assign({
524
511
  rowData: rowData
525
512
  }, render_props)), showRowEditBtn ? /*#__PURE__*/React.createElement(OkButton, {
526
- title: "\u7F16\u8F91/\u67E5\u770B",
527
- icon: /*#__PURE__*/React.createElement(EditOutlined, null),
513
+ title: '编辑/查看',
514
+ icon: /*#__PURE__*/React.createElement(MyIcon, {
515
+ value: 'EditOutlined'
516
+ }),
528
517
  size: "small",
529
518
  onClick: function onClick(e) {
530
519
  return handleEdit(rowData);
531
- }
520
+ },
521
+ btn_text: editText
532
522
  }) : null, showCopy ? /*#__PURE__*/React.createElement(OkButton, {
533
523
  title: "\u590D\u5236",
534
- icon: /*#__PURE__*/React.createElement(CopyOutlined, null),
524
+ icon: /*#__PURE__*/React.createElement(MyIcon, {
525
+ value: 'CopyOutlined'
526
+ }),
535
527
  size: "small",
536
528
  onClick: function onClick(e) {
537
- return handleEdit(_omit(rowData, ['id']));
529
+ return handleEdit(omit(rowData, ['id']));
538
530
  }
539
531
  }) : null, showRowPrintBtn ? /*#__PURE__*/React.createElement(OkButton, {
540
532
  title: "\u6253\u5370",
541
- icon: /*#__PURE__*/React.createElement(PrinterOutlined, null),
533
+ icon: /*#__PURE__*/React.createElement(MyIcon, {
534
+ value: 'PrinterOutlined'
535
+ }),
542
536
  size: "small",
543
537
  onClick: function onClick(e) {
544
538
  return handleRowPrint(rowData);
545
539
  }
546
540
  }) : null, showRowDelBtn ? /*#__PURE__*/React.createElement(OkButton, {
547
541
  title: "\u5220\u9664",
548
- icon: /*#__PURE__*/React.createElement(DeleteOutlined, null),
542
+ icon: /*#__PURE__*/React.createElement(MyIcon, {
543
+ value: 'DeleteOutlined'
544
+ }),
549
545
  danger: true,
550
546
  type: "primary",
551
547
  size: "small",
@@ -584,7 +580,7 @@ function _MyBaseList(_props) {
584
580
  return [4, (_a = myBaseListService.current) === null || _a === void 0 ? void 0 : _a.del(rowData.id)];
585
581
  case 1:
586
582
  _b.sent();
587
- _message.success("\u5220\u9664".concat(baseTitle, "\u6210\u529F"));
583
+ mchcEnv.success("\u5220\u9664".concat(baseTitle, "\u6210\u529F"));
588
584
  handleSearch();
589
585
  return [2];
590
586
  }
@@ -606,31 +602,34 @@ function _MyBaseList(_props) {
606
602
  });
607
603
  });
608
604
  }
609
- function handleItemSave(_data) {
605
+ function handleItemSave(d) {
610
606
  return __awaiter(this, void 0, void 0, function () {
611
- var rowData, submitData;
607
+ var old_data, _data, submitData;
612
608
  var _a;
613
609
  return __generator(this, function (_b) {
614
610
  switch (_b.label) {
615
611
  case 0:
616
- return [4, form.validateFields()];
612
+ return [4, table_form.validateFields()];
617
613
  case 1:
618
614
  _b.sent();
619
- rowData = (_a = _data !== null && _data !== void 0 ? _data : dataSource.find(function (_) {
615
+ old_data = (_a = d !== null && d !== void 0 ? d : dataSource.find(function (_) {
620
616
  return _.id === editKeyRef.current;
621
617
  })) !== null && _a !== void 0 ? _a : {};
622
- submitData = __assign(__assign({}, rowData), form.getFieldsValue());
623
- return [4, create_or_update(submitData)];
618
+ _data = __assign(__assign({}, old_data), table_form.getFieldsValue());
619
+ return [4, safe_async_call(beforeSubmit, _data, old_data)];
624
620
  case 2:
621
+ submitData = _b.sent();
622
+ return [4, create_or_update(submitData)];
623
+ case 3:
625
624
  _b.sent();
626
- form.resetFields();
625
+ table_form.resetFields();
627
626
  return [2];
628
627
  }
629
628
  });
630
629
  });
631
630
  }
632
631
  function handleItemCancel() {
633
- form.resetFields();
632
+ table_form.resetFields();
634
633
  set___Id(undefined);
635
634
  safe_set_edit_key(0);
636
635
  setDataSource(typeof editKey === 'string' ? dataSource.slice(1, dataSource.length) : dataSource);
@@ -649,10 +648,10 @@ function _MyBaseList(_props) {
649
648
  _a.sent();
650
649
  return [3, 3];
651
650
  case 2:
652
- _message.warning('请先保存上一条数据!');
651
+ message.warning('请先保存上一条数据!');
653
652
  return [2];
654
653
  case 3:
655
- form.setFieldsValue(rowData);
654
+ table_form.setFieldsValue(rowData);
656
655
  key = rowData.editKey || rowData.id;
657
656
  set___Id(rowData.id);
658
657
  safe_set_edit_key(key);
@@ -678,20 +677,24 @@ function _MyBaseList(_props) {
678
677
  set___Id(rowData.id);
679
678
  }
680
679
  var handleAdd = function handleAdd() {
680
+ var _a;
681
681
  if (onAdd) {
682
682
  onAdd();
683
683
  return;
684
684
  }
685
685
  if (needEditInTable) {
686
686
  if (editKeyRef.current) {
687
- _message.error('请先保存上一条记录');
687
+ message.error('请先保存上一条记录~');
688
688
  return;
689
689
  }
690
690
  var mockKey = +new Date();
691
- safe_set_edit_key(mockKey);
692
- setDataSource(__spreadArray([{
691
+ var new_data = {
693
692
  editKey: mockKey
694
- }], dataSource, true));
693
+ };
694
+ new_data = (_a = handleBeforePopup === null || handleBeforePopup === void 0 ? void 0 : handleBeforePopup(new_data)) !== null && _a !== void 0 ? _a : new_data;
695
+ var new_arr = __spreadArray([new_data], dataSource, true);
696
+ handleEdit(new_data);
697
+ setDataSource(new_arr);
695
698
  } else {
696
699
  if (ModalForm) {
697
700
  setEditable(true);
@@ -735,12 +738,12 @@ function _MyBaseList(_props) {
735
738
  case 0:
736
739
  if (!myBaseListService.current) return [2];
737
740
  if (dataSource.some(function (_) {
738
- return _isNil(_.id);
741
+ return isNil(_.id);
739
742
  })) setDataSource([]);
740
743
  setLoading(true);
741
744
  return [4, Promise.all([myBaseListService.current.page({
742
745
  params: params
743
- }), sleep(.2)])["finally"](function () {
746
+ }), sleep(100)])["finally"](function () {
744
747
  return setLoading(false);
745
748
  })];
746
749
  case 1:
@@ -783,7 +786,7 @@ function _MyBaseList(_props) {
783
786
  props = _b.props,
784
787
  dataIndex = _b.dataIndex,
785
788
  width = _b.width;
786
- var isOperativeCell = _isString(dataIndex) && ['__operation', 'operation'].includes(dataIndex);
789
+ var isOperativeCell = isString(dataIndex) && ['__operation', 'operation'].includes(dataIndex);
787
790
  var format_data = {
788
791
  title: get_title(col),
789
792
  dataIndex: get_dataIndex(col)
@@ -812,8 +815,7 @@ function _MyBaseList(_props) {
812
815
  var editing = cell.editing,
813
816
  dataIndex = cell.dataIndex,
814
817
  title = cell.title,
815
- _b = cell.inputType,
816
- inputType = _b === void 0 ? 'input' : _b,
818
+ inputType = cell.inputType,
817
819
  inputProps = cell.inputProps,
818
820
  rules = cell.rules,
819
821
  record = cell.record;
@@ -823,42 +825,25 @@ function _MyBaseList(_props) {
823
825
  render = cell.render,
824
826
  restProps = __rest(cell, ["editing", "dataIndex", "title", "inputType", "inputProps", "rules", "record", "index", "children", "inputConfig", "render"]);
825
827
  var C = (_a = MyBaseListComponents[inputType]) !== null && _a !== void 0 ? _a : function () {
826
- return "Unkown Cell Component!";
828
+ return "Unkown Cell Component:" + inputType;
827
829
  };
828
- return /*#__PURE__*/React.createElement("td", _extends({}, restProps, {
829
- title: _get(record, dataIndex)
830
- }), editing ? /*#__PURE__*/React.createElement(_Form.Item, {
830
+ return /*#__PURE__*/React.createElement("td", __assign({}, restProps, {
831
+ title: get(record, dataIndex)
832
+ }), editing && inputType ? (/*#__PURE__*/React.createElement(Form.Item, {
831
833
  name: dataIndex,
832
834
  style: {
833
835
  margin: 0
834
836
  },
835
837
  rules: getDefaultRequiredRules(rules, title || dataIndex)
836
- }, /*#__PURE__*/React.createElement(C, _extends({}, inputProps, {
838
+ }, /*#__PURE__*/React.createElement(C, __assign({}, inputProps, {
837
839
  inputType: inputType,
838
840
  config: inputConfig !== null && inputConfig !== void 0 ? inputConfig : cell
839
- }))) : C.DisplayFC && !render ? /*#__PURE__*/React.createElement(InterceptDisplayFC, {
841
+ })))) : (C === null || C === void 0 ? void 0 : C.DisplayFC) && !render ? /*#__PURE__*/React.createElement(InterceptDisplayFC, {
840
842
  C: C,
841
843
  config: inputConfig !== null && inputConfig !== void 0 ? inputConfig : cell,
842
- value: _get(record, dataIndex)
844
+ value: get(record, dataIndex)
843
845
  }) : children);
844
846
  };
845
- var renderOthersModal = function renderOthersModal() {
846
- return /*#__PURE__*/React.createElement(React.Fragment, null, visible && ModalForm && /*#__PURE__*/React.createElement(ModalForm, {
847
- visible: visible,
848
- editable: editable,
849
- id: ___id,
850
- extraModalData: extraModalData,
851
- onCancel: function onCancel() {
852
- handleCancel();
853
- handleSearch();
854
- },
855
- onSearch: handleSearch,
856
- onOk: function onOk() {
857
- handleCancel();
858
- handleSearch();
859
- }
860
- }));
861
- };
862
847
  function search() {
863
848
  return __awaiter(this, void 0, void 0, function () {
864
849
  var q;
@@ -872,107 +857,13 @@ function _MyBaseList(_props) {
872
857
  });
873
858
  });
874
859
  }
875
- var renderAdd = function renderAdd() {
876
- return /*#__PURE__*/React.createElement(_Space, null, RenderBtns === null || RenderBtns === void 0 ? void 0 : RenderBtns.call(window, actionCtx), showExport || onExport ? /*#__PURE__*/React.createElement(OkButton, {
877
- icon: /*#__PURE__*/React.createElement(ExportOutlined, null),
878
- type: "primary",
879
- onClick: function onClick() {
880
- var _a;
881
- if (onExport) {
882
- onExport(actionCtx);
883
- } else {
884
- (_a = myBaseListService.current) === null || _a === void 0 ? void 0 : _a["export"](getSearchParams()).then(function (r) {
885
- downloadFile(r, "".concat(baseTitle).concat(formatDateTime(), ".xlsx"), 'application/vnd.ms-excel');
886
- });
887
- }
888
- }
889
- }, '导出') : null, showPrint ? /*#__PURE__*/React.createElement(OkButton, {
890
- icon: /*#__PURE__*/React.createElement(ExportOutlined, null),
891
- type: "primary",
892
- onClick: function onClick() {
893
- if (onPrint) {
894
- onPrint(actionCtx);
895
- } else {
896
- mchcModal__.open('print_modal', {
897
- modal_data: {
898
- requestData: __assign(__assign({
899
- url: name + 'print'
900
- }, getSearchParams()), printDefaultConfig)
901
- }
902
- });
903
- }
904
- }
905
- }, '打印') : null, showAdd ? /*#__PURE__*/React.createElement(OkButton, {
906
- disabled: loading,
907
- icon: /*#__PURE__*/React.createElement(PlusOutlined, null),
908
- type: "primary",
909
- onClick: handleAdd
910
- }, addText || '新增') : null, showSearch ? /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(_Divider, {
911
- type: "vertical"
912
- }), /*#__PURE__*/React.createElement(_Button.Group, null, RenderSearchBtns === null || RenderSearchBtns === void 0 ? void 0 : RenderSearchBtns.call(window, actionCtx), /*#__PURE__*/React.createElement(OkButton, {
913
- htmlType: "reset",
914
- icon: /*#__PURE__*/React.createElement(ReloadOutlined, null),
915
- disabled: loading,
916
- onClick: function onClick() {
917
- searchForm.resetFields();
918
- defaultQuery.current = defaultQueryValue;
919
- setDataSource([]);
920
- setCurrent(1);
921
- setPageSize(defaultQueryValue.size);
922
- handleSearch();
923
- }
924
- }, "\u91CD\u7F6E"), /*#__PURE__*/React.createElement(OkButton, {
925
- type: "primary",
926
- htmlType: "submit",
927
- disabled: loading,
928
- onClick: function onClick() {
929
- return search();
930
- },
931
- icon: /*#__PURE__*/React.createElement(SearchOutlined, null)
932
- }, "\u67E5\u8BE2"))) : null);
933
- };
934
- var renderTitle = function renderTitle() {
935
- return /*#__PURE__*/React.createElement("div", {
936
- ref: queryRef,
937
- style: __assign({
938
- padding: 4
939
- }, longSearchForm ? {
940
- display: 'flex',
941
- flexDirection: 'column-reverse'
942
- } : {
943
- display: 'flex',
944
- justifyContent: 'space-between'
945
- })
946
- }, /*#__PURE__*/React.createElement("div", {
947
- ref: formWrapper,
948
- style: {
949
- display: 'flex',
950
- alignItems: 'center',
951
- justifyContent: 'space-between',
952
- paddingTop: 4
953
- }
954
- }, showSearch ? /*#__PURE__*/React.createElement(_Form, {
955
- initialValues: initialSearchValue,
956
- form: searchForm,
957
- layout: "inline",
958
- onFinish: function onFinish() {
959
- search();
960
- }
961
- }, searchConfig ? /*#__PURE__*/React.createElement(MyBaseListRenderFormSection, {
962
- config: searchConfig,
963
- disabled: loading
964
- }) : null) : null), /*#__PURE__*/React.createElement("div", {
965
- style: {
966
- display: 'flex',
967
- alignItems: 'center',
968
- justifyContent: 'flex-end',
969
- borderBottom: longSearchForm ? '1px dashed #ddd' : 0,
970
- paddingBottom: 4,
971
- paddingRight: 28
972
- }
973
- }, renderAdd()));
974
- };
975
860
  var mergedColumns = format_columns(cal_columns);
861
+ var rowSelection = {
862
+ onChange: handleRowSelected,
863
+ selectedRowKeys: checkRows.map(function (_) {
864
+ return _.id;
865
+ })
866
+ };
976
867
  var __pagination = needPagination ? {
977
868
  position: ['bottomCenter'],
978
869
  total: total,
@@ -989,29 +880,139 @@ function _MyBaseList(_props) {
989
880
  onShowSizeChange: handlePageChange,
990
881
  showQuickJumper: true,
991
882
  showSizeChanger: true
992
- } : {};
883
+ } : false;
993
884
  var __components = needEditInTable || true ? {
994
885
  body: {
995
886
  cell: renderEditableCell
996
887
  }
997
888
  } : {};
889
+ var _5 = useState([]);
890
+ _5[0];
891
+ _5[1];
998
892
  return /*#__PURE__*/React.createElement("div", {
999
- className: "base-list",
1000
- ref: wrapRef
1001
- }, /*#__PURE__*/React.createElement(_Form, {
893
+ ref: wrapRef,
894
+ style: {
895
+ background: sys_theme.bg_color
896
+ }
897
+ }, /*#__PURE__*/React.createElement(Form, {
1002
898
  onSubmitCapture: function onSubmitCapture(e) {
1003
- _message.info('onSubmitCapture');
899
+ message.info('onSubmitCapture');
1004
900
  },
1005
901
  onFinish: function onFinish() {
1006
- _message.info('onFinish');
902
+ message.info('onFinish');
1007
903
  },
1008
- form: form,
904
+ form: table_form,
1009
905
  component: false,
1010
906
  onFieldsChange: handleFieldsChange
1011
907
  }, /*#__PURE__*/React.createElement("div", {
1012
908
  className: "global-base-table",
1013
909
  id: "global-base-table"
1014
- }, renderTitle === null || renderTitle === void 0 ? void 0 : renderTitle(), /*#__PURE__*/React.createElement(Table, {
910
+ }, /*#__PURE__*/React.createElement("div", {
911
+ ref: queryRef,
912
+ style: __assign({
913
+ padding: 4
914
+ }, longSearchForm ? {
915
+ display: 'flex',
916
+ flexDirection: 'column-reverse'
917
+ } : {
918
+ display: 'flex',
919
+ justifyContent: 'space-between'
920
+ })
921
+ }, /*#__PURE__*/React.createElement("div", {
922
+ ref: formWrapper,
923
+ style: {
924
+ display: 'flex',
925
+ alignItems: 'center',
926
+ justifyContent: 'space-between',
927
+ paddingTop: 4
928
+ }
929
+ }, showSearch ? (/*#__PURE__*/React.createElement(Form, {
930
+ initialValues: initialSearchValue,
931
+ form: searchForm,
932
+ layout: "inline",
933
+ onFinish: function onFinish() {
934
+ search();
935
+ }
936
+ }, searchConfig ? /*#__PURE__*/React.createElement(MyBaseListRenderFormSection, {
937
+ config: searchConfig,
938
+ disabled: loading
939
+ }) : null)) : null), /*#__PURE__*/React.createElement("div", {
940
+ style: {
941
+ display: 'flex',
942
+ alignItems: 'center',
943
+ justifyContent: 'flex-end',
944
+ borderBottom: longSearchForm ? "1px dashed ".concat(sys_theme.colorBorder) : 0,
945
+ paddingBottom: 4,
946
+ paddingRight: 28
947
+ }
948
+ }, /*#__PURE__*/React.createElement(Space, null, RenderBtns === null || RenderBtns === void 0 ? void 0 : RenderBtns.call(window, actionCtx), showExport || onExport ? /*#__PURE__*/React.createElement(OkButton, {
949
+ icon: /*#__PURE__*/React.createElement(MyIcon, {
950
+ value: 'ExportOutlined'
951
+ }),
952
+ type: "primary",
953
+ onClick: function onClick() {
954
+ var _a;
955
+ if (onExport) {
956
+ onExport(actionCtx);
957
+ } else {
958
+ (_a = myBaseListService.current) === null || _a === void 0 ? void 0 : _a["export"](getSearchParams()).then(function (r) {
959
+ downloadFile(r, "".concat(baseTitle).concat(formatDateTime(), ".xlsx"), 'application/vnd.ms-excel');
960
+ });
961
+ }
962
+ }
963
+ }, '导出') : null, showPrint ? /*#__PURE__*/React.createElement(OkButton, {
964
+ icon: /*#__PURE__*/React.createElement(MyIcon, {
965
+ value: 'ExportOutlined'
966
+ }),
967
+ type: "primary",
968
+ onClick: function onClick() {
969
+ if (onPrint) {
970
+ onPrint(actionCtx);
971
+ } else {
972
+ mchcModal__.open('print_modal', {
973
+ modal_data: {
974
+ requestData: __assign(__assign({
975
+ url: name + 'print'
976
+ }, getSearchParams()), printDefaultConfig)
977
+ }
978
+ });
979
+ }
980
+ }
981
+ }, '打印') : null, showAdd ? /*#__PURE__*/React.createElement(OkButton, {
982
+ disabled: loading,
983
+ icon: /*#__PURE__*/React.createElement(MyIcon, {
984
+ value: 'PlusOutlined'
985
+ }),
986
+ type: "primary",
987
+ onClick: handleAdd
988
+ }, addText || '新增') : null, showSearch ? (/*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Divider, {
989
+ type: 'vertical'
990
+ }), /*#__PURE__*/React.createElement(Button.Group, null, RenderSearchBtns === null || RenderSearchBtns === void 0 ? void 0 : RenderSearchBtns.call(window, actionCtx), /*#__PURE__*/React.createElement(OkButton, {
991
+ htmlType: "reset",
992
+ icon: /*#__PURE__*/React.createElement(MyIcon, {
993
+ value: 'ReloadOutlined'
994
+ }),
995
+ disabled: loading,
996
+ onClick: function onClick() {
997
+ searchForm.resetFields();
998
+ defaultQuery.current = defaultQueryValue;
999
+ setDataSource([]);
1000
+ setCurrent(1);
1001
+ setPageSize(defaultQueryValue.size);
1002
+ handleSearch();
1003
+ }
1004
+ }, "\u91CD\u7F6E"), /*#__PURE__*/React.createElement(OkButton, {
1005
+ type: "primary",
1006
+ htmlType: "submit",
1007
+ disabled: loading,
1008
+ onClick: function onClick() {
1009
+ return search();
1010
+ },
1011
+ icon: /*#__PURE__*/React.createElement(MyIcon, {
1012
+ value: 'SearchOutlined'
1013
+ })
1014
+ }, "\u67E5\u8BE2")))) : null))), /*#__PURE__*/React.createElement(Table_L, {
1015
+ size: 'small',
1015
1016
  dataSource: dataSource,
1016
1017
  rowKey: rowKey || 'id',
1017
1018
  bordered: true,
@@ -1019,22 +1020,17 @@ function _MyBaseList(_props) {
1019
1020
  pagination: __pagination,
1020
1021
  title: undefined,
1021
1022
  style: {
1022
- padding: '0 12px'
1023
+ padding: '0 12px',
1024
+ paddingBottom: needPagination ? 0 : 8
1023
1025
  },
1024
1026
  components: __components,
1025
1027
  scroll: {
1026
1028
  scrollToFirstRowOnChange: true,
1027
- x: _get(otherTableProps, 'scroll.x') || 'calc(100px)',
1028
- y: _get(otherTableProps, 'scroll.y') || tableHeight
1029
+ x: get(otherTableProps, 'scroll.x') || 'calc(100px)',
1030
+ y: get(otherTableProps, 'scroll.y') || tableHeight
1029
1031
  },
1030
1032
  columns: mergedColumns,
1031
- rowSelection: needChecked ? {
1032
- type: 'checkbox',
1033
- onChange: handleRowSelected,
1034
- selectedRowKeys: checkRows.map(function (_) {
1035
- return _.id;
1036
- })
1037
- } : undefined,
1033
+ rowSelection: needChecked ? rowSelection : undefined,
1038
1034
  onRow: function onRow(record) {
1039
1035
  return {
1040
1036
  onClick: function onClick(event) {
@@ -1048,7 +1044,20 @@ function _MyBaseList(_props) {
1048
1044
  }
1049
1045
  };
1050
1046
  }
1051
- }))), renderOthersModal(), children);
1047
+ }))), /*#__PURE__*/React.createElement(React.Fragment, null, visible && ModalForm && (/*#__PURE__*/React.createElement(ModalForm, {
1048
+ open: visible,
1049
+ editable: editable,
1050
+ id: ___id,
1051
+ extraModalData: extraModalData,
1052
+ onCancel: function onCancel() {
1053
+ handleCancel();
1054
+ handleSearch();
1055
+ },
1056
+ onSearch: handleSearch,
1057
+ onOk: function onOk() {
1058
+ handleCancel();
1059
+ handleSearch();
1060
+ }
1061
+ }))), children);
1052
1062
  }
1053
1063
  export { _MyBaseList, _MyBaseList as default };
1054
- //# sourceMappingURL=.root3.js.map