@lm_fe/pages 0.1.201 → 0.2.2

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 (173) hide show
  1. package/README.md +0 -0
  2. package/dist/a_chunks/.root.js +1610 -222
  3. package/dist/a_chunks/.root10.js +494 -462
  4. package/dist/a_chunks/.root11.js +231 -159
  5. package/dist/a_chunks/.root12.js +245 -186
  6. package/dist/a_chunks/.root13.js +1898 -104
  7. package/dist/a_chunks/.root14.js +147 -716
  8. package/dist/a_chunks/.root15.js +27 -44
  9. package/dist/a_chunks/.root16.js +18 -168
  10. package/dist/a_chunks/.root17.js +20 -255
  11. package/dist/a_chunks/.root18.js +168 -385
  12. package/dist/a_chunks/.root19.js +119 -403
  13. package/dist/a_chunks/.root2.js +101 -73
  14. package/dist/a_chunks/.root20.js +74 -945
  15. package/dist/a_chunks/.root21.js +168 -202
  16. package/dist/a_chunks/.root22.js +677 -144
  17. package/dist/a_chunks/.root23.js +27 -956
  18. package/dist/a_chunks/.root24.js +126 -742
  19. package/dist/a_chunks/.root25.js +214 -265
  20. package/dist/a_chunks/.root26.js +391 -0
  21. package/dist/a_chunks/.root27.js +395 -0
  22. package/dist/a_chunks/.root28.js +948 -0
  23. package/dist/a_chunks/.root29.js +214 -0
  24. package/dist/a_chunks/.root3.js +56 -1044
  25. package/dist/a_chunks/.root30.js +130 -0
  26. package/dist/a_chunks/.root31.js +914 -0
  27. package/dist/a_chunks/.root32.js +860 -0
  28. package/dist/a_chunks/.root33.js +102 -0
  29. package/dist/a_chunks/.root34.js +157 -0
  30. package/dist/a_chunks/.root4.js +1004 -581
  31. package/dist/a_chunks/.root5.js +610 -1414
  32. package/dist/a_chunks/.root6.js +1399 -155
  33. package/dist/a_chunks/.root7.js +151 -123
  34. package/dist/a_chunks/.root8.js +82 -504
  35. package/dist/a_chunks/.root9.js +97 -60
  36. package/dist/a_chunks/data.js +572 -0
  37. package/dist/a_chunks/func.js +86 -0
  38. package/dist/a_chunks/index.js +942 -265
  39. package/dist/a_chunks/use_fetus.js +138 -0
  40. package/dist/a_chunks/utils.js +100 -0
  41. package/dist/a_chunks/utils2.js +36 -0
  42. package/dist/block//346/243/200/351/252/214/346/243/200/346/237/245/Inner.d.ts +1 -0
  43. package/dist/components/BF_Form/Wrap.d.ts +2 -2
  44. package/dist/components/BF_Form/index.d.ts +4 -2
  45. package/dist/components/BF_Form/types.d.ts +7 -0
  46. package/dist/components/BF_Form/use_table_config.d.ts +1 -5
  47. package/dist/components/Base_List/Helper.d.ts +0 -5
  48. package/dist/components/Base_List/_MyBaseList.d.ts +1 -0
  49. package/dist/components/Base_List/index.d.ts +2 -1
  50. package/dist/components/Base_List/types.d.ts +6 -3
  51. package/dist/components/Base_List/use_MyBaseList.d.ts +10 -0
  52. package/dist/components/Base_List/utils.d.ts +11 -0
  53. package/dist/components/IdNOButton/index copy.d.ts +1 -1
  54. package/dist/components/Layout_Sider/Inner.d.ts +2 -4
  55. package/dist/components/Layout_Sider/index.d.ts +2 -2
  56. package/dist/components/Layout_Sider/utils.d.ts +13 -0
  57. package/dist/components/Layout_TabButton/Inner.d.ts +2 -10
  58. package/dist/components/Layout_TabButton/index.d.ts +3 -8
  59. package/dist/components/Layout_TabButton/types.d.ts +8 -0
  60. package/dist/components/Login/Inner.d.ts +0 -1
  61. package/dist/components/Login/index.d.ts +2 -1
  62. package/dist/components/MenuSearch/Inner.d.ts +6 -0
  63. package/dist/components/MenuSearch/index.d.ts +2 -0
  64. package/dist/components/QuickDocButton/index.d.ts +5 -1
  65. package/dist/components/doctor_end/HeaderInfo/FuckTag.d.ts +6 -0
  66. package/dist/components/doctor_end/HeaderInfo/index.d.ts +1 -0
  67. package/dist/components/doctor_end/HeaderInfo/types.d.ts +1 -3
  68. package/dist/components/doctor_end/HeaderInfo/use_headinfo_color.d.ts +8 -0
  69. package/dist/components/exception/index.d.ts +1 -0
  70. package/dist/components/index.d.ts +1 -0
  71. package/dist/curve/components/BmiCanvas/index.d.ts +11 -0
  72. package/dist/curve/components/FetusCanvas/FetuGrowsEdit.d.ts +7 -0
  73. package/dist/curve/components/FetusCanvas/config.d.ts +3 -0
  74. package/dist/curve/components/FetusCanvas/index.d.ts +4 -0
  75. package/dist/curve/components/FetusCanvas/requestMethods.d.ts +7 -0
  76. package/dist/curve/components/FetusCanvasNICHD/config.d.ts +3 -0
  77. package/dist/curve/components/FetusCanvasNICHD/data.d.ts +84 -0
  78. package/dist/curve/components/FetusCanvasNICHD/index.d.ts +4 -0
  79. package/dist/curve/components/Pregnogram/index.d.ts +11 -0
  80. package/dist/curve/components/api.d.ts +17 -0
  81. package/dist/curve/components-new/FetusCanvas/config.d.ts +2 -0
  82. package/dist/curve/components-new/FetusCanvas/requestMethods.d.ts +7 -0
  83. package/dist/curve/components-new/FetusCanvasNICHD/config.d.ts +2 -0
  84. package/dist/curve/components-new/FetusCanvasNICHD/data.d.ts +84 -0
  85. package/dist/curve/data.d.ts +125 -0
  86. package/dist/curve/func.d.ts +12 -0
  87. package/dist/curve/func.test.d.ts +1 -0
  88. package/dist/curve/index.d.ts +7 -0
  89. package/dist/curve/intro-steps.d.ts +7 -0
  90. package/dist/curve/utils.d.ts +8 -0
  91. package/dist/form_config/conceiveMode.d.ts +2 -0
  92. package/dist/form_config/index.d.ts +4 -0
  93. package/dist/form_config/mlUltrasounds.d.ts +2 -0
  94. package/dist/form_config/not_yes_input.d.ts +4 -0
  95. package/dist/form_config/pressure.d.ts +4 -0
  96. package/dist/hooks/index.d.ts +1 -0
  97. package/dist/index.d.ts +2 -0
  98. package/dist/index.js +8 -33
  99. package/dist/modals/entries/StupidTemplateModal2/index copy.d.ts +22 -0
  100. package/dist/modals/entries/StupidTemplateModal2/index.d.ts +1 -2
  101. package/dist/modals/entries/box/index.d.ts +6 -0
  102. package/dist/modals/entries/modal_form/index.d.ts +1 -1
  103. package/dist/modals/entries/result_template/index.d.ts +24 -0
  104. package/dist/modals/entries/template_modal3/components/TemplateSelect.d.ts +2 -1
  105. package/dist/modals/entries/template_modal3/index copy 2.d.ts +1 -1
  106. package/dist/modals/entries/template_modal3/index.d.ts +5 -3
  107. package/dist/modals/entries/text_search/index.d.ts +1 -1
  108. package/dist/modals/entries//344/271/231/350/202/235/347/256/241/347/220/206/index.d.ts +1 -1
  109. 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
  110. 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
  111. 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
  112. 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
  113. 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
  114. 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
  115. 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
  116. 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
  117. 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
  118. 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
  119. 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
  120. package/dist/modals/entries//351/253/230/345/215/261/351/232/217/350/256/277/form_config.d.ts +4 -2
  121. package/dist/modals/index.d.ts +2 -0
  122. package/dist/modals/meta.d.ts +2 -0
  123. package/dist/pages/doc_record/index.d.ts +1 -1
  124. package/dist/pages/index.d.ts +1 -0
  125. package/dist/pages/questionnaire/Inner.d.ts +4 -0
  126. package/dist/pages/questionnaire/Qn.d.ts +3 -0
  127. package/dist/pages/questionnaire/SelectButton.d.ts +4 -0
  128. package/dist/pages/questionnaire/create/Step2Right.d.ts +11 -0
  129. package/dist/pages/questionnaire/create/common.d.ts +46 -0
  130. package/dist/pages/questionnaire/create/fakeData.d.ts +6 -0
  131. package/dist/pages/questionnaire/create/question-item.d.ts +14 -0
  132. package/dist/pages/questionnaire/create/step1.d.ts +12 -0
  133. package/dist/pages/questionnaire/create/step2.d.ts +10 -0
  134. package/dist/pages/questionnaire/create/step3.d.ts +8 -0
  135. package/dist/pages/questionnaire/create/step4.d.ts +8 -0
  136. package/dist/pages/questionnaire/index.d.ts +3 -0
  137. package/dist/pages/questionnaire/types.d.ts +10 -0
  138. package/dist/utils/helper.d.ts +5 -0
  139. package/dist/utils/index.d.ts +2 -1
  140. package/package.json +34 -16
  141. package/dist/a_chunks/.root.js.map +0 -1
  142. package/dist/a_chunks/.root10.js.map +0 -1
  143. package/dist/a_chunks/.root11.js.map +0 -1
  144. package/dist/a_chunks/.root12.js.map +0 -1
  145. package/dist/a_chunks/.root13.js.map +0 -1
  146. package/dist/a_chunks/.root14.js.map +0 -1
  147. package/dist/a_chunks/.root15.js.map +0 -1
  148. package/dist/a_chunks/.root16.js.map +0 -1
  149. package/dist/a_chunks/.root17.js.map +0 -1
  150. package/dist/a_chunks/.root18.js.map +0 -1
  151. package/dist/a_chunks/.root19.js.map +0 -1
  152. package/dist/a_chunks/.root2.js.map +0 -1
  153. package/dist/a_chunks/.root20.js.map +0 -1
  154. package/dist/a_chunks/.root21.js.map +0 -1
  155. package/dist/a_chunks/.root22.js.map +0 -1
  156. package/dist/a_chunks/.root23.js.map +0 -1
  157. package/dist/a_chunks/.root24.js.map +0 -1
  158. package/dist/a_chunks/.root25.js.map +0 -1
  159. package/dist/a_chunks/.root3.js.map +0 -1
  160. package/dist/a_chunks/.root4.js.map +0 -1
  161. package/dist/a_chunks/.root5.js.map +0 -1
  162. package/dist/a_chunks/.root6.js.map +0 -1
  163. package/dist/a_chunks/.root7.js.map +0 -1
  164. package/dist/a_chunks/.root8.js.map +0 -1
  165. package/dist/a_chunks/.root9.js.map +0 -1
  166. package/dist/a_chunks/extends.js +0 -11
  167. package/dist/a_chunks/extends.js.map +0 -1
  168. package/dist/a_chunks/index.js.map +0 -1
  169. package/dist/components/BF_Form/use_table_config copy.d.ts +0 -13
  170. package/dist/index.js.map +0 -1
  171. package/dist/modals/entries/StupidTemplateModal2/methods/index.d.ts +0 -16
  172. package/dist/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/add-diagnoses/add-diagnoses.d.ts +0 -12
  173. 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,200 +1,259 @@
1
- import 'antd/es/modal/style';
2
- import _Modal from 'antd/es/modal';
3
- import 'antd/es/button/style';
4
- import _Button from 'antd/es/button';
5
- import { _ as _extends } from './extends.js';
6
- import 'antd/es/message/style';
7
- import _message from 'antd/es/message';
8
- import { s as styleInject, d as __rest, _ as __awaiter, a as __generator } from './index.js';
9
- import { FullscreenOutlined, CloseOutlined, ExportOutlined } from '@ant-design/icons';
10
- import { MyLazyComponent } from '@lm_fe/components_m';
11
- import { mchcLogger, mchcEnv, mchcRouterContainer__ } from '@lm_fe/env';
12
- import { getHappyConfig, sleep } from '@lm_fe/utils';
13
- import React, { useState, useRef, useEffect } from 'react';
14
- import 'antd/es/row/style';
15
- import 'antd/es/row';
16
- import 'antd/es/col/style';
17
- import 'antd/es/col';
18
- import 'antd/es/list/style';
19
- import 'antd/es/list';
20
- import 'antd/es/tooltip/style';
21
- import 'antd/es/tooltip';
22
- import 'lodash/get';
23
- import 'classnames';
24
- import 'antd/es/spin/style';
25
- import 'antd/es/spin';
26
- import '@lm_fe/components';
27
- import 'antd/es/form/style';
28
- import 'antd/es/form';
29
- import 'antd/es/result/style';
30
- import 'antd/es/result';
31
- import 'antd/es/menu/style';
32
- import 'antd/es/menu';
1
+ import { MyIcon } from '@lm_fe/components';
2
+ import { Space, Button, Modal } from 'antd';
3
+ import { get, forEach, set } from 'lodash';
4
+ import React, { useEffect } from 'react';
5
+ import ReactToPrint from 'react-to-print';
6
+ import { d as get_canvas_el, e as draw_info, s as setVerRules, f as setHorRules, p as printCanvas, j as judgeAreas, b as get_fetus_color, c as get_abnormal_color } from './func.js';
7
+ import { e as bpdData, f as flData, g as acData } from './data.js';
8
+ import { u as use_fetus, F as FetuGrowsEdit } from './use_fetus.js';
9
+ import { s as styleInject } from './index.js';
10
+ import '@lm_fe/components_m';
11
+ import '@lm_fe/env';
33
12
  import '@lm_fe/service';
34
- import 'antd/es/space/style';
35
- import 'antd/es/space';
36
- import 'lodash/keys';
37
- import 'antd/es/divider/style';
38
- import 'antd/es/divider';
39
- var css_248z = ".index-module_modal-page__qXgnT .ant-modal-header {\n display: none;\n}\n.index-module_modal-page__qXgnT .ant-modal-close {\n display: none;\n transition: all 0.6s;\n right: -40px;\n top: -40px;\n color: #fff;\n background: rgba(128, 128, 128, 0.8);\n border-radius: 50%;\n}\n.index-module_modal-page__qXgnT .ant-modal-close:hover {\n background: rgba(1, 1, 1, 0.9);\n}\n.index-module_modal-page__qXgnT .ant-modal-close-x {\n width: 36px;\n height: 36px;\n line-height: 36px;\n}\n.index-module_modal-page__qXgnT .index-module_btn-containner__ITl7O {\n position: fixed;\n right: 20px;\n top: 20px;\n}\n";
40
- var styles = {
41
- "modal-page": "index-module_modal-page__qXgnT",
42
- "btn-containner": "index-module_btn-containner__ITl7O"
43
- };
13
+ import '@lm_fe/utils';
14
+ import '@lm_fe/provoke';
15
+ import 'classnames';
16
+ var css_248z = ".fetus-wrapper {\n width: 660px;\n position: relative;\n}\n.fetus-wrapper .btn-wrapper {\n position: absolute;\n top: 80px;\n right: 50px;\n}\n.point-modal {\n width: 360px !important;\n}\n.point-modal .info-item {\n margin-right: 18px;\n}\n.point-modal .ant-modal-close-x {\n line-height: 40px;\n}\n.table-modal {\n width: 1000px !important;\n}\n.table-modal .ant-modal-body {\n padding: 0;\n}\n";
44
17
  styleInject(css_248z);
45
- function Modal_Page(_a) {
46
- var _this = this;
47
- var modal_data = _a.modal_data,
48
- close = _a.close,
49
- others = __rest(_a, ["modal_data", "close"]);
50
- var content = modal_data.content,
51
- iframe_url = modal_data.iframe_url,
52
- route_conf = modal_data.route_conf;
53
- var _b = useState(false);
54
- _b[0];
55
- var setVisible = _b[1];
56
- var el = useRef(null);
18
+ function FetusCanvas(props) {
19
+ var headerInfo = props.headerInfo;
20
+ props.id;
21
+ var isAllPregnancies = props.isAllPregnancies;
22
+ var _a = use_fetus(props),
23
+ sys_theme = _a.sys_theme,
24
+ line_color = _a.line_color,
25
+ font_color = _a.font_color,
26
+ imageRef = _a.imageRef,
27
+ pointData = _a.pointData,
28
+ isShowPointModal = _a.isShowPointModal,
29
+ set_isShowPointModal = _a.set_isShowPointModal,
30
+ getFetusData = _a.getFetusData,
31
+ formData = _a.formData;
57
32
  useEffect(function () {
58
- (function () {
59
- return __awaiter(_this, void 0, void 0, function () {
60
- return __generator(this, function (_a) {
61
- switch (_a.label) {
62
- case 0:
63
- return [4, sleep(.8)];
64
- case 1:
65
- _a.sent();
66
- setVisible(true);
67
- return [2];
68
- }
69
- });
70
- });
71
- })();
33
+ if (formData) drawFetusCanvas();
72
34
  return function () {};
73
- }, []);
74
- useEffect(function () {
75
- mchcLogger.log('moda_page', modal_data);
76
- if (route_conf === null || route_conf === void 0 ? void 0 : route_conf.url) {
77
- var happy_conf = getHappyConfig(route_conf.url);
78
- mchcEnv.push_global_cache('happy_conf', happy_conf || {
79
- usr1: 'unset'
80
- });
81
- }
82
- return function () {
83
- if (route_conf === null || route_conf === void 0 ? void 0 : route_conf.url) {
84
- mchcEnv.pop_global_cache('happy_conf');
35
+ }, [formData]);
36
+ function drawScaleLine(canvas, ctx, oringin, steps, data, point, color, shape, lineWidth) {
37
+ var _loop_1 = function _loop_1(i) {
38
+ ctx.beginPath();
39
+ ctx.setLineDash(shape);
40
+ ctx.lineWidth = lineWidth;
41
+ if (i < data.length - 1) {
42
+ ctx.moveTo(oringin[0] + steps[0] * data[i].x, oringin[1] - steps[1] * data[i].y);
43
+ ctx.lineTo(oringin[0] + steps[0] * data[i + 1].x, oringin[1] - steps[1] * data[i + 1].y);
44
+ }
45
+ ctx.strokeStyle = color;
46
+ ctx.stroke();
47
+ if (point[0]) {
48
+ ctx.beginPath();
49
+ ctx.setLineDash([]);
50
+ ctx.arc(oringin[0] + steps[0] * data[i].x, oringin[1] - steps[1] * data[i].y, 3, 0, 2 * Math.PI);
51
+ point[1] && (ctx.fillStyle = point[1]);
52
+ ctx.fill();
53
+ var that_1 = this_1;
54
+ canvas && canvas.addEventListener('click', function (e) {
55
+ var X = oringin[0] + steps[0] * data[i].x;
56
+ var Y = oringin[1] - steps[1] * data[i].y;
57
+ var obj = {
58
+ x: X,
59
+ y: Y,
60
+ r: 5
61
+ };
62
+ var x = e.pageX - canvas.getBoundingClientRect().left;
63
+ var y = e.pageY - canvas.getBoundingClientRect().top;
64
+ if (x > obj.x - obj.r && x < obj.x + obj.r && y > obj.y - obj.r && y < obj.y + obj.r) {
65
+ var obj_1 = {
66
+ x: data[i].gestationalWeek,
67
+ y: data[i].value,
68
+ line: point[2],
69
+ fetus: data[i].sort,
70
+ style: {
71
+ position: 'fixed',
72
+ top: e.pageY,
73
+ left: e.pageX
74
+ }
75
+ };
76
+ that_1.setState({
77
+ pointData: obj_1,
78
+ isShowPointModal: true
79
+ });
80
+ }
81
+ }, false);
85
82
  }
86
83
  };
87
- }, []);
88
- function fullscreen() {
89
- return __awaiter(this, void 0, void 0, function () {
90
- var _a, _b;
91
- return __generator(this, function (_c) {
92
- switch (_c.label) {
93
- case 0:
94
- _message.info('按 Esc 退出全屏');
95
- return [4, sleep(.6)];
96
- case 1:
97
- _c.sent();
98
- (_b = (_a = el.current) === null || _a === void 0 ? void 0 : _a.requestFullscreen) === null || _b === void 0 ? void 0 : _b.call(_a);
99
- return [2];
100
- }
101
- });
102
- });
84
+ var this_1 = this;
85
+ for (var i = 0; i < data.length; i++) {
86
+ _loop_1(i);
87
+ }
103
88
  }
104
- function render_content() {
105
- if (content) return content;
106
- if (route_conf) {
107
- var params = route_conf.params || {};
108
- var C = mchcRouterContainer__.get_addon_component(route_conf.url);
109
- if (!C) return /*#__PURE__*/React.createElement("div", {
110
- style: {
111
- textAlign: 'center',
112
- lineHeight: '48px',
113
- height: 48
114
- }
115
- }, route_conf.url, " \u8BE5\u9875\u9762\u4E0D\u652F\u6301\u5F39\u7A97\u8BBF\u95EE\uFF0C\u8BF7\u8FD4\u56DE\uFF01 ");
116
- return /*#__PURE__*/React.createElement(C, _extends({}, params, {
117
- is_modal: true
118
- }));
89
+ function setVertical(context, xCount, yCount, xStep, yStep, baseLeft, baseTop) {
90
+ context.strokeStyle = line_color;
91
+ for (var i = 0; i < xCount; i++) {
92
+ context.beginPath();
93
+ context.lineWidth = 1;
94
+ context.moveTo(baseLeft, baseTop + xStep * i);
95
+ context.lineTo(baseLeft + (yCount - 1) * yStep, baseTop + xStep * i);
96
+ context.textBaseline = 'middle';
97
+ context.fillStyle = font_color;
98
+ context.font = 'bold 12px normal';
99
+ if (i * 2 % 10 === 0) {
100
+ context.lineWidth = 2;
101
+ context.fillText(i * 2, baseLeft - 20, (xCount - 1) * xStep + baseTop - i * xStep);
102
+ }
103
+ context.stroke();
119
104
  }
120
- if (iframe_url) {
121
- return /*#__PURE__*/React.createElement("div", {
122
- style: {
123
- width: '100%',
124
- height: '100%',
125
- position: 'relative'
126
- }
127
- }, /*#__PURE__*/React.createElement("iframe", {
128
- width: "100%",
129
- height: "100%",
130
- style: {
131
- border: 'none',
132
- padding: 0,
133
- margin: 0
134
- },
135
- src: iframe_url
136
- }), /*#__PURE__*/React.createElement(_Button, {
137
- style: {
138
- position: 'absolute',
139
- right: 24,
140
- bottom: 24,
141
- boxShadow: '#444 4px 4px 12px 2px'
142
- },
143
- size: "large",
144
- type: "primary",
145
- shape: "circle",
146
- icon: /*#__PURE__*/React.createElement(ExportOutlined, null),
147
- onClick: function onClick() {
148
- return mchcEnv.open(iframe_url);
105
+ }
106
+ function setHorizontal(context, xCount, yCount, xStep, yStep, baseLeft, baseTop) {
107
+ for (var i = 0; i < yCount; i++) {
108
+ context.beginPath();
109
+ context.lineWidth = 1;
110
+ context.moveTo(yStep * i + baseLeft, baseTop);
111
+ context.lineTo(yStep * i + baseLeft, baseTop + xStep * (xCount - 1));
112
+ context.textAlign = 'center';
113
+ context.fillStyle = font_color;
114
+ context.font = 'bold 12px normal';
115
+ if (i % 5 === 0) {
116
+ context.lineWidth = 2;
117
+ context.fillText(i + 10, baseLeft + i * yStep, xStep * xCount + baseTop + 5);
118
+ }
119
+ context.stroke();
120
+ }
121
+ }
122
+ function drawFetusCanvas() {
123
+ var mlUltrasounds = get(formData, 'mlUltrasounds') || [];
124
+ var allBpdArr = [];
125
+ var allFlArr = [];
126
+ var allAcArr = [];
127
+ if (mlUltrasounds.length > 0) {
128
+ forEach(mlUltrasounds, function (item) {
129
+ var yunWeek = item.gestationalWeek;
130
+ if (yunWeek && yunWeek.indexOf('+') !== -1) {
131
+ var arr = yunWeek.split('+');
132
+ yunWeek = Number(arr[0]) + Number(arr[1]) / 7;
149
133
  }
150
- }));
134
+ var setData = function setData(param, arr) {
135
+ var obj = {};
136
+ var sort = +item.fetal - 1;
137
+ obj.x = yunWeek - 10;
138
+ if (param === 'ac') {
139
+ obj.y = Number(item[param]) / 10;
140
+ } else {
141
+ obj.y = Number(item[param]);
142
+ }
143
+ obj.value = Number(item[param]);
144
+ obj.gestationalWeek = item.gestationalWeek;
145
+ obj.sort = item.fetal;
146
+ if (yunWeek && item[param] && yunWeek >= 10 && yunWeek <= 40 && obj.y <= 110) {
147
+ var arrItem = get(arr, sort) || [];
148
+ arrItem.push(obj);
149
+ set(arr, sort, arrItem);
150
+ }
151
+ };
152
+ setData('bpd', allBpdArr);
153
+ setData('fl', allFlArr);
154
+ setData('ac', allAcArr);
155
+ });
151
156
  }
152
- return /*#__PURE__*/React.createElement("div", {
153
- style: {
154
- textAlign: 'center',
155
- lineHeight: '48px',
156
- height: 48
157
- }
158
- }, "\u8BF7\u8BBE\u7F6E content\u3001route_conf \u6216\u8005 iframe_url");
157
+ var canvas = get_canvas_el('fetus-canvas', sys_theme);
158
+ var context = canvas.getContext('2d');
159
+ if (!context) return;
160
+ canvas.width = 660;
161
+ canvas.height = 710;
162
+ var baseLeft = 50;
163
+ var baseTop = 120;
164
+ var xStep = 10;
165
+ var yStep = 17;
166
+ var xCount = 56;
167
+ var yCount = 31;
168
+ context.fillStyle = font_color;
169
+ context.font = 'bold 16px normal';
170
+ context.textAlign = 'center';
171
+ context.fillText("".concat(draw_info(headerInfo)), canvas.width / 2, baseTop - 60);
172
+ context.fillText('胎儿生长曲线', canvas.width / 2, baseTop - 25);
173
+ setVertical(context, xCount, yCount, xStep, yStep, baseLeft, baseTop);
174
+ setHorizontal(context, xCount, yCount, xStep, yStep, baseLeft, baseTop);
175
+ setVerRules(context, [baseLeft, baseTop + (xCount - 1) * xStep], (yCount - 1) * yStep, line_color, 1, yStep, 5);
176
+ setHorRules(context, [baseLeft, baseTop + (xCount - 1) * xStep], (xCount - 1) * xStep, line_color, 1, xStep, 5);
177
+ context.fillText('+2SD', baseLeft + yCount * yStep, baseTop + 4.2 * xStep);
178
+ context.fillText('Mean', baseLeft + yCount * yStep, baseTop + 8 * xStep);
179
+ context.fillText('-2SD', baseLeft + yCount * yStep, baseTop + 11.5 * xStep);
180
+ context.fillText('+2SD', baseLeft + yCount * yStep, baseTop + 16.5 * xStep);
181
+ context.fillText('Mean', baseLeft + yCount * yStep, baseTop + 19 * xStep);
182
+ context.fillText('-2SD', baseLeft + yCount * yStep, baseTop + 21.5 * xStep);
183
+ context.fillText('37', baseLeft + yCount * yStep, baseTop + 36.5 * xStep);
184
+ context.fillText('34', baseLeft + yCount * yStep, baseTop + 38 * xStep);
185
+ context.fillText('31', baseLeft + yCount * yStep, baseTop + 39.5 * xStep);
186
+ context.font = 'bold 18px normal';
187
+ context.textAlign = 'center';
188
+ context.fillText('BPD', baseLeft + (yCount - 6) * yStep, baseTop + 6 * xStep);
189
+ context.fillText('FL', baseLeft + (yCount - 6) * yStep, baseTop + 28 * xStep);
190
+ context.fillText('AC', baseLeft + (yCount - 6) * yStep, baseTop + 44 * xStep);
191
+ var middleLineArr = [get(bpdData, 'middleLine'), get(flData, 'middleLine'), get(acData, 'middleLine')];
192
+ var endLineArr = [get(bpdData, 'bottomLine'), get(bpdData, 'topLine'), get(flData, 'bottomLine'), get(flData, 'topLine'), get(acData, 'bottomLine'), get(acData, 'topLine')];
193
+ forEach(middleLineArr, function (line) {
194
+ drawScaleLine(null, context, [baseLeft, baseTop + (xCount - 1) * xStep], [yStep, xStep / 2], line, [false], '#787878', [], 2);
195
+ });
196
+ forEach(endLineArr, function (line) {
197
+ drawScaleLine(null, context, [baseLeft, baseTop + (xCount - 1) * xStep], [yStep, xStep / 2], line, [false], '#787878', [8], 2);
198
+ });
199
+ var drawItemLine = function drawItemLine(itemArr, itemData, itemName) {
200
+ itemArr.forEach(function (child_data, child_idx) {
201
+ console.log('aax item', {
202
+ item: child_data,
203
+ itemName: itemName,
204
+ itemData: itemData,
205
+ child_idx: child_idx
206
+ });
207
+ if (child_data.length > 0) {
208
+ var color = judgeAreas(child_data[child_data.length - 1], get(itemData, 'lineArea')) ? get_fetus_color(sys_theme, child_idx) : get_abnormal_color(sys_theme);
209
+ drawScaleLine(canvas, context, [baseLeft, baseTop + (xCount - 1) * xStep], [yStep, xStep / 2], child_data, [true, color, itemName], color, [], 2);
210
+ }
211
+ });
212
+ };
213
+ drawItemLine(allBpdArr, bpdData, 'BPD');
214
+ drawItemLine(allFlArr, flData, 'FL');
215
+ drawItemLine(allAcArr, acData, 'AC');
216
+ imageRef.current = canvas === null || canvas === void 0 ? void 0 : canvas.toDataURL('image/jpg');
217
+ props.onLoad && props.onLoad();
159
218
  }
160
- var node = render_content();
161
- return /*#__PURE__*/React.createElement(_Modal, _extends({
162
- wrapClassName: styles['modal-page'],
163
- title: "\u9875\u97621",
164
- width: '90vw',
165
- footer: null,
166
- style: {
167
- top: '4px'
219
+ function renderPointModal() {
220
+ var handleCancel = function handleCancel() {
221
+ set_isShowPointModal(false);
222
+ };
223
+ return isShowPointModal && pointData ? (/*#__PURE__*/React.createElement(Modal, {
224
+ style: pointData.style,
225
+ className: "point-modal",
226
+ visible: isShowPointModal,
227
+ footer: null,
228
+ onCancel: handleCancel
229
+ }, /*#__PURE__*/React.createElement("span", {
230
+ className: "info-item"
231
+ }, "\u5B55\u5468\uFF1A", pointData.x), /*#__PURE__*/React.createElement("span", {
232
+ className: "info-item"
233
+ }, pointData.line, "\uFF1A", pointData.y), /*#__PURE__*/React.createElement("span", null, "\u80CE\u513F\u4FE1\u606F\uFF1A\u80CE\u513F", pointData.fetus))) : null;
234
+ }
235
+ return /*#__PURE__*/React.createElement("div", {
236
+ className: "fetus-wrapper"
237
+ }, !get(props, 'hidePrintBtn') && (/*#__PURE__*/React.createElement(Space, {
238
+ className: "btn-wrapper"
239
+ }, /*#__PURE__*/React.createElement(ReactToPrint, {
240
+ trigger: function trigger() {
241
+ return /*#__PURE__*/React.createElement(Button, {
242
+ type: "primary",
243
+ size: "small"
244
+ }, /*#__PURE__*/React.createElement(MyIcon, {
245
+ value: 'PrinterOutlined'
246
+ }), "\u6253\u5370");
168
247
  },
169
- destroyOnClose: true,
170
- bodyStyle: {
171
- height: '88vh',
172
- background: '#fff',
173
- padding: 0
174
- }
175
- }, others, {
176
- maskClosable: true
177
- }), /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(_Button.Group, {
178
- size: "large",
179
- className: styles['btn-containner']
180
- }, /*#__PURE__*/React.createElement(_Button, {
181
- title: "\u5168\u5C4F",
182
- icon: /*#__PURE__*/React.createElement(FullscreenOutlined, null),
183
- onClick: fullscreen
184
- }), /*#__PURE__*/React.createElement(_Button, {
185
- title: "\u5173\u95ED",
186
- icon: /*#__PURE__*/React.createElement(CloseOutlined, null),
187
- onClick: function onClick(e) {
188
- return close === null || close === void 0 ? void 0 : close(true);
189
- }
190
- })), /*#__PURE__*/React.createElement(MyLazyComponent, null, /*#__PURE__*/React.createElement("div", {
191
- ref: el,
192
- style: {
193
- background: '#fff',
194
- height: '100%',
195
- padding: 8
248
+ content: function content() {
249
+ return printCanvas('fetus-canvas');
196
250
  }
197
- }, node))));
251
+ }), !isAllPregnancies && (/*#__PURE__*/React.createElement(FetuGrowsEdit, {
252
+ value: formData,
253
+ onSubmit: getFetusData
254
+ })))), /*#__PURE__*/React.createElement("canvas", {
255
+ id: "fetus-canvas",
256
+ className: "fetus-canvas"
257
+ }, "\u60A8\u7684\u6D4F\u89C8\u5668\u4E0D\u652F\u6301canvas\uFF0C\u8BF7\u66F4\u6362\u6D4F\u89C8\u5668."), renderPointModal());
198
258
  }
199
- export { Modal_Page as default };
200
- //# sourceMappingURL=.root12.js.map
259
+ export { FetusCanvas as default };