@lm_fe/components 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.
- package/README.md +1 -1
- package/dist/keep-alive/common.d.ts +46 -0
- package/dist/keep-alive/components/AsyncComponent.d.ts +27 -0
- package/dist/keep-alive/components/Comment.d.ts +18 -0
- package/dist/keep-alive/components/Consumer.d.ts +20 -0
- package/dist/keep-alive/components/keepAlive.d.ts +4 -0
- package/dist/keep-alive/components/provider.d.ts +31 -0
- package/dist/keep-alive/contexts/IdentificationContext.d.ts +12 -0
- package/dist/keep-alive/contexts/KeepAliveContext.d.ts +5 -0
- package/dist/keep-alive/index.d.ts +7 -0
- package/dist/keep-alive/index.js +1901 -0
- package/dist/keep-alive/utils/bindLifecycle.d.ts +3 -0
- package/dist/keep-alive/utils/changePositionByComment.d.ts +1 -0
- package/dist/keep-alive/utils/createEventEmitter.d.ts +11 -0
- package/dist/keep-alive/utils/createStoreElement.d.ts +1 -0
- package/dist/keep-alive/utils/createUniqueIdentification.d.ts +8 -0
- package/dist/keep-alive/utils/debug.d.ts +3 -0
- package/dist/keep-alive/utils/getDisplayName.d.ts +2 -0
- package/dist/keep-alive/utils/getKeepAlive.d.ts +3 -0
- package/dist/keep-alive/utils/getKeyByFiberNode.d.ts +1 -0
- package/dist/keep-alive/utils/isRegExp.d.ts +1 -0
- package/dist/keep-alive/utils/keepAliveDecorator.d.ts +17 -0
- package/dist/keep-alive/utils/md5.d.ts +1 -0
- package/dist/keep-alive/utils/noop.d.ts +2 -0
- package/dist/keep-alive/utils/shallowEqual.d.ts +2 -0
- package/dist/keep-alive/utils/useKeepAliveEffect.d.ts +2 -0
- package/dist/keep-alive/utils/withIdentificationContextConsumer.d.ts +10 -0
- package/dist/keep-alive/utils/withKeepAliveContextConsumer.d.ts +10 -0
- package/dist/src/ArraySingle/Inner.d.ts +3 -0
- package/dist/src/ArraySingle/index.d.ts +2 -0
- package/dist/src/CaseTempleteEdit/Inner.d.ts +4 -0
- package/dist/src/CaseTempleteEdit/config.d.ts +20 -0
- package/dist/src/CaseTempleteEdit/index.d.ts +4 -0
- package/dist/src/CaseTempleteEdit/types.d.ts +19 -0
- package/dist/src/CaseTempleteEdit/utils.d.ts +2 -0
- package/dist/src/CaseTempleteEditEmr/Inner.d.ts +3 -0
- package/dist/src/CaseTempleteEditEmr/demo_text.d.ts +1 -0
- package/dist/src/CaseTempleteEditEmr/index.d.ts +2 -0
- package/dist/src/CaseTempleteEditEmr/types.d.ts +6 -0
- package/dist/src/CaseTempleteEditEmr/utils.d.ts +3 -0
- package/dist/{GlobalModal → src/GlobalModal}/index.d.ts +2 -1
- package/dist/src/LazyAntd/index.d.ts +17 -0
- package/dist/{Monaco → src/Monaco}/Inner.d.ts +1 -1
- package/dist/src/MyAddress/Inner.d.ts +3 -0
- package/dist/{MyImageEditor → src/MyImageEditor}/Inner.d.ts +1 -1
- package/dist/{MyImageEditor → src/MyImageEditor}/utils.d.ts +1 -1
- package/dist/{MyInput → src/MyInput}/index.d.ts +2 -2
- package/dist/{PDF_Frame_View → src/PDF_Frame_View}/utils.d.ts +1 -1
- package/dist/src/PatientSelect/Inner.d.ts +16 -0
- package/dist/src/PatientSelect/index.d.ts +3 -0
- package/dist/src/SimpleForm/Inner.d.ts +5 -0
- package/dist/{SimpleForm → src/SimpleForm}/components/TabForm/index.d.ts +3 -2
- package/dist/{SimpleForm → src/SimpleForm}/components/extra/Custom.d.ts +2 -1
- package/dist/{SimpleForm → src/SimpleForm}/components/index.d.ts +3 -6
- package/dist/src/SimpleForm/index.d.ts +17 -0
- package/dist/{SimpleForm/index.d.ts → src/SimpleForm/types.d.ts} +0 -14
- package/dist/src/a_chunks/ArraySingle.Inner.js +19 -0
- package/dist/src/a_chunks/CaseTempleteEdit.Inner.js +622 -0
- package/dist/src/a_chunks/CaseTempleteEditEmr.Inner.js +235 -0
- package/dist/{a_chunks/.root6.js → src/a_chunks/MyAddress.Inner.js} +38 -89
- package/dist/{a_chunks/.root4.js → src/a_chunks/MyImageEditor.Inner.js} +128 -179
- package/dist/{a_chunks/.root5.js → src/a_chunks/Old.InnerOld.js} +20 -59
- package/dist/{a_chunks/.root2.js → src/a_chunks/PDF_Frame_View.Inner.js} +11 -51
- package/dist/src/a_chunks/PatientSelect.Inner.js +281 -0
- package/dist/src/a_chunks/SimpleForm.Inner.js +318 -0
- package/dist/src/a_chunks/index.js +550 -0
- package/dist/src/a_chunks/style-inject.es.js +25 -0
- package/dist/src/config.d.ts +1 -0
- package/dist/{hooks → src/hooks}/index.d.ts +1 -0
- package/dist/src/hooks/use_fuck.d.ts +5 -0
- package/dist/src/index.d.ts +11 -0
- package/dist/src/index.js +10 -0
- package/dist/src/pack_components.d.ts +213 -0
- package/dist/src/utils/getInputStyle.d.ts +1 -0
- package/dist/src/utils/index.d.ts +1 -0
- package/dist/src/utils/other.d.ts +3 -0
- package/package.json +30 -26
- package/dist/ContainerDimensions2/index.d.ts +0 -10
- package/dist/LazyAntd/AutoComplete/Inner.d.ts +0 -4
- package/dist/LazyAntd/AutoComplete/index.d.ts +0 -4
- package/dist/LazyAntd/DatePicker/Base/Calendar.d.ts +0 -3
- package/dist/LazyAntd/DatePicker/Base/DatePicker.d.ts +0 -11
- package/dist/LazyAntd/DatePicker/Base/index.d.ts +0 -12
- package/dist/LazyAntd/DatePicker/Base/props.d.ts +0 -14
- package/dist/LazyAntd/DatePicker/Calendar.d.ts +0 -4
- package/dist/LazyAntd/DatePicker/DatePicker.d.ts +0 -4
- package/dist/LazyAntd/DatePicker/MonthPicker.d.ts +0 -4
- package/dist/LazyAntd/DatePicker/RangePicker.d.ts +0 -4
- package/dist/LazyAntd/DatePicker/TimePicker.d.ts +0 -4
- package/dist/LazyAntd/DatePicker/index.d.ts +0 -5
- package/dist/LazyAntd/Dropdown/Button.d.ts +0 -2
- package/dist/LazyAntd/Dropdown/Inner.d.ts +0 -3
- package/dist/LazyAntd/Dropdown/index.d.ts +0 -10
- package/dist/LazyAntd/Form/FormItemInner.d.ts +0 -2
- package/dist/LazyAntd/Form/Inner.d.ts +0 -3
- package/dist/LazyAntd/Form/index.d.ts +0 -9
- package/dist/LazyAntd/Modal/Inner.d.ts +0 -4
- package/dist/LazyAntd/Modal/index.d.ts +0 -3
- package/dist/LazyAntd/Pagination/Inner.d.ts +0 -3
- package/dist/LazyAntd/Pagination/index.d.ts +0 -3
- package/dist/LazyAntd/Select/Inner.d.ts +0 -3
- package/dist/LazyAntd/Select/OptionInner.d.ts +0 -2
- package/dist/LazyAntd/Select/index.d.ts +0 -10
- package/dist/LazyAntd/Table/Inner.d.ts +0 -3
- package/dist/LazyAntd/Table/index.d.ts +0 -3
- package/dist/LazyAntd/Tree/DirectoryTreeInner.d.ts +0 -3
- package/dist/LazyAntd/Tree/Inner.d.ts +0 -3
- package/dist/LazyAntd/Tree/TreeNodeInner.d.ts +0 -4
- package/dist/LazyAntd/Tree/index.d.ts +0 -12
- package/dist/LazyAntd/TreeSelect/Inner.d.ts +0 -3
- package/dist/LazyAntd/TreeSelect/index.d.ts +0 -3
- package/dist/LazyAntd/index.d.ts +0 -25
- package/dist/MyAddress/Inner.d.ts +0 -3
- package/dist/QRCode/Inner.d.ts +0 -3
- package/dist/QRCode/index.d.ts +0 -2
- package/dist/QRCode/types.d.ts +0 -68
- package/dist/a_chunks/.root.js +0 -805
- package/dist/a_chunks/.root.js.map +0 -1
- package/dist/a_chunks/.root10.js +0 -8
- package/dist/a_chunks/.root10.js.map +0 -1
- package/dist/a_chunks/.root11.js +0 -7
- package/dist/a_chunks/.root11.js.map +0 -1
- package/dist/a_chunks/.root12.js +0 -8
- package/dist/a_chunks/.root12.js.map +0 -1
- package/dist/a_chunks/.root13.js +0 -4
- package/dist/a_chunks/.root13.js.map +0 -1
- package/dist/a_chunks/.root14.js +0 -8
- package/dist/a_chunks/.root14.js.map +0 -1
- package/dist/a_chunks/.root15.js +0 -7
- package/dist/a_chunks/.root15.js.map +0 -1
- package/dist/a_chunks/.root16.js +0 -8
- package/dist/a_chunks/.root16.js.map +0 -1
- package/dist/a_chunks/.root17.js +0 -8
- package/dist/a_chunks/.root17.js.map +0 -1
- package/dist/a_chunks/.root18.js +0 -8
- package/dist/a_chunks/.root18.js.map +0 -1
- package/dist/a_chunks/.root19.js +0 -8
- package/dist/a_chunks/.root19.js.map +0 -1
- package/dist/a_chunks/.root2.js.map +0 -1
- package/dist/a_chunks/.root20.js +0 -6
- package/dist/a_chunks/.root20.js.map +0 -1
- package/dist/a_chunks/.root21.js +0 -5
- package/dist/a_chunks/.root21.js.map +0 -1
- package/dist/a_chunks/.root3.js +0 -7
- 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 +0 -8
- package/dist/a_chunks/.root7.js.map +0 -1
- package/dist/a_chunks/.root8.js +0 -8
- package/dist/a_chunks/.root8.js.map +0 -1
- package/dist/a_chunks/.root9.js +0 -7
- package/dist/a_chunks/.root9.js.map +0 -1
- package/dist/a_chunks/index.js +0 -1238
- package/dist/a_chunks/index.js.map +0 -1
- package/dist/index.d.ts +0 -11
- package/dist/index.js +0 -45
- package/dist/index.js.map +0 -1
- package/dist/pack_components.d.ts +0 -17
- package/dist/utils/getInputStyle.d.ts +0 -11
- package/dist/utils/index.d.ts +0 -2
- package/dist/utils/other.d.ts +0 -4
- /package/dist/{ContainerDimensions → src/ContainerDimensions}/index.d.ts +0 -0
- /package/dist/{GlobalModal → src/GlobalModal}/utils.d.ts +0 -0
- /package/dist/{Monaco → src/Monaco}/index.d.ts +0 -0
- /package/dist/{MyAddress → src/MyAddress}/Old/InnerOld.d.ts +0 -0
- /package/dist/{MyAddress → src/MyAddress}/Old/index.d.ts +0 -0
- /package/dist/{MyAddress → src/MyAddress}/Old/options.d.ts +0 -0
- /package/dist/{MyAddress → src/MyAddress}/index.d.ts +0 -0
- /package/dist/{MyAddress → src/MyAddress}/type.d.ts +0 -0
- /package/dist/{MyAddress → src/MyAddress}/utils.d.ts +0 -0
- /package/dist/{MyImageEditor → src/MyImageEditor}/index.d.ts +0 -0
- /package/dist/{MyImageEditor → src/MyImageEditor}/init_delete_control.d.ts +0 -0
- /package/dist/{MyInput → src/MyInput}/types.d.ts +0 -0
- /package/dist/{MyLazyComponent → src/MyLazyComponent}/index.d.ts +0 -0
- /package/dist/{PDF_Frame_View → src/PDF_Frame_View}/Inner.d.ts +0 -0
- /package/dist/{PDF_Frame_View → src/PDF_Frame_View}/index.d.ts +0 -0
- /package/dist/{PDF_Frame_View → src/PDF_Frame_View}/types.d.ts +0 -0
- /package/dist/{SimpleForm → src/SimpleForm}/components/extra/MultiInput.d.ts +0 -0
- /package/dist/{SimpleForm → src/SimpleForm}/components/extra/SimpleSelect.d.ts +0 -0
- /package/dist/{SimpleForm → src/SimpleForm}/components/extra/SwitchSelect.d.ts +0 -0
- /package/dist/{SimpleForm → src/SimpleForm}/types/help.d.ts +0 -0
- /package/dist/{SimpleForm → src/SimpleForm}/types/metaTypes.d.ts +0 -0
- /package/dist/{hooks → src/hooks}/useMchcDriverStatus.d.ts +0 -0
- /package/dist/{hooks → src/hooks}/useMyEffect.d.ts +0 -0
- /package/dist/{style → src/style}/index.d.ts +0 -0
|
@@ -1,56 +1,18 @@
|
|
|
1
|
+
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
1
2
|
import _toConsumableArray from "@babel/runtime/helpers/toConsumableArray";
|
|
2
3
|
import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
import 'antd
|
|
6
|
-
import
|
|
7
|
-
import {
|
|
8
|
-
import '
|
|
9
|
-
import _Input from 'antd/es/input';
|
|
10
|
-
import 'antd/es/cascader/style';
|
|
11
|
-
import _Cascader from 'antd/es/cascader';
|
|
12
|
-
import _get from 'lodash/get';
|
|
13
|
-
import _cloneDeep from 'lodash/cloneDeep';
|
|
14
|
-
import React__default, { useState, useEffect } from 'react';
|
|
4
|
+
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
5
|
+
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
6
|
+
import { Tooltip, Input, Cascader, Button } from 'antd';
|
|
7
|
+
import { cloneDeep, get } from 'lodash';
|
|
8
|
+
import React, { useState, useEffect } from 'react';
|
|
9
|
+
import { d as get_old_address_options } from './index.js';
|
|
15
10
|
import '@lm_fe/env';
|
|
16
|
-
import '
|
|
17
|
-
import 'antd/es/skeleton';
|
|
18
|
-
import 'fabric';
|
|
19
|
-
import 'lodash/map';
|
|
20
|
-
import 'antd/es/modal/style';
|
|
21
|
-
import 'antd/es/modal';
|
|
22
|
-
import 'lodash/isNil';
|
|
23
|
-
import 'antd/es/row/style';
|
|
24
|
-
import 'antd/es/row';
|
|
25
|
-
import 'antd/es/col/style';
|
|
26
|
-
import 'antd/es/col';
|
|
27
|
-
import 'antd/es/form/style';
|
|
28
|
-
import 'antd/es/form';
|
|
29
|
-
import 'antd/es/divider/style';
|
|
30
|
-
import 'antd/es/divider';
|
|
31
|
-
import 'antd/es/slider/style';
|
|
32
|
-
import 'antd/es/slider';
|
|
33
|
-
import 'antd/es/rate/style';
|
|
34
|
-
import 'antd/es/rate';
|
|
35
|
-
import 'antd/es/switch/style';
|
|
36
|
-
import 'antd/es/switch';
|
|
37
|
-
import 'antd/es/time-picker/style';
|
|
38
|
-
import 'antd/es/time-picker';
|
|
39
|
-
import 'antd/es/checkbox/style';
|
|
40
|
-
import 'antd/es/checkbox';
|
|
41
|
-
import 'antd/es/input-number/style';
|
|
42
|
-
import 'antd/es/input-number';
|
|
43
|
-
import 'antd/es/radio/style';
|
|
44
|
-
import 'antd/es/radio';
|
|
45
|
-
import 'antd/es/date-picker/style';
|
|
46
|
-
import 'antd/es/date-picker';
|
|
47
|
-
import '@lm_fe/utils';
|
|
48
|
-
import 'rc-tree/es/TreeNode';
|
|
49
|
-
import 'antd/es/tabs/style';
|
|
50
|
-
import 'antd/es/tabs';
|
|
11
|
+
import '@noah-libjs/components';
|
|
51
12
|
import '@lm_fe/static';
|
|
52
13
|
import '@lm_fe/service';
|
|
53
|
-
import '
|
|
14
|
+
import '@lm_fe/provoke';
|
|
15
|
+
import '@lm_fe/utils';
|
|
54
16
|
function MyAddressOld(_ref) {
|
|
55
17
|
var id = _ref.id,
|
|
56
18
|
value = _ref.value,
|
|
@@ -90,7 +52,7 @@ function MyAddressOld(_ref) {
|
|
|
90
52
|
setText = _useState8[1];
|
|
91
53
|
useEffect(function () {
|
|
92
54
|
get_old_address_options(needStreet).then(function (opt) {
|
|
93
|
-
setOptions(opt);
|
|
55
|
+
setOptions(opt[0]);
|
|
94
56
|
});
|
|
95
57
|
}, []);
|
|
96
58
|
useEffect(function () {
|
|
@@ -103,7 +65,7 @@ function MyAddressOld(_ref) {
|
|
|
103
65
|
provinces = _value$split2[0],
|
|
104
66
|
detailed = _value$split2[1];
|
|
105
67
|
var provincesArray = provinces ? provinces.split(',') : [];
|
|
106
|
-
var initPcasv =
|
|
68
|
+
var initPcasv = cloneDeep(provincesArray);
|
|
107
69
|
// 兼容旧版本全是“,”分割的地址(省,市,区,街道,详细地址)
|
|
108
70
|
if (!value.includes('&')) {
|
|
109
71
|
initPcasv = provincesArray.slice(0, 3);
|
|
@@ -126,7 +88,7 @@ function MyAddressOld(_ref) {
|
|
|
126
88
|
};
|
|
127
89
|
var handleAdress = function handleAdress(key) {
|
|
128
90
|
return function () {
|
|
129
|
-
var sourceValue =
|
|
91
|
+
var sourceValue = get(form === null || form === void 0 ? void 0 : form.getFieldsValue(), key);
|
|
130
92
|
if (sourceValue) {
|
|
131
93
|
onChange === null || onChange === void 0 || onChange(sourceValue);
|
|
132
94
|
}
|
|
@@ -137,20 +99,20 @@ function MyAddressOld(_ref) {
|
|
|
137
99
|
return option.label.toLowerCase().indexOf(inputValue.toLowerCase()) > -1;
|
|
138
100
|
});
|
|
139
101
|
};
|
|
140
|
-
return /*#__PURE__*/
|
|
102
|
+
return /*#__PURE__*/React.createElement(Tooltip, {
|
|
141
103
|
id: id,
|
|
142
104
|
placement: "topLeft",
|
|
143
105
|
title: text
|
|
144
|
-
}, /*#__PURE__*/
|
|
106
|
+
}, /*#__PURE__*/React.createElement(Input.Group, {
|
|
145
107
|
compact: true,
|
|
146
108
|
style: {
|
|
147
109
|
display: 'flex'
|
|
148
110
|
}
|
|
149
|
-
}, /*#__PURE__*/
|
|
111
|
+
}, /*#__PURE__*/React.createElement(Input.Group, {
|
|
150
112
|
style: {
|
|
151
113
|
flex: 1
|
|
152
114
|
}
|
|
153
|
-
}, /*#__PURE__*/
|
|
115
|
+
}, /*#__PURE__*/React.createElement(Cascader, {
|
|
154
116
|
allowClear: true,
|
|
155
117
|
size: size,
|
|
156
118
|
bordered: bordered,
|
|
@@ -167,7 +129,7 @@ function MyAddressOld(_ref) {
|
|
|
167
129
|
width: '40%'
|
|
168
130
|
},
|
|
169
131
|
getPopupContainer: getPopupContainer
|
|
170
|
-
}), /*#__PURE__*/
|
|
132
|
+
}), /*#__PURE__*/React.createElement(Input, {
|
|
171
133
|
size: size,
|
|
172
134
|
disabled: disabled,
|
|
173
135
|
bordered: bordered,
|
|
@@ -183,13 +145,12 @@ function MyAddressOld(_ref) {
|
|
|
183
145
|
name = _ref2.name,
|
|
184
146
|
_ref2$props = _ref2.props,
|
|
185
147
|
props = _ref2$props === void 0 ? {} : _ref2$props;
|
|
186
|
-
return /*#__PURE__*/
|
|
148
|
+
return /*#__PURE__*/React.createElement(Button, _objectSpread(_objectSpread({
|
|
187
149
|
ghost: true,
|
|
188
150
|
type: "primary"
|
|
189
|
-
}, props, {
|
|
151
|
+
}, props), {}, {
|
|
190
152
|
onClick: handleAdress(name)
|
|
191
153
|
}), label !== null && label !== void 0 ? label : 'label');
|
|
192
154
|
})));
|
|
193
155
|
}
|
|
194
156
|
export { MyAddressOld as default };
|
|
195
|
-
//# sourceMappingURL=.root5.js.map
|
|
@@ -6,55 +6,16 @@ var _excluded = ["url", "method"];
|
|
|
6
6
|
import _regeneratorRuntime from "@babel/runtime/regenerator";
|
|
7
7
|
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
8
8
|
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
9
|
-
import 'antd/es/spin/style';
|
|
10
|
-
import _Spin from 'antd/es/spin';
|
|
11
|
-
import 'antd/es/message/style';
|
|
12
|
-
import _message from 'antd/es/message';
|
|
13
|
-
import _map from 'lodash/map';
|
|
14
|
-
import _isString from 'lodash/isString';
|
|
15
9
|
import { mchcMacro, mchcLogger } from '@lm_fe/env';
|
|
16
10
|
import { request } from '@lm_fe/utils';
|
|
17
|
-
import
|
|
11
|
+
import { message, Spin } from 'antd';
|
|
12
|
+
import { isString, map } from 'lodash';
|
|
13
|
+
import React, { useMemo, useRef, useState, useEffect } from 'react';
|
|
18
14
|
import { g as get_PdfFrameView_version, h as handlePrintData, a as handleRes } from './index.js';
|
|
19
|
-
import '
|
|
20
|
-
import 'antd/es/input';
|
|
21
|
-
import 'antd/es/skeleton/style';
|
|
22
|
-
import 'antd/es/skeleton';
|
|
23
|
-
import 'fabric';
|
|
24
|
-
import 'lodash/get';
|
|
25
|
-
import 'antd/es/modal/style';
|
|
26
|
-
import 'antd/es/modal';
|
|
27
|
-
import 'lodash/isNil';
|
|
28
|
-
import 'antd/es/row/style';
|
|
29
|
-
import 'antd/es/row';
|
|
30
|
-
import 'antd/es/col/style';
|
|
31
|
-
import 'antd/es/col';
|
|
32
|
-
import 'antd/es/form/style';
|
|
33
|
-
import 'antd/es/form';
|
|
34
|
-
import 'antd/es/divider/style';
|
|
35
|
-
import 'antd/es/divider';
|
|
36
|
-
import 'antd/es/slider/style';
|
|
37
|
-
import 'antd/es/slider';
|
|
38
|
-
import 'antd/es/rate/style';
|
|
39
|
-
import 'antd/es/rate';
|
|
40
|
-
import 'antd/es/switch/style';
|
|
41
|
-
import 'antd/es/switch';
|
|
42
|
-
import 'antd/es/time-picker/style';
|
|
43
|
-
import 'antd/es/time-picker';
|
|
44
|
-
import 'antd/es/checkbox/style';
|
|
45
|
-
import 'antd/es/checkbox';
|
|
46
|
-
import 'antd/es/input-number/style';
|
|
47
|
-
import 'antd/es/input-number';
|
|
48
|
-
import 'antd/es/radio/style';
|
|
49
|
-
import 'antd/es/radio';
|
|
50
|
-
import 'antd/es/date-picker/style';
|
|
51
|
-
import 'antd/es/date-picker';
|
|
52
|
-
import 'rc-tree/es/TreeNode';
|
|
53
|
-
import 'antd/es/tabs/style';
|
|
54
|
-
import 'antd/es/tabs';
|
|
15
|
+
import '@noah-libjs/components';
|
|
55
16
|
import '@lm_fe/static';
|
|
56
17
|
import '@lm_fe/service';
|
|
57
|
-
import '
|
|
18
|
+
import '@lm_fe/provoke';
|
|
58
19
|
function PdfFrameView_Inner(props) {
|
|
59
20
|
var requestData = props.requestData,
|
|
60
21
|
printData = props.printData,
|
|
@@ -95,7 +56,7 @@ function PdfFrameView_Inner(props) {
|
|
|
95
56
|
if (filepath) {
|
|
96
57
|
printConfig.pdf = filepath;
|
|
97
58
|
}
|
|
98
|
-
if (printData &&
|
|
59
|
+
if (printData && isString(printData)) {
|
|
99
60
|
printConfig.pdf = handlePrintData(printData);
|
|
100
61
|
}
|
|
101
62
|
_context.prev = 3;
|
|
@@ -146,7 +107,7 @@ function PdfFrameView_Inner(props) {
|
|
|
146
107
|
case 26:
|
|
147
108
|
_context.prev = 26;
|
|
148
109
|
_context.t1 = _context["catch"](3);
|
|
149
|
-
|
|
110
|
+
message.warning(_context.t1);
|
|
150
111
|
case 29:
|
|
151
112
|
data = printConfig.pdf;
|
|
152
113
|
callback === null || callback === void 0 || callback(data);
|
|
@@ -185,18 +146,18 @@ function PdfFrameView_Inner(props) {
|
|
|
185
146
|
version: version,
|
|
186
147
|
_vsersion: _vsersion
|
|
187
148
|
});
|
|
188
|
-
return /*#__PURE__*/
|
|
149
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
189
150
|
style: {
|
|
190
151
|
height: '100%',
|
|
191
152
|
overflow: 'hidden'
|
|
192
153
|
}
|
|
193
|
-
}, !pdfdata ? /*#__PURE__*/
|
|
154
|
+
}, !pdfdata ? /*#__PURE__*/React.createElement(Spin, {
|
|
194
155
|
style: {
|
|
195
156
|
width: '100%',
|
|
196
157
|
marginTop: 240
|
|
197
158
|
},
|
|
198
159
|
size: "large"
|
|
199
|
-
}) : /*#__PURE__*/
|
|
160
|
+
}) : /*#__PURE__*/React.createElement("iframe", {
|
|
200
161
|
style: {
|
|
201
162
|
border: 'none',
|
|
202
163
|
padding: 0,
|
|
@@ -208,7 +169,7 @@ function PdfFrameView_Inner(props) {
|
|
|
208
169
|
var app = target === null || target === void 0 || (_target$contentWindow = target.contentWindow) === null || _target$contentWindow === void 0 ? void 0 : _target$contentWindow.PDFViewerApplication;
|
|
209
170
|
// app!.appConfig!.viewerCssTheme = 1;
|
|
210
171
|
var toolbar = (_app$appConfig$toolba = app === null || app === void 0 || (_app$appConfig = app.appConfig) === null || _app$appConfig === void 0 ? void 0 : _app$appConfig.toolbar) !== null && _app$appConfig$toolba !== void 0 ? _app$appConfig$toolba : {};
|
|
211
|
-
|
|
172
|
+
map(toolbar, function (a, b) {
|
|
212
173
|
if (!['print', 'download', PDFAppConfig !== null && PDFAppConfig !== void 0 && PDFAppConfig.hidenToolbar ? '' : 'container'].includes(b)) {
|
|
213
174
|
a.hidden = true;
|
|
214
175
|
}
|
|
@@ -224,4 +185,3 @@ function PdfFrameView_Inner(props) {
|
|
|
224
185
|
}));
|
|
225
186
|
}
|
|
226
187
|
export { PdfFrameView_Inner as default };
|
|
227
|
-
//# sourceMappingURL=.root2.js.map
|
|
@@ -0,0 +1,281 @@
|
|
|
1
|
+
import _toConsumableArray from "@babel/runtime/helpers/toConsumableArray";
|
|
2
|
+
import _asyncToGenerator from "@babel/runtime/helpers/asyncToGenerator";
|
|
3
|
+
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
4
|
+
import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
|
|
5
|
+
import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
|
|
6
|
+
var _excluded = ["onChange", "form", "onPatientSelect", "name", "width", "value", "PatientSelect_url", "PatientSelect_filterKey", "PatientSelect_displayKey", "style", "popupMatchSelectWidth"];
|
|
7
|
+
import _regeneratorRuntime from "@babel/runtime/regenerator";
|
|
8
|
+
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
9
|
+
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
10
|
+
import { mchcLogger, mchcEvent } from '@lm_fe/env';
|
|
11
|
+
import { request, isEmpty, group, mapValues, flat } from '@lm_fe/utils';
|
|
12
|
+
import { getInputStyle, AutoComplete_L } from '@noah-libjs/components';
|
|
13
|
+
import { Row, Col, Divider } from 'antd';
|
|
14
|
+
import { debounce, get } from 'lodash';
|
|
15
|
+
import React, { useRef, useState, useEffect, useMemo } from 'react';
|
|
16
|
+
var mode_reg = /^.*(\[[0-9]\])$/;
|
|
17
|
+
var default_url = '/api/pregnancies';
|
|
18
|
+
var default_keys = [{
|
|
19
|
+
label: '门诊号',
|
|
20
|
+
value: 'outpatientNO'
|
|
21
|
+
}, {
|
|
22
|
+
label: '姓名',
|
|
23
|
+
value: 'name'
|
|
24
|
+
}, {
|
|
25
|
+
label: '末次月经',
|
|
26
|
+
value: 'lmp'
|
|
27
|
+
}, {
|
|
28
|
+
label: '电话',
|
|
29
|
+
value: __DEV__ ? 'id' : 'telephone'
|
|
30
|
+
}];
|
|
31
|
+
var is_err = false;
|
|
32
|
+
function PatientSelect(props) {
|
|
33
|
+
var _onChange = props.onChange,
|
|
34
|
+
form = props.form,
|
|
35
|
+
onPatientSelect = props.onPatientSelect,
|
|
36
|
+
_props$name = props.name,
|
|
37
|
+
name = _props$name === void 0 ? 'unKnown' : _props$name,
|
|
38
|
+
width = props.width,
|
|
39
|
+
value = props.value,
|
|
40
|
+
_props$PatientSelect_ = props.PatientSelect_url,
|
|
41
|
+
PatientSelect_url = _props$PatientSelect_ === void 0 ? default_url : _props$PatientSelect_,
|
|
42
|
+
_props$PatientSelect_2 = props.PatientSelect_filterKey,
|
|
43
|
+
PatientSelect_filterKey = _props$PatientSelect_2 === void 0 ? 'outpatientNO' : _props$PatientSelect_2,
|
|
44
|
+
_props$PatientSelect_3 = props.PatientSelect_displayKey,
|
|
45
|
+
PatientSelect_displayKey = _props$PatientSelect_3 === void 0 ? default_keys : _props$PatientSelect_3,
|
|
46
|
+
style = props.style,
|
|
47
|
+
popupMatchSelectWidth = props.popupMatchSelectWidth,
|
|
48
|
+
inputProps = _objectWithoutProperties(props, _excluded);
|
|
49
|
+
var url = useRef(is_err ? default_url : PatientSelect_url);
|
|
50
|
+
var keys__ = useRef(is_err ? default_keys : PatientSelect_displayKey);
|
|
51
|
+
var _style = getInputStyle(props);
|
|
52
|
+
var init = useRef(false);
|
|
53
|
+
var _useState = useState([]),
|
|
54
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
55
|
+
raw_opts = _useState2[0],
|
|
56
|
+
set_raw_opts = _useState2[1];
|
|
57
|
+
var nice_key = keys__.current[0].value;
|
|
58
|
+
var scrollPage = useRef(0);
|
|
59
|
+
var key_len = keys__.current.length;
|
|
60
|
+
var pre_col = key_len <= 1 ? 24 : ~~(24 / key_len);
|
|
61
|
+
var last_col = key_len <= 1 ? 0 : 24 - pre_col * (key_len - 1);
|
|
62
|
+
var _useState3 = useState(value),
|
|
63
|
+
_useState4 = _slicedToArray(_useState3, 2),
|
|
64
|
+
local_value = _useState4[0],
|
|
65
|
+
set_local_value = _useState4[1];
|
|
66
|
+
function safe_set_options(arr) {
|
|
67
|
+
set_raw_opts(arr);
|
|
68
|
+
}
|
|
69
|
+
function process_repeated(arr) {
|
|
70
|
+
var x = group(arr, function (_) {
|
|
71
|
+
return get(_, nice_key);
|
|
72
|
+
}); // {aa:[{key:'aa'},{key:'aa'}]}
|
|
73
|
+
var xx = mapValues(x, function (arr) {
|
|
74
|
+
return arr.map(function (_, idx) {
|
|
75
|
+
return _objectSpread(_objectSpread({}, _), {}, _defineProperty({}, nice_key, _[nice_key] + "[".concat(idx + 1, "]")));
|
|
76
|
+
});
|
|
77
|
+
}); // {aa: [{key:'aa[0]'}, {key: 'aa[1]'} ]}
|
|
78
|
+
var xxx = flat(Object.values(xx)); // [{key:'aa[0]'}, {key: 'aa[1]']
|
|
79
|
+
return xxx;
|
|
80
|
+
}
|
|
81
|
+
useEffect(function () {
|
|
82
|
+
if (!init.current && value) {
|
|
83
|
+
init.current = true;
|
|
84
|
+
_handleSearch(value);
|
|
85
|
+
}
|
|
86
|
+
console.log('set_local_value', value);
|
|
87
|
+
set_local_value(value);
|
|
88
|
+
}, [value]);
|
|
89
|
+
var _handleSearch = /*#__PURE__*/function () {
|
|
90
|
+
var _ref = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee(text) {
|
|
91
|
+
var result, res;
|
|
92
|
+
return _regeneratorRuntime.wrap(function _callee$(_context) {
|
|
93
|
+
while (1) switch (_context.prev = _context.next) {
|
|
94
|
+
case 0:
|
|
95
|
+
result = [];
|
|
96
|
+
_context.prev = 1;
|
|
97
|
+
_context.next = 4;
|
|
98
|
+
return request.get("".concat(url.current), {
|
|
99
|
+
params: _defineProperty({
|
|
100
|
+
size: 10,
|
|
101
|
+
page: 0
|
|
102
|
+
}, "".concat(PatientSelect_filterKey, ".contains"), text)
|
|
103
|
+
});
|
|
104
|
+
case 4:
|
|
105
|
+
result = _context.sent.data;
|
|
106
|
+
_context.next = 15;
|
|
107
|
+
break;
|
|
108
|
+
case 7:
|
|
109
|
+
_context.prev = 7;
|
|
110
|
+
_context.t0 = _context["catch"](1);
|
|
111
|
+
if (!is_err) {
|
|
112
|
+
_context.next = 11;
|
|
113
|
+
break;
|
|
114
|
+
}
|
|
115
|
+
return _context.abrupt("return", []);
|
|
116
|
+
case 11:
|
|
117
|
+
is_err = true;
|
|
118
|
+
url.current = default_url;
|
|
119
|
+
keys__.current = default_keys;
|
|
120
|
+
return _context.abrupt("return", _handleSearch(text));
|
|
121
|
+
case 15:
|
|
122
|
+
res = result !== null && result !== void 0 ? result : [];
|
|
123
|
+
safe_set_options(res);
|
|
124
|
+
scrollPage.current = 0;
|
|
125
|
+
return _context.abrupt("return", res);
|
|
126
|
+
case 19:
|
|
127
|
+
case "end":
|
|
128
|
+
return _context.stop();
|
|
129
|
+
}
|
|
130
|
+
}, _callee, null, [[1, 7]]);
|
|
131
|
+
}));
|
|
132
|
+
return function handleSearch(_x) {
|
|
133
|
+
return _ref.apply(this, arguments);
|
|
134
|
+
};
|
|
135
|
+
}();
|
|
136
|
+
var scrollSearch = /*#__PURE__*/function () {
|
|
137
|
+
var _ref2 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee2(value) {
|
|
138
|
+
var page,
|
|
139
|
+
result,
|
|
140
|
+
_args2 = arguments;
|
|
141
|
+
return _regeneratorRuntime.wrap(function _callee2$(_context2) {
|
|
142
|
+
while (1) switch (_context2.prev = _context2.next) {
|
|
143
|
+
case 0:
|
|
144
|
+
page = _args2.length > 1 && _args2[1] !== undefined ? _args2[1] : 0;
|
|
145
|
+
_context2.next = 3;
|
|
146
|
+
return request.get("".concat(url.current), {
|
|
147
|
+
params: _defineProperty(_defineProperty(_defineProperty({}, "".concat(PatientSelect_filterKey, ".contains"), value), "size", 10), "page", page)
|
|
148
|
+
});
|
|
149
|
+
case 3:
|
|
150
|
+
result = _context2.sent;
|
|
151
|
+
safe_set_options([].concat(_toConsumableArray(raw_opts), _toConsumableArray(result.data)));
|
|
152
|
+
case 5:
|
|
153
|
+
case "end":
|
|
154
|
+
return _context2.stop();
|
|
155
|
+
}
|
|
156
|
+
}, _callee2);
|
|
157
|
+
}));
|
|
158
|
+
return function scrollSearch(_x2) {
|
|
159
|
+
return _ref2.apply(this, arguments);
|
|
160
|
+
};
|
|
161
|
+
}();
|
|
162
|
+
var debounce_serach = useMemo(function () {
|
|
163
|
+
return debounce(/*#__PURE__*/function () {
|
|
164
|
+
var _ref3 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee3(text) {
|
|
165
|
+
return _regeneratorRuntime.wrap(function _callee3$(_context3) {
|
|
166
|
+
while (1) switch (_context3.prev = _context3.next) {
|
|
167
|
+
case 0:
|
|
168
|
+
return _context3.abrupt("return", _handleSearch(text));
|
|
169
|
+
case 1:
|
|
170
|
+
case "end":
|
|
171
|
+
return _context3.stop();
|
|
172
|
+
}
|
|
173
|
+
}, _callee3);
|
|
174
|
+
}));
|
|
175
|
+
return function (_x3) {
|
|
176
|
+
return _ref3.apply(this, arguments);
|
|
177
|
+
};
|
|
178
|
+
}(), 400);
|
|
179
|
+
}, []);
|
|
180
|
+
var onPopupScroll = function onPopupScroll(e) {
|
|
181
|
+
e.persist();
|
|
182
|
+
var target = e.target;
|
|
183
|
+
if (target.scrollTop + target.offsetHeight === target.scrollHeight) {
|
|
184
|
+
var nextScrollPage = scrollPage.current + 1;
|
|
185
|
+
scrollPage.current = nextScrollPage;
|
|
186
|
+
scrollSearch(local_value, nextScrollPage);
|
|
187
|
+
}
|
|
188
|
+
};
|
|
189
|
+
return /*#__PURE__*/React.createElement(AutoComplete_L, _objectSpread(_objectSpread({
|
|
190
|
+
dropdownRender: function dropdownRender(menu) {
|
|
191
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Row, {
|
|
192
|
+
style: {
|
|
193
|
+
padding: 6
|
|
194
|
+
}
|
|
195
|
+
}, keys__.current.map(function (k, idx) {
|
|
196
|
+
var key = k.label;
|
|
197
|
+
return /*#__PURE__*/React.createElement(Col, {
|
|
198
|
+
key: key,
|
|
199
|
+
span: idx === key_len - 1 ? last_col : pre_col
|
|
200
|
+
}, key);
|
|
201
|
+
})), /*#__PURE__*/React.createElement(Divider, {
|
|
202
|
+
style: {
|
|
203
|
+
margin: '4px 0'
|
|
204
|
+
}
|
|
205
|
+
}), menu);
|
|
206
|
+
},
|
|
207
|
+
onClick: function onClick() {
|
|
208
|
+
// 点击触发
|
|
209
|
+
if (isEmpty(raw_opts) && isEmpty(local_value)) {
|
|
210
|
+
_handleSearch();
|
|
211
|
+
}
|
|
212
|
+
}
|
|
213
|
+
}, inputProps), {}, {
|
|
214
|
+
allowClear: true,
|
|
215
|
+
style: _style,
|
|
216
|
+
value: local_value,
|
|
217
|
+
popupMatchSelectWidth: popupMatchSelectWidth || key_len * 150,
|
|
218
|
+
options: process_repeated(raw_opts || []).map(function (_) {
|
|
219
|
+
var label = get(_, keys__.current[0].value);
|
|
220
|
+
var opts = {
|
|
221
|
+
label: label,
|
|
222
|
+
value: label,
|
|
223
|
+
key: _ === null || _ === void 0 ? void 0 : _.id,
|
|
224
|
+
option_data: _
|
|
225
|
+
};
|
|
226
|
+
return opts;
|
|
227
|
+
}),
|
|
228
|
+
onChange: function onChange(value, option) {
|
|
229
|
+
var v = get_raw_value(value);
|
|
230
|
+
_onChange === null || _onChange === void 0 || _onChange(v);
|
|
231
|
+
set_local_value(v);
|
|
232
|
+
debounce_serach(v);
|
|
233
|
+
},
|
|
234
|
+
onSelect: function onSelect(text, opt) {
|
|
235
|
+
mchcLogger.log('PatientSelect onSelect', {
|
|
236
|
+
text: text,
|
|
237
|
+
opt: opt
|
|
238
|
+
});
|
|
239
|
+
var option_data = opt.option_data;
|
|
240
|
+
var v = get_raw_value(text);
|
|
241
|
+
var raw_item = raw_opts.find(function (r) {
|
|
242
|
+
return r.id === get(option_data, 'id');
|
|
243
|
+
});
|
|
244
|
+
if (raw_item && v) {
|
|
245
|
+
mchcEvent.emit('my_form', {
|
|
246
|
+
name: name,
|
|
247
|
+
type: 'onSearch',
|
|
248
|
+
value: {
|
|
249
|
+
text: v,
|
|
250
|
+
data: raw_item
|
|
251
|
+
}
|
|
252
|
+
});
|
|
253
|
+
onPatientSelect === null || onPatientSelect === void 0 || onPatientSelect(raw_item, form);
|
|
254
|
+
}
|
|
255
|
+
},
|
|
256
|
+
optionRender: function optionRender(_ref4) {
|
|
257
|
+
var data = _ref4.data;
|
|
258
|
+
var option_data = data.option_data;
|
|
259
|
+
var id = option_data.id;
|
|
260
|
+
return /*#__PURE__*/React.createElement(Row, {
|
|
261
|
+
key: id
|
|
262
|
+
}, keys__.current.map(function (k, idx) {
|
|
263
|
+
var value = get(option_data, k.value);
|
|
264
|
+
return /*#__PURE__*/React.createElement(Col, {
|
|
265
|
+
key: k.label + id,
|
|
266
|
+
span: idx === key_len - 1 ? last_col : pre_col
|
|
267
|
+
}, value);
|
|
268
|
+
}));
|
|
269
|
+
},
|
|
270
|
+
onPopupScroll: onPopupScroll
|
|
271
|
+
}));
|
|
272
|
+
}
|
|
273
|
+
function get_raw_value(mixed_value) {
|
|
274
|
+
var v = mixed_value !== null && mixed_value !== void 0 ? mixed_value : '';
|
|
275
|
+
var match_result = v.match(mode_reg);
|
|
276
|
+
if (match_result) {
|
|
277
|
+
return v.replace(match_result[1], '');
|
|
278
|
+
}
|
|
279
|
+
return mixed_value;
|
|
280
|
+
}
|
|
281
|
+
export { PatientSelect as default };
|