@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/.root11.js
CHANGED
|
@@ -1,170 +1,242 @@
|
|
|
1
|
-
import '
|
|
2
|
-
import
|
|
3
|
-
import {
|
|
4
|
-
import 'antd
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
import
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import
|
|
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';
|
|
21
|
-
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';
|
|
1
|
+
import { s as styleInject, b as __awaiter, c as __generator, g as curve_api } from './index.js';
|
|
2
|
+
import { MyIcon } from '@lm_fe/components';
|
|
3
|
+
import { use_provoke } from '@lm_fe/provoke';
|
|
4
|
+
import { Radio, Button } from 'antd';
|
|
5
|
+
import { get, cloneDeep, forEach } from 'lodash';
|
|
6
|
+
import React, { useRef, useEffect } from 'react';
|
|
7
|
+
import ReactToPrint from 'react-to-print';
|
|
8
|
+
import { g as get_line_color, a as get_text_color, p as printCanvas, 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 } from './func.js';
|
|
9
|
+
import { b as bmiData1, a as bmiData2, c as bmiData3, d as bmiData4 } from './data.js';
|
|
10
|
+
import '@lm_fe/utils';
|
|
26
11
|
import 'classnames';
|
|
27
|
-
import '
|
|
28
|
-
import '
|
|
29
|
-
import '
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
disableAll = modal_data.disableAll,
|
|
61
|
-
_g = modal_data.modalFormSize,
|
|
62
|
-
modalFormSize = _g === void 0 ? 'middle' : _g;
|
|
63
|
-
var _form = _Form.useForm()[0];
|
|
64
|
-
var form = (_b = modal_data.form) !== null && _b !== void 0 ? _b : _form;
|
|
65
|
-
var _h = useState({}),
|
|
66
|
-
data = _h[0],
|
|
67
|
-
setData = _h[1];
|
|
68
|
-
var _j = BF_Wrap2({
|
|
69
|
-
default_conf: {
|
|
70
|
-
title: bf_title,
|
|
71
|
-
tableColumns: formDescriptions
|
|
72
|
-
}
|
|
73
|
-
}),
|
|
74
|
-
Wrap = _j.Wrap,
|
|
75
|
-
config = _j.config;
|
|
76
|
-
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);
|
|
83
|
-
});
|
|
84
|
-
return function () {};
|
|
85
|
-
}, []);
|
|
12
|
+
import '@lm_fe/components_m';
|
|
13
|
+
import '@lm_fe/env';
|
|
14
|
+
import '@lm_fe/service';
|
|
15
|
+
var css_248z = ".bmi-wrapper {\n width: 700px;\n position: relative;\n}\n.bmi-wrapper .bmi-radio {\n position: absolute;\n top: 16px;\n left: 45px;\n}\n.bmi-wrapper .print-btn {\n position: absolute;\n top: 102px;\n right: 52px;\n}\n";
|
|
16
|
+
styleInject(css_248z);
|
|
17
|
+
var recordOptions = [{
|
|
18
|
+
label: '全部',
|
|
19
|
+
value: 0
|
|
20
|
+
}, {
|
|
21
|
+
label: '产检记录',
|
|
22
|
+
value: 1
|
|
23
|
+
}, {
|
|
24
|
+
label: '居家记录',
|
|
25
|
+
value: 2
|
|
26
|
+
}];
|
|
27
|
+
function BmiCanvas(props) {
|
|
28
|
+
var _a;
|
|
29
|
+
var _b = use_provoke('sys_theme', 'config'),
|
|
30
|
+
sys_theme = _b.sys_theme,
|
|
31
|
+
config = _b.config;
|
|
32
|
+
var headerInfo = props.headerInfo,
|
|
33
|
+
id = props.id;
|
|
34
|
+
props.isAllPregnancies;
|
|
35
|
+
var line_color = get_line_color(sys_theme);
|
|
36
|
+
var font_color = get_text_color(sys_theme);
|
|
37
|
+
get(headerInfo, "id") || id;
|
|
38
|
+
var imageRef = useRef();
|
|
39
|
+
var bmi_Data = useRef(bmiData1);
|
|
40
|
+
var bmiNum = useRef('');
|
|
41
|
+
var bmiTz = useRef('');
|
|
42
|
+
var bmiList = useRef([]);
|
|
43
|
+
var resdata = useRef({});
|
|
44
|
+
var default_type = (_a = config.医生端_BMI曲线类型) !== null && _a !== void 0 ? _a : 0;
|
|
86
45
|
useEffect(function () {
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
var res = e.data;
|
|
90
|
-
form.setFieldsValue({
|
|
91
|
-
idNO: res.idNO,
|
|
92
|
-
name: res.name
|
|
93
|
-
});
|
|
94
|
-
}
|
|
46
|
+
getResData().then(function () {
|
|
47
|
+
ste_data_and_draw(default_type);
|
|
95
48
|
});
|
|
96
49
|
}, []);
|
|
97
|
-
function
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
50
|
+
function getResData() {
|
|
51
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
52
|
+
var pregnancyId, res0, res1, res2;
|
|
53
|
+
return __generator(this, function (_a) {
|
|
54
|
+
switch (_a.label) {
|
|
55
|
+
case 0:
|
|
56
|
+
pregnancyId = get(headerInfo, 'id') || id;
|
|
57
|
+
return [4, curve_api.curve.getBmi(pregnancyId, 0)];
|
|
58
|
+
case 1:
|
|
59
|
+
res0 = _a.sent();
|
|
60
|
+
return [4, curve_api.curve.getBmi(pregnancyId, 1)];
|
|
61
|
+
case 2:
|
|
62
|
+
res1 = _a.sent();
|
|
63
|
+
return [4, curve_api.curve.getBmi(pregnancyId, 2)];
|
|
64
|
+
case 3:
|
|
65
|
+
res2 = _a.sent();
|
|
66
|
+
resdata.current = {
|
|
67
|
+
0: res0,
|
|
68
|
+
1: res1,
|
|
69
|
+
2: res2
|
|
70
|
+
};
|
|
71
|
+
return [2];
|
|
72
|
+
}
|
|
73
|
+
});
|
|
111
74
|
});
|
|
112
75
|
}
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
case 1:
|
|
133
|
-
a = _a.sent();
|
|
134
|
-
if (!a) return [2];
|
|
135
|
-
_onOk === null || _onOk === void 0 ? void 0 : _onOk(e);
|
|
136
|
-
return [2];
|
|
137
|
-
}
|
|
138
|
-
});
|
|
139
|
-
});
|
|
140
|
-
})["catch"](function (error) {
|
|
141
|
-
console.error('modal_form 发生错误', error);
|
|
76
|
+
function ste_data_and_draw(type) {
|
|
77
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
78
|
+
var res;
|
|
79
|
+
return __generator(this, function (_a) {
|
|
80
|
+
res = get(resdata.current, "".concat(type));
|
|
81
|
+
if (get(res, 'preBmi') < 18.5) {
|
|
82
|
+
bmi_Data.current = bmiData1;
|
|
83
|
+
} else if (get(res, 'preBmi') < 25) {
|
|
84
|
+
bmi_Data.current = bmiData2;
|
|
85
|
+
} else if (get(res, 'preBmi') < 30) {
|
|
86
|
+
bmi_Data.current = bmiData3;
|
|
87
|
+
} else if (get(res, 'preBmi') >= 30) {
|
|
88
|
+
bmi_Data.current = bmiData4;
|
|
89
|
+
}
|
|
90
|
+
bmiNum.current = get(res, 'preBmi');
|
|
91
|
+
bmiTz.current = get(res, 'weight');
|
|
92
|
+
bmiList.current = get(res, 'items');
|
|
93
|
+
drawBmiCanvas();
|
|
94
|
+
return [2];
|
|
142
95
|
});
|
|
96
|
+
});
|
|
97
|
+
}
|
|
98
|
+
function handleRadioChange(e) {
|
|
99
|
+
ste_data_and_draw(e.target.value);
|
|
100
|
+
}
|
|
101
|
+
function drawScaleLine(canvas, ctx, oringin, steps, data, point, color, shape, lineWidth) {
|
|
102
|
+
for (var i = 0; i < data.length; i++) {
|
|
103
|
+
ctx.beginPath();
|
|
104
|
+
ctx.setLineDash(shape);
|
|
105
|
+
ctx.lineWidth = lineWidth;
|
|
106
|
+
if (i < data.length - 1) {
|
|
107
|
+
ctx.moveTo(oringin[0] + steps[0] * data[i].x, oringin[1] - steps[1] * data[i].y);
|
|
108
|
+
ctx.lineTo(oringin[0] + steps[0] * data[i + 1].x, oringin[1] - steps[1] * data[i + 1].y);
|
|
109
|
+
}
|
|
110
|
+
ctx.strokeStyle = color;
|
|
111
|
+
ctx.stroke();
|
|
112
|
+
if (point[0]) {
|
|
113
|
+
ctx.beginPath();
|
|
114
|
+
ctx.setLineDash([]);
|
|
115
|
+
ctx.arc(oringin[0] + steps[0] * data[i].x, oringin[1] - steps[1] * data[i].y, 3, 0, 2 * Math.PI);
|
|
116
|
+
ctx.fillStyle = point[1];
|
|
117
|
+
ctx.fill();
|
|
118
|
+
}
|
|
143
119
|
}
|
|
144
|
-
}
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
120
|
+
}
|
|
121
|
+
function setVertical(context, xCount, yCount, xStep, yStep, baseLeft, baseTop) {
|
|
122
|
+
context.strokeStyle = line_color;
|
|
123
|
+
for (var i = 0; i < xCount; i++) {
|
|
124
|
+
context.beginPath();
|
|
125
|
+
context.lineWidth = 1;
|
|
126
|
+
context.moveTo(baseLeft, baseTop + xStep * i);
|
|
127
|
+
context.lineTo(baseLeft + (yCount - 1) * yStep, baseTop + xStep * i);
|
|
128
|
+
context.textBaseline = 'middle';
|
|
129
|
+
context.fillStyle = font_color;
|
|
130
|
+
context.font = 'bold 12px consolas';
|
|
131
|
+
context.fillText(i * 2 + -8, baseLeft - 20, (xCount - 1) * xStep + baseTop - i * xStep);
|
|
132
|
+
context.stroke();
|
|
133
|
+
}
|
|
134
|
+
context.font = 'bold 12px normal';
|
|
135
|
+
context.fillText('体重增长(kg)', baseLeft - 20, baseTop - 20);
|
|
136
|
+
}
|
|
137
|
+
function setHorizontal(context, xCount, yCount, xStep, yStep, baseLeft, baseTop) {
|
|
138
|
+
var count = 0;
|
|
139
|
+
for (var i = 0; i < yCount; i++) {
|
|
140
|
+
count++;
|
|
141
|
+
context.beginPath();
|
|
142
|
+
context.lineWidth = 1;
|
|
143
|
+
context.moveTo(yStep * i + baseLeft, baseTop);
|
|
144
|
+
context.lineTo(yStep * i + baseLeft, baseTop + xStep * (xCount - 1));
|
|
145
|
+
context.textAlign = 'center';
|
|
146
|
+
context.fillStyle = font_color;
|
|
147
|
+
context.font = 'bold 12px consolas';
|
|
148
|
+
if (count === 1 || count === 4) {
|
|
149
|
+
count = count === 4 ? 1 : count;
|
|
150
|
+
context.fillText(i + 1, baseLeft + i * yStep, xStep * xCount + baseTop - 15);
|
|
151
|
+
}
|
|
152
|
+
context.stroke();
|
|
153
|
+
}
|
|
154
|
+
context.font = 'bold 12px normal';
|
|
155
|
+
context.fillText('孕周(周)', yStep * yCount + baseLeft + 15, (xCount - 1) * xStep + baseTop);
|
|
156
|
+
}
|
|
157
|
+
function drawBmiCanvas() {
|
|
158
|
+
var _a = bmi_Data.current,
|
|
159
|
+
bmiBottomLine = _a.bmiBottomLine,
|
|
160
|
+
bmiIntro = _a.bmiIntro,
|
|
161
|
+
bmiLinesPoints = _a.bmiLinesPoints,
|
|
162
|
+
bmiTopLine = _a.bmiTopLine;
|
|
163
|
+
var newBmiList = cloneDeep(bmiList.current);
|
|
164
|
+
newBmiList.map(function (item) {
|
|
165
|
+
if (!item.weight || !item.week) {
|
|
166
|
+
item.weight = 0;
|
|
167
|
+
item.week = -1;
|
|
168
|
+
} else {
|
|
169
|
+
item.weight = item.weight - Number(bmiTz.current);
|
|
170
|
+
if (item.week.indexOf('+') !== -1) {
|
|
171
|
+
var arr = item.week.split('+');
|
|
172
|
+
item.week = Number(arr[0]) + Number(arr[1]) / 7;
|
|
162
173
|
}
|
|
163
|
-
|
|
174
|
+
item.week = item.week - 1;
|
|
175
|
+
}
|
|
176
|
+
});
|
|
177
|
+
newBmiList = newBmiList.filter(function (i) {
|
|
178
|
+
return i.week >= 0 && i.week <= 39 && i.weight >= -8 && i.weight <= 24;
|
|
179
|
+
});
|
|
180
|
+
newBmiList.length > 0 && newBmiList.map(function (item) {
|
|
181
|
+
item.x = item.week;
|
|
182
|
+
item.y = item.weight;
|
|
183
|
+
});
|
|
184
|
+
var unusualColor = newBmiList.length > 0 && judgeAreas(newBmiList[newBmiList.length - 1], bmiLinesPoints) ? get_fetus_color(sys_theme, 0) : get_abnormal_color(sys_theme);
|
|
185
|
+
var canvas = get_canvas_el('bmi-canvas', sys_theme);
|
|
186
|
+
var context = canvas.getContext('2d');
|
|
187
|
+
canvas.width = 700;
|
|
188
|
+
canvas.height = 710;
|
|
189
|
+
var baseLeft = 60;
|
|
190
|
+
var baseTop = 190;
|
|
191
|
+
var xStep = 30;
|
|
192
|
+
var yStep = 15;
|
|
193
|
+
var xCount = 17;
|
|
194
|
+
var yCount = 40;
|
|
195
|
+
context.fillStyle = font_color;
|
|
196
|
+
context.font = 'bold 16px normal';
|
|
197
|
+
context.textAlign = 'center';
|
|
198
|
+
context.fillText("".concat(draw_info(headerInfo)), canvas.width / 2, baseTop - 120);
|
|
199
|
+
context.fillText('BMI孕期体重管理曲线', canvas.width / 2, baseTop - 80);
|
|
200
|
+
context.fillStyle = '#52aaff';
|
|
201
|
+
context.font = 'normal 12px normal';
|
|
202
|
+
context.fillText("\u5B55\u524DBMI: ".concat(bmiNum.current, " kg/\u33A1"), canvas.width / 2, baseTop - 50);
|
|
203
|
+
context.fillText(bmiIntro, canvas.width / 2, baseTop - 30);
|
|
204
|
+
context.fillStyle = font_color;
|
|
205
|
+
setVertical(context, xCount, yCount, xStep, yStep, baseLeft, baseTop);
|
|
206
|
+
setHorizontal(context, xCount, yCount, xStep, yStep, baseLeft, baseTop);
|
|
207
|
+
setVerRules(context, [baseLeft, baseTop + (xCount - 1) * xStep], (yCount - 1) * yStep, line_color, 1, yStep, 5);
|
|
208
|
+
setHorRules(context, [baseLeft, baseTop + (xCount - 1) * xStep], (xCount - 1) * xStep, line_color, 1, xStep, 5);
|
|
209
|
+
var endLineArr = [bmiBottomLine, bmiTopLine];
|
|
210
|
+
forEach(endLineArr, function (line) {
|
|
211
|
+
drawScaleLine(canvas, context, [baseLeft, baseTop + (xCount - 5) * xStep], [yStep, xStep / 2], line, [true, '#787878'], '#787878', [8], 2);
|
|
212
|
+
});
|
|
213
|
+
drawScaleLine(canvas, context, [baseLeft, baseTop + (xCount - 5) * xStep], [yStep, xStep / 2], newBmiList, [true, unusualColor], unusualColor, [], 2);
|
|
214
|
+
imageRef.current = canvas === null || canvas === void 0 ? void 0 : canvas.toDataURL('image/jpg');
|
|
215
|
+
props.onLoad && props.onLoad();
|
|
216
|
+
}
|
|
217
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
218
|
+
className: "bmi-wrapper"
|
|
219
|
+
}, /*#__PURE__*/React.createElement(Radio.Group, {
|
|
220
|
+
className: "bmi-radio",
|
|
221
|
+
options: recordOptions,
|
|
222
|
+
defaultValue: default_type,
|
|
223
|
+
onChange: handleRadioChange
|
|
224
|
+
}), !get(props, 'hidePrintBtn') && (/*#__PURE__*/React.createElement(ReactToPrint, {
|
|
225
|
+
trigger: function trigger() {
|
|
226
|
+
return /*#__PURE__*/React.createElement(Button, {
|
|
227
|
+
type: "primary",
|
|
228
|
+
size: "small",
|
|
229
|
+
className: "print-btn"
|
|
230
|
+
}, /*#__PURE__*/React.createElement(MyIcon, {
|
|
231
|
+
value: 'PrinterOutlined'
|
|
232
|
+
}), " \u6253\u5370");
|
|
164
233
|
},
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
234
|
+
content: function content() {
|
|
235
|
+
return printCanvas('bmi-canvas');
|
|
236
|
+
}
|
|
237
|
+
})), /*#__PURE__*/React.createElement("canvas", {
|
|
238
|
+
id: "bmi-canvas",
|
|
239
|
+
className: "bmi-canvas"
|
|
240
|
+
}, "\u60A8\u7684\u6D4F\u89C8\u5668\u4E0D\u652F\u6301canvas\uFF0C\u8BF7\u66F4\u6362\u6D4F\u89C8\u5668."));
|
|
168
241
|
}
|
|
169
|
-
export {
|
|
170
|
-
//# sourceMappingURL=.root11.js.map
|
|
242
|
+
export { BmiCanvas as default };
|