@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
|
@@ -0,0 +1,235 @@
|
|
|
1
|
+
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
2
|
+
import _asyncToGenerator from "@babel/runtime/helpers/asyncToGenerator";
|
|
3
|
+
import _regeneratorRuntime from "@babel/runtime/regenerator";
|
|
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 { mchcLogger, mchcEnv } from '@lm_fe/env';
|
|
7
|
+
import { load_src, sleep } from '@lm_fe/utils';
|
|
8
|
+
import { message, Space, Button } from 'antd';
|
|
9
|
+
import React, { useRef, useEffect } from 'react';
|
|
10
|
+
import { b as load_xemr, c as get_editor_frame } from './index.js';
|
|
11
|
+
import '@noah-libjs/components';
|
|
12
|
+
import 'lodash';
|
|
13
|
+
import '@lm_fe/static';
|
|
14
|
+
import '@lm_fe/service';
|
|
15
|
+
import '@lm_fe/provoke';
|
|
16
|
+
function CaseTempleteEditEmr(props) {
|
|
17
|
+
var toolbars = props.toolbars,
|
|
18
|
+
_props$value = props.value,
|
|
19
|
+
value = _props$value === void 0 ? '' : _props$value,
|
|
20
|
+
onChange = props.onChange,
|
|
21
|
+
containerProps = props.containerProps,
|
|
22
|
+
hidentoolbars = props.hidentoolbars;
|
|
23
|
+
var fuck_editor = useRef();
|
|
24
|
+
var value_cache = useRef(value);
|
|
25
|
+
value_cache.current = value;
|
|
26
|
+
useEffect(function () {
|
|
27
|
+
load_xemr().then(function (editor) {
|
|
28
|
+
fuck_editor.current = editor;
|
|
29
|
+
mchcLogger.log('fuck_editor', fuck_editor.current);
|
|
30
|
+
init_emr();
|
|
31
|
+
});
|
|
32
|
+
return function () {};
|
|
33
|
+
}, []);
|
|
34
|
+
useEffect(function () {
|
|
35
|
+
try {
|
|
36
|
+
var _fuck_editor$current;
|
|
37
|
+
(_fuck_editor$current = fuck_editor.current) === null || _fuck_editor$current === void 0 || _fuck_editor$current.loadHtml(value);
|
|
38
|
+
} catch (e) {
|
|
39
|
+
message.warning('加载文档发生错误');
|
|
40
|
+
mchcLogger.warn('加载文档发生错误', {
|
|
41
|
+
e: e,
|
|
42
|
+
value: value
|
|
43
|
+
});
|
|
44
|
+
}
|
|
45
|
+
return function () {};
|
|
46
|
+
}, [value]);
|
|
47
|
+
function init_emr() {
|
|
48
|
+
var _emreditor$contentWin;
|
|
49
|
+
if (!fuck_editor.current) {
|
|
50
|
+
return;
|
|
51
|
+
}
|
|
52
|
+
var option = {
|
|
53
|
+
license: 'xxxxx',
|
|
54
|
+
//授权字符串
|
|
55
|
+
baseUrl: '/lib/X-EMR/',
|
|
56
|
+
//基本URL
|
|
57
|
+
saveUrl: '/doc/',
|
|
58
|
+
//保存URL
|
|
59
|
+
pdfUrl: 'https://www.x-emr.cn/pdf/post',
|
|
60
|
+
//pdf生成服务
|
|
61
|
+
mode: emr_mode,
|
|
62
|
+
//form:表单模式,design:设计模式
|
|
63
|
+
scale: 1,
|
|
64
|
+
//缩放比例
|
|
65
|
+
container: '#editor_el',
|
|
66
|
+
//编辑器容器对象ID
|
|
67
|
+
toolbar: {
|
|
68
|
+
file: true,
|
|
69
|
+
//显示文件
|
|
70
|
+
edit: true,
|
|
71
|
+
//显示编辑
|
|
72
|
+
insert: true,
|
|
73
|
+
//显示插入
|
|
74
|
+
expression: true,
|
|
75
|
+
//显示表达式
|
|
76
|
+
table: true,
|
|
77
|
+
//显示表格
|
|
78
|
+
revision: true,
|
|
79
|
+
//显示修订
|
|
80
|
+
view: false,
|
|
81
|
+
//显示查看
|
|
82
|
+
print: false,
|
|
83
|
+
//显示打印
|
|
84
|
+
"import": false,
|
|
85
|
+
//显示导入
|
|
86
|
+
"export": false,
|
|
87
|
+
//显示导出
|
|
88
|
+
develop: false,
|
|
89
|
+
//显示开发工具
|
|
90
|
+
help: false //显示帮助
|
|
91
|
+
},
|
|
92
|
+
statusbar: false,
|
|
93
|
+
//是否显示状态栏
|
|
94
|
+
dictionary: false
|
|
95
|
+
};
|
|
96
|
+
fuck_editor.current.init(option);
|
|
97
|
+
fuck_editor.current.loadHtml(value_cache.current);
|
|
98
|
+
var _emreditor = get_editor_frame();
|
|
99
|
+
load_src({
|
|
100
|
+
type: 'text/css',
|
|
101
|
+
text: "\n body {\n background-image: none !important;\n }\n "
|
|
102
|
+
}, _emreditor === null || _emreditor === void 0 || (_emreditor$contentWin = _emreditor.contentWindow) === null || _emreditor$contentWin === void 0 ? void 0 : _emreditor$contentWin.document.head);
|
|
103
|
+
if (!value_cache.current) fuck_editor.current.execCommand('new');
|
|
104
|
+
}
|
|
105
|
+
function save() {
|
|
106
|
+
return _save.apply(this, arguments);
|
|
107
|
+
}
|
|
108
|
+
function _save() {
|
|
109
|
+
_save = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee() {
|
|
110
|
+
var _pv$contentWindow, _documentElement$quer, _documentElement$quer2, _fuck_editor$current2, _fuck_editor$current3, _pv, documentElement, previewHTML;
|
|
111
|
+
return _regeneratorRuntime.wrap(function _callee$(_context) {
|
|
112
|
+
while (1) switch (_context.prev = _context.next) {
|
|
113
|
+
case 0:
|
|
114
|
+
_context.prev = 0;
|
|
115
|
+
_context.next = 3;
|
|
116
|
+
return prepare_preview();
|
|
117
|
+
case 3:
|
|
118
|
+
_pv = _context.sent;
|
|
119
|
+
documentElement = _pv === null || _pv === void 0 || (_pv$contentWindow = _pv.contentWindow) === null || _pv$contentWindow === void 0 ? void 0 : _pv$contentWindow.document;
|
|
120
|
+
previewHTML = (_documentElement$quer = (_documentElement$quer2 = documentElement.querySelector('.preview')) === null || _documentElement$quer2 === void 0 ? void 0 : _documentElement$quer2.innerHTML) !== null && _documentElement$quer !== void 0 ? _documentElement$quer : '';
|
|
121
|
+
mchcLogger.log('previewHTML', {
|
|
122
|
+
previewHTML: previewHTML
|
|
123
|
+
}, (_fuck_editor$current2 = fuck_editor.current) === null || _fuck_editor$current2 === void 0 ? void 0 : _fuck_editor$current2.getHtml());
|
|
124
|
+
onChange === null || onChange === void 0 || onChange((_fuck_editor$current3 = fuck_editor.current) === null || _fuck_editor$current3 === void 0 ? void 0 : _fuck_editor$current3.getHtml());
|
|
125
|
+
_context.next = 14;
|
|
126
|
+
break;
|
|
127
|
+
case 10:
|
|
128
|
+
_context.prev = 10;
|
|
129
|
+
_context.t0 = _context["catch"](0);
|
|
130
|
+
mchcEnv.warning('发生错误');
|
|
131
|
+
mchcLogger.warn('发生错误', _context.t0);
|
|
132
|
+
case 14:
|
|
133
|
+
case "end":
|
|
134
|
+
return _context.stop();
|
|
135
|
+
}
|
|
136
|
+
}, _callee, null, [[0, 10]]);
|
|
137
|
+
}));
|
|
138
|
+
return _save.apply(this, arguments);
|
|
139
|
+
}
|
|
140
|
+
var hiddenButton = props.hiddenButton,
|
|
141
|
+
_props$emr_mode = props.emr_mode,
|
|
142
|
+
emr_mode = _props$emr_mode === void 0 ? 'design' : _props$emr_mode;
|
|
143
|
+
function prepare_preview() {
|
|
144
|
+
return _prepare_preview.apply(this, arguments);
|
|
145
|
+
}
|
|
146
|
+
function _prepare_preview() {
|
|
147
|
+
_prepare_preview = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee2() {
|
|
148
|
+
var _pv, doc_el;
|
|
149
|
+
return _regeneratorRuntime.wrap(function _callee2$(_context2) {
|
|
150
|
+
while (1) switch (_context2.prev = _context2.next) {
|
|
151
|
+
case 0:
|
|
152
|
+
if (fuck_editor.current) {
|
|
153
|
+
_context2.next = 2;
|
|
154
|
+
break;
|
|
155
|
+
}
|
|
156
|
+
return _context2.abrupt("return");
|
|
157
|
+
case 2:
|
|
158
|
+
fuck_editor.current.execCommand('preview');
|
|
159
|
+
_context2.next = 5;
|
|
160
|
+
return sleep(1000);
|
|
161
|
+
case 5:
|
|
162
|
+
// let _emr_el = get_editor_frame()
|
|
163
|
+
_pv = document.getElementById('_printview');
|
|
164
|
+
doc_el = _pv === null || _pv === void 0 ? void 0 : _pv.contentDocument;
|
|
165
|
+
doc_el.querySelectorAll('text').forEach(function (element) {
|
|
166
|
+
return element.remove();
|
|
167
|
+
}); // 删除该死的授权许可
|
|
168
|
+
doc_el.querySelectorAll('.page-mask').forEach(function (element) {
|
|
169
|
+
return element.remove();
|
|
170
|
+
}); // 删除该死的mask
|
|
171
|
+
doc_el.querySelectorAll('.pagebreaker').forEach(function (element) {
|
|
172
|
+
return element.remove();
|
|
173
|
+
}); // 删除该死的pagebreaker
|
|
174
|
+
// _pv.hidden = true
|
|
175
|
+
// _emr_el.style.display = 'block'
|
|
176
|
+
return _context2.abrupt("return", _pv);
|
|
177
|
+
case 11:
|
|
178
|
+
case "end":
|
|
179
|
+
return _context2.stop();
|
|
180
|
+
}
|
|
181
|
+
}, _callee2);
|
|
182
|
+
}));
|
|
183
|
+
return _prepare_preview.apply(this, arguments);
|
|
184
|
+
}
|
|
185
|
+
function print() {
|
|
186
|
+
return _print.apply(this, arguments);
|
|
187
|
+
}
|
|
188
|
+
function _print() {
|
|
189
|
+
_print = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee3() {
|
|
190
|
+
var _pv$contentWindow2, _pv;
|
|
191
|
+
return _regeneratorRuntime.wrap(function _callee3$(_context3) {
|
|
192
|
+
while (1) switch (_context3.prev = _context3.next) {
|
|
193
|
+
case 0:
|
|
194
|
+
_context3.prev = 0;
|
|
195
|
+
_context3.next = 3;
|
|
196
|
+
return prepare_preview();
|
|
197
|
+
case 3:
|
|
198
|
+
_pv = _context3.sent;
|
|
199
|
+
_pv === null || _pv === void 0 || (_pv$contentWindow2 = _pv.contentWindow) === null || _pv$contentWindow2 === void 0 || _pv$contentWindow2.print();
|
|
200
|
+
_context3.next = 11;
|
|
201
|
+
break;
|
|
202
|
+
case 7:
|
|
203
|
+
_context3.prev = 7;
|
|
204
|
+
_context3.t0 = _context3["catch"](0);
|
|
205
|
+
mchcEnv.warning('发生错误');
|
|
206
|
+
mchcLogger.warn('发生错误', _context3.t0);
|
|
207
|
+
case 11:
|
|
208
|
+
case "end":
|
|
209
|
+
return _context3.stop();
|
|
210
|
+
}
|
|
211
|
+
}, _callee3, null, [[0, 7]]);
|
|
212
|
+
}));
|
|
213
|
+
return _print.apply(this, arguments);
|
|
214
|
+
}
|
|
215
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("div", {
|
|
216
|
+
id: "editor_el",
|
|
217
|
+
style: _objectSpread({
|
|
218
|
+
overflow: 'hidden auto',
|
|
219
|
+
height: '100%'
|
|
220
|
+
}, containerProps)
|
|
221
|
+
}), !hiddenButton && (/*#__PURE__*/React.createElement(Space.Compact, {
|
|
222
|
+
style: {
|
|
223
|
+
position: 'fixed',
|
|
224
|
+
right: 36,
|
|
225
|
+
bottom: 36
|
|
226
|
+
}
|
|
227
|
+
}, /*#__PURE__*/React.createElement(Button, {
|
|
228
|
+
type: "primary",
|
|
229
|
+
onClick: save
|
|
230
|
+
}, "\u4FDD\u5B58"), /*#__PURE__*/React.createElement(Button, {
|
|
231
|
+
type: "primary",
|
|
232
|
+
onClick: print
|
|
233
|
+
}, "\u6253\u5370"))));
|
|
234
|
+
}
|
|
235
|
+
export { CaseTempleteEditEmr as default };
|
|
@@ -1,76 +1,30 @@
|
|
|
1
|
+
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
1
2
|
import _toConsumableArray from "@babel/runtime/helpers/toConsumableArray";
|
|
2
3
|
import _asyncToGenerator from "@babel/runtime/helpers/asyncToGenerator";
|
|
3
4
|
import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
|
|
5
|
+
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; }
|
|
6
|
+
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; }
|
|
4
7
|
import _regeneratorRuntime from "@babel/runtime/regenerator";
|
|
5
|
-
import '
|
|
6
|
-
import _Tooltip from 'antd/es/tooltip';
|
|
7
|
-
import 'antd/es/button/style';
|
|
8
|
-
import _Button from 'antd/es/button';
|
|
9
|
-
import { _ as _extends } from './index.js';
|
|
10
|
-
import 'antd/es/input/style';
|
|
11
|
-
import _Input from 'antd/es/input';
|
|
12
|
-
import 'antd/es/cascader/style';
|
|
13
|
-
import _Cascader from 'antd/es/cascader';
|
|
14
|
-
import 'antd/es/message/style';
|
|
15
|
-
import _message from 'antd/es/message';
|
|
16
|
-
import _isEmpty from 'lodash/isEmpty';
|
|
17
|
-
import _get from 'lodash/get';
|
|
8
|
+
import { mchcEnv } from '@lm_fe/env';
|
|
18
9
|
import { SMchc_Address } from '@lm_fe/service';
|
|
19
|
-
import React__default, { useState, useRef, useEffect } from 'react';
|
|
20
|
-
import _isString from 'lodash/isString';
|
|
21
|
-
import _isEqual from 'lodash/isEqual';
|
|
22
|
-
import _cloneDeep from 'lodash/cloneDeep';
|
|
23
10
|
import { copyText } from '@lm_fe/utils';
|
|
24
|
-
import '@
|
|
25
|
-
import 'antd
|
|
26
|
-
import '
|
|
27
|
-
import '
|
|
28
|
-
import 'lodash/map';
|
|
29
|
-
import 'antd/es/modal/style';
|
|
30
|
-
import 'antd/es/modal';
|
|
31
|
-
import 'lodash/isNil';
|
|
32
|
-
import 'antd/es/row/style';
|
|
33
|
-
import 'antd/es/row';
|
|
34
|
-
import 'antd/es/col/style';
|
|
35
|
-
import 'antd/es/col';
|
|
36
|
-
import 'antd/es/form/style';
|
|
37
|
-
import 'antd/es/form';
|
|
38
|
-
import 'antd/es/divider/style';
|
|
39
|
-
import 'antd/es/divider';
|
|
40
|
-
import 'antd/es/slider/style';
|
|
41
|
-
import 'antd/es/slider';
|
|
42
|
-
import 'antd/es/rate/style';
|
|
43
|
-
import 'antd/es/rate';
|
|
44
|
-
import 'antd/es/switch/style';
|
|
45
|
-
import 'antd/es/switch';
|
|
46
|
-
import 'antd/es/time-picker/style';
|
|
47
|
-
import 'antd/es/time-picker';
|
|
48
|
-
import 'antd/es/checkbox/style';
|
|
49
|
-
import 'antd/es/checkbox';
|
|
50
|
-
import 'antd/es/input-number/style';
|
|
51
|
-
import 'antd/es/input-number';
|
|
52
|
-
import 'antd/es/radio/style';
|
|
53
|
-
import 'antd/es/radio';
|
|
54
|
-
import 'antd/es/date-picker/style';
|
|
55
|
-
import 'antd/es/date-picker';
|
|
56
|
-
import 'rc-tree/es/TreeNode';
|
|
57
|
-
import 'antd/es/tabs/style';
|
|
58
|
-
import 'antd/es/tabs';
|
|
59
|
-
import '@lm_fe/static';
|
|
60
|
-
import 'react-keep-alive-pro';
|
|
11
|
+
import { MyIcon } from '@noah-libjs/components';
|
|
12
|
+
import { Space, Cascader, Input, Button, Tooltip } from 'antd';
|
|
13
|
+
import { isEmpty, isEqual, isString, cloneDeep, get } from 'lodash';
|
|
14
|
+
import React, { useState, useRef, useEffect } from 'react';
|
|
61
15
|
function checkFetchAddrOptionsNeed(value, oldArr, options) {
|
|
62
16
|
var _parseValue = parseValue(value),
|
|
63
17
|
arr = _parseValue.arr;
|
|
64
|
-
if (
|
|
65
|
-
if (
|
|
18
|
+
if (isEmpty(arr)) {
|
|
19
|
+
if (isEmpty(options)) return 'init';
|
|
66
20
|
return 'noNeed';
|
|
67
21
|
} else {
|
|
68
|
-
if (
|
|
22
|
+
if (isEqual(arr, oldArr)) return 'noNeed';
|
|
69
23
|
return 'detail';
|
|
70
24
|
}
|
|
71
25
|
}
|
|
72
26
|
function parseValue(value) {
|
|
73
|
-
if (!value || !
|
|
27
|
+
if (!value || !isString(value)) return {
|
|
74
28
|
arr: [],
|
|
75
29
|
str: ''
|
|
76
30
|
};
|
|
@@ -80,7 +34,7 @@ function parseValue(value) {
|
|
|
80
34
|
provinces = _value$split2[0],
|
|
81
35
|
detailed = _value$split2[1];
|
|
82
36
|
var rawArr = provinces ? provinces.split(',') : [];
|
|
83
|
-
var newArr =
|
|
37
|
+
var newArr = cloneDeep(rawArr);
|
|
84
38
|
// 兼容旧版本全是“,”分割的地址(省,市,区,街道,详细地址)
|
|
85
39
|
if (!value.includes('&')) {
|
|
86
40
|
newArr = rawArr.slice(0, 3);
|
|
@@ -91,7 +45,7 @@ function parseValue(value) {
|
|
|
91
45
|
str: detailed
|
|
92
46
|
};
|
|
93
47
|
}
|
|
94
|
-
function
|
|
48
|
+
function MyAddressNew_Inner(props) {
|
|
95
49
|
var _value$replace;
|
|
96
50
|
var id = props.id,
|
|
97
51
|
value = props.value,
|
|
@@ -253,7 +207,7 @@ function MyAddressNew(props) {
|
|
|
253
207
|
};
|
|
254
208
|
var handleSameAdress = function handleSameAdress(key) {
|
|
255
209
|
return function () {
|
|
256
|
-
var sourceValue =
|
|
210
|
+
var sourceValue = get(form === null || form === void 0 ? void 0 : form.getFieldsValue(), key);
|
|
257
211
|
if (sourceValue) {
|
|
258
212
|
safeChange === null || safeChange === void 0 || safeChange(sourceValue);
|
|
259
213
|
}
|
|
@@ -261,22 +215,17 @@ function MyAddressNew(props) {
|
|
|
261
215
|
};
|
|
262
216
|
function copy() {
|
|
263
217
|
copyText(txt !== null && txt !== void 0 ? txt : '');
|
|
264
|
-
|
|
218
|
+
mchcEnv.success('复制成功');
|
|
265
219
|
}
|
|
266
220
|
if (loading) {
|
|
267
|
-
return /*#__PURE__*/
|
|
221
|
+
return /*#__PURE__*/React.createElement("span", null, "\u6570\u636E\u52A0\u8F7D\u4E2D....");
|
|
268
222
|
}
|
|
269
223
|
var txt = value === null || value === void 0 || (_value$replace = value.replace) === null || _value$replace === void 0 ? void 0 : _value$replace.call(value, /,|&/g, '');
|
|
270
|
-
var node = /*#__PURE__*/
|
|
271
|
-
compact: true,
|
|
224
|
+
var node = /*#__PURE__*/React.createElement(Space.Compact, {
|
|
272
225
|
style: {
|
|
273
226
|
display: 'flex'
|
|
274
227
|
}
|
|
275
|
-
}, /*#__PURE__*/
|
|
276
|
-
style: {
|
|
277
|
-
flex: 1
|
|
278
|
-
}
|
|
279
|
-
}, /*#__PURE__*/React__default.createElement(_Cascader, {
|
|
228
|
+
}, /*#__PURE__*/React.createElement(Cascader, {
|
|
280
229
|
changeOnSelect: true,
|
|
281
230
|
allowClear: true,
|
|
282
231
|
size: size,
|
|
@@ -287,14 +236,14 @@ function MyAddressNew(props) {
|
|
|
287
236
|
loadData: function loadData(arr) {
|
|
288
237
|
if (arr) {
|
|
289
238
|
var item = arr[arr.length - 1];
|
|
290
|
-
if (item &&
|
|
239
|
+
if (item && isEmpty(item.children)) {
|
|
291
240
|
item.loading = true;
|
|
292
241
|
SMchc_Address.getAddressList(item).then(/*#__PURE__*/function () {
|
|
293
242
|
var _ref2 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee2(r) {
|
|
294
243
|
return _regeneratorRuntime.wrap(function _callee2$(_context2) {
|
|
295
244
|
while (1) switch (_context2.prev = _context2.next) {
|
|
296
245
|
case 0:
|
|
297
|
-
// await sleep(.2)
|
|
246
|
+
// await sleep(.2 * 1000)
|
|
298
247
|
item.loading = false;
|
|
299
248
|
item.children = r;
|
|
300
249
|
__setCascaderOptions(_toConsumableArray(cascaderOptions));
|
|
@@ -310,17 +259,17 @@ function MyAddressNew(props) {
|
|
|
310
259
|
}());
|
|
311
260
|
}
|
|
312
261
|
}
|
|
313
|
-
}
|
|
262
|
+
},
|
|
314
263
|
// showSearch={{ filter }}
|
|
315
|
-
,
|
|
316
|
-
|
|
317
264
|
placeholder: "\u8BF7\u9009\u62E9\u5730\u533A",
|
|
318
265
|
value: cascaderValue,
|
|
319
266
|
style: {
|
|
320
267
|
width: '50%'
|
|
321
268
|
},
|
|
322
269
|
getPopupContainer: getPopupContainer
|
|
323
|
-
}), /*#__PURE__*/
|
|
270
|
+
}), /*#__PURE__*/React.createElement(Input
|
|
271
|
+
// title={txt}
|
|
272
|
+
, {
|
|
324
273
|
// title={txt}
|
|
325
274
|
size: size,
|
|
326
275
|
disabled: disabled,
|
|
@@ -332,30 +281,30 @@ function MyAddressNew(props) {
|
|
|
332
281
|
style: {
|
|
333
282
|
width: '50%'
|
|
334
283
|
}
|
|
335
|
-
})
|
|
284
|
+
}), addressBtns.map(function (_ref3) {
|
|
336
285
|
var label = _ref3.label,
|
|
337
286
|
name = _ref3.name,
|
|
338
287
|
_ref3$props = _ref3.props,
|
|
339
288
|
props = _ref3$props === void 0 ? {} : _ref3$props;
|
|
340
|
-
return /*#__PURE__*/
|
|
289
|
+
return /*#__PURE__*/React.createElement(Button, _objectSpread(_objectSpread({
|
|
290
|
+
key: name,
|
|
341
291
|
ghost: true,
|
|
342
292
|
type: "primary"
|
|
343
|
-
}, props, {
|
|
293
|
+
}, props), {}, {
|
|
344
294
|
onClick: handleSameAdress(name)
|
|
345
295
|
}), label !== null && label !== void 0 ? label : 'label');
|
|
346
296
|
}));
|
|
347
|
-
return /*#__PURE__*/
|
|
297
|
+
return /*#__PURE__*/React.createElement(Tooltip, {
|
|
348
298
|
id: id,
|
|
349
299
|
placement: "topLeft",
|
|
350
|
-
title: /*#__PURE__*/
|
|
300
|
+
title: /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement("span", null, txt, " "), /*#__PURE__*/React.createElement(Button, {
|
|
301
|
+
size: 'small',
|
|
351
302
|
onClick: copy,
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
}, "\u70B9\u51FB\u590D\u5236"))
|
|
303
|
+
type: 'primary',
|
|
304
|
+
icon: /*#__PURE__*/React.createElement(MyIcon, {
|
|
305
|
+
value: 'CopyOutlined'
|
|
306
|
+
})
|
|
307
|
+
}))
|
|
358
308
|
}, node);
|
|
359
309
|
}
|
|
360
|
-
export {
|
|
361
|
-
//# sourceMappingURL=.root6.js.map
|
|
310
|
+
export { MyAddressNew_Inner as default };
|