@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
@@ -0,0 +1,41 @@
1
+ import { d as __rest, a as __assign, B as BF_Form } from './index.js';
2
+ import { Modal } from 'antd';
3
+ import React, { useState, useEffect } from 'react';
4
+ import '@lm_fe/components';
5
+ import '@lm_fe/utils';
6
+ import 'classnames';
7
+ import 'lodash';
8
+ import '@lm_fe/components_m';
9
+ import '@lm_fe/env';
10
+ import '@lm_fe/provoke';
11
+ import '@lm_fe/service';
12
+ function FormChrono(_a) {
13
+ var modal_data = _a.modal_data,
14
+ visible = _a.visible,
15
+ onCancel = _a.onCancel;
16
+ _a.props;
17
+ var others = __rest(_a, ["modal_data", "visible", "onCancel", "props"]);
18
+ var title = modal_data.title,
19
+ history_args = modal_data.history_args;
20
+ var _b = useState();
21
+ _b[0];
22
+ _b[1];
23
+ useEffect(function () {
24
+ return function () {};
25
+ }, []);
26
+ return /*#__PURE__*/React.createElement(Modal, __assign({
27
+ open: visible,
28
+ title: "Test",
29
+ width: 1000,
30
+ footer: null,
31
+ onCancel: onCancel,
32
+ style: {
33
+ top: '20px'
34
+ },
35
+ destroyOnClose: true
36
+ }, others), /*#__PURE__*/React.createElement(BF_Form, {
37
+ title: title,
38
+ history_args: history_args
39
+ }));
40
+ }
41
+ export { FormChrono as default };
@@ -0,0 +1,22 @@
1
+ import { d as __rest, a as __assign } from './index.js';
2
+ import { Modal } from 'antd';
3
+ import React from 'react';
4
+ import '@lm_fe/components';
5
+ import '@lm_fe/utils';
6
+ import 'classnames';
7
+ import 'lodash';
8
+ import '@lm_fe/components_m';
9
+ import '@lm_fe/env';
10
+ import '@lm_fe/provoke';
11
+ import '@lm_fe/service';
12
+ var DEFAULT_URL = '/api/template-trees';
13
+ function TemplateModal2(props) {
14
+ props.modal_data;
15
+ props.onCancel;
16
+ props.onOk;
17
+ var others = __rest(props, ["modal_data", "onCancel", "onOk"]);
18
+ return /*#__PURE__*/React.createElement(Modal, __assign({
19
+ width: 1100
20
+ }, others));
21
+ }
22
+ export { DEFAULT_URL, TemplateModal2 as default };
@@ -0,0 +1,23 @@
1
+ import { d as __rest, a as __assign } from './index.js';
2
+ import { Modal } from 'antd';
3
+ import React from 'react';
4
+ import '@lm_fe/components';
5
+ import '@lm_fe/utils';
6
+ import 'classnames';
7
+ import 'lodash';
8
+ import '@lm_fe/components_m';
9
+ import '@lm_fe/env';
10
+ import '@lm_fe/provoke';
11
+ import '@lm_fe/service';
12
+ function Box(_a) {
13
+ var modal_data = _a.modal_data,
14
+ visible = _a.visible,
15
+ others = __rest(_a, ["modal_data", "visible"]);
16
+ var content = modal_data.content;
17
+ return /*#__PURE__*/React.createElement(Modal, __assign({
18
+ title: "Test",
19
+ open: visible,
20
+ centered: true
21
+ }, others), content);
22
+ }
23
+ export { Box as default };
@@ -1,41 +1,14 @@
1
- import 'antd/es/modal/style';
2
- import _Modal from 'antd/es/modal';
3
- import { _ as _extends } from './extends.js';
4
- import 'antd/es/form/style';
5
- import _Form from 'antd/es/form';
6
- import { d as __rest, f as BF_Wrap2, b as __assign, _ as __awaiter, a as __generator, E as ErrorBoundarySmall } from './index.js';
7
- import React, { useState, useEffect } from 'react';
8
- import { mchcDriver, mchcEvent } from '@lm_fe/env';
1
+ import { d as __rest, i as BF_Wrap2, b as __awaiter, c as __generator, a as __assign, E as ErrorBoundarySmall } from './index.js';
2
+ import { validate_form } from '@lm_fe/components';
3
+ import { Form, Modal } from 'antd';
4
+ import React, { useState, useRef, useEffect } from 'react';
5
+ import { mchcLogger, mchcDriver, mchcEvent } from '@lm_fe/env';
9
6
  import { FormSection } from '@lm_fe/components_m';
10
- import { safe_async_call } from '@lm_fe/utils';
11
- import 'antd/es/row/style';
12
- import 'antd/es/row';
13
- import 'antd/es/col/style';
14
- import 'antd/es/col';
15
- import '@lm_fe/components';
16
- import 'antd/es/result/style';
17
- import 'antd/es/result';
18
- import 'lodash/keys';
19
- import 'lodash/get';
20
- import '@ant-design/icons';
7
+ import { noop, safe_async_call, sleep } from '@lm_fe/utils';
8
+ import '@lm_fe/provoke';
21
9
  import '@lm_fe/service';
22
- import 'antd/es/list/style';
23
- import 'antd/es/list';
24
- import 'antd/es/tooltip/style';
25
- import 'antd/es/tooltip';
10
+ import 'lodash';
26
11
  import 'classnames';
27
- import 'antd/es/button/style';
28
- import 'antd/es/button';
29
- import 'antd/es/spin/style';
30
- import 'antd/es/spin';
31
- import 'antd/es/menu/style';
32
- import 'antd/es/menu';
33
- import 'antd/es/message/style';
34
- import 'antd/es/message';
35
- import 'antd/es/space/style';
36
- import 'antd/es/space';
37
- import 'antd/es/divider/style';
38
- import 'antd/es/divider';
39
12
  function MyModalForm(_a) {
40
13
  var _this = this;
41
14
  var _b;
@@ -60,7 +33,7 @@ function MyModalForm(_a) {
60
33
  disableAll = modal_data.disableAll,
61
34
  _g = modal_data.modalFormSize,
62
35
  modalFormSize = _g === void 0 ? 'middle' : _g;
63
- var _form = _Form.useForm()[0];
36
+ var _form = Form.useForm()[0];
64
37
  var form = (_b = modal_data.form) !== null && _b !== void 0 ? _b : _form;
65
38
  var _h = useState({}),
66
39
  data = _h[0],
@@ -68,21 +41,72 @@ function MyModalForm(_a) {
68
41
  var _j = BF_Wrap2({
69
42
  default_conf: {
70
43
  title: bf_title,
71
- tableColumns: formDescriptions
44
+ tableColumns: formDescriptions,
45
+ handleBeforePopup: function handleBeforePopup(values) {
46
+ return values !== null && values !== void 0 ? values : {};
47
+ }
72
48
  }
73
49
  }),
74
50
  Wrap = _j.Wrap,
75
51
  config = _j.config;
52
+ var inited = useRef(false);
53
+ var _k = useState(false),
54
+ loading = _k[0],
55
+ setLoading = _k[1];
76
56
  useEffect(function () {
77
- var _a, _b;
78
- (_b = (_a = safe_async_call(function () {
79
- return getInitialData === null || getInitialData === void 0 ? void 0 : getInitialData();
80
- })).then) === null || _b === void 0 ? void 0 : _b.call(_a, function (v) {
81
- setData(v);
82
- form.setFieldsValue(v);
57
+ if (inited.current) return noop;
58
+ if (!bf_title) {
59
+ base_int().then(finish_init);
60
+ return noop;
61
+ }
62
+ if (config) {
63
+ mchcLogger.log('modal_form config', {
64
+ config: config
65
+ });
66
+ if (config.handleBeforePopup) {
67
+ base_int().then(config.handleBeforePopup).then(finish_init);
68
+ } else {
69
+ base_int().then(finish_init);
70
+ }
71
+ }
72
+ return noop;
73
+ }, [bf_title, config]);
74
+ function base_int() {
75
+ return __awaiter(this, void 0, void 0, function () {
76
+ return __generator(this, function (_a) {
77
+ return [2, safe_async_call(function () {
78
+ return getInitialData === null || getInitialData === void 0 ? void 0 : getInitialData();
79
+ }).then(function (v) {
80
+ var init_data = v !== null && v !== void 0 ? v : {};
81
+ return init_data;
82
+ })];
83
+ });
83
84
  });
84
- return function () {};
85
- }, []);
85
+ }
86
+ function finish_init() {
87
+ return __awaiter(this, arguments, void 0, function (base) {
88
+ if (base === void 0) {
89
+ base = {};
90
+ }
91
+ return __generator(this, function (_a) {
92
+ switch (_a.label) {
93
+ case 0:
94
+ inited.current = true;
95
+ setData(base);
96
+ return [4, sleep(400)];
97
+ case 1:
98
+ _a.sent();
99
+ mchcLogger.log('modal_form init', {
100
+ base: base,
101
+ form: form,
102
+ xx: form.getFieldsValue()
103
+ });
104
+ form.setFieldsValue(base);
105
+ return [2];
106
+ }
107
+ });
108
+ });
109
+ }
86
110
  useEffect(function () {
87
111
  return mchcDriver.on_rm('data', function (e) {
88
112
  if (e.type === 'ReadCard') {
@@ -110,38 +134,44 @@ function MyModalForm(_a) {
110
134
  form: form
111
135
  });
112
136
  }
113
- return /*#__PURE__*/React.createElement(_Modal, _extends({
137
+ return /*#__PURE__*/React.createElement(Modal, __assign({
114
138
  title: (data === null || data === void 0 ? void 0 : data.id) ? "\u4FEE\u6539".concat(title) : "\u6DFB\u52A0".concat(title),
139
+ okButtonProps: {
140
+ loading: loading
141
+ },
115
142
  centered: true,
116
- destroyOnClose: true,
143
+ destroyOnHidden: true,
117
144
  width: width !== null && width !== void 0 ? width : "60vw",
118
- bodyStyle: __assign({
119
- padding: '12px 20px',
120
- height: '70vh',
121
- overflowY: 'scroll'
122
- }, bodyStyle),
145
+ styles: {
146
+ body: __assign({
147
+ height: '70vh',
148
+ overflowY: 'auto',
149
+ overflowX: 'hidden'
150
+ }, bodyStyle)
151
+ },
123
152
  onOk: function onOk(e) {
124
- form.validateFields().then(function () {
125
- return __awaiter(_this, void 0, void 0, function () {
126
- var formData, a;
127
- return __generator(this, function (_a) {
128
- switch (_a.label) {
129
- case 0:
130
- formData = form.getFieldsValue();
131
- return [4, safe_async_call(onSubmit, __assign(__assign({}, data), formData))];
132
- case 1:
133
- a = _a.sent();
134
- if (!a) return [2];
153
+ return __awaiter(_this, void 0, void 0, function () {
154
+ var formData;
155
+ return __generator(this, function (_a) {
156
+ switch (_a.label) {
157
+ case 0:
158
+ return [4, validate_form(form)];
159
+ case 1:
160
+ formData = _a.sent();
161
+ if (!formData) return [2];
162
+ setLoading(true);
163
+ safe_async_call(onSubmit, __assign(__assign({}, data), formData), data).then(function (a) {
164
+ if (!a) return;
135
165
  _onOk === null || _onOk === void 0 ? void 0 : _onOk(e);
136
- return [2];
137
- }
138
- });
166
+ })["finally"](function () {
167
+ return setLoading(false);
168
+ });
169
+ return [2];
170
+ }
139
171
  });
140
- })["catch"](function (error) {
141
- console.error('modal_form 发生错误', error);
142
172
  });
143
173
  }
144
- }, others), /*#__PURE__*/React.createElement(ErrorBoundarySmall, null, /*#__PURE__*/React.createElement(_Form, {
174
+ }, others), /*#__PURE__*/React.createElement(ErrorBoundarySmall, null, /*#__PURE__*/React.createElement(Form, {
145
175
  size: modalFormSize,
146
176
  onFieldsChange: function onFieldsChange(a, b) {
147
177
  _onFieldsChange === null || _onFieldsChange === void 0 ? void 0 : _onFieldsChange(a, b, form);
@@ -167,4 +197,3 @@ function MyModalForm(_a) {
167
197
  }, renderEditContent())));
168
198
  }
169
199
  export { MyModalForm as default };
170
- //# sourceMappingURL=.root11.js.map
@@ -0,0 +1,143 @@
1
+ import { d as __rest, b as __awaiter, c as __generator, a as __assign } from './index.js';
2
+ import { MyIcon } from '@lm_fe/components';
3
+ import { MyLazyComponent } from '@lm_fe/components_m';
4
+ import { mchcLogger, mchcEnv, mchcRouterContainer__ } from '@lm_fe/env';
5
+ import { use_provoke } from '@lm_fe/provoke';
6
+ import { sleep, getHappyConfig } from '@lm_fe/utils';
7
+ import { Modal, Button } from 'antd';
8
+ import React, { useState, useRef, useEffect } from 'react';
9
+ import 'classnames';
10
+ import 'lodash';
11
+ import '@lm_fe/service';
12
+ function Modal_Page(_a) {
13
+ var _this = this;
14
+ var modal_data = _a.modal_data;
15
+ _a.close;
16
+ var others = __rest(_a, ["modal_data", "close"]);
17
+ var content = modal_data.content,
18
+ iframe_url = modal_data.iframe_url,
19
+ route_conf = modal_data.route_conf;
20
+ var sys_theme = use_provoke(function (s) {
21
+ return s.sys_theme;
22
+ });
23
+ var _b = useState(false);
24
+ _b[0];
25
+ var setVisible = _b[1];
26
+ var el = useRef(null);
27
+ useEffect(function () {
28
+ (function () {
29
+ return __awaiter(_this, void 0, void 0, function () {
30
+ return __generator(this, function (_a) {
31
+ switch (_a.label) {
32
+ case 0:
33
+ return [4, sleep(.8 * 1000)];
34
+ case 1:
35
+ _a.sent();
36
+ setVisible(true);
37
+ return [2];
38
+ }
39
+ });
40
+ });
41
+ })();
42
+ return function () {};
43
+ }, []);
44
+ useEffect(function () {
45
+ mchcLogger.log('moda_page', modal_data);
46
+ if (route_conf === null || route_conf === void 0 ? void 0 : route_conf.url) {
47
+ var happy_conf = getHappyConfig(route_conf.url);
48
+ mchcEnv.push_global_cache('happy_conf', happy_conf || {
49
+ usr1: 'unset'
50
+ });
51
+ }
52
+ return function () {
53
+ if (route_conf === null || route_conf === void 0 ? void 0 : route_conf.url) {
54
+ mchcEnv.pop_global_cache('happy_conf');
55
+ }
56
+ };
57
+ }, []);
58
+ function render_content() {
59
+ if (content) return content;
60
+ if (route_conf) {
61
+ var params = route_conf.params || {};
62
+ var C = mchcRouterContainer__.get_addon_component(route_conf.url);
63
+ if (!C) return /*#__PURE__*/React.createElement("div", {
64
+ style: {
65
+ textAlign: 'center',
66
+ lineHeight: '48px',
67
+ height: 48
68
+ }
69
+ }, route_conf.url, " \u8BE5\u9875\u9762\u4E0D\u652F\u6301\u5F39\u7A97\u8BBF\u95EE\uFF0C\u8BF7\u8FD4\u56DE\uFF01 ");
70
+ return /*#__PURE__*/React.createElement(C, __assign({}, params, {
71
+ is_modal: true
72
+ }));
73
+ }
74
+ if (iframe_url) {
75
+ return /*#__PURE__*/React.createElement("div", {
76
+ style: {
77
+ width: '100%',
78
+ height: '100%',
79
+ position: 'relative'
80
+ }
81
+ }, /*#__PURE__*/React.createElement("iframe", {
82
+ width: "100%",
83
+ height: "100%",
84
+ style: {
85
+ border: 'none',
86
+ padding: 0,
87
+ margin: 0
88
+ },
89
+ src: iframe_url
90
+ }), /*#__PURE__*/React.createElement(Button, {
91
+ style: {
92
+ position: 'absolute',
93
+ right: 24,
94
+ bottom: 24,
95
+ boxShadow: '#444 4px 4px 12px 2px'
96
+ },
97
+ size: 'large',
98
+ type: "primary",
99
+ shape: 'circle',
100
+ icon: /*#__PURE__*/React.createElement(MyIcon, {
101
+ value: 'ExportOutlined'
102
+ }),
103
+ onClick: function onClick() {
104
+ return mchcEnv.open(iframe_url);
105
+ }
106
+ }));
107
+ }
108
+ return /*#__PURE__*/React.createElement("div", {
109
+ style: {
110
+ textAlign: 'center',
111
+ lineHeight: '48px',
112
+ height: 48
113
+ }
114
+ }, "\u8BF7\u8BBE\u7F6E content\u3001route_conf \u6216\u8005 iframe_url");
115
+ }
116
+ var node = render_content();
117
+ return /*#__PURE__*/React.createElement(Modal, __assign({
118
+ width: '92vw',
119
+ footer: null,
120
+ centered: true,
121
+ closeIcon: null,
122
+ styles: {
123
+ header: {},
124
+ content: {
125
+ padding: 4
126
+ },
127
+ body: {
128
+ height: '92vh',
129
+ overflow: 'auto'
130
+ }
131
+ },
132
+ destroyOnClose: true
133
+ }, others, {
134
+ maskClosable: true
135
+ }), /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(MyLazyComponent, null, /*#__PURE__*/React.createElement("div", {
136
+ ref: el,
137
+ style: {
138
+ height: '99%',
139
+ background: sys_theme.bg_color
140
+ }
141
+ }, node))));
142
+ }
143
+ export { Modal_Page as default };
@@ -1,43 +1,16 @@
1
- import 'antd/es/modal/style';
2
- import _Modal from 'antd/es/modal';
3
- import { _ as _extends } from './extends.js';
4
- import 'antd/es/space/style';
5
- import _Space from 'antd/es/space';
6
- import { s as styleInject, d as __rest, b as __assign } from './index.js';
1
+ import { s as styleInject, d as __rest, a as __assign } from './index.js';
7
2
  import { get_PdfFrameView_version, PdfFrameView, LazyAntd } from '@lm_fe/components';
8
3
  import { lm_pdfjs_info } from '@lm_fe/static';
4
+ import { Modal, Space } from 'antd';
9
5
  import React, { useState } from 'react';
10
6
  import store from 'store';
11
- import 'antd/es/row/style';
12
- import 'antd/es/row';
13
- import 'antd/es/col/style';
14
- import 'antd/es/col';
15
- import 'antd/es/list/style';
16
- import 'antd/es/list';
17
- import 'antd/es/tooltip/style';
18
- import 'antd/es/tooltip';
19
- import 'lodash/get';
20
- import '@ant-design/icons';
7
+ import '@lm_fe/utils';
21
8
  import 'classnames';
22
- import 'antd/es/button/style';
23
- import 'antd/es/button';
24
- import 'antd/es/spin/style';
25
- import 'antd/es/spin';
9
+ import 'lodash';
26
10
  import '@lm_fe/components_m';
27
- import '@lm_fe/utils';
28
- import 'antd/es/form/style';
29
- import 'antd/es/form';
30
- import 'antd/es/result/style';
31
- import 'antd/es/result';
32
- import 'antd/es/menu/style';
33
- import 'antd/es/menu';
34
- import '@lm_fe/service';
35
- import 'antd/es/message/style';
36
- import 'antd/es/message';
37
11
  import '@lm_fe/env';
38
- import 'lodash/keys';
39
- import 'antd/es/divider/style';
40
- import 'antd/es/divider';
12
+ import '@lm_fe/provoke';
13
+ import '@lm_fe/service';
41
14
  var css_248z = ".index-module_print-modal__XcdX6 .ant-modal-header {\n padding: 12px;\n}\n";
42
15
  var styles = {
43
16
  "print-modal": "index-module_print-modal__XcdX6"
@@ -64,19 +37,18 @@ function Print_Modal(_a) {
64
37
  __version = _c[0],
65
38
  set__version = _c[1];
66
39
  var w = width !== null && width !== void 0 ? width : "60vw";
67
- return /*#__PURE__*/React.createElement(_Modal, _extends({
40
+ return /*#__PURE__*/React.createElement(Modal, __assign({
68
41
  className: styles['print-modal'],
69
42
  title: /*#__PURE__*/React.createElement("div", {
70
43
  style: {
71
44
  display: 'flex',
72
45
  justifyContent: 'space-between',
73
46
  alignItems: 'center',
74
- marginRight: 36
47
+ margin: '0 56px 0 24px'
75
48
  }
76
49
  }, /*#__PURE__*/React.createElement("span", {
77
50
  onClick: function onClick() {}
78
- }, "\u6253\u5370\u9884\u89C8"), /*#__PURE__*/React.createElement(_Space, null, version ? null : /*#__PURE__*/React.createElement(Select, {
79
- size: "small",
51
+ }, "\u6253\u5370\u9884\u89C8"), /*#__PURE__*/React.createElement(Space, null, version ? null : /*#__PURE__*/React.createElement(Select, {
80
52
  style: {
81
53
  width: 200
82
54
  },
@@ -95,19 +67,21 @@ function Print_Modal(_a) {
95
67
  width: w,
96
68
  footer: null,
97
69
  centered: true,
98
- destroyOnClose: true,
99
- style: {
100
- padding: 0
101
- }
70
+ destroyOnHidden: true
102
71
  }, others, {
103
- bodyStyle: __assign(__assign({
104
- height: '88vh'
105
- }, bodyStyle), {
106
- padding: 0
107
- })
108
- }), /*#__PURE__*/React.createElement(PdfFrameView, _extends({}, modal_data, {
72
+ styles: {
73
+ body: __assign(__assign({
74
+ height: '88vh'
75
+ }, bodyStyle), {
76
+ padding: 0
77
+ }),
78
+ content: {
79
+ padding: 0,
80
+ paddingTop: 14
81
+ }
82
+ }
83
+ }), /*#__PURE__*/React.createElement(PdfFrameView, __assign({}, modal_data, {
109
84
  version: __version
110
85
  })));
111
86
  }
112
87
  export { Print_Modal as default };
113
- //# sourceMappingURL=.root13.js.map