@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.
- package/README.md +0 -0
- package/dist/a_chunks/.root.js +1610 -222
- package/dist/a_chunks/.root10.js +494 -462
- package/dist/a_chunks/.root11.js +231 -159
- package/dist/a_chunks/.root12.js +245 -186
- package/dist/a_chunks/.root13.js +1898 -104
- package/dist/a_chunks/.root14.js +147 -716
- package/dist/a_chunks/.root15.js +27 -44
- package/dist/a_chunks/.root16.js +18 -168
- package/dist/a_chunks/.root17.js +20 -255
- package/dist/a_chunks/.root18.js +168 -385
- package/dist/a_chunks/.root19.js +119 -403
- package/dist/a_chunks/.root2.js +101 -73
- package/dist/a_chunks/.root20.js +74 -945
- package/dist/a_chunks/.root21.js +168 -202
- package/dist/a_chunks/.root22.js +677 -144
- package/dist/a_chunks/.root23.js +27 -956
- package/dist/a_chunks/.root24.js +126 -742
- package/dist/a_chunks/.root25.js +214 -265
- package/dist/a_chunks/.root26.js +391 -0
- package/dist/a_chunks/.root27.js +395 -0
- package/dist/a_chunks/.root28.js +948 -0
- package/dist/a_chunks/.root29.js +214 -0
- package/dist/a_chunks/.root3.js +56 -1044
- package/dist/a_chunks/.root30.js +130 -0
- package/dist/a_chunks/.root31.js +914 -0
- package/dist/a_chunks/.root32.js +860 -0
- package/dist/a_chunks/.root33.js +102 -0
- package/dist/a_chunks/.root34.js +157 -0
- package/dist/a_chunks/.root4.js +1004 -581
- package/dist/a_chunks/.root5.js +610 -1414
- package/dist/a_chunks/.root6.js +1399 -155
- package/dist/a_chunks/.root7.js +151 -123
- package/dist/a_chunks/.root8.js +82 -504
- package/dist/a_chunks/.root9.js +97 -60
- package/dist/a_chunks/data.js +572 -0
- package/dist/a_chunks/func.js +86 -0
- package/dist/a_chunks/index.js +942 -265
- package/dist/a_chunks/use_fetus.js +138 -0
- package/dist/a_chunks/utils.js +100 -0
- package/dist/a_chunks/utils2.js +36 -0
- package/dist/block//346/243/200/351/252/214/346/243/200/346/237/245/Inner.d.ts +1 -0
- package/dist/components/BF_Form/Wrap.d.ts +2 -2
- package/dist/components/BF_Form/index.d.ts +4 -2
- package/dist/components/BF_Form/types.d.ts +7 -0
- package/dist/components/BF_Form/use_table_config.d.ts +1 -5
- package/dist/components/Base_List/Helper.d.ts +0 -5
- package/dist/components/Base_List/_MyBaseList.d.ts +1 -0
- package/dist/components/Base_List/index.d.ts +2 -1
- package/dist/components/Base_List/types.d.ts +6 -3
- package/dist/components/Base_List/use_MyBaseList.d.ts +10 -0
- package/dist/components/Base_List/utils.d.ts +11 -0
- package/dist/components/IdNOButton/index copy.d.ts +1 -1
- package/dist/components/Layout_Sider/Inner.d.ts +2 -4
- package/dist/components/Layout_Sider/index.d.ts +2 -2
- package/dist/components/Layout_Sider/utils.d.ts +13 -0
- package/dist/components/Layout_TabButton/Inner.d.ts +2 -10
- package/dist/components/Layout_TabButton/index.d.ts +3 -8
- package/dist/components/Layout_TabButton/types.d.ts +8 -0
- package/dist/components/Login/Inner.d.ts +0 -1
- package/dist/components/Login/index.d.ts +2 -1
- package/dist/components/MenuSearch/Inner.d.ts +6 -0
- package/dist/components/MenuSearch/index.d.ts +2 -0
- package/dist/components/QuickDocButton/index.d.ts +5 -1
- package/dist/components/doctor_end/HeaderInfo/FuckTag.d.ts +6 -0
- package/dist/components/doctor_end/HeaderInfo/index.d.ts +1 -0
- package/dist/components/doctor_end/HeaderInfo/types.d.ts +1 -3
- package/dist/components/doctor_end/HeaderInfo/use_headinfo_color.d.ts +8 -0
- package/dist/components/exception/index.d.ts +1 -0
- package/dist/components/index.d.ts +1 -0
- package/dist/curve/components/BmiCanvas/index.d.ts +11 -0
- package/dist/curve/components/FetusCanvas/FetuGrowsEdit.d.ts +7 -0
- package/dist/curve/components/FetusCanvas/config.d.ts +3 -0
- package/dist/curve/components/FetusCanvas/index.d.ts +4 -0
- package/dist/curve/components/FetusCanvas/requestMethods.d.ts +7 -0
- package/dist/curve/components/FetusCanvasNICHD/config.d.ts +3 -0
- package/dist/curve/components/FetusCanvasNICHD/data.d.ts +84 -0
- package/dist/curve/components/FetusCanvasNICHD/index.d.ts +4 -0
- package/dist/curve/components/Pregnogram/index.d.ts +11 -0
- package/dist/curve/components/api.d.ts +17 -0
- package/dist/curve/components-new/FetusCanvas/config.d.ts +2 -0
- package/dist/curve/components-new/FetusCanvas/requestMethods.d.ts +7 -0
- package/dist/curve/components-new/FetusCanvasNICHD/config.d.ts +2 -0
- package/dist/curve/components-new/FetusCanvasNICHD/data.d.ts +84 -0
- package/dist/curve/data.d.ts +125 -0
- package/dist/curve/func.d.ts +12 -0
- package/dist/curve/func.test.d.ts +1 -0
- package/dist/curve/index.d.ts +7 -0
- package/dist/curve/intro-steps.d.ts +7 -0
- package/dist/curve/utils.d.ts +8 -0
- package/dist/form_config/conceiveMode.d.ts +2 -0
- package/dist/form_config/index.d.ts +4 -0
- package/dist/form_config/mlUltrasounds.d.ts +2 -0
- package/dist/form_config/not_yes_input.d.ts +4 -0
- package/dist/form_config/pressure.d.ts +4 -0
- package/dist/hooks/index.d.ts +1 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.js +8 -33
- package/dist/modals/entries/StupidTemplateModal2/index copy.d.ts +22 -0
- package/dist/modals/entries/StupidTemplateModal2/index.d.ts +1 -2
- package/dist/modals/entries/box/index.d.ts +6 -0
- package/dist/modals/entries/modal_form/index.d.ts +1 -1
- package/dist/modals/entries/result_template/index.d.ts +24 -0
- package/dist/modals/entries/template_modal3/components/TemplateSelect.d.ts +2 -1
- package/dist/modals/entries/template_modal3/index copy 2.d.ts +1 -1
- package/dist/modals/entries/template_modal3/index.d.ts +5 -3
- package/dist/modals/entries/text_search/index.d.ts +1 -1
- package/dist/modals/entries//344/271/231/350/202/235/347/256/241/347/220/206/index.d.ts +1 -1
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- package/dist/modals/entries//351/253/230/345/215/261/351/232/217/350/256/277/form_config.d.ts +4 -2
- package/dist/modals/index.d.ts +2 -0
- package/dist/modals/meta.d.ts +2 -0
- package/dist/pages/doc_record/index.d.ts +1 -1
- package/dist/pages/index.d.ts +1 -0
- package/dist/pages/questionnaire/Inner.d.ts +4 -0
- package/dist/pages/questionnaire/Qn.d.ts +3 -0
- package/dist/pages/questionnaire/SelectButton.d.ts +4 -0
- package/dist/pages/questionnaire/create/Step2Right.d.ts +11 -0
- package/dist/pages/questionnaire/create/common.d.ts +46 -0
- package/dist/pages/questionnaire/create/fakeData.d.ts +6 -0
- package/dist/pages/questionnaire/create/question-item.d.ts +14 -0
- package/dist/pages/questionnaire/create/step1.d.ts +12 -0
- package/dist/pages/questionnaire/create/step2.d.ts +10 -0
- package/dist/pages/questionnaire/create/step3.d.ts +8 -0
- package/dist/pages/questionnaire/create/step4.d.ts +8 -0
- package/dist/pages/questionnaire/index.d.ts +3 -0
- package/dist/pages/questionnaire/types.d.ts +10 -0
- package/dist/utils/helper.d.ts +5 -0
- package/dist/utils/index.d.ts +2 -1
- package/package.json +34 -16
- package/dist/a_chunks/.root.js.map +0 -1
- package/dist/a_chunks/.root10.js.map +0 -1
- package/dist/a_chunks/.root11.js.map +0 -1
- package/dist/a_chunks/.root12.js.map +0 -1
- package/dist/a_chunks/.root13.js.map +0 -1
- package/dist/a_chunks/.root14.js.map +0 -1
- package/dist/a_chunks/.root15.js.map +0 -1
- package/dist/a_chunks/.root16.js.map +0 -1
- package/dist/a_chunks/.root17.js.map +0 -1
- package/dist/a_chunks/.root18.js.map +0 -1
- package/dist/a_chunks/.root19.js.map +0 -1
- package/dist/a_chunks/.root2.js.map +0 -1
- package/dist/a_chunks/.root20.js.map +0 -1
- package/dist/a_chunks/.root21.js.map +0 -1
- package/dist/a_chunks/.root22.js.map +0 -1
- package/dist/a_chunks/.root23.js.map +0 -1
- package/dist/a_chunks/.root24.js.map +0 -1
- package/dist/a_chunks/.root25.js.map +0 -1
- package/dist/a_chunks/.root3.js.map +0 -1
- package/dist/a_chunks/.root4.js.map +0 -1
- package/dist/a_chunks/.root5.js.map +0 -1
- package/dist/a_chunks/.root6.js.map +0 -1
- package/dist/a_chunks/.root7.js.map +0 -1
- package/dist/a_chunks/.root8.js.map +0 -1
- package/dist/a_chunks/.root9.js.map +0 -1
- package/dist/a_chunks/extends.js +0 -11
- package/dist/a_chunks/extends.js.map +0 -1
- package/dist/a_chunks/index.js.map +0 -1
- package/dist/components/BF_Form/use_table_config copy.d.ts +0 -13
- package/dist/index.js.map +0 -1
- package/dist/modals/entries/StupidTemplateModal2/methods/index.d.ts +0 -16
- 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
- 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
package/dist/a_chunks/.root12.js
CHANGED
|
@@ -1,200 +1,259 @@
|
|
|
1
|
-
import '
|
|
2
|
-
import
|
|
3
|
-
import '
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import '
|
|
7
|
-
import
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import
|
|
11
|
-
import
|
|
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 '
|
|
35
|
-
import '
|
|
36
|
-
import '
|
|
37
|
-
|
|
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
|
|
46
|
-
var
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
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
|
-
(
|
|
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
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
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
|
-
|
|
89
|
-
|
|
90
|
-
|
|
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
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
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
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
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
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
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
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
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
|
-
|
|
170
|
-
|
|
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
|
-
},
|
|
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 {
|
|
200
|
-
//# sourceMappingURL=.root12.js.map
|
|
259
|
+
export { FetusCanvas as default };
|