@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,166 @@
1
+ import { MyIcon } from '@lm_fe/components';
2
+ import { use_provoke } from '@lm_fe/provoke';
3
+ import { Button } from 'antd';
4
+ import { get, cloneDeep, forEach } from 'lodash';
5
+ import React, { useRef, useEffect } from 'react';
6
+ import ReactToPrint from 'react-to-print';
7
+ import { g as get_line_color, a as get_text_color, j as judgeAreas, b as get_fetus_color, c as get_abnormal_color, d as get_canvas_el, e as draw_info, s as setVerRules, f as setHorRules, p as printCanvas } from './func.js';
8
+ import { h as fundalHeightData } from './data.js';
9
+ import { s as styleInject, g as curve_api } from './index.js';
10
+ import '@lm_fe/utils';
11
+ import 'classnames';
12
+ import '@lm_fe/components_m';
13
+ import '@lm_fe/env';
14
+ import '@lm_fe/service';
15
+ var css_248z = ".pregnogram-wrapper {\n width: 700px;\n position: relative;\n}\n.pregnogram-wrapper .print-btn {\n position: absolute;\n top: 102px;\n right: 100px;\n}\n";
16
+ styleInject(css_248z);
17
+ function Pregnogram(props) {
18
+ var sys_theme = use_provoke(function (s) {
19
+ return s.sys_theme;
20
+ });
21
+ var headerInfo = props.headerInfo,
22
+ id = props.id;
23
+ props.isAllPregnancies;
24
+ var pregnancyId = get(headerInfo, 'id') || id;
25
+ var line_color = get_line_color(sys_theme);
26
+ var font_color = get_text_color(sys_theme);
27
+ var fundalHeightList = useRef([]);
28
+ var imageRef = useRef();
29
+ useEffect(function () {
30
+ curve_api.curve.getFundalHeight(pregnancyId).then(function (res) {
31
+ fundalHeightList.current = get(res, 'items');
32
+ drawPregnogramCanvas();
33
+ });
34
+ return function () {};
35
+ }, []);
36
+ function drawPregnogramCanvas() {
37
+ var cloneList = cloneDeep(fundalHeightList.current);
38
+ cloneList.map(function (item) {
39
+ if (!item.fundalHeight || !item.week) {
40
+ item.fundalHeight = 0;
41
+ item.week = -1;
42
+ } else {
43
+ item.fundalHeight = Number(item.fundalHeight) - 12;
44
+ if (item.week.indexOf('+') !== -1) {
45
+ var arr = item.week.split('+');
46
+ item.week = Number(arr[0]) + Number(arr[1]) / 7;
47
+ }
48
+ item.week = item.week - 15;
49
+ }
50
+ });
51
+ cloneList = cloneList.filter(function (i) {
52
+ return i.week >= 0 && i.week <= 27 && i.fundalHeight >= 0 && i.fundalHeight <= 30;
53
+ });
54
+ cloneList.length > 0 && cloneList.map(function (item) {
55
+ item.x = item.week;
56
+ item.y = item.fundalHeight;
57
+ });
58
+ var unusualColor = cloneList.length > 0 && judgeAreas(cloneList[cloneList.length - 1], get(fundalHeightData, 'lineArea')) ? get_fetus_color(sys_theme, 0) : get_abnormal_color(sys_theme);
59
+ var canvas = get_canvas_el('pregnogram-canvas', sys_theme);
60
+ var context = canvas.getContext('2d');
61
+ if (!context) return;
62
+ canvas.width = 700;
63
+ canvas.height = 710;
64
+ var baseLeft = 60;
65
+ var baseTop = 190;
66
+ var xStep = 16;
67
+ var yStep = 20;
68
+ var xCount = 31;
69
+ var yCount = 28;
70
+ context.fillStyle = font_color;
71
+ context.font = 'bold 16px normal';
72
+ context.textAlign = 'center';
73
+ context.fillText("".concat(draw_info(headerInfo)), canvas.width / 2, baseTop - 120);
74
+ context.fillText('妊娠图', canvas.width / 2, baseTop - 80);
75
+ setVertical(context, xCount, yCount, xStep, yStep, baseLeft, baseTop);
76
+ setHorizontal(context, xCount, yCount, xStep, yStep, baseLeft, baseTop);
77
+ setVerRules(context, [baseLeft, baseTop + (xCount - 1) * xStep], (yCount - 1) * yStep, line_color, 1, yStep, 5);
78
+ setHorRules(context, [baseLeft, baseTop + (xCount - 1) * xStep], (xCount - 1) * xStep, line_color, 1, xStep, 5);
79
+ drawScaleLine(canvas, context, [baseLeft, baseTop + (xCount - 1) * xStep], [yStep, xStep], cloneList, [true, unusualColor], unusualColor, [], 2);
80
+ var solidLineArr = [get(fundalHeightData, 'topSolidLine'), get(fundalHeightData, 'bottomSolidLine')];
81
+ forEach(solidLineArr, function (line) {
82
+ drawScaleLine(canvas, context, [baseLeft, baseTop + (xCount - 1) * xStep], [yStep, xStep], line, [true, '#787878'], '#787878', [], 2);
83
+ });
84
+ var dashLineArr = [get(fundalHeightData, 'topDashLine'), get(fundalHeightData, 'bottomDashLine')];
85
+ forEach(dashLineArr, function (line) {
86
+ drawScaleLine(canvas, context, [baseLeft, baseTop + (xCount - 1) * xStep], [yStep, xStep], line, [true, '#787878'], '#787878', [8], 2);
87
+ });
88
+ imageRef.current = canvas === null || canvas === void 0 ? void 0 : canvas.toDataURL('image/jpg');
89
+ props.onLoad && props.onLoad();
90
+ }
91
+ function drawScaleLine(canvas, ctx, oringin, steps, data, point, color, shape, lineWidth) {
92
+ for (var i = 0; i < data.length; i++) {
93
+ ctx.beginPath();
94
+ ctx.setLineDash(shape);
95
+ ctx.lineWidth = lineWidth;
96
+ if (i < data.length - 1) {
97
+ ctx.moveTo(oringin[0] + steps[0] * data[i].x, oringin[1] - steps[1] * data[i].y);
98
+ ctx.lineTo(oringin[0] + steps[0] * data[i + 1].x, oringin[1] - steps[1] * data[i + 1].y);
99
+ }
100
+ ctx.strokeStyle = color;
101
+ ctx.stroke();
102
+ if (point[0]) {
103
+ ctx.beginPath();
104
+ ctx.setLineDash([]);
105
+ ctx.arc(oringin[0] + steps[0] * data[i].x, oringin[1] - steps[1] * data[i].y, 3, 0, 2 * Math.PI);
106
+ ctx.fillStyle = point[1];
107
+ ctx.fill();
108
+ }
109
+ }
110
+ }
111
+ function setVertical(context, xCount, yCount, xStep, yStep, baseLeft, baseTop) {
112
+ context.strokeStyle = line_color;
113
+ for (var i = 0; i < xCount; i++) {
114
+ context.beginPath();
115
+ context.lineWidth = 1;
116
+ context.moveTo(baseLeft, baseTop + xStep * i);
117
+ context.lineTo(baseLeft + (yCount - 1) * yStep, baseTop + xStep * i);
118
+ context.textBaseline = 'middle';
119
+ context.fillStyle = font_color;
120
+ context.font = 'bold 12px consolas';
121
+ if (i % 2 !== 0) {
122
+ context.fillText(i + 12, baseLeft - 20, (xCount - 1) * xStep + baseTop - i * xStep);
123
+ }
124
+ context.stroke();
125
+ }
126
+ context.font = 'bold 12px normal';
127
+ context.fillText('宫高(cm)', baseLeft - 20, baseTop - 20);
128
+ }
129
+ function setHorizontal(context, xCount, yCount, xStep, yStep, baseLeft, baseTop) {
130
+ for (var i = 0; i < yCount; i++) {
131
+ context.beginPath();
132
+ context.lineWidth = 1;
133
+ context.moveTo(yStep * i + baseLeft, baseTop);
134
+ context.lineTo(yStep * i + baseLeft, baseTop + xStep * (xCount - 1));
135
+ context.textAlign = 'center';
136
+ context.fillStyle = font_color;
137
+ context.font = 'bold 12px consolas';
138
+ if (i % 2 !== 0) {
139
+ context.fillText(i + 15, baseLeft + i * yStep, xStep * xCount + baseTop);
140
+ }
141
+ context.stroke();
142
+ }
143
+ context.font = 'bold 12px normal';
144
+ context.fillText('孕周(周)', yStep * yCount + baseLeft + 15, (xCount - 1) * xStep + baseTop);
145
+ }
146
+ return /*#__PURE__*/React.createElement("div", {
147
+ className: "pregnogram-wrapper"
148
+ }, !get(props, 'hidePrintBtn') && (/*#__PURE__*/React.createElement(ReactToPrint, {
149
+ trigger: function trigger() {
150
+ return /*#__PURE__*/React.createElement(Button, {
151
+ size: "small",
152
+ type: "primary",
153
+ className: "print-btn"
154
+ }, /*#__PURE__*/React.createElement(MyIcon, {
155
+ value: 'PrinterOutlined'
156
+ }), "\u6253\u5370");
157
+ },
158
+ content: function content() {
159
+ return printCanvas('pregnogram-canvas');
160
+ }
161
+ })), /*#__PURE__*/React.createElement("canvas", {
162
+ id: "pregnogram-canvas",
163
+ className: "pregnogram-canvas"
164
+ }, "\u60A8\u7684\u6D4F\u89C8\u5668\u4E0D\u652F\u6301canvas\uFF0C\u8BF7\u66F4\u6362\u6D4F\u89C8\u5668."));
165
+ }
166
+ export { Pregnogram as default };
@@ -0,0 +1,572 @@
1
+ import { set, get } from 'lodash';
2
+ import { h as getLineArea } from './func.js';
3
+ var bmiData1 = {
4
+ bmiIntro: '体重过轻,建议孕期体重增长目标:12.5-18kg',
5
+ bmiBottomLine: [{
6
+ x: 0,
7
+ y: 0
8
+ }, {
9
+ x: 12,
10
+ y: 1.5
11
+ }, {
12
+ x: 39,
13
+ y: 12.5
14
+ }],
15
+ bmiTopLine: [{
16
+ x: 0,
17
+ y: 0
18
+ }, {
19
+ x: 12,
20
+ y: 3
21
+ }, {
22
+ x: 39,
23
+ y: 18
24
+ }],
25
+ bmiLinesPoints: [{
26
+ x: 0,
27
+ y: 0
28
+ }, {
29
+ x: 12,
30
+ y: 1.5
31
+ }, {
32
+ x: 39,
33
+ y: 12.5
34
+ }, {
35
+ x: 39,
36
+ y: 18
37
+ }, {
38
+ x: 12,
39
+ y: 3
40
+ }, {
41
+ x: 0,
42
+ y: 0
43
+ }]
44
+ };
45
+ var bmiData2 = {
46
+ bmiIntro: '体重正常,建议增长体重增长目标11.5-16kg',
47
+ bmiBottomLine: [{
48
+ x: 0,
49
+ y: 0
50
+ }, {
51
+ x: 12,
52
+ y: 1.5
53
+ }, {
54
+ x: 39,
55
+ y: 11.5
56
+ }],
57
+ bmiTopLine: [{
58
+ x: 0,
59
+ y: 0
60
+ }, {
61
+ x: 12,
62
+ y: 3
63
+ }, {
64
+ x: 39,
65
+ y: 16
66
+ }],
67
+ bmiLinesPoints: [{
68
+ x: 0,
69
+ y: 0
70
+ }, {
71
+ x: 12,
72
+ y: 1.5
73
+ }, {
74
+ x: 39,
75
+ y: 11.5
76
+ }, {
77
+ x: 39,
78
+ y: 16
79
+ }, {
80
+ x: 12,
81
+ y: 3
82
+ }, {
83
+ x: 0,
84
+ y: 0
85
+ }]
86
+ };
87
+ var bmiData3 = {
88
+ bmiIntro: '体重超重,建议增长体重增长目标7-11.5kg',
89
+ bmiBottomLine: [{
90
+ x: 0,
91
+ y: 0
92
+ }, {
93
+ x: 12,
94
+ y: 1.5
95
+ }, {
96
+ x: 39,
97
+ y: 7
98
+ }],
99
+ bmiTopLine: [{
100
+ x: 0,
101
+ y: 0
102
+ }, {
103
+ x: 12,
104
+ y: 3
105
+ }, {
106
+ x: 39,
107
+ y: 11.5
108
+ }],
109
+ bmiLinesPoints: [{
110
+ x: 0,
111
+ y: 0
112
+ }, {
113
+ x: 12,
114
+ y: 1.5
115
+ }, {
116
+ x: 39,
117
+ y: 7
118
+ }, {
119
+ x: 39,
120
+ y: 11.5
121
+ }, {
122
+ x: 12,
123
+ y: 3
124
+ }, {
125
+ x: 0,
126
+ y: 0
127
+ }]
128
+ };
129
+ var bmiData4 = {
130
+ bmiIntro: '体重肥胖,建议增长体重增长目标5-9kg',
131
+ bmiBottomLine: [{
132
+ x: 0,
133
+ y: 0
134
+ }, {
135
+ x: 12,
136
+ y: 1.5
137
+ }, {
138
+ x: 39,
139
+ y: 5
140
+ }],
141
+ bmiTopLine: [{
142
+ x: 0,
143
+ y: 0
144
+ }, {
145
+ x: 12,
146
+ y: 3
147
+ }, {
148
+ x: 39,
149
+ y: 9
150
+ }],
151
+ bmiLinesPoints: [{
152
+ x: 0,
153
+ y: 0
154
+ }, {
155
+ x: 12,
156
+ y: 1.5
157
+ }, {
158
+ x: 39,
159
+ y: 5
160
+ }, {
161
+ x: 39,
162
+ y: 9
163
+ }, {
164
+ x: 12,
165
+ y: 3
166
+ }, {
167
+ x: 0,
168
+ y: 0
169
+ }]
170
+ };
171
+ var acData = {
172
+ lineArea: [],
173
+ bottomLine: [{
174
+ x: 5.5,
175
+ y: 8
176
+ }, {
177
+ x: 10,
178
+ y: 12.8
179
+ }, {
180
+ x: 15,
181
+ y: 18
182
+ }, {
183
+ x: 20,
184
+ y: 22.8
185
+ }, {
186
+ x: 25,
187
+ y: 27.2
188
+ }, {
189
+ x: 30,
190
+ y: 31
191
+ }],
192
+ middleLine: [{
193
+ x: 5.5,
194
+ y: 9.3
195
+ }, {
196
+ x: 10,
197
+ y: 14.4
198
+ }, {
199
+ x: 15,
200
+ y: 20
201
+ }, {
202
+ x: 20,
203
+ y: 25.2
204
+ }, {
205
+ x: 25,
206
+ y: 30
207
+ }, {
208
+ x: 30,
209
+ y: 34
210
+ }],
211
+ topLine: [{
212
+ x: 5.5,
213
+ y: 10.5
214
+ }, {
215
+ x: 10,
216
+ y: 15.8
217
+ }, {
218
+ x: 15,
219
+ y: 22
220
+ }, {
221
+ x: 20,
222
+ y: 27.7
223
+ }, {
224
+ x: 25,
225
+ y: 32.8
226
+ }, {
227
+ x: 30,
228
+ y: 37
229
+ }]
230
+ };
231
+ set(acData, 'lineArea', getLineArea(get(acData, 'bottomLine'), get(acData, 'topLine')));
232
+ var flData = {
233
+ lineArea: [],
234
+ bottomLine: [{
235
+ x: 2,
236
+ y: 2.5
237
+ }, {
238
+ x: 5.5,
239
+ y: 13.3
240
+ }, {
241
+ x: 10,
242
+ y: 26.4
243
+ }, {
244
+ x: 15,
245
+ y: 38.6
246
+ }, {
247
+ x: 20,
248
+ y: 49.5
249
+ }, {
250
+ x: 25,
251
+ y: 59.2
252
+ }, {
253
+ x: 30,
254
+ y: 67
255
+ }],
256
+ middleLine: [{
257
+ x: 2,
258
+ y: 6
259
+ }, {
260
+ x: 5.5,
261
+ y: 17.4
262
+ }, {
263
+ x: 10,
264
+ y: 30.7
265
+ }, {
266
+ x: 15,
267
+ y: 43
268
+ }, {
269
+ x: 20,
270
+ y: 54
271
+ }, {
272
+ x: 25,
273
+ y: 63.5
274
+ }, {
275
+ x: 30,
276
+ y: 72
277
+ }],
278
+ topLine: [{
279
+ x: 2,
280
+ y: 9
281
+ }, {
282
+ x: 5.5,
283
+ y: 20.7
284
+ }, {
285
+ x: 10,
286
+ y: 34
287
+ }, {
288
+ x: 15,
289
+ y: 47.5
290
+ }, {
291
+ x: 20,
292
+ y: 58.5
293
+ }, {
294
+ x: 25,
295
+ y: 68.8
296
+ }, {
297
+ x: 30,
298
+ y: 77
299
+ }]
300
+ };
301
+ set(flData, 'lineArea', getLineArea(get(flData, 'bottomLine'), get(flData, 'topLine')));
302
+ var bpdData = {
303
+ lineArea: [],
304
+ bottomLine: [{
305
+ x: 2,
306
+ y: 14.8
307
+ }, {
308
+ x: 5.5,
309
+ y: 26.7
310
+ }, {
311
+ x: 10,
312
+ y: 41.5
313
+ }, {
314
+ x: 15,
315
+ y: 56.5
316
+ }, {
317
+ x: 20,
318
+ y: 70
319
+ }, {
320
+ x: 25,
321
+ y: 80.8
322
+ }, {
323
+ x: 27.5,
324
+ y: 84.7
325
+ }, {
326
+ x: 30,
327
+ y: 87
328
+ }],
329
+ middleLine: [{
330
+ x: 2,
331
+ y: 20.5
332
+ }, {
333
+ x: 5.5,
334
+ y: 32.7
335
+ }, {
336
+ x: 10,
337
+ y: 47.5
338
+ }, {
339
+ x: 15,
340
+ y: 63
341
+ }, {
342
+ x: 20,
343
+ y: 76.7
344
+ }, {
345
+ x: 25,
346
+ y: 87.5
347
+ }, {
348
+ x: 27.5,
349
+ y: 91.7
350
+ }, {
351
+ x: 30,
352
+ y: 94
353
+ }],
354
+ topLine: [{
355
+ x: 2,
356
+ y: 25
357
+ }, {
358
+ x: 5.5,
359
+ y: 38
360
+ }, {
361
+ x: 10,
362
+ y: 53.5
363
+ }, {
364
+ x: 15,
365
+ y: 69.2
366
+ }, {
367
+ x: 20,
368
+ y: 82.5
369
+ }, {
370
+ x: 25,
371
+ y: 93.4
372
+ }, {
373
+ x: 27.5,
374
+ y: 97.6
375
+ }, {
376
+ x: 30,
377
+ y: 100.8
378
+ }]
379
+ };
380
+ set(bpdData, 'lineArea', getLineArea(get(bpdData, 'bottomLine'), get(bpdData, 'topLine')));
381
+ var fundalHeightData = {
382
+ lineArea: [],
383
+ topSolidLine: [{
384
+ x: 1,
385
+ y: 7
386
+ }, {
387
+ x: 2,
388
+ y: 8
389
+ }, {
390
+ x: 3,
391
+ y: 8
392
+ }, {
393
+ x: 5,
394
+ y: 10
395
+ }, {
396
+ x: 7,
397
+ y: 11.5
398
+ }, {
399
+ x: 9,
400
+ y: 13.5
401
+ }, {
402
+ x: 11,
403
+ y: 15
404
+ }, {
405
+ x: 13,
406
+ y: 16.5
407
+ }, {
408
+ x: 15,
409
+ y: 18
410
+ }, {
411
+ x: 17,
412
+ y: 19.5
413
+ }, {
414
+ x: 19,
415
+ y: 20.5
416
+ }, {
417
+ x: 21,
418
+ y: 21.5
419
+ }, {
420
+ x: 23,
421
+ y: 22.5
422
+ }, {
423
+ x: 25,
424
+ y: 23.5
425
+ }, {
426
+ x: 26,
427
+ y: 23
428
+ }, {
429
+ x: 27,
430
+ y: 23
431
+ }],
432
+ bottomSolidLine: [{
433
+ x: 1,
434
+ y: 0
435
+ }, {
436
+ x: 3,
437
+ y: 1
438
+ }, {
439
+ x: 5,
440
+ y: 3
441
+ }, {
442
+ x: 7,
443
+ y: 4.5
444
+ }, {
445
+ x: 9,
446
+ y: 6
447
+ }, {
448
+ x: 11,
449
+ y: 7
450
+ }, {
451
+ x: 13,
452
+ y: 8.5
453
+ }, {
454
+ x: 15,
455
+ y: 10.5
456
+ }, {
457
+ x: 17,
458
+ y: 12.5
459
+ }, {
460
+ x: 19,
461
+ y: 13.5
462
+ }, {
463
+ x: 21,
464
+ y: 15
465
+ }, {
466
+ x: 23,
467
+ y: 16
468
+ }, {
469
+ x: 25,
470
+ y: 17.5
471
+ }, {
472
+ x: 27,
473
+ y: 17
474
+ }],
475
+ topDashLine: [{
476
+ x: 1,
477
+ y: 5.5
478
+ }, {
479
+ x: 2,
480
+ y: 7
481
+ }, {
482
+ x: 3,
483
+ y: 7
484
+ }, {
485
+ x: 5,
486
+ y: 8.5
487
+ }, {
488
+ x: 7,
489
+ y: 10
490
+ }, {
491
+ x: 9,
492
+ y: 12
493
+ }, {
494
+ x: 11,
495
+ y: 13.5
496
+ }, {
497
+ x: 13,
498
+ y: 15
499
+ }, {
500
+ x: 15,
501
+ y: 16.5
502
+ }, {
503
+ x: 17,
504
+ y: 18.5
505
+ }, {
506
+ x: 19,
507
+ y: 19
508
+ }, {
509
+ x: 21,
510
+ y: 20.5
511
+ }, {
512
+ x: 23,
513
+ y: 21
514
+ }, {
515
+ x: 25,
516
+ y: 22.5
517
+ }, {
518
+ x: 26,
519
+ y: 22
520
+ }, {
521
+ x: 27,
522
+ y: 22
523
+ }],
524
+ bottomDashLine: [{
525
+ x: 1,
526
+ y: 1.5
527
+ }, {
528
+ x: 3,
529
+ y: 2.5
530
+ }, {
531
+ x: 5,
532
+ y: 4.5
533
+ }, {
534
+ x: 7,
535
+ y: 6
536
+ }, {
537
+ x: 9,
538
+ y: 7.5
539
+ }, {
540
+ x: 11,
541
+ y: 8.5
542
+ }, {
543
+ x: 13,
544
+ y: 10
545
+ }, {
546
+ x: 15,
547
+ y: 12.5
548
+ }, {
549
+ x: 17,
550
+ y: 14.5
551
+ }, {
552
+ x: 19,
553
+ y: 14.5
554
+ }, {
555
+ x: 21,
556
+ y: 16
557
+ }, {
558
+ x: 23,
559
+ y: 17.5
560
+ }, {
561
+ x: 25,
562
+ y: 18.5
563
+ }, {
564
+ x: 26,
565
+ y: 18
566
+ }, {
567
+ x: 27,
568
+ y: 17.5
569
+ }]
570
+ };
571
+ set(fundalHeightData, 'lineArea', getLineArea(get(fundalHeightData, 'bottomSolidLine'), get(fundalHeightData, 'topSolidLine')));
572
+ export { bmiData2 as a, bmiData1 as b, bmiData3 as c, bmiData4 as d, bpdData as e, flData as f, acData as g, fundalHeightData as h };