@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,235 +1,201 @@
1
- import 'antd/es/modal/style';
2
- import _Modal from 'antd/es/modal';
3
- import { _ as _extends } from './extends.js';
4
- import 'antd/es/space/style';
5
- import _Space from 'antd/es/space';
6
- import 'antd/es/button/style';
7
- import _Button from 'antd/es/button';
8
- import _isEmpty from 'lodash/isEmpty';
9
- import _forEach from 'lodash/forEach';
10
- import { s as styleInject, d as __rest, _ as __awaiter, a as __generator, c as __spreadArray } from './index.js';
11
- import { SMchc_TemplateTrees } from '@lm_fe/service';
12
- import React, { useState, useRef, useEffect } from 'react';
13
- import ReactToPrint from 'react-to-print';
14
- import { LazyAntd } from '@lm_fe/components';
15
- import 'antd/es/row/style';
16
- import 'antd/es/row';
17
- import 'antd/es/col/style';
18
- import 'antd/es/col';
19
- import 'antd/es/list/style';
20
- import 'antd/es/list';
21
- import 'antd/es/tooltip/style';
22
- import 'antd/es/tooltip';
23
- import 'lodash/get';
24
- import '@ant-design/icons';
1
+ import { d as __rest, b as __awaiter, c as __generator, a as __assign, _ as __spreadArray } from './index.js';
2
+ import { Tree_L } from '@lm_fe/components';
3
+ import { request, isObject } from '@lm_fe/utils';
4
+ import { Modal, Tabs, Button, Space } from 'antd';
5
+ import { forEach, isEmpty, isString } from 'lodash';
6
+ import React, { useRef, useState, useEffect } from 'react';
7
+ import { OkButton } from '@lm_fe/components_m';
25
8
  import 'classnames';
26
- import 'antd/es/spin/style';
27
- import 'antd/es/spin';
28
- import '@lm_fe/components_m';
29
- import '@lm_fe/utils';
30
- import 'antd/es/form/style';
31
- import 'antd/es/form';
32
- import 'antd/es/result/style';
33
- import 'antd/es/result';
34
- import 'antd/es/menu/style';
35
- import 'antd/es/menu';
36
- import 'antd/es/message/style';
37
- import 'antd/es/message';
38
9
  import '@lm_fe/env';
39
- import 'lodash/keys';
40
- import 'antd/es/divider/style';
41
- import 'antd/es/divider';
42
- var css_248z = "@media print {\n html,\n body {\n background-color: #fff !important;\n }\n html .index-module_printtoalc__Eq-V4,\n body .index-module_printtoalc__Eq-V4 {\n padding: 12px;\n }\n}\n.index-module_tree-title__S78sH {\n width: 100%;\n}\n.index-module_tree-title__S78sH > .ant-tree-switcher,\n.index-module_tree-title__S78sH > .ant-tree-checkbox {\n display: none;\n}\n.index-module_tree-title__S78sH > .ant-tree-node-content-wrapper {\n width: 100%;\n height: 30px;\n margin-bottom: 10px;\n line-height: 30px;\n text-align: center;\n background-color: #e6f7ff;\n border-bottom: 3px solid #6699ff;\n}\n";
43
- var styles = {
44
- "printtoalc": "index-module_printtoalc__Eq-V4",
45
- "tree-title": "index-module_tree-title__S78sH"
46
- };
47
- styleInject(css_248z);
48
- var Tree = LazyAntd.Tree;
49
- LazyAntd.TreeSelect;
50
- LazyAntd.Select;
51
- LazyAntd.Table;
52
- LazyAntd.Dropdown;
53
- LazyAntd.Pagination;
54
- var TYPE = 33;
55
- function Index(props) {
56
- var _this = this;
57
- var modal_data = props.modal_data,
58
- close = props.close,
59
- others = __rest(props, ["modal_data", "close"]);
60
- var pregnancyId = modal_data.pregnancyId;
61
- var _a = useState([]),
62
- treeToalc = _a[0],
63
- setTreeToalc = _a[1];
64
- var _b = useState([]),
65
- toalcKeys = _b[0],
66
- setToalcKeys = _b[1];
67
- var printTableRef = useRef(null);
10
+ import '@lm_fe/provoke';
11
+ import '@lm_fe/service';
12
+ function make_key(item) {
13
+ if (!item) return '';
14
+ if (item.raw_title) return "".concat(item.id, "@@").concat(item.raw_title);
15
+ return "".concat(item.id, "@@").concat(item.title);
16
+ }
17
+ function get_title_form_key(key) {
18
+ if (!isString(key)) return '';
19
+ var arr = key.split('@@');
20
+ var title = arr[1];
21
+ return title || key;
22
+ }
23
+ function ResultImport(props) {
24
+ var modal_data = props.modal_data;
25
+ props.onClose;
26
+ var close = props.close,
27
+ others = __rest(props, ["modal_data", "onClose", "close"]);
28
+ var _a = modal_data.simpleTypes,
29
+ simpleTypes = _a === void 0 ? [] : _a,
30
+ gen_obj = modal_data.gen_obj,
31
+ form = modal_data.form,
32
+ on_tpl_check = modal_data.on_tpl_check;
33
+ var el = useRef(null);
34
+ var _b = useState(''),
35
+ activeTabKey = _b[0],
36
+ set_activeTabKey = _b[1];
37
+ var _c = useState(''),
38
+ defaultExpandedKey = _c[0],
39
+ set_defaultExpandedKey = _c[1];
40
+ var _d = useState([]),
41
+ check_keys = _d[0],
42
+ setCheck_keys = _d[1];
43
+ var abnormal_key = useRef([]);
44
+ var key_map = useRef({});
45
+ var _e = useState([]),
46
+ arr = _e[0],
47
+ setArr = _e[1];
68
48
  useEffect(function () {
69
- (function () {
70
- return __awaiter(_this, void 0, void 0, function () {
71
- var _treeToalc, selecteToalc, toalcValue, _toalcKeys;
72
- var _a;
73
- return __generator(this, function (_b) {
74
- switch (_b.label) {
75
- case 0:
76
- return [4, SMchc_TemplateTrees.getTemplateTree(TYPE)];
77
- case 1:
78
- _treeToalc = _b.sent();
79
- return [4, SMchc_TemplateTrees.findAlertAssessment(TYPE, pregnancyId)];
80
- case 2:
81
- selecteToalc = _b.sent();
82
- toalcValue = (_a = selecteToalc.value) !== null && _a !== void 0 ? _a : [];
83
- _toalcKeys = toalcValue.map(function (_) {
84
- return String(_.id);
85
- });
86
- setTreeToalc(_treeToalc);
87
- setToalcKeys(_toalcKeys);
88
- return [2];
89
- }
90
- });
91
- });
92
- })();
49
+ fetch_data(simpleTypes[0]);
93
50
  return function () {};
94
51
  }, []);
95
- function handleCheck(keys) {
96
- _forEach(treeToalc, function (item) {
97
- if (keys.includes(String(item.id))) {
98
- item.selected = true;
99
- } else {
100
- item.selected = null;
101
- }
52
+ function handleTabChange(key) {
53
+ return __awaiter(this, void 0, void 0, function () {
54
+ var target;
55
+ return __generator(this, function (_a) {
56
+ target = simpleTypes.find(function (_) {
57
+ return _.title === key;
58
+ });
59
+ fetch_data(target);
60
+ return [2];
61
+ });
102
62
  });
103
- setToalcKeys(keys);
104
- setTreeToalc(__spreadArray([], treeToalc, true));
105
63
  }
106
- function handleOk() {
64
+ function fetch_data(target) {
107
65
  return __awaiter(this, void 0, void 0, function () {
108
- var filterData, data;
109
- return __generator(this, function (_a) {
110
- switch (_a.label) {
66
+ var method, url, params, result, format_data;
67
+ var _a, _b;
68
+ return __generator(this, function (_c) {
69
+ switch (_c.label) {
111
70
  case 0:
112
- filterData = treeToalc.filter(function (item) {
113
- return toalcKeys.includes(String(item.id));
114
- });
115
- data = {
116
- pregnancyId: pregnancyId,
117
- type: TYPE,
118
- value: filterData.length ? filterData : undefined,
119
- templateId: null
120
- };
121
- if (!(filterData.length == 0)) return [3, 2];
122
- return [4, SMchc_TemplateTrees.deleteHighrisk(data)];
71
+ if (!(target === null || target === void 0 ? void 0 : target.url)) return [2];
72
+ abnormal_key.current = [];
73
+ setCheck_keys([]);
74
+ method = (_a = target.method) !== null && _a !== void 0 ? _a : 'get';
75
+ url = target.url;
76
+ params = (_b = gen_obj === null || gen_obj === void 0 ? void 0 : gen_obj(form)) !== null && _b !== void 0 ? _b : {};
77
+ return [4, request.ins({
78
+ method: method,
79
+ url: url,
80
+ data: params,
81
+ params: params
82
+ })];
123
83
  case 1:
124
- _a.sent();
125
- return [3, 4];
126
- case 2:
127
- return [4, SMchc_TemplateTrees.saveAlertAssessment(data)];
128
- case 3:
129
- _a.sent();
130
- _a.label = 4;
131
- case 4:
132
- close === null || close === void 0 ? void 0 : close(true);
84
+ result = _c.sent().data;
85
+ set_activeTabKey(target.title);
86
+ set_defaultExpandedKey(make_key(result === null || result === void 0 ? void 0 : result[0]));
87
+ format_data = transferTemplateData(result, abnormal_key.current, key_map.current);
88
+ setArr(format_data);
133
89
  return [2];
134
90
  }
135
91
  });
136
92
  });
137
93
  }
138
- function transferTemplateData(data, pid) {
94
+ function handleOk(e) {
95
+ var ins = el.current;
96
+ if (ins) {
97
+ var state = ins.state;
98
+ var keys = state.checkedKeys;
99
+ var checkedItems = keys.map(function (_) {
100
+ return key_map.current[_];
101
+ });
102
+ var half_keys = state.halfCheckedKeys;
103
+ var content = checkedItems.sort(function (a, b) {
104
+ return a.pid === 0 ? -1 : 1;
105
+ }).map(function (_) {
106
+ return _.raw_title;
107
+ }).join(' / ');
108
+ if (!isEmpty(half_keys)) {
109
+ var half_title = half_keys.map(get_title_form_key).reverse().join(' / ');
110
+ console.log('el half_title', half_title, half_keys);
111
+ content = "".concat(half_title, " / ").concat(content);
112
+ }
113
+ var leaf = checkedItems.filter(function (_) {
114
+ var _a;
115
+ return _.isLeaf && !((_a = _.children) === null || _a === void 0 ? void 0 : _a.length);
116
+ });
117
+ on_tpl_check === null || on_tpl_check === void 0 ? void 0 : on_tpl_check({
118
+ result: checkedItems,
119
+ leaf: leaf,
120
+ content: content
121
+ });
122
+ }
123
+ close === null || close === void 0 ? void 0 : close(true, e);
124
+ }
125
+ function handleCheck(keys, e) {
126
+ setCheck_keys(keys);
127
+ e.checkedNodes;
128
+ e.halfCheckedKeys;
129
+ }
130
+ function transferTemplateData(data, abnormal, map, pid) {
139
131
  if (pid === void 0) {
140
132
  pid = 0;
141
133
  }
142
134
  var treeData = [];
143
- data.forEach(function (item) {
135
+ forEach(data, function (item) {
144
136
  if (item.pid === pid) {
145
- var tmpData = {
146
- key: String(item.id)
147
- };
148
- if (item.pid === 0) tmpData.className = styles['tree-title'];
149
- tmpData.title = item.val;
150
- tmpData.key = String(item.id);
151
- tmpData.children = transferTemplateData(data, item.id);
152
- if (_isEmpty(tmpData.children)) {
153
- tmpData.isLeaf = true;
137
+ if (isObject(item.title)) ;else {
138
+ item.raw_title = item.title;
139
+ item.title = item.unusual ? /*#__PURE__*/React.createElement("span", {
140
+ style: {
141
+ color: 'red'
142
+ }
143
+ }, item.title, " ", item.unusualDesc) : item.title;
144
+ }
145
+ item.key = make_key(item);
146
+ map[item.key] = item;
147
+ item.children = transferTemplateData(item.items, abnormal, map, item.id);
148
+ if (isEmpty(item.children)) {
149
+ item.isLeaf = true;
150
+ if (item.unusual) {
151
+ abnormal.push(item.key);
152
+ }
154
153
  } else {
155
- tmpData.isLeaf = false;
154
+ item.isLeaf = false;
156
155
  }
157
- treeData.push(tmpData);
156
+ treeData.push(item);
158
157
  }
159
158
  });
160
159
  return treeData;
161
160
  }
162
- function renderFooter() {
163
- var _this = this;
164
- return /*#__PURE__*/React.createElement(_Space, {
161
+ return /*#__PURE__*/React.createElement(Modal, __assign({}, others, {
162
+ centered: false,
163
+ title: "\u7ED3\u679C\u5BFC\u5165",
164
+ width: 1100,
165
+ onOk: handleOk
166
+ }), /*#__PURE__*/React.createElement(Tabs, {
167
+ defaultActiveKey: activeTabKey,
168
+ onChange: handleTabChange
169
+ }, simpleTypes.map(function (_a) {
170
+ var title = _a.title;
171
+ _a.url;
172
+ return /*#__PURE__*/React.createElement(Tabs.TabPane, {
173
+ tab: /*#__PURE__*/React.createElement(Button, {
174
+ className: "list-btn"
175
+ }, title),
176
+ key: title
177
+ }, !isEmpty(arr) && activeTabKey === title ? /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("div", {
165
178
  style: {
166
179
  display: 'flex',
167
- alignItems: 'center',
168
- justifyContent: 'center'
180
+ flexDirection: 'row-reverse'
169
181
  }
170
- }, /*#__PURE__*/React.createElement(_Button, {
171
- key: "back",
182
+ }, /*#__PURE__*/React.createElement(Space.Compact, null, /*#__PURE__*/React.createElement(OkButton, {
183
+ primary: true,
172
184
  onClick: function onClick() {
173
- return close === null || close === void 0 ? void 0 : close(false);
185
+ setCheck_keys(Array.from(new Set(__spreadArray(__spreadArray([], check_keys, true), abnormal_key.current, true))));
174
186
  }
175
- }, "\u53D6\u6D88"), /*#__PURE__*/React.createElement(_Button, {
176
- key: "submit",
177
- type: "primary",
178
- onClick: handleOk
179
- }, "\u786E\u5B9A"), /*#__PURE__*/React.createElement(ReactToPrint, {
180
- trigger: function trigger() {
181
- return /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(_Button, {
182
- type: "primary"
183
- }, "\u6253\u5370"));
184
- },
185
- onBeforeGetContent: function onBeforeGetContent() {
186
- return __awaiter(_this, void 0, void 0, function () {
187
- return __generator(this, function (_a) {
188
- setTimeout(function () {}, 100);
189
- return [2];
190
- });
191
- });
192
- },
193
- content: function content() {
194
- return printTableRef.current;
187
+ }, "\u52FE\u9009\u5F02\u5E38"), /*#__PURE__*/React.createElement(OkButton, {
188
+ onClick: function onClick() {
189
+ return setCheck_keys([]);
195
190
  }
196
- }));
197
- }
198
- var treeData = transferTemplateData(treeToalc);
199
- return /*#__PURE__*/React.createElement(_Modal, _extends({}, others, {
200
- className: styles["tolac-modal"],
201
- title: "\u7622\u75D5\u5B50\u5BAB\u9634\u9053\u8BD5\u4EA7\u8868",
202
- width: 800,
203
- onOk: handleOk,
204
- maskClosable: false,
205
- footer: renderFooter()
206
- }), !!treeToalc.length && /*#__PURE__*/React.createElement(Tree, {
207
- checkable: true,
208
- defaultExpandAll: true,
209
- checkedKeys: toalcKeys,
210
- treeData: treeData,
211
- onCheck: handleCheck
212
- }), /*#__PURE__*/React.createElement("div", {
213
- style: {
214
- display: 'none'
215
- }
216
- }, /*#__PURE__*/React.createElement("div", {
217
- style: {
218
- marginTop: '28px'
219
- },
220
- ref: printTableRef,
221
- className: styles['printtoalc']
222
- }, /*#__PURE__*/React.createElement("h2", {
223
- style: {
224
- textAlign: 'center'
225
- }
226
- }, "\u7622\u75D5\u5B50\u5BAB\u9634\u9053\u8BD5\u4EA7\u8868"), !!treeToalc.length && /*#__PURE__*/React.createElement(Tree, {
227
- checkable: true,
228
- defaultExpandAll: true,
229
- checkedKeys: toalcKeys,
230
- treeData: treeData,
231
- onCheck: handleCheck
232
- }))));
191
+ }, "\u5168\u90E8\u53D6\u6D88"))), /*#__PURE__*/React.createElement(Tree_L, {
192
+ ref: el,
193
+ checkable: true,
194
+ defaultExpandedKeys: [defaultExpandedKey],
195
+ onCheck: handleCheck,
196
+ treeData: arr,
197
+ checkedKeys: check_keys
198
+ })) : '暂无结果~');
199
+ })));
233
200
  }
234
- export { Index as default };
235
- //# sourceMappingURL=.root21.js.map
201
+ export { ResultImport as default };