@lm_fe/pages-mchc 0.2.5 → 0.2.7
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/a_chunks/diagnoses-week.js +1 -1
- package/dist/a_chunks/index.js +16 -18
- package/dist/a_chunks/index2.js +1 -1
- package/dist/a_chunks/pages.config-table.list.js +1 -1
- package/dist/a_chunks/pages.config-table.panel.js +1 -1
- package/dist/a_chunks/pages.config-table.panel2.js +1 -1
- package/dist/a_chunks/prenatal-visit.pregnancy.doctor-end.js +7 -7
- package/dist/a_chunks/prenatal-visit.pregnancy.doctor-end10.js +46 -79
- package/dist/a_chunks/prenatal-visit.pregnancy.doctor-end11.js +75 -363
- package/dist/a_chunks/prenatal-visit.pregnancy.doctor-end12.js +334 -188
- package/dist/a_chunks/prenatal-visit.pregnancy.doctor-end13.js +213 -470
- package/dist/a_chunks/prenatal-visit.pregnancy.doctor-end14.js +463 -163
- package/dist/a_chunks/prenatal-visit.pregnancy.doctor-end15.js +135 -304
- package/dist/a_chunks/prenatal-visit.pregnancy.doctor-end16.js +320 -152
- package/dist/a_chunks/prenatal-visit.pregnancy.doctor-end17.js +181 -77
- package/dist/a_chunks/prenatal-visit.pregnancy.doctor-end18.js +70 -234
- package/dist/a_chunks/prenatal-visit.pregnancy.doctor-end19.js +239 -52
- package/dist/a_chunks/prenatal-visit.pregnancy.doctor-end2.js +1132 -341
- package/dist/a_chunks/prenatal-visit.pregnancy.doctor-end20.js +52 -251
- package/dist/a_chunks/prenatal-visit.pregnancy.doctor-end21.js +243 -99
- package/dist/a_chunks/prenatal-visit.pregnancy.doctor-end22.js +95 -83
- package/dist/a_chunks/prenatal-visit.pregnancy.doctor-end23.js +94 -515
- package/dist/a_chunks/prenatal-visit.pregnancy.doctor-end24.js +507 -297
- package/dist/a_chunks/prenatal-visit.pregnancy.doctor-end25.js +279 -408
- package/dist/a_chunks/prenatal-visit.pregnancy.doctor-end26.js +419 -103
- package/dist/a_chunks/prenatal-visit.pregnancy.doctor-end27.js +101 -187
- package/dist/a_chunks/prenatal-visit.pregnancy.doctor-end28.js +185 -423
- package/dist/a_chunks/prenatal-visit.pregnancy.doctor-end29.js +313 -246
- package/dist/a_chunks/prenatal-visit.pregnancy.doctor-end3.js +344 -550
- package/dist/a_chunks/prenatal-visit.pregnancy.doctor-end30.js +223 -133
- package/dist/a_chunks/prenatal-visit.pregnancy.doctor-end31.js +271 -93
- package/dist/a_chunks/prenatal-visit.pregnancy.doctor-end32.js +96 -216
- package/dist/a_chunks/prenatal-visit.pregnancy.doctor-end33.js +215 -117
- package/dist/a_chunks/prenatal-visit.pregnancy.doctor-end34.js +102 -91
- package/dist/a_chunks/prenatal-visit.pregnancy.doctor-end35.js +94 -22
- package/dist/a_chunks/prenatal-visit.pregnancy.doctor-end36.js +9 -16
- package/dist/a_chunks/prenatal-visit.pregnancy.doctor-end37.js +28 -44
- package/dist/a_chunks/prenatal-visit.pregnancy.doctor-end38.js +45 -41
- package/dist/a_chunks/prenatal-visit.pregnancy.doctor-end39.js +55 -108
- package/dist/a_chunks/prenatal-visit.pregnancy.doctor-end4.js +552 -30
- package/dist/a_chunks/prenatal-visit.pregnancy.doctor-end40.js +54 -105
- package/dist/a_chunks/prenatal-visit.pregnancy.doctor-end41.js +160 -234
- package/dist/a_chunks/prenatal-visit.pregnancy.doctor-end42.js +235 -0
- package/dist/a_chunks/prenatal-visit.pregnancy.doctor-end5.js +33 -40
- package/dist/a_chunks/prenatal-visit.pregnancy.doctor-end6.js +40 -33
- package/dist/a_chunks/prenatal-visit.pregnancy.doctor-end7.js +33 -40
- package/dist/a_chunks/prenatal-visit.pregnancy.doctor-end8.js +39 -33
- package/dist/a_chunks/prenatal-visit.pregnancy.doctor-end9.js +33 -39
- package/dist/a_chunks/prenatal-visit.pregnancy.nurse-end.js +4 -2
- package/dist/a_chunks/src.pages.config-table.js +1 -1
- package/dist/a_chunks/src.pages.system-config2.js +68 -56
- package/dist/a_chunks/utils.js +60 -110
- package/dist/a_chunks/utils2.js +113 -56
- package/dist/a_chunks/utils3.js +57 -0
- package/dist/pages/config-table/utils.d.ts +1 -0
- package/dist/pages/prenatal-visit/pregnancy/doctor-end/.further/components/FurtherTable/index.d.ts +1 -0
- package/dist/pages/prenatal-visit/pregnancy/doctor-end/.further/utils.d.ts +9 -0
- package/package.json +9 -9
- package/dist/a_chunks/DoctorEnd_FurtherPage.js +0 -1244
- package/dist/pages/prenatal-visit/pregnancy/doctor-end/.further/components/FurtherForm/config.d.ts +0 -9
- package/dist/pages/prenatal-visit/pregnancy/doctor-end/.postpartum/components/FurtherForm/config.d.ts +0 -6
|
@@ -1,180 +1,480 @@
|
|
|
1
|
-
import { s as styleInject,
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import
|
|
7
|
-
import
|
|
8
|
-
import
|
|
9
|
-
import
|
|
1
|
+
import { s as styleInject, e as __extends, c as __assign, _ as __awaiter, a as __generator } from './index.js';
|
|
2
|
+
import { LazyAntd, MyIcon } from '@lm_fe/components';
|
|
3
|
+
import { request } from '@lm_fe/utils';
|
|
4
|
+
import { Tooltip, Modal, Input, Button, Row, Col } from 'antd';
|
|
5
|
+
import { get, concat, forEach, includes, map, isEmpty, isUndefined } from 'lodash';
|
|
6
|
+
import React, { Component } from 'react';
|
|
7
|
+
import '@lm_fe/env';
|
|
8
|
+
import '@lm_fe/components_m';
|
|
9
|
+
import '@lm_fe/pages';
|
|
10
10
|
import '@lm_fe/service';
|
|
11
|
-
|
|
12
|
-
import '@lm_fe/provoke';
|
|
13
|
-
var css_248z = ".diagWrapper-new {\n padding: 8px;\n overflow-y: auto;\n border: 1px solid #d7dce7;\n padding-right: 0px;\n}\n.diagWrapper-new .diagIpt {\n padding-bottom: 5px;\n}\n.diagWrapper-new .firstDiag {\n display: flex;\n align-items: center;\n margin: 7px 0px 7px 5px;\n font-weight: 600;\n color: #150f55;\n}\n.diagWrapper-new .firstDiag .diagNum {\n border-radius: 50%;\n width: 20px;\n height: 20px;\n line-height: 20px;\n text-align: center;\n border: 2px solid #d7dce7;\n background-color: #fff;\n display: flex;\n justify-content: center;\n align-items: center;\n color: #333541;\n margin-right: 6px;\n font-weight: 400;\n}\n.diagWrapper-new .singleDiag {\n display: flex;\n align-items: center;\n margin: 7px 0 7px 5px;\n font-weight: 600;\n color: #150f55;\n}\n.diagWrapper-new input::-webkit-input-placeholder {\n /* WebKit browsers */\n color: #242741;\n}\n.diagWrapper-new input:-moz-placeholder {\n /* Mozilla Firefox 4 to 18 */\n color: #242741;\n}\n.diagWrapper-new input::-moz-placeholder {\n /* Mozilla Firefox 19+ */\n color: #242741;\n}\n.diagWrapper-new input:-ms-input-placeholder {\n /* Internet Explorer 10+ */\n color: #242741;\n}\n.diagWrapper-new .diagGP {\n display: inline-block;\n width: 12px;\n height: 21px;\n line-height: 21px;\n border-bottom: 1px #fe708b solid;\n}\n.diagWrapper-new .diagWeek {\n width: 34px;\n padding: 0 2px;\n}\n.diagWrapper-new .diagWord {\n display: flex;\n align-items: center;\n border-radius: 2px;\n color: #150f55;\n cursor: pointer;\n background-color: #fce6ea;\n flex-wrap: wrap;\n}\n.diagWrapper-new .remark {\n color: #a39b9b;\n}\n.diagWrapper-new .diagHighrisk {\n background-color: #fcb9c5;\n}\n.diagWrapper-new .diagNote {\n min-width: 60px;\n height: 28px;\n flex: 1;\n border: 0 none;\n outline: none;\n box-shadow: none;\n background-color: transparent;\n border-bottom: 1px #fe708b solid;\n}\n.diagWrapper-new .diagNote::-ms-input-placeholder {\n text-align: center;\n}\n.diagWrapper-new .diagNote::-webkit-input-placeholder {\n text-align: center;\n}\n.diagWrapper-new .diag-popover {\n display: flex;\n align-items: center;\n}\n.diagWrapper-new .diag-popover2 {\n display: flex;\n align-items: center;\n}\n.diagWrapper-new .diag-words {\n overflow: hidden;\n text-overflow: ellipsis;\n display: -webkit-box !important;\n -webkit-box-orient: vertical;\n -webkit-line-clamp: 2;\n}\n.diagWrapper-new .delBtn {\n color: #8a8a8a;\n font-size: 24px;\n}\n.diagHandle {\n cursor: pointer;\n}\n";
|
|
11
|
+
var css_248z = ".template-tree-wrapper .add-btn {\n position: absolute;\n top: 18px;\n right: 42px;\n z-index: 2;\n text-align: right;\n}\n.template-tree-wrapper .ant-tree .ant-tree-list .ant-tree-title {\n display: inline-block;\n max-width: 320px;\n overflow: hidden;\n white-space: nowrap;\n text-overflow: ellipsis;\n}\n.template-tree-wrapper .handle-icon {\n margin-left: 10px;\n cursor: pointer;\n}\n";
|
|
14
12
|
styleInject(css_248z);
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
13
|
+
var operationMapping = {
|
|
14
|
+
"new": '新增模板',
|
|
15
|
+
add: '新增子模板',
|
|
16
|
+
edit: '编辑模板',
|
|
17
|
+
"delete": '请注意!'
|
|
18
|
+
};
|
|
19
|
+
var Tree = LazyAntd.Tree;
|
|
20
|
+
LazyAntd.TreeSelect;
|
|
21
|
+
LazyAntd.Select;
|
|
22
|
+
LazyAntd.Table;
|
|
23
|
+
LazyAntd.Dropdown;
|
|
24
|
+
LazyAntd.Pagination;
|
|
25
|
+
var Index = function (_super) {
|
|
26
|
+
__extends(Index, _super);
|
|
27
|
+
function Index(props) {
|
|
28
|
+
var _this = _super.call(this, props) || this;
|
|
29
|
+
_this.getTemplateData = function (value) {
|
|
30
|
+
return __awaiter(_this, void 0, void 0, function () {
|
|
31
|
+
var _a, type, depid, userid, pregnancyid, paramsArr, paramsStr, newValue, res;
|
|
32
|
+
return __generator(this, function (_b) {
|
|
33
|
+
switch (_b.label) {
|
|
34
|
+
case 0:
|
|
35
|
+
_a = this.props, type = _a.type, depid = _a.depid, userid = _a.userid, pregnancyid = _a.pregnancyid;
|
|
36
|
+
paramsArr = {
|
|
37
|
+
type: type,
|
|
38
|
+
depid: depid,
|
|
39
|
+
userid: userid
|
|
40
|
+
};
|
|
41
|
+
paramsStr = '';
|
|
42
|
+
forEach(paramsArr, function (value, key) {
|
|
43
|
+
if (!isUndefined(value)) {
|
|
44
|
+
paramsStr += "".concat(key, ".equals=").concat(value, "&");
|
|
45
|
+
}
|
|
46
|
+
});
|
|
47
|
+
if (pregnancyid) {
|
|
48
|
+
paramsStr += "pregnancyid.equals=".concat(pregnancyid, "&");
|
|
49
|
+
}
|
|
50
|
+
newValue = value == undefined ? this.props.searchValue : value;
|
|
51
|
+
if (newValue) {
|
|
52
|
+
paramsStr += "code.contains=".concat(newValue, "&mnemonic.contains=").concat(newValue, "&val.contains=").concat(newValue, "&");
|
|
53
|
+
}
|
|
54
|
+
return [4, request.get("/api/template-trees?".concat(paramsStr, "page=0&size=500"))];
|
|
55
|
+
case 1:
|
|
56
|
+
res = _b.sent().data;
|
|
57
|
+
res = res || [];
|
|
58
|
+
this.setState({
|
|
59
|
+
templateData: res
|
|
60
|
+
});
|
|
61
|
+
this.setState({
|
|
62
|
+
nodeTreeItem: null,
|
|
63
|
+
operation: null,
|
|
64
|
+
newTitle: null,
|
|
65
|
+
addTitle: null
|
|
66
|
+
});
|
|
67
|
+
return [2];
|
|
68
|
+
}
|
|
69
|
+
});
|
|
46
70
|
});
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
return __generator(this, function (_a) {
|
|
53
|
-
switch (_a.label) {
|
|
54
|
-
case 0:
|
|
55
|
-
newList = cloneDeep(diagnosesList);
|
|
56
|
-
delArr = newList.splice(i, 1);
|
|
57
|
-
return [4, requestMethods_further.deleteDiagnosis(get(delArr, "[0].id"))];
|
|
58
|
-
case 1:
|
|
59
|
-
_a.sent();
|
|
60
|
-
mchcEnv.success('删除成功!');
|
|
61
|
-
setDiagnosesList(newList);
|
|
62
|
-
changeHeaderInfo();
|
|
63
|
-
return [2];
|
|
64
|
-
}
|
|
71
|
+
};
|
|
72
|
+
_this.handleTreeItem = function (operate) {
|
|
73
|
+
_this.setState({
|
|
74
|
+
modalVisible: true,
|
|
75
|
+
operation: operate
|
|
65
76
|
});
|
|
66
|
-
}
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
77
|
+
};
|
|
78
|
+
_this.handleTreeSort = function (sort) {
|
|
79
|
+
return __awaiter(_this, void 0, void 0, function () {
|
|
80
|
+
return __generator(this, function (_a) {
|
|
81
|
+
console.log('移动');
|
|
82
|
+
return [2];
|
|
83
|
+
});
|
|
84
|
+
});
|
|
85
|
+
};
|
|
86
|
+
_this.handleIptChange = function (e, operation) {
|
|
87
|
+
var nodeTreeItem = _this.state.nodeTreeItem;
|
|
88
|
+
if (operation === 'new') _this.setState({
|
|
89
|
+
newTitle: e.target.value
|
|
90
|
+
});
|
|
91
|
+
if (operation === 'add') _this.setState({
|
|
92
|
+
addTitle: e.target.value
|
|
93
|
+
});
|
|
94
|
+
if (operation === 'edit') {
|
|
95
|
+
var data = {
|
|
96
|
+
title: e.target.value
|
|
97
|
+
};
|
|
98
|
+
_this.setState({
|
|
99
|
+
nodeTreeItem: __assign(__assign({}, nodeTreeItem), data)
|
|
100
|
+
});
|
|
101
|
+
}
|
|
102
|
+
};
|
|
103
|
+
_this.handleOk = function () {
|
|
104
|
+
return __awaiter(_this, void 0, void 0, function () {
|
|
105
|
+
var _a, type, depid, userid, _b, nodeTreeItem, addTitle, operation, newTitle, newItem, addItem, editItem;
|
|
106
|
+
return __generator(this, function (_c) {
|
|
107
|
+
switch (_c.label) {
|
|
108
|
+
case 0:
|
|
109
|
+
_a = this.props, type = _a.type, depid = _a.depid, userid = _a.userid;
|
|
110
|
+
_b = this.state, nodeTreeItem = _b.nodeTreeItem, addTitle = _b.addTitle, operation = _b.operation, newTitle = _b.newTitle;
|
|
111
|
+
if (!(operation === 'new')) return [3, 2];
|
|
112
|
+
newItem = {
|
|
113
|
+
pid: 0,
|
|
114
|
+
val: newTitle,
|
|
115
|
+
type: type,
|
|
116
|
+
depid: depid,
|
|
117
|
+
userid: userid
|
|
118
|
+
};
|
|
119
|
+
return [4, request.post("/api/template-trees", newItem)];
|
|
120
|
+
case 1:
|
|
121
|
+
_c.sent();
|
|
122
|
+
this.getTemplateData();
|
|
123
|
+
_c.label = 2;
|
|
124
|
+
case 2:
|
|
125
|
+
if (!(operation === 'add')) return [3, 4];
|
|
126
|
+
addItem = {
|
|
127
|
+
pid: Number(nodeTreeItem.id),
|
|
128
|
+
val: addTitle,
|
|
129
|
+
type: type,
|
|
130
|
+
depid: depid,
|
|
131
|
+
userid: userid
|
|
132
|
+
};
|
|
133
|
+
return [4, request.post("/api/template-trees", addItem)];
|
|
134
|
+
case 3:
|
|
135
|
+
_c.sent();
|
|
136
|
+
this.getTemplateData();
|
|
137
|
+
_c.label = 4;
|
|
138
|
+
case 4:
|
|
139
|
+
if (!(operation === 'edit')) return [3, 6];
|
|
140
|
+
editItem = {
|
|
141
|
+
pid: Number(nodeTreeItem.pid),
|
|
142
|
+
val: nodeTreeItem.title,
|
|
143
|
+
type: type,
|
|
144
|
+
depid: depid,
|
|
145
|
+
userid: userid,
|
|
146
|
+
id: nodeTreeItem.id
|
|
147
|
+
};
|
|
148
|
+
return [4, request.put("/api/template-trees", editItem)];
|
|
149
|
+
case 5:
|
|
150
|
+
_c.sent();
|
|
151
|
+
this.getTemplateData();
|
|
152
|
+
_c.label = 6;
|
|
153
|
+
case 6:
|
|
154
|
+
if (!(operation === 'delete')) return [3, 8];
|
|
155
|
+
return [4, request["delete"]("/api/template-trees/".concat(nodeTreeItem.id))];
|
|
156
|
+
case 7:
|
|
157
|
+
_c.sent();
|
|
158
|
+
this.getTemplateData();
|
|
159
|
+
_c.label = 8;
|
|
160
|
+
case 8:
|
|
161
|
+
this.setState({
|
|
162
|
+
modalVisible: false,
|
|
163
|
+
nodeTreeItem: null,
|
|
164
|
+
operation: null
|
|
96
165
|
});
|
|
166
|
+
return [2];
|
|
167
|
+
}
|
|
168
|
+
});
|
|
169
|
+
});
|
|
170
|
+
};
|
|
171
|
+
_this.handleCancel = function () {
|
|
172
|
+
_this.setState({
|
|
173
|
+
modalVisible: false,
|
|
174
|
+
nodeTreeItem: null,
|
|
175
|
+
operation: null
|
|
176
|
+
});
|
|
177
|
+
};
|
|
178
|
+
_this.handleAddBtnClick = function () {
|
|
179
|
+
_this.setState({
|
|
180
|
+
operation: 'new',
|
|
181
|
+
modalVisible: true
|
|
182
|
+
});
|
|
183
|
+
};
|
|
184
|
+
_this.onMouseEnter = function (_a, area) {
|
|
185
|
+
var event = _a.event,
|
|
186
|
+
node = _a.node;
|
|
187
|
+
var x = event.currentTarget.offsetLeft + event.currentTarget.clientWidth;
|
|
188
|
+
var y = event.currentTarget.offsetTop;
|
|
189
|
+
_this.setState({
|
|
190
|
+
nodeTreeItem: {
|
|
191
|
+
pageX: x,
|
|
192
|
+
pageY: y,
|
|
193
|
+
pid: node.props.pid,
|
|
194
|
+
id: Number(node.props.eventKey),
|
|
195
|
+
title: node.props.title,
|
|
196
|
+
sort: node.props.sort
|
|
197
|
+
},
|
|
198
|
+
currentArea: area
|
|
199
|
+
});
|
|
200
|
+
};
|
|
201
|
+
_this.handleCheck = function (keys) {
|
|
202
|
+
return __awaiter(_this, void 0, void 0, function () {
|
|
203
|
+
var onChecked, _a, templateData;
|
|
204
|
+
return __generator(this, function (_b) {
|
|
205
|
+
onChecked = this.props.onChecked;
|
|
206
|
+
_a = this.state, templateData = _a.templateData, _a.checkedKeys;
|
|
207
|
+
this.setState({
|
|
208
|
+
checkedKeys: keys
|
|
209
|
+
});
|
|
210
|
+
forEach(templateData, function (item) {
|
|
211
|
+
if (includes(keys, "".concat(item.id))) {
|
|
212
|
+
item.checked = true;
|
|
213
|
+
} else {
|
|
214
|
+
item.checked = false;
|
|
97
215
|
}
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
216
|
+
});
|
|
217
|
+
onChecked && onChecked(templateData);
|
|
218
|
+
return [2];
|
|
219
|
+
});
|
|
220
|
+
});
|
|
221
|
+
};
|
|
222
|
+
_this.handleCheckLeft = function (keys) {
|
|
223
|
+
var onChecked = _this.props.onChecked;
|
|
224
|
+
var _a = _this.state,
|
|
225
|
+
templateData = _a.templateData,
|
|
226
|
+
checkedKeysRight = _a.checkedKeysRight;
|
|
227
|
+
var allCheckedKays = concat(keys, checkedKeysRight);
|
|
228
|
+
_this.setState({
|
|
229
|
+
checkedKeysLeft: keys
|
|
230
|
+
});
|
|
231
|
+
forEach(templateData, function (item) {
|
|
232
|
+
if (includes(allCheckedKays, "".concat(item.id))) {
|
|
233
|
+
item.checked = true;
|
|
234
|
+
} else {
|
|
235
|
+
item.checked = false;
|
|
236
|
+
}
|
|
237
|
+
});
|
|
238
|
+
onChecked && onChecked(templateData);
|
|
239
|
+
};
|
|
240
|
+
_this.handleCheckRight = function (keys) {
|
|
241
|
+
var onChecked = _this.props.onChecked;
|
|
242
|
+
var _a = _this.state,
|
|
243
|
+
templateData = _a.templateData,
|
|
244
|
+
checkedKeysLeft = _a.checkedKeysLeft;
|
|
245
|
+
var allCheckedKays = concat(keys, checkedKeysLeft);
|
|
246
|
+
_this.setState({
|
|
247
|
+
checkedKeysRight: keys
|
|
248
|
+
});
|
|
249
|
+
forEach(templateData, function (item) {
|
|
250
|
+
if (includes(allCheckedKays, "".concat(item.id))) {
|
|
251
|
+
item.checked = true;
|
|
252
|
+
} else {
|
|
253
|
+
item.checked = false;
|
|
104
254
|
}
|
|
105
255
|
});
|
|
106
|
-
|
|
256
|
+
onChecked && onChecked(templateData);
|
|
257
|
+
};
|
|
258
|
+
_this.transferTemplateData = function (data, pid) {
|
|
259
|
+
if (pid === void 0) {
|
|
260
|
+
pid = 0;
|
|
261
|
+
}
|
|
262
|
+
var showIcd = _this.props.showIcd;
|
|
263
|
+
var treeData = [];
|
|
264
|
+
map(data, function (item) {
|
|
265
|
+
if (item.pid === pid) {
|
|
266
|
+
item.title = showIcd && item.code ? "\uFF08icd\uFF09".concat(item.val) : item.val;
|
|
267
|
+
item.key = String(item.id);
|
|
268
|
+
item.children = _this.transferTemplateData(data, item.id);
|
|
269
|
+
if (isEmpty(item.children)) {
|
|
270
|
+
item.isLeaf = true;
|
|
271
|
+
} else {
|
|
272
|
+
item.isLeaf = false;
|
|
273
|
+
}
|
|
274
|
+
treeData.push(item);
|
|
275
|
+
}
|
|
276
|
+
});
|
|
277
|
+
console.log({
|
|
278
|
+
treeData: treeData
|
|
279
|
+
});
|
|
280
|
+
return treeData;
|
|
281
|
+
};
|
|
282
|
+
_this.handleSelect = function (selectedKeys, _a) {
|
|
283
|
+
var node = _a.node;
|
|
284
|
+
var onSelected = _this.props.onSelected;
|
|
285
|
+
onSelected && onSelected(node);
|
|
286
|
+
};
|
|
287
|
+
_this.state = {
|
|
288
|
+
templateData: null,
|
|
289
|
+
checkedKeys: [],
|
|
290
|
+
checkedKeysLeft: [],
|
|
291
|
+
checkedKeysRight: [],
|
|
292
|
+
currentArea: null,
|
|
293
|
+
operation: null,
|
|
294
|
+
nodeTreeItem: null,
|
|
295
|
+
modalVisible: false,
|
|
296
|
+
newTitle: null,
|
|
297
|
+
addTitle: null
|
|
298
|
+
};
|
|
299
|
+
return _this;
|
|
300
|
+
}
|
|
301
|
+
Index.prototype.componentDidMount = function () {
|
|
302
|
+
this.getTemplateData(get(this.props, "searchValue", ''));
|
|
107
303
|
};
|
|
108
|
-
|
|
109
|
-
|
|
304
|
+
Index.prototype.componentWillReceiveProps = function (nextPorps) {
|
|
305
|
+
if (get(nextPorps, "searchValue") != get(this.props, "searchValue")) {
|
|
306
|
+
this.getTemplateData(get(nextPorps, "searchValue"));
|
|
307
|
+
}
|
|
110
308
|
};
|
|
111
|
-
function
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
309
|
+
Index.prototype.renderNodeTreeMenu = function () {
|
|
310
|
+
var _this = this;
|
|
311
|
+
var editable = this.props.editable;
|
|
312
|
+
var nodeTreeItem = this.state.nodeTreeItem;
|
|
313
|
+
var _a = __assign({}, nodeTreeItem),
|
|
314
|
+
pageX = _a.pageX,
|
|
315
|
+
pageY = _a.pageY,
|
|
316
|
+
pid = _a.pid;
|
|
317
|
+
var menuStyle = {
|
|
318
|
+
position: 'absolute',
|
|
319
|
+
maxHeight: 40,
|
|
320
|
+
textAlign: 'center',
|
|
321
|
+
left: "".concat(pageX + 10, "px"),
|
|
322
|
+
top: "".concat(pageY, "px"),
|
|
323
|
+
display: 'flex',
|
|
324
|
+
flexDirection: 'row'
|
|
325
|
+
};
|
|
326
|
+
return nodeTreeItem && editable ? (/*#__PURE__*/React.createElement("div", {
|
|
327
|
+
style: menuStyle
|
|
328
|
+
}, pid === 0 ? (/*#__PURE__*/React.createElement("div", {
|
|
329
|
+
className: "handle-icon",
|
|
330
|
+
onClick: function onClick() {
|
|
331
|
+
return _this.handleTreeItem('add');
|
|
118
332
|
}
|
|
119
|
-
}, /*#__PURE__*/React.createElement(
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
333
|
+
}, /*#__PURE__*/React.createElement(Tooltip, {
|
|
334
|
+
placement: "bottom",
|
|
335
|
+
title: "\u6DFB\u52A0\u5B50\u6A21\u677F"
|
|
336
|
+
}, /*#__PURE__*/React.createElement(MyIcon, {
|
|
337
|
+
value: 'PlusCircleOutlined'
|
|
338
|
+
})))) : null, /*#__PURE__*/React.createElement("div", {
|
|
339
|
+
className: "handle-icon",
|
|
123
340
|
onClick: function onClick() {
|
|
124
|
-
return
|
|
125
|
-
modal_data: {
|
|
126
|
-
pregnancyId: headerInfo === null || headerInfo === void 0 ? void 0 : headerInfo.id
|
|
127
|
-
}
|
|
128
|
-
});
|
|
341
|
+
return _this.handleTreeItem('edit');
|
|
129
342
|
}
|
|
130
|
-
},
|
|
131
|
-
|
|
343
|
+
}, /*#__PURE__*/React.createElement(Tooltip, {
|
|
344
|
+
placement: "bottom",
|
|
345
|
+
title: "\u4FEE\u6539"
|
|
346
|
+
}, /*#__PURE__*/React.createElement(MyIcon, {
|
|
347
|
+
value: 'EditOutlined'
|
|
348
|
+
}))), /*#__PURE__*/React.createElement("div", {
|
|
349
|
+
className: "handle-icon",
|
|
132
350
|
onClick: function onClick() {
|
|
133
|
-
return
|
|
134
|
-
params: __assign(__assign({}, getSearchParamsAll()), {
|
|
135
|
-
id: headerInfo === null || headerInfo === void 0 ? void 0 : headerInfo.id
|
|
136
|
-
}),
|
|
137
|
-
successText: '同步成功'
|
|
138
|
-
}).then(function (res) {
|
|
139
|
-
var _a;
|
|
140
|
-
var arr = (_a = res.data) !== null && _a !== void 0 ? _a : [];
|
|
141
|
-
setDiagnosesList(__spreadArray(__spreadArray([], diagnosesList, true), arr, true));
|
|
142
|
-
});
|
|
351
|
+
return _this.handleTreeItem('delete');
|
|
143
352
|
}
|
|
144
|
-
},
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
},
|
|
148
|
-
|
|
149
|
-
|
|
353
|
+
}, /*#__PURE__*/React.createElement(Tooltip, {
|
|
354
|
+
placement: "bottom",
|
|
355
|
+
title: "\u5220\u9664"
|
|
356
|
+
}, /*#__PURE__*/React.createElement(MyIcon, {
|
|
357
|
+
value: 'DeleteOutlined'
|
|
358
|
+
}))))) : null;
|
|
359
|
+
};
|
|
360
|
+
Index.prototype.renderHandleModal = function () {
|
|
361
|
+
var _this = this;
|
|
362
|
+
var _a = this.state,
|
|
363
|
+
modalVisible = _a.modalVisible,
|
|
364
|
+
nodeTreeItem = _a.nodeTreeItem,
|
|
365
|
+
addTitle = _a.addTitle,
|
|
366
|
+
operation = _a.operation,
|
|
367
|
+
newTitle = _a.newTitle;
|
|
368
|
+
var title = operationMapping[operation];
|
|
369
|
+
return /*#__PURE__*/React.createElement(Modal, {
|
|
370
|
+
title: title,
|
|
371
|
+
closable: true,
|
|
372
|
+
visible: modalVisible,
|
|
373
|
+
onCancel: this.handleCancel,
|
|
374
|
+
onOk: this.handleOk
|
|
375
|
+
}, operation === 'new' && (/*#__PURE__*/React.createElement("div", null, "\u65B0\u589E\u6A21\u677F\u540D\u79F0\uFF1A", /*#__PURE__*/React.createElement(Input, {
|
|
376
|
+
value: newTitle,
|
|
377
|
+
onChange: function onChange(e) {
|
|
378
|
+
return _this.handleIptChange(e, 'new');
|
|
379
|
+
},
|
|
380
|
+
style: {
|
|
381
|
+
width: '50%'
|
|
382
|
+
}
|
|
383
|
+
}))), operation === 'add' && (/*#__PURE__*/React.createElement("div", null, "\u65B0\u589E\u5B50\u6A21\u677F\uFF1A", /*#__PURE__*/React.createElement(Input, {
|
|
384
|
+
value: addTitle,
|
|
385
|
+
onChange: function onChange(e) {
|
|
386
|
+
return _this.handleIptChange(e, 'add');
|
|
387
|
+
},
|
|
388
|
+
style: {
|
|
389
|
+
width: '50%'
|
|
390
|
+
}
|
|
391
|
+
}))), operation === 'edit' && (/*#__PURE__*/React.createElement("div", null, "\u7F16\u8F91\u6A21\u677F\u540D\u79F0\uFF1A", /*#__PURE__*/React.createElement(Input, {
|
|
392
|
+
value: nodeTreeItem.title,
|
|
393
|
+
onChange: function onChange(e) {
|
|
394
|
+
return _this.handleIptChange(e, 'edit');
|
|
395
|
+
},
|
|
396
|
+
style: {
|
|
397
|
+
width: '50%'
|
|
398
|
+
}
|
|
399
|
+
}))), operation === 'delete' && /*#__PURE__*/React.createElement("div", null, "\u662F\u5426\u5220\u9664\u6A21\u677F\uFF1A", nodeTreeItem.title));
|
|
400
|
+
};
|
|
401
|
+
Index.prototype.renderTreatment = function () {
|
|
402
|
+
var _this = this;
|
|
403
|
+
var _a = this.props,
|
|
404
|
+
checkable = _a.checkable,
|
|
405
|
+
divide = _a.divide,
|
|
406
|
+
editable = _a.editable;
|
|
407
|
+
var _b = this.state,
|
|
408
|
+
templateData = _b.templateData,
|
|
409
|
+
checkedKeys = _b.checkedKeys,
|
|
410
|
+
checkedKeysLeft = _b.checkedKeysLeft,
|
|
411
|
+
checkedKeysRight = _b.checkedKeysRight,
|
|
412
|
+
currentArea = _b.currentArea,
|
|
413
|
+
nodeTreeItem = _b.nodeTreeItem;
|
|
414
|
+
var treeData = this.transferTemplateData(templateData);
|
|
415
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
416
|
+
style: {
|
|
417
|
+
minHeight: 160,
|
|
418
|
+
padding: '12px 0'
|
|
419
|
+
}
|
|
420
|
+
}, editable ? (/*#__PURE__*/React.createElement("div", {
|
|
421
|
+
className: "add-btn"
|
|
422
|
+
}, /*#__PURE__*/React.createElement(Button, {
|
|
423
|
+
size: "small",
|
|
424
|
+
onClick: this.handleAddBtnClick
|
|
425
|
+
}, "\u6DFB\u52A0\u6A21\u677F"))) : null, divide ? (/*#__PURE__*/React.createElement(Row, null, /*#__PURE__*/React.createElement(Col, {
|
|
426
|
+
span: 12
|
|
427
|
+
}, /*#__PURE__*/React.createElement(Tree, {
|
|
428
|
+
style: {
|
|
429
|
+
maxHeight: '90%'
|
|
430
|
+
},
|
|
431
|
+
checkable: checkable,
|
|
432
|
+
defaultExpandAll: true,
|
|
433
|
+
checkedKeys: checkedKeysLeft.length === 0 ? [] : checkedKeysLeft,
|
|
434
|
+
onCheck: this.handleCheckLeft,
|
|
435
|
+
onSelect: this.handleSelect,
|
|
436
|
+
onMouseEnter: function onMouseEnter(e) {
|
|
437
|
+
return _this.onMouseEnter(e, 'treeLeft');
|
|
438
|
+
},
|
|
439
|
+
treeData: treeData.slice(0, Math.ceil(treeData.length / 2))
|
|
440
|
+
}), nodeTreeItem && currentArea === 'treeLeft' ? this.renderNodeTreeMenu() : null), /*#__PURE__*/React.createElement(Col, {
|
|
441
|
+
span: 12
|
|
442
|
+
}, /*#__PURE__*/React.createElement(Tree, {
|
|
443
|
+
style: {
|
|
444
|
+
maxHeight: '90%'
|
|
445
|
+
},
|
|
446
|
+
checkable: checkable,
|
|
447
|
+
defaultExpandAll: true,
|
|
448
|
+
checkedKeys: checkedKeysRight.length === 0 ? [] : checkedKeysRight,
|
|
449
|
+
onCheck: this.handleCheckRight,
|
|
450
|
+
onSelect: this.handleSelect,
|
|
451
|
+
onMouseEnter: function onMouseEnter(e) {
|
|
452
|
+
return _this.onMouseEnter(e, 'treeright');
|
|
453
|
+
},
|
|
454
|
+
treeData: treeData.slice(Math.ceil(treeData.length / 2))
|
|
455
|
+
}), nodeTreeItem && currentArea === 'treeright' ? this.renderNodeTreeMenu() : null))) : (/*#__PURE__*/React.createElement(Row, null, /*#__PURE__*/React.createElement(Col, {
|
|
456
|
+
span: 24
|
|
457
|
+
}, /*#__PURE__*/React.createElement(Tree, {
|
|
458
|
+
style: {
|
|
459
|
+
maxHeight: '90%'
|
|
460
|
+
},
|
|
461
|
+
checkable: checkable,
|
|
462
|
+
defaultExpandAll: true,
|
|
463
|
+
checkedKeys: checkedKeys,
|
|
464
|
+
onCheck: this.handleCheck,
|
|
465
|
+
onSelect: this.handleSelect,
|
|
466
|
+
onMouseEnter: function onMouseEnter(e) {
|
|
467
|
+
return _this.onMouseEnter(e, '');
|
|
468
|
+
},
|
|
469
|
+
treeData: treeData
|
|
470
|
+
}), nodeTreeItem ? this.renderNodeTreeMenu() : null))));
|
|
471
|
+
};
|
|
472
|
+
Index.prototype.render = function () {
|
|
473
|
+
var templateData = this.state.templateData;
|
|
150
474
|
return /*#__PURE__*/React.createElement("div", {
|
|
151
|
-
className: "
|
|
152
|
-
},
|
|
153
|
-
first: page !== 'return',
|
|
154
|
-
headerInfo: headerInfo
|
|
155
|
-
}), (diagnosesList === null || diagnosesList === void 0 ? void 0 : diagnosesList.length) ? diagnosesList.map(function (item, index) {
|
|
156
|
-
return /*#__PURE__*/React.createElement(DiagnosesItem, {
|
|
157
|
-
edit: false,
|
|
158
|
-
index: index,
|
|
159
|
-
diagnose: item,
|
|
160
|
-
key: "".concat(get(item, 'id'), "-false"),
|
|
161
|
-
handleDelete: handleDelete,
|
|
162
|
-
headerInfo: headerInfo,
|
|
163
|
-
diagnosesList: diagnosesList,
|
|
164
|
-
saveHeaderInfo: saveHeaderInfo,
|
|
165
|
-
setDiagnosesList: setDiagnosesList,
|
|
166
|
-
isShowDiagnosesTemplate: false
|
|
167
|
-
});
|
|
168
|
-
}) : /*#__PURE__*/React.createElement(Empty, null));
|
|
475
|
+
className: "template-tree-wrapper"
|
|
476
|
+
}, templateData && this.renderTreatment(), this.renderHandleModal());
|
|
169
477
|
};
|
|
170
|
-
return
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
addDiag: addDiag,
|
|
174
|
-
headerInfo: headerInfo,
|
|
175
|
-
diagnosesList: diagnosesList,
|
|
176
|
-
setDiagnosesList: setDiagnosesList,
|
|
177
|
-
saveHeaderInfo: saveHeaderInfo
|
|
178
|
-
})));
|
|
179
|
-
}
|
|
180
|
-
export { Diagnoses as default };
|
|
478
|
+
return Index;
|
|
479
|
+
}(Component);
|
|
480
|
+
export { Index as default };
|