@lm_fe/pages-fubao 0.1.201 → 0.2.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +4 -2
- package/dist/a_chunks/.root.js +240 -280
- package/dist/a_chunks/.root10.js +9 -15
- package/dist/a_chunks/.root11.js +210 -244
- package/dist/a_chunks/.root12.js +2 -33
- package/dist/a_chunks/.root13.js +300 -331
- package/dist/a_chunks/.root14.js +2 -16
- package/dist/a_chunks/.root15.js +2 -16
- package/dist/a_chunks/.root16.js +4 -6
- package/dist/a_chunks/.root17.js +11 -2
- package/dist/a_chunks/.root18.js +10 -1
- package/dist/a_chunks/.root19.js +16 -27
- package/dist/a_chunks/.root2.js +22 -30
- package/dist/a_chunks/.root20.js +34 -38
- package/dist/a_chunks/.root21.js +16 -18
- package/dist/a_chunks/.root22.js +34 -38
- package/dist/a_chunks/.root23.js +16 -18
- package/dist/a_chunks/.root24.js +10 -14
- package/dist/a_chunks/.root25.js +10 -14
- package/dist/a_chunks/.root26.js +10 -14
- package/dist/a_chunks/.root27.js +16 -27
- package/dist/a_chunks/.root28.js +15 -19
- package/dist/a_chunks/.root29.js +15 -19
- package/dist/a_chunks/.root3.js +4 -6
- package/dist/a_chunks/.root30.js +9 -14
- package/dist/a_chunks/.root31.js +2 -10
- package/dist/a_chunks/.root32.js +11 -19
- package/dist/a_chunks/.root33.js +308 -335
- package/dist/a_chunks/.root34.js +1 -2
- package/dist/a_chunks/.root35.js +14 -154
- package/dist/a_chunks/.root36.js +7 -21
- package/dist/a_chunks/.root37.js +183 -1481
- package/dist/a_chunks/.root38.js +32 -2496
- package/dist/a_chunks/.root39.js +56 -83
- package/dist/a_chunks/.root4.js +4 -6
- package/dist/a_chunks/.root40.js +3 -3
- package/dist/a_chunks/.root41.js +56 -83
- package/dist/a_chunks/.root42.js +6 -20
- package/dist/a_chunks/.root43.js +183 -1526
- package/dist/a_chunks/.root44.js +13 -19
- package/dist/a_chunks/.root45.js +55 -82
- package/dist/a_chunks/.root46.js +55 -82
- package/dist/a_chunks/.root47.js +5 -8
- package/dist/a_chunks/.root48.js +30 -22
- package/dist/a_chunks/.root49.js +30 -43
- package/dist/a_chunks/.root5.js +3 -3
- package/dist/a_chunks/.root50.js +53 -226
- package/dist/a_chunks/.root51.js +64 -188
- package/dist/a_chunks/.root52.js +113 -3122
- package/dist/a_chunks/.root53.js +85 -134
- package/dist/a_chunks/.root54.js +3071 -175
- package/dist/a_chunks/.root55.js +127 -478
- package/dist/a_chunks/.root56.js +170 -910
- package/dist/a_chunks/.root57.js +376 -399
- package/dist/a_chunks/.root58.js +808 -687
- package/dist/a_chunks/.root59.js +495 -118
- package/dist/a_chunks/.root6.js +6 -9
- package/dist/a_chunks/.root60.js +773 -45
- package/dist/a_chunks/.root61.js +738 -97
- package/dist/a_chunks/.root62.js +105 -273
- package/dist/a_chunks/.root63.js +38 -22
- package/dist/a_chunks/.root64.js +184 -16
- package/dist/a_chunks/.root65.js +107 -241
- package/dist/a_chunks/.root66.js +132 -0
- package/dist/a_chunks/.root67.js +286 -0
- package/dist/a_chunks/.root68.js +817 -0
- package/dist/a_chunks/.root69.js +28 -0
- package/dist/a_chunks/.root7.js +2 -42
- package/dist/a_chunks/.root70.js +19 -0
- package/dist/a_chunks/.root71.js +247 -0
- package/dist/a_chunks/.root8.js +2 -12
- package/dist/a_chunks/.root9.js +16 -26
- package/dist/a_chunks/Form.js +3 -5
- package/dist/a_chunks/ModalForm.js +254 -280
- package/dist/a_chunks/api.js +311 -325
- package/dist/a_chunks/common.js +0 -1
- package/dist/a_chunks/config.js +135 -164
- package/dist/a_chunks/form_config.js +11 -130
- package/dist/a_chunks/index.js +43 -57
- package/dist/a_chunks/index2.js +148 -64
- package/dist/a_chunks/index3.js +131 -1151
- package/dist/a_chunks/index4.js +57 -1040
- package/dist/a_chunks/index5.js +142 -0
- package/dist/a_chunks/index6.js +1169 -0
- package/dist/a_chunks/index7.js +1006 -0
- package/dist/a_chunks/style-inject.es.js +0 -1
- package/dist/a_chunks/tslib.es6.js +1 -2
- package/dist/a_chunks//344/275/223/346/240/274/346/243/200/346/237/245_config.js +0 -1
- package/dist/index.js +10 -5
- package/dist/pages/fubao/family-planning/file-management/doctor-desk/components/SurgicalRecordv2/Curettage/index.d.ts +1 -1
- package/dist/pages/fubao/family-planning/file-management/doctor-desk/components/VideoReport/method.d.ts +1 -1
- package/dist/pages/fubao/folic-acid/file-management/list/index copy.d.ts +1 -1
- package/dist/pages/fubao/gynecological-diseases/two-cancers/./344/270/244/347/231/214/351/232/217/350/256/277/index.d.ts +1 -1
- package/dist/pages/fubao/pre-pregnancy-care/file-management/edit/form_config.d.ts +2 -1
- package/dist/pages/fubao/pre-pregnancy-care/file-management/edit/index copy.d.ts +18 -0
- package/dist/pages/fubao/pre-pregnancy-care/file-management/edit/index.d.ts +3 -18
- package/dist/pages/fubao/premarital-care/.public-exam/SecondSex/form_config_nv.d.ts +4 -0
- package/dist/pages/fubao/premarital-care/file-management/config/table.d.ts +1 -1
- package/dist/pages/fubao/premarital-care/file-management/edit/form_config.d.ts +2 -1
- package/dist/pages/fubao/premarital-care/file-management/edit/index copy 2.d.ts +17 -0
- package/dist/pages/fubao/premarital-care/file-management/edit/index.d.ts +3 -17
- package/dist/pages/fubao/statistic/abnormal-breast-cancer/index.d.ts +2 -0
- package/dist/pages/fubao/statistic/abnormal-cervical-cancer/index.d.ts +2 -0
- package/dist/pages/fubao/statistic/premarital-checkup/./345/251/232/346/243/200/351/232/217/350/256/277/index.d.ts +1 -1
- package/dist/pages/fubao/statistic/progestation-checkup/./345/255/225/346/243/200/351/232/217/350/256/277/index.d.ts +1 -1
- package/dist/routes/index.d.ts +2 -0
- package/dist/routes/meta.d.ts +2 -0
- package/package.json +19 -14
- package/dist/a_chunks/.root.js.map +0 -1
- package/dist/a_chunks/.root10.js.map +0 -1
- package/dist/a_chunks/.root11.js.map +0 -1
- package/dist/a_chunks/.root12.js.map +0 -1
- package/dist/a_chunks/.root13.js.map +0 -1
- package/dist/a_chunks/.root14.js.map +0 -1
- package/dist/a_chunks/.root15.js.map +0 -1
- package/dist/a_chunks/.root16.js.map +0 -1
- package/dist/a_chunks/.root17.js.map +0 -1
- package/dist/a_chunks/.root18.js.map +0 -1
- package/dist/a_chunks/.root19.js.map +0 -1
- package/dist/a_chunks/.root2.js.map +0 -1
- package/dist/a_chunks/.root20.js.map +0 -1
- package/dist/a_chunks/.root21.js.map +0 -1
- package/dist/a_chunks/.root22.js.map +0 -1
- package/dist/a_chunks/.root23.js.map +0 -1
- package/dist/a_chunks/.root24.js.map +0 -1
- package/dist/a_chunks/.root25.js.map +0 -1
- package/dist/a_chunks/.root26.js.map +0 -1
- package/dist/a_chunks/.root27.js.map +0 -1
- package/dist/a_chunks/.root28.js.map +0 -1
- package/dist/a_chunks/.root29.js.map +0 -1
- package/dist/a_chunks/.root3.js.map +0 -1
- package/dist/a_chunks/.root30.js.map +0 -1
- package/dist/a_chunks/.root31.js.map +0 -1
- package/dist/a_chunks/.root32.js.map +0 -1
- package/dist/a_chunks/.root33.js.map +0 -1
- package/dist/a_chunks/.root34.js.map +0 -1
- package/dist/a_chunks/.root35.js.map +0 -1
- package/dist/a_chunks/.root36.js.map +0 -1
- package/dist/a_chunks/.root37.js.map +0 -1
- package/dist/a_chunks/.root38.js.map +0 -1
- package/dist/a_chunks/.root39.js.map +0 -1
- package/dist/a_chunks/.root4.js.map +0 -1
- package/dist/a_chunks/.root40.js.map +0 -1
- package/dist/a_chunks/.root41.js.map +0 -1
- package/dist/a_chunks/.root42.js.map +0 -1
- package/dist/a_chunks/.root43.js.map +0 -1
- package/dist/a_chunks/.root44.js.map +0 -1
- package/dist/a_chunks/.root45.js.map +0 -1
- package/dist/a_chunks/.root46.js.map +0 -1
- package/dist/a_chunks/.root47.js.map +0 -1
- package/dist/a_chunks/.root48.js.map +0 -1
- package/dist/a_chunks/.root49.js.map +0 -1
- package/dist/a_chunks/.root5.js.map +0 -1
- package/dist/a_chunks/.root50.js.map +0 -1
- package/dist/a_chunks/.root51.js.map +0 -1
- package/dist/a_chunks/.root52.js.map +0 -1
- package/dist/a_chunks/.root53.js.map +0 -1
- package/dist/a_chunks/.root54.js.map +0 -1
- package/dist/a_chunks/.root55.js.map +0 -1
- package/dist/a_chunks/.root56.js.map +0 -1
- package/dist/a_chunks/.root57.js.map +0 -1
- package/dist/a_chunks/.root58.js.map +0 -1
- package/dist/a_chunks/.root59.js.map +0 -1
- package/dist/a_chunks/.root6.js.map +0 -1
- package/dist/a_chunks/.root60.js.map +0 -1
- package/dist/a_chunks/.root61.js.map +0 -1
- package/dist/a_chunks/.root62.js.map +0 -1
- package/dist/a_chunks/.root63.js.map +0 -1
- package/dist/a_chunks/.root64.js.map +0 -1
- package/dist/a_chunks/.root65.js.map +0 -1
- package/dist/a_chunks/.root7.js.map +0 -1
- package/dist/a_chunks/.root8.js.map +0 -1
- package/dist/a_chunks/.root9.js.map +0 -1
- package/dist/a_chunks/Form.js.map +0 -1
- package/dist/a_chunks/ModalForm.js.map +0 -1
- package/dist/a_chunks/api.js.map +0 -1
- package/dist/a_chunks/common.js.map +0 -1
- package/dist/a_chunks/config.js.map +0 -1
- package/dist/a_chunks/extends.js +0 -11
- package/dist/a_chunks/extends.js.map +0 -1
- package/dist/a_chunks/form_config.js.map +0 -1
- package/dist/a_chunks/index.js.map +0 -1
- package/dist/a_chunks/index2.js.map +0 -1
- package/dist/a_chunks/index3.js.map +0 -1
- package/dist/a_chunks/index4.js.map +0 -1
- package/dist/a_chunks/style-inject.es.js.map +0 -1
- package/dist/a_chunks/tslib.es6.js.map +0 -1
- package/dist/a_chunks//344/275/223/346/240/274/346/243/200/346/237/245_config.js.map +0 -1
- package/dist/index.js.map +0 -1
- package/dist/pages/fubao/pre-pregnancy-care/.public-exam/config/adapter.d.ts +0 -2
- package/dist/pages/fubao/premarital-care/.public-exam/config/adapter.d.ts +0 -2
- /package/dist/pages/fubao/premarital-care/.public-exam/SecondSex/{form_config.d.ts → form_config_nan.d.ts} +0 -0
package/dist/a_chunks/.root54.js
CHANGED
|
@@ -1,181 +1,3077 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import '
|
|
5
|
-
import '
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
1
|
+
import { Input, Button, Form, Radio, Divider, Row, Col, AutoComplete, InputNumber, Steps, Popconfirm, Tag, Typography, Popover, Layout } from 'antd';
|
|
2
|
+
import React$1, { useState, useEffect, useRef, useCallback, useMemo } from 'react';
|
|
3
|
+
import { useDrag, useDrop, DndProvider } from 'react-dnd';
|
|
4
|
+
import { HTML5Backend } from 'react-dnd-html5-backend';
|
|
5
|
+
import store from 'store';
|
|
6
|
+
import { c as __extends, d as __spreadArray, _ as __awaiter, a as __generator, b as __assign, e as __rest } from './tslib.es6.js';
|
|
7
|
+
import dayjs from 'dayjs';
|
|
8
|
+
import { fubaoRequest, formatDate } from '@lm_fe/utils';
|
|
9
|
+
import { get, debounce, set, map } from 'lodash';
|
|
10
|
+
import { SLocal_State, ModelService, mchcEnums } from '@lm_fe/service';
|
|
11
|
+
import { mchcEnv, mchcLogger } from '@lm_fe/env';
|
|
12
|
+
import { LazyAntd, DatePicker_L } from '@lm_fe/components';
|
|
13
|
+
import { r as renderForm0_shared, v as valueToForm } from './ModalForm.js';
|
|
14
|
+
import { mchcModal__ } from '@lm_fe/pages';
|
|
15
|
+
import { CloseOutlined, DownOutlined, UpOutlined, ExclamationCircleOutlined, QuestionCircleOutlined, EditOutlined, DeleteOutlined, PlusCircleOutlined, LeftOutlined, RightOutlined, SyncOutlined } from '@ant-design/icons';
|
|
16
|
+
import { s as styleInject } from './style-inject.es.js';
|
|
17
|
+
import { N as NurseTypesMapping } from './config.js';
|
|
18
|
+
import '@lm_fe/components_m';
|
|
19
|
+
var START_HOUR = 8;
|
|
20
|
+
var END_HOUR = 18;
|
|
21
|
+
var DIFF_HOUR = END_HOUR - START_HOUR;
|
|
22
|
+
var HOUR_SPAN = 0.5;
|
|
23
|
+
var EExaminationStatus$1;
|
|
24
|
+
(function (EExaminationStatus) {
|
|
25
|
+
EExaminationStatus[EExaminationStatus["\u6B63\u5E38"] = 1] = "\u6B63\u5E38";
|
|
26
|
+
EExaminationStatus[EExaminationStatus["\u5F02\u5E38"] = 2] = "\u5F02\u5E38";
|
|
27
|
+
EExaminationStatus[EExaminationStatus["\u672A\u67E5"] = 3] = "\u672A\u67E5";
|
|
28
|
+
})(EExaminationStatus$1 || (EExaminationStatus$1 = {}));
|
|
29
|
+
var OPERATION_ARR = ['人工流产', '刮宫术', '宫内避孕器放置术', '宫内节育器取出术', '子宫输卵管通液术'];
|
|
30
|
+
var ATTENDANCE_MAP = {
|
|
31
|
+
0: '休息',
|
|
32
|
+
1: '上午',
|
|
33
|
+
2: '下午',
|
|
34
|
+
3: '全天'
|
|
35
|
+
};
|
|
36
|
+
var OPERATION_NAME_MAP = {
|
|
37
|
+
人工流产: 'inducedAbortion',
|
|
38
|
+
刮宫术: 'dilatationAndCurettage',
|
|
39
|
+
子宫输卵管通液术: 'uterineFallopianTubeFluid',
|
|
40
|
+
宫内节育器取出术: 'takeOutIntrauterineDevice',
|
|
41
|
+
宫内避孕器放置术: 'putInIntrauterineDevice'
|
|
42
|
+
};
|
|
43
|
+
var EXAM_MAP = {
|
|
44
|
+
血常规: 'bloodRoutine',
|
|
45
|
+
凝血六项: 'sixCoagulation',
|
|
46
|
+
HIV: 'hiv',
|
|
47
|
+
梅毒: 'syphilis',
|
|
48
|
+
乙肝: 'hepatitisB',
|
|
49
|
+
丙肝: 'hepatitisC',
|
|
50
|
+
白带常规: 'leucorrhea'
|
|
51
|
+
};
|
|
52
|
+
var EProgressStatus$1;
|
|
53
|
+
(function (EProgressStatus) {
|
|
54
|
+
EProgressStatus[EProgressStatus["\u5F85\u9884\u7EA6"] = 1] = "\u5F85\u9884\u7EA6";
|
|
55
|
+
EProgressStatus[EProgressStatus["\u5F85\u7B7E\u5230"] = 2] = "\u5F85\u7B7E\u5230";
|
|
56
|
+
EProgressStatus[EProgressStatus["\u5DF2\u7B7E\u5230"] = 3] = "\u5DF2\u7B7E\u5230";
|
|
57
|
+
EProgressStatus[EProgressStatus["\u5DF2\u5B8C\u6210"] = 4] = "\u5DF2\u5B8C\u6210";
|
|
58
|
+
})(EProgressStatus$1 || (EProgressStatus$1 = {}));
|
|
59
|
+
var Event_EarlyPregnancyCheckSurgeryType;
|
|
60
|
+
(function (Event_EarlyPregnancyCheckSurgeryType) {
|
|
61
|
+
Event_EarlyPregnancyCheckSurgeryType["APPOINTMENT_CHANGE"] = "APPOINTMENT_CHANGE";
|
|
62
|
+
})(Event_EarlyPregnancyCheckSurgeryType || (Event_EarlyPregnancyCheckSurgeryType = {}));
|
|
63
|
+
var MY_ModelService$1 = function (_super) {
|
|
64
|
+
__extends(MY_ModelService, _super);
|
|
65
|
+
function MY_ModelService() {
|
|
66
|
+
var _this = _super !== null && _super.apply(this, arguments) || this;
|
|
67
|
+
_this.eventTypeStore = Event_EarlyPregnancyCheckSurgeryType;
|
|
68
|
+
return _this;
|
|
69
|
+
}
|
|
70
|
+
MY_ModelService.prototype.appointmentSurgery = function (data) {
|
|
71
|
+
var _this = this;
|
|
72
|
+
data.appointmentPeople = data.appointmentPeople || SLocal_State.getUserData().login;
|
|
73
|
+
return this._request({
|
|
74
|
+
url: '/api/family/planning/updateAppointmentSurgery',
|
|
75
|
+
method: 'POST',
|
|
76
|
+
data: this.transferSubmitData(data)
|
|
77
|
+
}).then(function (r) {
|
|
78
|
+
mchcEnv.info(r.msg);
|
|
79
|
+
return _this.transferSourceData(r.data);
|
|
80
|
+
});
|
|
81
|
+
};
|
|
82
|
+
MY_ModelService.prototype.cancelAppointmentSurgery = function (id) {
|
|
83
|
+
return this._request({
|
|
84
|
+
url: "/api/family/planning/cancelAppointmentSurgery/".concat(id),
|
|
85
|
+
method: 'DELETE'
|
|
86
|
+
}).then(function (r) {
|
|
87
|
+
mchcEnv.info(get(r, 'data.msg'));
|
|
88
|
+
});
|
|
89
|
+
};
|
|
90
|
+
MY_ModelService.prototype.getOptionalPregnancyList = function (name) {
|
|
91
|
+
var _this = this;
|
|
92
|
+
return this._request({
|
|
93
|
+
url: '/api/family/planning/getEarlyPregnancyCheckSurgicalTypeCPE',
|
|
94
|
+
method: 'GET',
|
|
95
|
+
params: this.transferParams({
|
|
96
|
+
name: name
|
|
97
|
+
})
|
|
98
|
+
}).then(function (r) {
|
|
99
|
+
return r.data.map(function (_) {
|
|
100
|
+
return _this.transferSourceData(_);
|
|
101
|
+
});
|
|
102
|
+
});
|
|
103
|
+
};
|
|
104
|
+
MY_ModelService.prototype.getOptionalDoctorAndNurse = function () {
|
|
105
|
+
return this._request({
|
|
106
|
+
url: '/api/family/planning/getDoctorAndNurse',
|
|
107
|
+
method: 'GET',
|
|
108
|
+
params: {}
|
|
109
|
+
}).then(function (r) {
|
|
110
|
+
return r.data;
|
|
111
|
+
});
|
|
112
|
+
};
|
|
113
|
+
MY_ModelService.prototype.getFamilyPlanningDefaultSetting = function () {
|
|
114
|
+
return this._request({
|
|
115
|
+
url: '/api/family/planning/getFamilyPlanningDefaultSetting',
|
|
116
|
+
method: 'GET',
|
|
117
|
+
params: {}
|
|
118
|
+
}).then(function (r) {
|
|
119
|
+
return r.data;
|
|
120
|
+
});
|
|
121
|
+
};
|
|
122
|
+
MY_ModelService.prototype.getStatistic = function (start, end) {
|
|
123
|
+
return this._request({
|
|
124
|
+
url: '/api/family/planning/getAppointmentSignCompleteTimeoutNum',
|
|
125
|
+
method: 'GET',
|
|
126
|
+
params: {
|
|
127
|
+
'appointmentDate.greaterOrEqualThan': start.format('YYYY-MM-DD'),
|
|
128
|
+
'appointmentDate.lessOrEqualThan': end.format('YYYY-MM-DD')
|
|
129
|
+
}
|
|
130
|
+
}).then(function (r) {
|
|
131
|
+
return r.data;
|
|
132
|
+
});
|
|
133
|
+
};
|
|
134
|
+
return MY_ModelService;
|
|
135
|
+
}(ModelService);
|
|
136
|
+
var SModel_EarlyPregnancyCheckSurgeryType = new MY_ModelService$1({
|
|
137
|
+
n: 'EarlyPregnancyCheckSurgicalType',
|
|
138
|
+
prePath: '/family/planning',
|
|
139
|
+
addictionalParams: {
|
|
140
|
+
deleteFlag: 0
|
|
141
|
+
}
|
|
142
|
+
});
|
|
143
|
+
SModel_EarlyPregnancyCheckSurgeryType.DateKeys.push('appointmentDate', 'registrationDate', 'admissionTime');
|
|
144
|
+
SModel_EarlyPregnancyCheckSurgeryType.TimeKeys.push('appointmentTimeRangeStart', 'appointmentTimeRangeEnd');
|
|
145
|
+
var SModel_EarlyPregnancySurgicalTemplate = new ModelService({
|
|
146
|
+
n: 'EarlyPregnancySurgicalTemplate',
|
|
147
|
+
prePath: '/family/planning',
|
|
148
|
+
addictionalParams: {
|
|
149
|
+
deleteFlag: 0
|
|
150
|
+
}
|
|
151
|
+
});
|
|
152
|
+
new ModelService({
|
|
153
|
+
n: 'FamilyPlanningDefaultSetting',
|
|
154
|
+
addictionalParams: {
|
|
155
|
+
deleteFlag: 0
|
|
156
|
+
},
|
|
157
|
+
prePath: '/family/planning'
|
|
158
|
+
});
|
|
159
|
+
var MY_ModelService = function (_super) {
|
|
160
|
+
__extends(MY_ModelService, _super);
|
|
161
|
+
function MY_ModelService() {
|
|
162
|
+
return _super !== null && _super.apply(this, arguments) || this;
|
|
163
|
+
}
|
|
164
|
+
MY_ModelService.prototype.getOpenSurgicalBySchedulingDate = function (schedulingDate) {
|
|
165
|
+
return this._request({
|
|
166
|
+
url: '/api/family/planning/getOpenSurgicalBySchedulingDate',
|
|
167
|
+
method: 'GET',
|
|
168
|
+
params: this.transferParams({
|
|
169
|
+
schedulingDate: schedulingDate
|
|
170
|
+
})
|
|
171
|
+
}).then(function (res) {
|
|
172
|
+
return res.data;
|
|
173
|
+
});
|
|
174
|
+
};
|
|
175
|
+
MY_ModelService.prototype.getBetweenList = function (start, end) {
|
|
176
|
+
end = end || start;
|
|
177
|
+
return this.getList({
|
|
178
|
+
params: {
|
|
179
|
+
'schedulingDate.greaterOrEqualThan': start.format('YYYY-MM-DD'),
|
|
180
|
+
'schedulingDate.lessOrEqualThan': end.format('YYYY-MM-DD')
|
|
181
|
+
}
|
|
182
|
+
});
|
|
183
|
+
};
|
|
184
|
+
return MY_ModelService;
|
|
185
|
+
}(ModelService);
|
|
186
|
+
var SModel_FamilyPlaningSchedulingDetails = new MY_ModelService({
|
|
187
|
+
n: 'SchedulingInformation',
|
|
188
|
+
prePath: '/family/planning',
|
|
189
|
+
addictionalParams: {
|
|
190
|
+
deleteFlag: 0
|
|
191
|
+
}
|
|
192
|
+
});
|
|
193
|
+
SModel_FamilyPlaningSchedulingDetails.DateKeys.push('schedulingDate', 'schedulingDate');
|
|
194
|
+
SModel_FamilyPlaningSchedulingDetails.equalsKeys.push('schedulingDate', 'schedulingDate');
|
|
195
|
+
var SModel_WorkQuestions = new ModelService({
|
|
196
|
+
n: '/work-questions'
|
|
197
|
+
});
|
|
198
|
+
SModel_WorkQuestions.jsonKeys.push('questionnaire');
|
|
199
|
+
new ModelService({
|
|
200
|
+
n: '/template-trees'
|
|
201
|
+
});
|
|
202
|
+
var stupidEnums = mchcEnums;
|
|
203
|
+
var EProgressStatus;
|
|
204
|
+
(function (EProgressStatus) {
|
|
205
|
+
EProgressStatus[EProgressStatus["\u5F85\u9884\u7EA6"] = 1] = "\u5F85\u9884\u7EA6";
|
|
206
|
+
EProgressStatus[EProgressStatus["\u5F85\u7B7E\u5230"] = 2] = "\u5F85\u7B7E\u5230";
|
|
207
|
+
EProgressStatus[EProgressStatus["\u5DF2\u7B7E\u5230"] = 3] = "\u5DF2\u7B7E\u5230";
|
|
208
|
+
EProgressStatus[EProgressStatus["\u5DF2\u5B8C\u6210"] = 4] = "\u5DF2\u5B8C\u6210";
|
|
209
|
+
})(EProgressStatus || (EProgressStatus = {}));
|
|
210
|
+
var EExaminationStatus;
|
|
211
|
+
(function (EExaminationStatus) {
|
|
212
|
+
EExaminationStatus[EExaminationStatus["\u6B63\u5E38"] = 1] = "\u6B63\u5E38";
|
|
213
|
+
EExaminationStatus[EExaminationStatus["\u5F02\u5E38"] = 2] = "\u5F02\u5E38";
|
|
214
|
+
EExaminationStatus[EExaminationStatus["\u672A\u67E5"] = 3] = "\u672A\u67E5";
|
|
215
|
+
})(EExaminationStatus || (EExaminationStatus = {}));
|
|
216
|
+
LazyAntd.Tree;
|
|
217
|
+
LazyAntd.TreeSelect;
|
|
218
|
+
var Select$2 = LazyAntd.Select,
|
|
219
|
+
Table = LazyAntd.Table;
|
|
220
|
+
LazyAntd.Dropdown;
|
|
221
|
+
LazyAntd.Pagination;
|
|
222
|
+
var InformedConsentTable = function InformedConsentTable(_a) {
|
|
223
|
+
var data = _a.data,
|
|
224
|
+
onChange = _a.onChange,
|
|
225
|
+
disabled = _a.disabled;
|
|
226
|
+
var _b = useState();
|
|
227
|
+
_b[0];
|
|
228
|
+
_b[1];
|
|
229
|
+
var _c = useState(data || []),
|
|
230
|
+
_data = _c[0],
|
|
231
|
+
set_data = _c[1];
|
|
232
|
+
useEffect(function () {
|
|
233
|
+
var d = _data.map(function (_) {
|
|
234
|
+
return {
|
|
235
|
+
id: _.id,
|
|
236
|
+
state: _.state || 0,
|
|
237
|
+
archiveTime: _.archiveTime || '',
|
|
238
|
+
consentName: _.consentName || ''
|
|
239
|
+
};
|
|
240
|
+
});
|
|
241
|
+
onChange(d);
|
|
242
|
+
}, [_data]);
|
|
243
|
+
function setData(item, k, value) {
|
|
244
|
+
item[k] = value;
|
|
245
|
+
set_data(__spreadArray([], _data, true));
|
|
246
|
+
}
|
|
247
|
+
useEffect(function () {
|
|
248
|
+
set_data(data || []);
|
|
249
|
+
console.log('form0 ', data);
|
|
250
|
+
}, [data]);
|
|
251
|
+
return /*#__PURE__*/React$1.createElement("div", {
|
|
252
|
+
style: {
|
|
253
|
+
width: '100%',
|
|
254
|
+
padding: '0 50px'
|
|
255
|
+
}
|
|
256
|
+
}, /*#__PURE__*/React$1.createElement(Table, {
|
|
257
|
+
style: {
|
|
258
|
+
width: '100%',
|
|
259
|
+
margin: '12px 0'
|
|
260
|
+
},
|
|
261
|
+
pagination: false,
|
|
262
|
+
bordered: true,
|
|
263
|
+
dataSource: _data,
|
|
264
|
+
columns: [{
|
|
265
|
+
title: '知情同意书名称',
|
|
266
|
+
dataIndex: 'consentName',
|
|
267
|
+
width: 350,
|
|
268
|
+
render: function render(a, b) {
|
|
269
|
+
return /*#__PURE__*/React$1.createElement(Input, {
|
|
270
|
+
disabled: disabled,
|
|
271
|
+
value: a,
|
|
272
|
+
onChange: function onChange(e) {
|
|
273
|
+
return b.consentName = e.target.value;
|
|
274
|
+
}
|
|
275
|
+
});
|
|
276
|
+
}
|
|
25
277
|
}, {
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
278
|
+
title: '状态',
|
|
279
|
+
dataIndex: 'state',
|
|
280
|
+
width: 350,
|
|
281
|
+
render: function render(a, b) {
|
|
282
|
+
return /*#__PURE__*/React$1.createElement(Select$2, {
|
|
283
|
+
disabled: disabled,
|
|
284
|
+
value: a,
|
|
285
|
+
options: ['待归档', '已归档'].map(function (_, i) {
|
|
286
|
+
return {
|
|
287
|
+
label: _,
|
|
288
|
+
value: i
|
|
289
|
+
};
|
|
290
|
+
}),
|
|
291
|
+
onChange: function onChange(i) {
|
|
292
|
+
setData(b, 'state', i);
|
|
293
|
+
b.archiveTime = i ? dayjs().format('YYYY-MM-DD HH-mm:ss') : '';
|
|
294
|
+
}
|
|
295
|
+
});
|
|
296
|
+
}
|
|
29
297
|
}, {
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
}, {
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
}
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
}
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
298
|
+
title: '归档时间',
|
|
299
|
+
dataIndex: 'archiveTime',
|
|
300
|
+
width: 200
|
|
301
|
+
}, {
|
|
302
|
+
title: '操作',
|
|
303
|
+
dataIndex: '',
|
|
304
|
+
align: 'center',
|
|
305
|
+
render: function render(a, b, idx) {
|
|
306
|
+
return /*#__PURE__*/React$1.createElement(Button, {
|
|
307
|
+
disabled: disabled,
|
|
308
|
+
onClick: function onClick() {
|
|
309
|
+
_data.splice(idx, 1);
|
|
310
|
+
set_data(__spreadArray([], _data, true));
|
|
311
|
+
}
|
|
312
|
+
}, "\u5220\u9664");
|
|
313
|
+
}
|
|
314
|
+
}]
|
|
315
|
+
}), /*#__PURE__*/React$1.createElement(Button, {
|
|
316
|
+
disabled: disabled,
|
|
317
|
+
block: true,
|
|
318
|
+
onClick: function onClick() {
|
|
319
|
+
return set_data(__spreadArray(__spreadArray([], _data, true), [{}], false));
|
|
320
|
+
}
|
|
321
|
+
}, "\u6DFB\u52A0\u77E5\u60C5\u540C\u610F\u4E66"));
|
|
322
|
+
};
|
|
323
|
+
var BookingService = function () {
|
|
324
|
+
function BookingService() {}
|
|
325
|
+
BookingService.prototype.booking = function () {};
|
|
326
|
+
BookingService.prototype.getKnowledgeType = function () {
|
|
327
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
328
|
+
return __generator(this, function (_a) {
|
|
329
|
+
switch (_a.label) {
|
|
330
|
+
case 0:
|
|
331
|
+
return [4, fubaoRequest.get('/api/dictionaries/134')];
|
|
332
|
+
case 1:
|
|
333
|
+
return [2, _a.sent().data];
|
|
334
|
+
}
|
|
335
|
+
});
|
|
336
|
+
});
|
|
337
|
+
};
|
|
338
|
+
BookingService.prototype.getKnowledge = function (type) {
|
|
339
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
340
|
+
return __generator(this, function (_a) {
|
|
341
|
+
switch (_a.label) {
|
|
342
|
+
case 0:
|
|
343
|
+
return [4, fubaoRequest.get("/api/knowledges?sort=id,desc&page=0&size=999&type.equals=".concat(type))];
|
|
344
|
+
case 1:
|
|
345
|
+
return [2, _a.sent().data];
|
|
346
|
+
}
|
|
347
|
+
});
|
|
348
|
+
});
|
|
349
|
+
};
|
|
350
|
+
BookingService.prototype.appointmentSurgery = function (data) {
|
|
351
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
352
|
+
return __generator(this, function (_a) {
|
|
353
|
+
switch (_a.label) {
|
|
354
|
+
case 0:
|
|
355
|
+
return [4, fubaoRequest.post('/api/family/planning/appointmentSurgery', __assign(__assign({}, data), {
|
|
356
|
+
progressStatus: EProgressStatus.待签到
|
|
357
|
+
}))];
|
|
358
|
+
case 1:
|
|
359
|
+
return [2, _a.sent().data];
|
|
360
|
+
}
|
|
361
|
+
});
|
|
362
|
+
});
|
|
363
|
+
};
|
|
364
|
+
BookingService.prototype.appointmentSurgerySign = function (data) {
|
|
365
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
366
|
+
return __generator(this, function (_a) {
|
|
367
|
+
switch (_a.label) {
|
|
368
|
+
case 0:
|
|
369
|
+
return [4, fubaoRequest.put('/api/family/planning/updateSurgeryProgress', __assign(__assign({}, data), {
|
|
370
|
+
progressStatus: EProgressStatus.已签到
|
|
371
|
+
}))];
|
|
372
|
+
case 1:
|
|
373
|
+
return [2, _a.sent().data];
|
|
374
|
+
}
|
|
375
|
+
});
|
|
376
|
+
});
|
|
377
|
+
};
|
|
378
|
+
return BookingService;
|
|
379
|
+
}();
|
|
380
|
+
var bookingService = new BookingService();
|
|
381
|
+
var StupidRadioGroup = function StupidRadioGroup(props) {
|
|
382
|
+
var options = props.options,
|
|
383
|
+
name = props.name,
|
|
384
|
+
value = props.value,
|
|
385
|
+
disabled = props.disabled,
|
|
386
|
+
others = __rest(props, ["options", "name", "value", "disabled"]);
|
|
387
|
+
var fuckInputNode = /*#__PURE__*/React$1.createElement(Form.Item, {
|
|
388
|
+
name: "".concat(name, "Note"),
|
|
389
|
+
noStyle: true
|
|
390
|
+
}, /*#__PURE__*/React$1.createElement(Input, {
|
|
391
|
+
size: "small",
|
|
392
|
+
disabled: disabled,
|
|
393
|
+
style: {
|
|
394
|
+
border: 'none',
|
|
395
|
+
borderBottom: '2px solid red',
|
|
396
|
+
borderRadius: 0,
|
|
397
|
+
width: 60
|
|
398
|
+
}
|
|
399
|
+
}));
|
|
400
|
+
return /*#__PURE__*/React$1.createElement(Radio.Group, __assign({}, others, {
|
|
401
|
+
value: value,
|
|
402
|
+
disabled: disabled
|
|
403
|
+
}), options === null || options === void 0 ? void 0 : options.map(function (_) {
|
|
404
|
+
var isActive = value == _.value;
|
|
405
|
+
var style = Object.assign({}, isActive ? _.activeStyle : {});
|
|
406
|
+
return /*#__PURE__*/React$1.createElement(Radio, {
|
|
407
|
+
key: _.value.toString(),
|
|
408
|
+
value: _.value
|
|
409
|
+
}, /*#__PURE__*/React$1.createElement("span", {
|
|
410
|
+
style: style
|
|
411
|
+
}, _.label, _.withFuckedInput && _.value === value ? fuckInputNode : null));
|
|
412
|
+
}));
|
|
413
|
+
};
|
|
414
|
+
LazyAntd.Tree;
|
|
415
|
+
LazyAntd.TreeSelect;
|
|
416
|
+
var Select$1 = LazyAntd.Select;
|
|
417
|
+
LazyAntd.Table;
|
|
418
|
+
LazyAntd.Dropdown;
|
|
419
|
+
LazyAntd.Pagination;
|
|
420
|
+
var Item$2 = Form.Item;
|
|
421
|
+
var requiredRule = [{
|
|
422
|
+
required: true,
|
|
423
|
+
message: ''
|
|
424
|
+
}];
|
|
425
|
+
var examStatusOptions = Object.keys(EExaminationStatus).filter(function (_) {
|
|
426
|
+
return isNaN(Number(_));
|
|
427
|
+
}).map(function (label) {
|
|
428
|
+
return {
|
|
429
|
+
label: label,
|
|
430
|
+
value: EExaminationStatus[label],
|
|
431
|
+
activeStyle: EExaminationStatus[label] === EExaminationStatus.正常 ? {} : {
|
|
432
|
+
color: 'red'
|
|
433
|
+
},
|
|
434
|
+
withFuckedInput: EExaminationStatus[label] === EExaminationStatus.异常
|
|
435
|
+
};
|
|
436
|
+
});
|
|
437
|
+
var Form0 = function Form0(_a) {
|
|
438
|
+
var _b, _c, _d;
|
|
439
|
+
var form = _a.form,
|
|
440
|
+
setCommonData = _a.setCommonData,
|
|
441
|
+
commonData = _a.commonData;
|
|
442
|
+
var remoteData = commonData === null || commonData === void 0 ? void 0 : commonData.data;
|
|
443
|
+
var status = stupidEnums.EarlyPregnancyCheckSurgeryType.progressStatus.getLabel(remoteData === null || remoteData === void 0 ? void 0 : remoteData.progressStatus);
|
|
444
|
+
var canEdit = !status;
|
|
445
|
+
var disabled = !canEdit;
|
|
446
|
+
var _e = useState(false),
|
|
447
|
+
selected = _e[0],
|
|
448
|
+
setSelected = _e[1];
|
|
449
|
+
var _f = useState(false),
|
|
450
|
+
tracingFormVisible = _f[0],
|
|
451
|
+
setTracingFormVisible = _f[1];
|
|
452
|
+
var informedConsents = useRef([]);
|
|
453
|
+
var _g = useState([]);
|
|
454
|
+
_g[0];
|
|
455
|
+
var setKnowledgeTypList = _g[1];
|
|
456
|
+
var _h = useState(true);
|
|
457
|
+
_h[0];
|
|
458
|
+
_h[1];
|
|
459
|
+
var _j = useState([]);
|
|
460
|
+
_j[0];
|
|
461
|
+
_j[1];
|
|
462
|
+
var _k = useState([]),
|
|
463
|
+
optionalPregnancy = _k[0],
|
|
464
|
+
setOptionalPregnancy = _k[1];
|
|
465
|
+
var _l = useState(),
|
|
466
|
+
scheduleData = _l[0],
|
|
467
|
+
setScheduleData = _l[1];
|
|
468
|
+
var _m = useState([]),
|
|
469
|
+
operationList = _m[0],
|
|
470
|
+
setOperationList = _m[1];
|
|
471
|
+
var _o = useState({}),
|
|
472
|
+
_formData = _o[0],
|
|
473
|
+
set_formData = _o[1];
|
|
474
|
+
var _p = useState([]),
|
|
475
|
+
yearsSchedul = _p[0],
|
|
476
|
+
setYearsSchedul = _p[1];
|
|
477
|
+
getAttendanceOfThisDay(scheduleData);
|
|
478
|
+
var _q = getOperationNum(scheduleData, _formData.operationName),
|
|
479
|
+
all = _q.all,
|
|
480
|
+
reserved = _q.reserved;
|
|
481
|
+
var morningReservationNum = (scheduleData === null || scheduleData === void 0 ? void 0 : scheduleData.morningReservationNum) || 0;
|
|
482
|
+
var afternoonReservationNum = (scheduleData === null || scheduleData === void 0 ? void 0 : scheduleData.afternoonReservationNum) || 0;
|
|
483
|
+
function setFormData(formData) {
|
|
484
|
+
if (formData) {
|
|
485
|
+
set_formData(formData);
|
|
486
|
+
form.setFieldsValue(__assign({}, formData));
|
|
487
|
+
}
|
|
488
|
+
}
|
|
489
|
+
function handleDateChange(date) {
|
|
490
|
+
if (!date) return;
|
|
491
|
+
Promise.all([getSchedulingData(date), SModel_FamilyPlaningSchedulingDetails.getOpenSurgicalBySchedulingDate(date)]).then(function (_a) {
|
|
492
|
+
var _schedule = _a[0],
|
|
493
|
+
strArr = _a[1];
|
|
494
|
+
setScheduleData(_schedule);
|
|
495
|
+
setOperationList(strArr);
|
|
496
|
+
});
|
|
497
|
+
}
|
|
498
|
+
useEffect(function () {
|
|
499
|
+
var date = remoteData === null || remoteData === void 0 ? void 0 : remoteData.appointmentDate;
|
|
500
|
+
mchcLogger.log('fuck date', {
|
|
501
|
+
remoteData: remoteData,
|
|
502
|
+
commonData: commonData
|
|
503
|
+
});
|
|
504
|
+
if (remoteData) {
|
|
505
|
+
setFormData(__assign(__assign({
|
|
506
|
+
appointmentPeople: (remoteData === null || remoteData === void 0 ? void 0 : remoteData.appointmentPeople) || SLocal_State.getUserData().firstName,
|
|
507
|
+
registrationDate: (remoteData === null || remoteData === void 0 ? void 0 : remoteData.registrationDate) || dayjs()
|
|
508
|
+
}, remoteData), remoteData.preoperativeExamination ? remoteData.preoperativeExamination : {}));
|
|
509
|
+
}
|
|
510
|
+
if (date) {
|
|
511
|
+
handleDateChange(date);
|
|
512
|
+
SModel_FamilyPlaningSchedulingDetails.getBetweenList(date.clone().startOf('year').subtract(365, 'day'), date.clone().endOf('year').add(365, 'day')).then(setYearsSchedul);
|
|
513
|
+
}
|
|
514
|
+
return function () {};
|
|
515
|
+
}, [commonData]);
|
|
516
|
+
useEffect(function () {
|
|
517
|
+
bookingService.getKnowledgeType().then(function (data) {
|
|
518
|
+
setKnowledgeTypList(data.enumerations);
|
|
519
|
+
});
|
|
520
|
+
SModel_EarlyPregnancyCheckSurgeryType.getOptionalPregnancyList().then(setOptionalPregnancy);
|
|
521
|
+
}, []);
|
|
522
|
+
function doid() {
|
|
523
|
+
if (!canEdit) {
|
|
524
|
+
return Promise.resolve();
|
|
525
|
+
}
|
|
526
|
+
return form.validateFields().then(function (values) {
|
|
527
|
+
var _a;
|
|
528
|
+
var submitData = __assign(__assign({}, values), {
|
|
529
|
+
earlyPregnancyCheckPacTrackingFollowUpRecord: __assign(__assign({}, valueToForm(values)), {
|
|
530
|
+
followUpState: '已完成'
|
|
531
|
+
}),
|
|
532
|
+
preoperativeExamination: values,
|
|
533
|
+
id: remoteData === null || remoteData === void 0 ? void 0 : remoteData.id,
|
|
534
|
+
informedConsents: informedConsents.current,
|
|
535
|
+
progressStatus: (_a = remoteData === null || remoteData === void 0 ? void 0 : remoteData.progressStatus) !== null && _a !== void 0 ? _a : stupidEnums.EarlyPregnancyCheckSurgeryType.progressStatus.getValue('待签到'),
|
|
536
|
+
registrationDate: (remoteData === null || remoteData === void 0 ? void 0 : remoteData.registrationDate) || dayjs()
|
|
537
|
+
});
|
|
538
|
+
var p = !(remoteData === null || remoteData === void 0 ? void 0 : remoteData.id) || (remoteData === null || remoteData === void 0 ? void 0 : remoteData.progressStatus) === stupidEnums.EarlyPregnancyCheckSurgeryType.progressStatus.getValue('待预约') ? SModel_EarlyPregnancyCheckSurgeryType.appointmentSurgery(submitData) : SModel_EarlyPregnancyCheckSurgeryType.appointmentSurgery(submitData);
|
|
539
|
+
return p.then(function (r) {
|
|
540
|
+
setCommonData(__assign(__assign({}, commonData), {
|
|
541
|
+
data: r
|
|
542
|
+
}));
|
|
543
|
+
return r;
|
|
544
|
+
});
|
|
545
|
+
});
|
|
546
|
+
}
|
|
547
|
+
form._validateFields = doid;
|
|
548
|
+
form._save = doid;
|
|
549
|
+
var searchName = useCallback(debounce(function (v) {
|
|
550
|
+
return SModel_EarlyPregnancyCheckSurgeryType.getOptionalPregnancyList(v).then(setOptionalPregnancy);
|
|
551
|
+
}, 500), []);
|
|
552
|
+
return /*#__PURE__*/React$1.createElement("div", {
|
|
553
|
+
className: "stupid-modal-body"
|
|
554
|
+
}, /*#__PURE__*/React$1.createElement(Form, {
|
|
555
|
+
form: form,
|
|
556
|
+
labelCol: {
|
|
557
|
+
xs: 6
|
|
558
|
+
},
|
|
559
|
+
wrapperCol: {
|
|
560
|
+
xs: 14
|
|
561
|
+
},
|
|
562
|
+
onValuesChange: function onValuesChange(a, b) {
|
|
563
|
+
console.log('props', a);
|
|
564
|
+
set_formData(b);
|
|
565
|
+
}
|
|
566
|
+
}, /*#__PURE__*/React$1.createElement(Divider, null, "\u60A3\u8005\u4FE1\u606F "), /*#__PURE__*/React$1.createElement(Row, null, /*#__PURE__*/React$1.createElement(Col, {
|
|
567
|
+
xs: 8,
|
|
568
|
+
hidden: true
|
|
569
|
+
}, /*#__PURE__*/React$1.createElement(Item$2, {
|
|
570
|
+
label: "",
|
|
571
|
+
name: "operatingRoom",
|
|
572
|
+
rules: [{
|
|
573
|
+
required: false
|
|
574
|
+
}]
|
|
575
|
+
}, /*#__PURE__*/React$1.createElement(Input, null))), /*#__PURE__*/React$1.createElement(Col, {
|
|
576
|
+
xs: 8
|
|
577
|
+
}, /*#__PURE__*/React$1.createElement(Item$2, {
|
|
578
|
+
hidden: !!(remoteData === null || remoteData === void 0 ? void 0 : remoteData.id),
|
|
579
|
+
label: "\u59D3\u540D",
|
|
580
|
+
name: "name",
|
|
581
|
+
rules: requiredRule
|
|
582
|
+
}, /*#__PURE__*/React$1.createElement(AutoComplete, {
|
|
583
|
+
showSearch: true,
|
|
584
|
+
placeholder: "\u8BF7\u9009\u62E9",
|
|
585
|
+
options: optionalPregnancy.map(function (_) {
|
|
586
|
+
return {
|
|
587
|
+
label: _.name,
|
|
588
|
+
value: _.id
|
|
589
|
+
};
|
|
590
|
+
}),
|
|
591
|
+
onChange: function onChange(v) {
|
|
592
|
+
var target = optionalPregnancy.find(function (_) {
|
|
593
|
+
return _.id.toString() === v.toString();
|
|
594
|
+
});
|
|
595
|
+
if (target) {
|
|
596
|
+
setFormData(target);
|
|
597
|
+
}
|
|
598
|
+
setSelected(!!target);
|
|
599
|
+
},
|
|
600
|
+
optionFilterProp: "label",
|
|
601
|
+
onSearch: searchName
|
|
602
|
+
})), /*#__PURE__*/React$1.createElement(Item$2, {
|
|
603
|
+
hidden: !(remoteData === null || remoteData === void 0 ? void 0 : remoteData.id),
|
|
604
|
+
label: "\u59D3\u540D",
|
|
605
|
+
name: "name",
|
|
606
|
+
rules: requiredRule
|
|
607
|
+
}, /*#__PURE__*/React$1.createElement(Input, {
|
|
608
|
+
disabled: selected || disabled
|
|
609
|
+
}))), /*#__PURE__*/React$1.createElement(Col, {
|
|
610
|
+
xs: 8
|
|
611
|
+
}, /*#__PURE__*/React$1.createElement(Item$2, {
|
|
612
|
+
label: "\u95E8\u8BCA\u53F7",
|
|
613
|
+
name: "outpatientNo",
|
|
614
|
+
rules: requiredRule
|
|
615
|
+
}, /*#__PURE__*/React$1.createElement(Input, {
|
|
616
|
+
disabled: selected || disabled
|
|
617
|
+
}))), /*#__PURE__*/React$1.createElement(Col, {
|
|
618
|
+
xs: 8
|
|
619
|
+
}, /*#__PURE__*/React$1.createElement(Item$2, {
|
|
620
|
+
label: "\u8BC1\u4EF6\u53F7\u7801",
|
|
621
|
+
name: "idNO",
|
|
622
|
+
rules: requiredRule
|
|
623
|
+
}, /*#__PURE__*/React$1.createElement(Input, {
|
|
624
|
+
disabled: selected || disabled
|
|
625
|
+
}))), /*#__PURE__*/React$1.createElement(Col, {
|
|
626
|
+
xs: 8
|
|
627
|
+
}, /*#__PURE__*/React$1.createElement(Item$2, {
|
|
628
|
+
label: "\u624B\u673A\u53F7\u7801",
|
|
629
|
+
name: "telephone",
|
|
630
|
+
rules: requiredRule
|
|
631
|
+
}, /*#__PURE__*/React$1.createElement(Input, {
|
|
632
|
+
disabled: selected || disabled
|
|
633
|
+
}))), /*#__PURE__*/React$1.createElement(Col, {
|
|
634
|
+
xs: 16
|
|
635
|
+
}, /*#__PURE__*/React$1.createElement(Item$2, {
|
|
636
|
+
label: "\u5BB6\u5EAD\u5730\u5740",
|
|
637
|
+
name: "residenceAddress",
|
|
638
|
+
labelCol: {
|
|
639
|
+
xs: 3
|
|
640
|
+
},
|
|
641
|
+
wrapperCol: {
|
|
642
|
+
xs: 19
|
|
643
|
+
}
|
|
644
|
+
}, /*#__PURE__*/React$1.createElement(Input, {
|
|
645
|
+
disabled: selected || disabled
|
|
646
|
+
}))), /*#__PURE__*/React$1.createElement(Col, {
|
|
647
|
+
xs: 16
|
|
648
|
+
}, /*#__PURE__*/React$1.createElement(Item$2, {
|
|
649
|
+
label: "\u672F\u524D\u8BCA\u65AD",
|
|
650
|
+
name: "preoperativeDiagnosis",
|
|
651
|
+
labelCol: {
|
|
652
|
+
xs: 3
|
|
653
|
+
},
|
|
654
|
+
wrapperCol: {
|
|
655
|
+
xs: 19
|
|
656
|
+
},
|
|
657
|
+
rules: [{
|
|
658
|
+
required: false
|
|
659
|
+
}]
|
|
660
|
+
}, /*#__PURE__*/React$1.createElement(Input.TextArea, {
|
|
661
|
+
disabled: disabled
|
|
662
|
+
}))), /*#__PURE__*/React$1.createElement(Col, {
|
|
663
|
+
xs: 8
|
|
664
|
+
}, /*#__PURE__*/React$1.createElement(Item$2, {
|
|
665
|
+
label: "\u63A5\u8BCA\u65E5\u671F",
|
|
666
|
+
name: "admissionTime",
|
|
667
|
+
rules: [{
|
|
668
|
+
required: false
|
|
669
|
+
}]
|
|
670
|
+
}, /*#__PURE__*/React$1.createElement(DatePicker_L, {
|
|
671
|
+
format: "YYYY-MM-DD",
|
|
672
|
+
disabled: selected || disabled
|
|
673
|
+
}))), /*#__PURE__*/React$1.createElement(Col, {
|
|
674
|
+
xs: 16
|
|
675
|
+
}, /*#__PURE__*/React$1.createElement(Item$2, {
|
|
676
|
+
label: "\u533B\u5631",
|
|
677
|
+
name: "doctorOrder",
|
|
678
|
+
labelCol: {
|
|
679
|
+
xs: 3
|
|
680
|
+
},
|
|
681
|
+
wrapperCol: {
|
|
682
|
+
xs: 19
|
|
683
|
+
},
|
|
684
|
+
rules: [{
|
|
685
|
+
required: false
|
|
686
|
+
}]
|
|
687
|
+
}, /*#__PURE__*/React$1.createElement(Input.TextArea, {
|
|
688
|
+
disabled: disabled
|
|
689
|
+
}))), /*#__PURE__*/React$1.createElement(Col, {
|
|
690
|
+
xs: 8
|
|
691
|
+
}, /*#__PURE__*/React$1.createElement(Item$2, {
|
|
692
|
+
label: "\u63A5\u8BCA\u533B\u751F",
|
|
693
|
+
name: "admissionDoctor"
|
|
694
|
+
}, /*#__PURE__*/React$1.createElement(Select$1, {
|
|
695
|
+
placeholder: "\u8BF7\u8F93\u5165",
|
|
696
|
+
options: (_b = commonData === null || commonData === void 0 ? void 0 : commonData.optionalDoctor) === null || _b === void 0 ? void 0 : _b.map(function (_) {
|
|
697
|
+
return {
|
|
698
|
+
label: _,
|
|
699
|
+
value: _
|
|
700
|
+
};
|
|
701
|
+
}),
|
|
702
|
+
disabled: disabled
|
|
703
|
+
}))), /*#__PURE__*/React$1.createElement(Divider, null, "\u672F\u524D\u68C0\u67E5"), /*#__PURE__*/React$1.createElement(Col, {
|
|
704
|
+
xs: 8
|
|
705
|
+
}, /*#__PURE__*/React$1.createElement(Item$2, {
|
|
706
|
+
label: "HIV",
|
|
707
|
+
name: "hiv"
|
|
708
|
+
}, /*#__PURE__*/React$1.createElement(StupidRadioGroup, {
|
|
709
|
+
name: "hiv",
|
|
710
|
+
options: examStatusOptions,
|
|
711
|
+
disabled: disabled
|
|
712
|
+
}))), /*#__PURE__*/React$1.createElement(Col, {
|
|
713
|
+
xs: 8
|
|
714
|
+
}, /*#__PURE__*/React$1.createElement(Item$2, {
|
|
715
|
+
label: "\u6885\u6BD2",
|
|
716
|
+
name: "syphilis"
|
|
717
|
+
}, /*#__PURE__*/React$1.createElement(StupidRadioGroup, {
|
|
718
|
+
name: "syphilis",
|
|
719
|
+
options: examStatusOptions,
|
|
720
|
+
disabled: disabled
|
|
721
|
+
}))), /*#__PURE__*/React$1.createElement(Col, {
|
|
722
|
+
xs: 8
|
|
723
|
+
}, /*#__PURE__*/React$1.createElement(Item$2, {
|
|
724
|
+
label: "\u4E59\u809D",
|
|
725
|
+
name: "hepatitisB"
|
|
726
|
+
}, /*#__PURE__*/React$1.createElement(StupidRadioGroup, {
|
|
727
|
+
name: "hepatitisB",
|
|
728
|
+
options: examStatusOptions,
|
|
729
|
+
disabled: disabled
|
|
730
|
+
}))), /*#__PURE__*/React$1.createElement(Col, {
|
|
731
|
+
xs: 8
|
|
732
|
+
}, /*#__PURE__*/React$1.createElement(Item$2, {
|
|
733
|
+
label: "\u4E19\u809D",
|
|
734
|
+
name: "hepatitisC"
|
|
735
|
+
}, /*#__PURE__*/React$1.createElement(StupidRadioGroup, {
|
|
736
|
+
name: "hepatitisC",
|
|
737
|
+
options: examStatusOptions,
|
|
738
|
+
disabled: disabled
|
|
739
|
+
}))), /*#__PURE__*/React$1.createElement(Col, {
|
|
740
|
+
xs: 8
|
|
741
|
+
}, /*#__PURE__*/React$1.createElement(Item$2, {
|
|
742
|
+
label: "\u51DD\u8840\u529F\u80FD",
|
|
743
|
+
name: "sixCoagulation"
|
|
744
|
+
}, /*#__PURE__*/React$1.createElement(StupidRadioGroup, {
|
|
745
|
+
name: "sixCoagulation",
|
|
746
|
+
options: examStatusOptions,
|
|
747
|
+
disabled: disabled
|
|
748
|
+
}))), /*#__PURE__*/React$1.createElement(Col, {
|
|
749
|
+
xs: 8
|
|
750
|
+
}, /*#__PURE__*/React$1.createElement(Item$2, {
|
|
751
|
+
label: "\u767D\u5E26",
|
|
752
|
+
name: "leucorrhea"
|
|
753
|
+
}, /*#__PURE__*/React$1.createElement(StupidRadioGroup, {
|
|
754
|
+
name: "leucorrhea",
|
|
755
|
+
options: examStatusOptions,
|
|
756
|
+
disabled: disabled
|
|
757
|
+
}))), /*#__PURE__*/React$1.createElement(Col, {
|
|
758
|
+
xs: 8
|
|
759
|
+
}, /*#__PURE__*/React$1.createElement(Item$2, {
|
|
760
|
+
label: "\u6838\u9178",
|
|
761
|
+
name: "nat"
|
|
762
|
+
}, /*#__PURE__*/React$1.createElement(StupidRadioGroup, {
|
|
763
|
+
name: "nat",
|
|
764
|
+
options: examStatusOptions,
|
|
765
|
+
disabled: disabled
|
|
766
|
+
}))), /*#__PURE__*/React$1.createElement(Col, {
|
|
767
|
+
xs: 8
|
|
768
|
+
}, /*#__PURE__*/React$1.createElement(Item$2, {
|
|
769
|
+
label: "HB",
|
|
770
|
+
name: "hb"
|
|
771
|
+
}, /*#__PURE__*/React$1.createElement(InputNumber, {
|
|
772
|
+
addonAfter: "g/L",
|
|
773
|
+
disabled: disabled
|
|
774
|
+
}))), /*#__PURE__*/React$1.createElement(Col, {
|
|
775
|
+
xs: 8
|
|
776
|
+
}, /*#__PURE__*/React$1.createElement(Item$2, {
|
|
777
|
+
label: "MCV",
|
|
778
|
+
name: "mcv"
|
|
779
|
+
}, /*#__PURE__*/React$1.createElement(InputNumber, {
|
|
780
|
+
addonAfter: "fL",
|
|
781
|
+
disabled: disabled
|
|
782
|
+
}))), /*#__PURE__*/React$1.createElement(Col, {
|
|
783
|
+
xs: 8
|
|
784
|
+
}, /*#__PURE__*/React$1.createElement(Item$2, {
|
|
785
|
+
label: "PLT",
|
|
786
|
+
name: "plt"
|
|
787
|
+
}, /*#__PURE__*/React$1.createElement(InputNumber, {
|
|
788
|
+
addonAfter: "10^9/L",
|
|
789
|
+
disabled: disabled
|
|
790
|
+
}))), /*#__PURE__*/React$1.createElement(Col, {
|
|
791
|
+
xs: 8
|
|
792
|
+
}, /*#__PURE__*/React$1.createElement(Item$2, {
|
|
793
|
+
label: "\u9EBB\u9189\u8BC4\u4F30",
|
|
794
|
+
name: "preanestheticEvaluation"
|
|
795
|
+
}, /*#__PURE__*/React$1.createElement(StupidRadioGroup, {
|
|
796
|
+
name: "preanestheticEvaluation",
|
|
797
|
+
options: examStatusOptions,
|
|
798
|
+
disabled: disabled
|
|
799
|
+
}))), /*#__PURE__*/React$1.createElement(Col, {
|
|
800
|
+
xs: 8
|
|
801
|
+
}, /*#__PURE__*/React$1.createElement(Item$2, {
|
|
802
|
+
label: "\u5FC3\u7535\u56FE",
|
|
803
|
+
name: "ecg"
|
|
804
|
+
}, /*#__PURE__*/React$1.createElement(StupidRadioGroup, {
|
|
805
|
+
name: "ecg",
|
|
806
|
+
options: examStatusOptions,
|
|
807
|
+
disabled: disabled
|
|
808
|
+
}))), /*#__PURE__*/React$1.createElement(InformedConsentTable, {
|
|
809
|
+
disabled: disabled,
|
|
810
|
+
onChange: function onChange(v) {
|
|
811
|
+
return informedConsents.current = v;
|
|
812
|
+
},
|
|
813
|
+
data: (_c = commonData === null || commonData === void 0 ? void 0 : commonData.data) === null || _c === void 0 ? void 0 : _c.informedConsents
|
|
814
|
+
}), /*#__PURE__*/React$1.createElement(Divider, null, "\u624B\u672F\u9884\u7EA6"), /*#__PURE__*/React$1.createElement(Col, {
|
|
815
|
+
xs: 8
|
|
816
|
+
}, /*#__PURE__*/React$1.createElement(Item$2, {
|
|
817
|
+
label: "\u624B\u672F\u540D\u79F0",
|
|
818
|
+
name: "operationName",
|
|
819
|
+
rules: requiredRule
|
|
820
|
+
}, /*#__PURE__*/React$1.createElement(Select$1, {
|
|
821
|
+
options: operationList.map(function (_) {
|
|
822
|
+
return {
|
|
823
|
+
label: _,
|
|
824
|
+
value: _
|
|
825
|
+
};
|
|
826
|
+
}),
|
|
827
|
+
disabled: disabled,
|
|
828
|
+
placeholder: "\u8BF7\u9009\u62E9",
|
|
829
|
+
onChange: function onChange(target) {
|
|
830
|
+
if (target) {
|
|
831
|
+
setTracingFormVisible(['人工流产', '药物流产'].includes(target) || __DEV__);
|
|
832
|
+
}
|
|
833
|
+
}
|
|
834
|
+
}))), /*#__PURE__*/React$1.createElement(Col, {
|
|
835
|
+
xs: 8
|
|
836
|
+
}, /*#__PURE__*/React$1.createElement(Item$2, {
|
|
837
|
+
label: "\u9884\u7EA6\u65E5\u671F",
|
|
838
|
+
name: "appointmentDate",
|
|
839
|
+
rules: requiredRule
|
|
840
|
+
}, /*#__PURE__*/React$1.createElement(DatePicker_L, {
|
|
841
|
+
disabled: status === '待签到' || status === '超时' ? false : disabled,
|
|
842
|
+
format: "YYYY-MM-DD",
|
|
843
|
+
onChange: function onChange(e) {
|
|
844
|
+
handleDateChange(e);
|
|
845
|
+
},
|
|
846
|
+
disabledDate: function disabledDate(d) {
|
|
847
|
+
var target = yearsSchedul.find(function (_) {
|
|
848
|
+
return _.schedulingDate.isSame(d, 'day');
|
|
849
|
+
});
|
|
850
|
+
return getAttendanceOfThisDay(target) === '休息';
|
|
851
|
+
}
|
|
852
|
+
}))), /*#__PURE__*/React$1.createElement(Col, {
|
|
853
|
+
xs: 8
|
|
854
|
+
}, /*#__PURE__*/React$1.createElement("div", null, "\u5269\u4F59\u53F7\u6E90\uFF1A", all - reserved, "\uFF0C\u5DF2\u9884\u7EA6\uFF1A", reserved, "\uFF0C\u5F00\u653E\u53F7\u6E90\uFF1A", all)), /*#__PURE__*/React$1.createElement(Col, {
|
|
855
|
+
xs: 8
|
|
856
|
+
}, /*#__PURE__*/React$1.createElement(Item$2, {
|
|
857
|
+
label: "\u65F6\u95F4\u6BB5",
|
|
858
|
+
name: "appointmentMorningOrAfternoon",
|
|
859
|
+
rules: requiredRule
|
|
860
|
+
}, /*#__PURE__*/React$1.createElement(Select$1, {
|
|
861
|
+
placeholder: "\u8BF7\u9009\u62E9",
|
|
862
|
+
disabled: status === '待签到' || status === '超时' ? false : disabled,
|
|
863
|
+
allowClear: true,
|
|
864
|
+
options: ['上午', '下午'].map(function (_, idx) {
|
|
865
|
+
return {
|
|
866
|
+
value: _,
|
|
867
|
+
label: "".concat(_, " ").concat((idx ? afternoonReservationNum : morningReservationNum) >= 25 ? '(已满)' : ''),
|
|
868
|
+
disabled: checkDisabledHalfDay(scheduleData, _)
|
|
869
|
+
};
|
|
870
|
+
})
|
|
871
|
+
}))), /*#__PURE__*/React$1.createElement(Col, {
|
|
872
|
+
xs: 8
|
|
873
|
+
}, /*#__PURE__*/React$1.createElement(Item$2, {
|
|
874
|
+
label: "\u7F34\u8D39\u60C5\u51B5",
|
|
875
|
+
name: "payment"
|
|
876
|
+
}, /*#__PURE__*/React$1.createElement(Select$1, {
|
|
877
|
+
disabled: true,
|
|
878
|
+
options: ['未缴费', '已缴费'].map(function (_, idx) {
|
|
879
|
+
return {
|
|
880
|
+
label: _,
|
|
881
|
+
value: idx
|
|
882
|
+
};
|
|
883
|
+
}),
|
|
884
|
+
placeholder: "\u672A\u7F34\u8D39"
|
|
885
|
+
}))), tracingFormVisible && (/*#__PURE__*/React$1.createElement(Col, {
|
|
886
|
+
xs: 24
|
|
887
|
+
}, renderForm0_shared('首次随访', false, remoteData, false, function () {})))), /*#__PURE__*/React$1.createElement(Row, null, /*#__PURE__*/React$1.createElement(Col, {
|
|
888
|
+
xs: 8
|
|
889
|
+
}, /*#__PURE__*/React$1.createElement(Item$2, {
|
|
890
|
+
label: "\u767B\u8BB0\u65E5\u671F",
|
|
891
|
+
name: "registrationDate",
|
|
892
|
+
rules: requiredRule
|
|
893
|
+
}, /*#__PURE__*/React$1.createElement(DatePicker_L, {
|
|
894
|
+
format: "YYYY-MM-DD",
|
|
895
|
+
disabled: true
|
|
896
|
+
}))), /*#__PURE__*/React$1.createElement(Col, {
|
|
897
|
+
xs: 8
|
|
898
|
+
}, /*#__PURE__*/React$1.createElement(Item$2, {
|
|
899
|
+
label: "\u767B\u8BB0\u8005",
|
|
900
|
+
name: "appointmentPeople",
|
|
901
|
+
rules: requiredRule
|
|
902
|
+
}, /*#__PURE__*/React$1.createElement(Select$1, {
|
|
903
|
+
placeholder: "\u8BF7\u8F93\u5165",
|
|
904
|
+
options: (_d = commonData === null || commonData === void 0 ? void 0 : commonData.optionalNurse) === null || _d === void 0 ? void 0 : _d.map(function (_) {
|
|
905
|
+
return {
|
|
906
|
+
label: _,
|
|
907
|
+
value: _
|
|
908
|
+
};
|
|
909
|
+
}),
|
|
910
|
+
disabled: disabled
|
|
911
|
+
}))))));
|
|
912
|
+
};
|
|
913
|
+
var GlobalModal = function () {
|
|
914
|
+
function GlobalModal() {}
|
|
915
|
+
return GlobalModal;
|
|
916
|
+
}();
|
|
917
|
+
var stupidModal = new GlobalModal();
|
|
918
|
+
window.stupidModal = stupidModal;
|
|
919
|
+
LazyAntd.Tree;
|
|
920
|
+
LazyAntd.TreeSelect;
|
|
921
|
+
var Select = LazyAntd.Select;
|
|
922
|
+
LazyAntd.Table;
|
|
923
|
+
LazyAntd.Dropdown;
|
|
924
|
+
LazyAntd.Pagination;
|
|
925
|
+
var Item$1 = Form.Item;
|
|
926
|
+
Radio.Group;
|
|
927
|
+
var Form1 = function Form1(_a) {
|
|
928
|
+
var _b, _c;
|
|
929
|
+
var form = _a.form,
|
|
930
|
+
commonData = _a.commonData;
|
|
931
|
+
var data = commonData === null || commonData === void 0 ? void 0 : commonData.data;
|
|
932
|
+
var status = stupidEnums.EarlyPregnancyCheckSurgeryType.progressStatus.getLabel(data === null || data === void 0 ? void 0 : data.progressStatus);
|
|
933
|
+
var isDone = status === '已签到' || status === '已完成';
|
|
934
|
+
function doid() {
|
|
935
|
+
if (!data) return;
|
|
936
|
+
if (isDone) return;
|
|
937
|
+
return form.validateFields().then(function (values) {
|
|
938
|
+
return SModel_EarlyPregnancyCheckSurgeryType.appointmentSurgery(__assign(__assign(__assign({}, data), values), {
|
|
939
|
+
progressStatus: stupidEnums.EarlyPregnancyCheckSurgeryType.progressStatus.getValue('已签到')
|
|
940
|
+
})).then(function () {
|
|
941
|
+
return confirm('签到成功,是否关闭弹窗?') && stupidModal.pop();
|
|
942
|
+
});
|
|
943
|
+
});
|
|
944
|
+
}
|
|
945
|
+
form._validateFields = doid;
|
|
946
|
+
form._save = doid;
|
|
947
|
+
useEffect(function () {
|
|
948
|
+
var remoteData = commonData === null || commonData === void 0 ? void 0 : commonData.data;
|
|
949
|
+
if (remoteData) {
|
|
950
|
+
form.setFieldsValue(__assign(__assign({}, remoteData), {
|
|
951
|
+
appointmentPeople: (remoteData === null || remoteData === void 0 ? void 0 : remoteData.appointmentPeople) || SLocal_State.getUserData(),
|
|
952
|
+
signInRegistrant: (remoteData === null || remoteData === void 0 ? void 0 : remoteData.signInRegistrant) || SLocal_State.getUserData(),
|
|
953
|
+
signInTime: (remoteData === null || remoteData === void 0 ? void 0 : remoteData.signInTime) || dayjs()
|
|
954
|
+
}));
|
|
955
|
+
}
|
|
956
|
+
return function () {};
|
|
957
|
+
}, [commonData]);
|
|
958
|
+
return /*#__PURE__*/React$1.createElement("div", null, /*#__PURE__*/React$1.createElement(Form, {
|
|
959
|
+
form: form,
|
|
960
|
+
labelCol: {
|
|
961
|
+
xs: 6
|
|
962
|
+
},
|
|
963
|
+
wrapperCol: {
|
|
964
|
+
xs: 14
|
|
965
|
+
},
|
|
966
|
+
onValuesChange: function onValuesChange(a, b) {}
|
|
967
|
+
}, /*#__PURE__*/React$1.createElement(Divider, null, "\u57FA\u672C\u4FE1\u606F"), /*#__PURE__*/React$1.createElement(Row, null, /*#__PURE__*/React$1.createElement(Col, {
|
|
968
|
+
xs: 8,
|
|
969
|
+
hidden: true
|
|
970
|
+
}, /*#__PURE__*/React$1.createElement(Item$1, {
|
|
971
|
+
label: "",
|
|
972
|
+
name: "operatingRoom",
|
|
973
|
+
rules: [{
|
|
974
|
+
required: false
|
|
975
|
+
}]
|
|
976
|
+
}, /*#__PURE__*/React$1.createElement(Input, {
|
|
977
|
+
placeholder: "\u8BF7\u8F93\u5165\u624B\u672F\u5BA4",
|
|
978
|
+
disabled: true
|
|
979
|
+
}))), /*#__PURE__*/React$1.createElement(Col, {
|
|
980
|
+
xs: 8
|
|
981
|
+
}, /*#__PURE__*/React$1.createElement(Item$1, {
|
|
982
|
+
label: "\u59D3\u540D",
|
|
983
|
+
name: "name",
|
|
984
|
+
rules: [{
|
|
985
|
+
required: false
|
|
986
|
+
}]
|
|
987
|
+
}, /*#__PURE__*/React$1.createElement(Input, {
|
|
988
|
+
placeholder: "\u8BF7\u8F93\u5165\u59D3\u540D",
|
|
989
|
+
disabled: true
|
|
990
|
+
}))), /*#__PURE__*/React$1.createElement(Col, {
|
|
991
|
+
xs: 8
|
|
992
|
+
}, /*#__PURE__*/React$1.createElement(Item$1, {
|
|
993
|
+
label: "\u95E8\u8BCA\u53F7",
|
|
994
|
+
name: "outpatientNo"
|
|
995
|
+
}, /*#__PURE__*/React$1.createElement(Input, {
|
|
996
|
+
placeholder: "\u8BF7\u8F93\u5165\u95E8\u8BCA\u53F7",
|
|
997
|
+
disabled: true
|
|
998
|
+
}))), /*#__PURE__*/React$1.createElement(Col, {
|
|
999
|
+
xs: 8
|
|
1000
|
+
}, /*#__PURE__*/React$1.createElement(Item$1, {
|
|
1001
|
+
label: "\u8BC1\u4EF6\u53F7\u7801",
|
|
1002
|
+
name: "idNO"
|
|
1003
|
+
}, /*#__PURE__*/React$1.createElement(Input, {
|
|
1004
|
+
placeholder: "\u8BF7\u8F93\u5165\u8BC1\u4EF6\u53F7\u7801",
|
|
1005
|
+
disabled: true
|
|
1006
|
+
}))), /*#__PURE__*/React$1.createElement(Col, {
|
|
1007
|
+
xs: 8
|
|
1008
|
+
}, /*#__PURE__*/React$1.createElement(Item$1, {
|
|
1009
|
+
label: "\u624B\u673A\u53F7\u7801",
|
|
1010
|
+
name: "telephone",
|
|
1011
|
+
rules: [{}]
|
|
1012
|
+
}, /*#__PURE__*/React$1.createElement(Input, {
|
|
1013
|
+
placeholder: "\u8BF7\u8F93\u5165\u624B\u673A\u53F7\u7801",
|
|
1014
|
+
disabled: true
|
|
1015
|
+
}))), /*#__PURE__*/React$1.createElement(Col, {
|
|
1016
|
+
xs: 8
|
|
1017
|
+
}, /*#__PURE__*/React$1.createElement(Item$1, {
|
|
1018
|
+
label: "\u5BB6\u5EAD\u5730\u5740",
|
|
1019
|
+
name: "residenceAddress"
|
|
1020
|
+
}, /*#__PURE__*/React$1.createElement(Input, {
|
|
1021
|
+
placeholder: "\u8BF7\u8F93\u5165\u5BB6\u5EAD\u5730\u5740",
|
|
1022
|
+
disabled: true
|
|
1023
|
+
}))), /*#__PURE__*/React$1.createElement(Col, {
|
|
1024
|
+
xs: 8
|
|
1025
|
+
}, /*#__PURE__*/React$1.createElement(Item$1, {
|
|
1026
|
+
label: "\u63A5\u8BCA\u65E5\u671F",
|
|
1027
|
+
name: "admissionTime",
|
|
1028
|
+
rules: [{
|
|
1029
|
+
required: false
|
|
1030
|
+
}]
|
|
1031
|
+
}, /*#__PURE__*/React$1.createElement(DatePicker_L, {
|
|
1032
|
+
placeholder: "\u8BF7\u8F93\u5165\u63A5\u8BCA\u65E5\u671F",
|
|
1033
|
+
format: "YYYY-MM-DD",
|
|
1034
|
+
disabled: true
|
|
1035
|
+
}))), /*#__PURE__*/React$1.createElement(Col, {
|
|
1036
|
+
xs: 16
|
|
1037
|
+
}, /*#__PURE__*/React$1.createElement(Item$1, {
|
|
1038
|
+
label: "\u533B\u5631",
|
|
1039
|
+
name: "doctorOrder",
|
|
1040
|
+
labelCol: {
|
|
1041
|
+
xs: 3
|
|
1042
|
+
},
|
|
1043
|
+
wrapperCol: {
|
|
1044
|
+
xs: 19
|
|
1045
|
+
},
|
|
1046
|
+
rules: [{
|
|
1047
|
+
required: false
|
|
1048
|
+
}]
|
|
1049
|
+
}, /*#__PURE__*/React$1.createElement(Input.TextArea, {
|
|
1050
|
+
placeholder: "\u8BF7\u8F93\u5165\u533B\u5631",
|
|
1051
|
+
disabled: true
|
|
1052
|
+
}))), /*#__PURE__*/React$1.createElement(Col, {
|
|
1053
|
+
xs: 8
|
|
1054
|
+
}, /*#__PURE__*/React$1.createElement(Item$1, {
|
|
1055
|
+
label: "\u63A5\u8BCA\u533B\u751F",
|
|
1056
|
+
name: "admissionDoctor"
|
|
1057
|
+
}, /*#__PURE__*/React$1.createElement(Select, {
|
|
1058
|
+
disabled: true,
|
|
1059
|
+
placeholder: "\u8BF7\u8F93\u5165",
|
|
1060
|
+
options: (_b = commonData === null || commonData === void 0 ? void 0 : commonData.optionalDoctor) === null || _b === void 0 ? void 0 : _b.map(function (_) {
|
|
1061
|
+
return {
|
|
1062
|
+
label: _,
|
|
1063
|
+
value: _
|
|
1064
|
+
};
|
|
1065
|
+
})
|
|
1066
|
+
}))), /*#__PURE__*/React$1.createElement(Divider, null, "\u624B\u672F\u9884\u7EA6"), /*#__PURE__*/React$1.createElement(Col, {
|
|
1067
|
+
xs: 8
|
|
1068
|
+
}, /*#__PURE__*/React$1.createElement(Item$1, {
|
|
1069
|
+
label: "\u624B\u672F\u540D\u79F0",
|
|
1070
|
+
name: "operationName"
|
|
1071
|
+
}, /*#__PURE__*/React$1.createElement(Input, {
|
|
1072
|
+
disabled: true,
|
|
1073
|
+
placeholder: "\u8BF7\u8F93\u5165\u624B\u672F\u540D\u79F0"
|
|
1074
|
+
}))), /*#__PURE__*/React$1.createElement(Col, {
|
|
1075
|
+
xs: 8
|
|
1076
|
+
}, /*#__PURE__*/React$1.createElement(Item$1, {
|
|
1077
|
+
label: "\u767B\u8BB0\u8005",
|
|
1078
|
+
name: "appointmentPeople"
|
|
1079
|
+
}, /*#__PURE__*/React$1.createElement(Select, {
|
|
1080
|
+
disabled: true,
|
|
1081
|
+
placeholder: "\u8BF7\u8F93\u5165",
|
|
1082
|
+
options: (_c = commonData === null || commonData === void 0 ? void 0 : commonData.optionalNurse) === null || _c === void 0 ? void 0 : _c.map(function (_) {
|
|
1083
|
+
return {
|
|
1084
|
+
label: _,
|
|
1085
|
+
value: _
|
|
1086
|
+
};
|
|
1087
|
+
})
|
|
1088
|
+
}))), /*#__PURE__*/React$1.createElement(Col, {
|
|
1089
|
+
xs: 8
|
|
1090
|
+
}, /*#__PURE__*/React$1.createElement(Item$1, {
|
|
1091
|
+
label: "\u9884\u7EA6\u65E5\u671F",
|
|
1092
|
+
name: "appointmentDate",
|
|
1093
|
+
rules: [{
|
|
1094
|
+
required: false,
|
|
1095
|
+
message: ''
|
|
1096
|
+
}]
|
|
1097
|
+
}, /*#__PURE__*/React$1.createElement(DatePicker_L, {
|
|
1098
|
+
placeholder: "\u8BF7\u8F93\u5165\u9884\u7EA6\u65F6\u95F4",
|
|
1099
|
+
format: "YYYY-MM-DD",
|
|
1100
|
+
disabled: true
|
|
1101
|
+
})))), /*#__PURE__*/React$1.createElement(Divider, null, "\u672F\u524D\u7B7E\u5230"), /*#__PURE__*/React$1.createElement(Row, null, /*#__PURE__*/React$1.createElement(Col, {
|
|
1102
|
+
xs: 8
|
|
1103
|
+
}, /*#__PURE__*/React$1.createElement(Item$1, {
|
|
1104
|
+
label: "\u8840\u538B",
|
|
1105
|
+
name: "preoperativeDiastolic",
|
|
1106
|
+
rules: [{
|
|
1107
|
+
required: true,
|
|
1108
|
+
message: ''
|
|
1109
|
+
}]
|
|
1110
|
+
}, /*#__PURE__*/React$1.createElement(Input.Group, {
|
|
1111
|
+
compact: true
|
|
1112
|
+
}, /*#__PURE__*/React$1.createElement(Form.Item, {
|
|
1113
|
+
rules: [{
|
|
1114
|
+
required: true,
|
|
1115
|
+
message: ''
|
|
88
1116
|
}],
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
"
|
|
96
|
-
|
|
97
|
-
|
|
1117
|
+
name: "preoperativeDiastolic",
|
|
1118
|
+
style: {
|
|
1119
|
+
width: '30%'
|
|
1120
|
+
}
|
|
1121
|
+
}, /*#__PURE__*/React$1.createElement(Input, {
|
|
1122
|
+
disabled: status === '已签到' ? false : isDone,
|
|
1123
|
+
placeholder: "\u8212\u5F20\u538B",
|
|
1124
|
+
type: "number"
|
|
1125
|
+
})), /*#__PURE__*/React$1.createElement(Input, {
|
|
1126
|
+
style: {
|
|
1127
|
+
width: 30,
|
|
1128
|
+
borderLeft: 0,
|
|
1129
|
+
margin: '0 1px',
|
|
1130
|
+
borderRight: 0,
|
|
1131
|
+
pointerEvents: 'none',
|
|
1132
|
+
textAlign: 'center'
|
|
1133
|
+
},
|
|
1134
|
+
placeholder: "/",
|
|
1135
|
+
disabled: true
|
|
1136
|
+
}), /*#__PURE__*/React$1.createElement(Form.Item, {
|
|
1137
|
+
rules: [{
|
|
1138
|
+
required: true,
|
|
1139
|
+
message: ''
|
|
98
1140
|
}],
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
}
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
1141
|
+
name: "preoperativeSystolic",
|
|
1142
|
+
style: {
|
|
1143
|
+
width: '30%'
|
|
1144
|
+
}
|
|
1145
|
+
}, /*#__PURE__*/React$1.createElement(Input, {
|
|
1146
|
+
disabled: status === '已签到' ? false : isDone,
|
|
1147
|
+
placeholder: "\u6536\u7F29\u538B",
|
|
1148
|
+
type: "number"
|
|
1149
|
+
}))))), /*#__PURE__*/React$1.createElement(Col, {
|
|
1150
|
+
xs: 8
|
|
1151
|
+
}, /*#__PURE__*/React$1.createElement(Item$1, {
|
|
1152
|
+
label: "\u4F53\u6E29",
|
|
1153
|
+
name: "preoperativeBodyTemperature",
|
|
1154
|
+
rules: [{
|
|
1155
|
+
required: true,
|
|
1156
|
+
message: ''
|
|
1157
|
+
}]
|
|
1158
|
+
}, /*#__PURE__*/React$1.createElement(Input, {
|
|
1159
|
+
disabled: status === '已签到' ? false : isDone,
|
|
1160
|
+
placeholder: "\u8BF7\u8F93\u5165\u4F53\u6E29",
|
|
1161
|
+
type: "number",
|
|
1162
|
+
addonAfter: "\xB0C"
|
|
1163
|
+
}))), /*#__PURE__*/React$1.createElement(Col, {
|
|
1164
|
+
xs: 8
|
|
1165
|
+
}, /*#__PURE__*/React$1.createElement(Item$1, {
|
|
1166
|
+
label: "\u662F\u5426\u7A7A\u8179",
|
|
1167
|
+
name: "preoperativeFasting",
|
|
1168
|
+
rules: [{
|
|
1169
|
+
required: true,
|
|
1170
|
+
message: ''
|
|
1171
|
+
}]
|
|
1172
|
+
}, /*#__PURE__*/React$1.createElement(StupidRadioGroup, {
|
|
1173
|
+
disabled: status === '已签到' ? false : isDone,
|
|
1174
|
+
name: "preoperativeFasting",
|
|
1175
|
+
options: ['是', '否'].map(function (_, i) {
|
|
1176
|
+
return {
|
|
1177
|
+
label: _,
|
|
1178
|
+
value: i + 1,
|
|
1179
|
+
withFuckedInput: !!i
|
|
1180
|
+
};
|
|
1181
|
+
})
|
|
1182
|
+
}))), /*#__PURE__*/React$1.createElement(Col, {
|
|
1183
|
+
xs: 24
|
|
1184
|
+
}, /*#__PURE__*/React$1.createElement(Item$1, {
|
|
1185
|
+
label: "\u5907\u6CE8",
|
|
1186
|
+
name: "preoperativeNote",
|
|
1187
|
+
labelCol: {
|
|
1188
|
+
xs: 2
|
|
1189
|
+
},
|
|
1190
|
+
wrapperCol: {
|
|
1191
|
+
xs: 21
|
|
1192
|
+
}
|
|
1193
|
+
}, /*#__PURE__*/React$1.createElement(Input, {
|
|
1194
|
+
disabled: status === '已签到' ? false : isDone,
|
|
1195
|
+
placeholder: "\u8BF7\u8F93\u5165\u5907\u6CE8"
|
|
1196
|
+
}))), /*#__PURE__*/React$1.createElement(Col, {
|
|
1197
|
+
xs: 8
|
|
1198
|
+
}, /*#__PURE__*/React$1.createElement(Item$1, {
|
|
1199
|
+
label: "\u7B7E\u5230\u65F6\u95F4",
|
|
1200
|
+
name: "signInTime"
|
|
1201
|
+
}, /*#__PURE__*/React$1.createElement(DatePicker_L, {
|
|
1202
|
+
disabled: status === '已签到' ? false : isDone,
|
|
1203
|
+
placeholder: "\u8BF7\u8F93\u5165\u7B7E\u5230\u65F6\u95F4",
|
|
1204
|
+
format: "YYYY-MM-DD HH:mm",
|
|
1205
|
+
showTime: true
|
|
1206
|
+
}))), /*#__PURE__*/React$1.createElement(Col, {
|
|
1207
|
+
xs: 8
|
|
1208
|
+
}, /*#__PURE__*/React$1.createElement(Item$1, {
|
|
1209
|
+
label: "\u7B7E\u5230\u767B\u8BB0\u8005",
|
|
1210
|
+
name: "signInRegistrant"
|
|
1211
|
+
}, /*#__PURE__*/React$1.createElement(Input, {
|
|
1212
|
+
disabled: status === '已签到' ? false : isDone,
|
|
1213
|
+
placeholder: "\u8BF7\u8F93\u5165\u7B7E\u5230\u767B\u8BB0\u8005"
|
|
1214
|
+
}))))));
|
|
1215
|
+
};
|
|
1216
|
+
var StepFrom = function StepFrom(props) {
|
|
1217
|
+
var data = props.data,
|
|
1218
|
+
step = props.step,
|
|
1219
|
+
initData = props.initData;
|
|
1220
|
+
var _a = useState(step || 0),
|
|
1221
|
+
currentStep = _a[0],
|
|
1222
|
+
setCurrentStep = _a[1];
|
|
1223
|
+
var forms = Array(data.length).fill(0).map(function (_) {
|
|
1224
|
+
return Form.useForm()[0];
|
|
1225
|
+
});
|
|
1226
|
+
var _b = useState(),
|
|
1227
|
+
commonData = _b[0],
|
|
1228
|
+
setCommonData = _b[1];
|
|
1229
|
+
useEffect(function () {
|
|
1230
|
+
if (initData) {
|
|
1231
|
+
setCommonData(initData);
|
|
1232
|
+
}
|
|
1233
|
+
}, [initData]);
|
|
1234
|
+
return /*#__PURE__*/React$1.createElement("div", null, /*#__PURE__*/React$1.createElement(Steps, {
|
|
1235
|
+
current: currentStep,
|
|
1236
|
+
style: {
|
|
1237
|
+
marginBottom: 24
|
|
1238
|
+
}
|
|
1239
|
+
}, data.map(function (_a, idx) {
|
|
1240
|
+
var title = _a.title,
|
|
1241
|
+
subTitle = _a.subTitle,
|
|
1242
|
+
description = _a.description;
|
|
1243
|
+
return /*#__PURE__*/React$1.createElement(Steps.Step, {
|
|
1244
|
+
key: idx,
|
|
1245
|
+
title: title,
|
|
1246
|
+
subTitle: subTitle,
|
|
1247
|
+
description: description
|
|
1248
|
+
});
|
|
1249
|
+
})), data.map(function (_a, idx) {
|
|
1250
|
+
var Component = _a.Component;
|
|
1251
|
+
return /*#__PURE__*/React$1.createElement("div", {
|
|
1252
|
+
hidden: currentStep !== idx,
|
|
1253
|
+
key: idx
|
|
1254
|
+
}, /*#__PURE__*/React$1.createElement(Component, {
|
|
1255
|
+
commonData: commonData,
|
|
1256
|
+
setCommonData: setCommonData,
|
|
1257
|
+
form: forms[idx]
|
|
1258
|
+
}));
|
|
1259
|
+
}), /*#__PURE__*/React$1.createElement("div", {
|
|
1260
|
+
style: {
|
|
1261
|
+
display: 'flex',
|
|
1262
|
+
justifyContent: 'center',
|
|
1263
|
+
paddingTop: 12
|
|
1264
|
+
}
|
|
1265
|
+
}, /*#__PURE__*/React$1.createElement(Button, {
|
|
1266
|
+
type: "primary",
|
|
1267
|
+
hidden: currentStep === 0,
|
|
1268
|
+
onClick: function onClick() {
|
|
1269
|
+
return setCurrentStep(currentStep - 1);
|
|
1270
|
+
},
|
|
1271
|
+
style: {
|
|
1272
|
+
marginLeft: 16
|
|
1273
|
+
}
|
|
1274
|
+
}, "\u4E0A\u4E00\u9875"), /*#__PURE__*/React$1.createElement(Button, {
|
|
1275
|
+
type: "primary",
|
|
1276
|
+
hidden: currentStep === data.length - 1,
|
|
1277
|
+
onClick: function onClick() {
|
|
1278
|
+
var _a, _b;
|
|
1279
|
+
return (_b = (_a = forms[currentStep]) === null || _a === void 0 ? void 0 : _a._validateFields()) === null || _b === void 0 ? void 0 : _b.then(function () {
|
|
1280
|
+
setCurrentStep(currentStep + 1);
|
|
1281
|
+
});
|
|
1282
|
+
}
|
|
1283
|
+
}, "\u4E0B\u4E00\u9875"), /*#__PURE__*/React$1.createElement(Button, {
|
|
1284
|
+
type: "primary",
|
|
1285
|
+
hidden: get(initData, 'data.progressStatus') === 3 || get(initData, 'data.progressStatus') === 4,
|
|
1286
|
+
onClick: function onClick() {
|
|
1287
|
+
var _a;
|
|
1288
|
+
return (_a = forms[currentStep]) === null || _a === void 0 ? void 0 : _a._save();
|
|
1289
|
+
},
|
|
1290
|
+
style: {
|
|
1291
|
+
marginLeft: 16
|
|
1292
|
+
}
|
|
1293
|
+
}, (get(initData, 'data.progressStatus') === 0 || get(initData, 'data.progressStatus') === 2) && currentStep === 1 ? '保存并签到' : '保存')));
|
|
1294
|
+
};
|
|
1295
|
+
var BookingModalNew = function BookingModalNew(props) {
|
|
1296
|
+
var step = props.step,
|
|
1297
|
+
data = props.data;
|
|
1298
|
+
var _a = useState(),
|
|
1299
|
+
commonData = _a[0],
|
|
1300
|
+
setCommonData = _a[1];
|
|
1301
|
+
useEffect(function () {
|
|
1302
|
+
Promise.all([SModel_EarlyPregnancyCheckSurgeryType.getOptionalDoctorAndNurse()]).then(function (arr) {
|
|
1303
|
+
setCommonData({
|
|
1304
|
+
data: data,
|
|
1305
|
+
optionalDoctor: arr[0].DOCTOR,
|
|
1306
|
+
optionalNurse: arr[0].NURSE
|
|
1307
|
+
});
|
|
1308
|
+
});
|
|
1309
|
+
return function () {};
|
|
1310
|
+
}, [data]);
|
|
1311
|
+
return /*#__PURE__*/React$1.createElement(StepFrom, {
|
|
1312
|
+
initData: commonData,
|
|
1313
|
+
step: step,
|
|
1314
|
+
data: [{
|
|
1315
|
+
title: '手术预约',
|
|
1316
|
+
Component: Form0
|
|
1317
|
+
}, {
|
|
1318
|
+
title: '术前签到',
|
|
1319
|
+
Component: Form1
|
|
1320
|
+
}]
|
|
1321
|
+
});
|
|
1322
|
+
};
|
|
1323
|
+
function handleIsBefore(date) {
|
|
1324
|
+
var today = dayjs();
|
|
1325
|
+
var isBefore = dayjs(formatDate(date)).diff(dayjs(formatDate(today)), 'days');
|
|
1326
|
+
return isBefore;
|
|
1327
|
+
}
|
|
1328
|
+
function getResidue(activeOperationType, scheduleDataOfThisDay) {
|
|
1329
|
+
var isOpen = true;
|
|
1330
|
+
var obj = {};
|
|
1331
|
+
var flagArr = [];
|
|
1332
|
+
if (!scheduleDataOfThisDay) return {
|
|
1333
|
+
isOpen: false
|
|
1334
|
+
};
|
|
1335
|
+
if (activeOperationType.size) {
|
|
1336
|
+
for (var _i = 0, activeOperationType_1 = activeOperationType; _i < activeOperationType_1.length; _i++) {
|
|
1337
|
+
var item = activeOperationType_1[_i];
|
|
1338
|
+
var key = OPERATION_NAME_MAP[item];
|
|
1339
|
+
var residueNum = get(scheduleDataOfThisDay, "".concat(key, "ResidueNum"));
|
|
1340
|
+
var flag = true;
|
|
1341
|
+
if (residueNum === 0 || !get(scheduleDataOfThisDay, "".concat(key))) {
|
|
1342
|
+
flag = false;
|
|
1343
|
+
}
|
|
1344
|
+
flagArr.push(flag);
|
|
1345
|
+
if (get(scheduleDataOfThisDay, "".concat(key))) {
|
|
1346
|
+
set(obj, key, residueNum);
|
|
1347
|
+
}
|
|
1348
|
+
}
|
|
1349
|
+
}
|
|
1350
|
+
if (flagArr.length > 0) {
|
|
1351
|
+
if (flagArr.includes(true)) {
|
|
1352
|
+
isOpen = true;
|
|
1353
|
+
} else {
|
|
1354
|
+
isOpen = false;
|
|
1355
|
+
}
|
|
1356
|
+
}
|
|
1357
|
+
return __assign({
|
|
1358
|
+
isOpen: isOpen
|
|
1359
|
+
}, obj);
|
|
1360
|
+
}
|
|
1361
|
+
function getOperationNum(config, type) {
|
|
1362
|
+
if (!config) return {
|
|
1363
|
+
all: 0,
|
|
1364
|
+
reserved: 0,
|
|
1365
|
+
isOpen: false,
|
|
1366
|
+
left: 0
|
|
1367
|
+
};
|
|
1368
|
+
if (!type) return {
|
|
1369
|
+
all: config.totalNumOfDay,
|
|
1370
|
+
reserved: config.totalReservationNumOfDay,
|
|
1371
|
+
left: config.totalNumOfDay - config.totalReservationNumOfDay,
|
|
1372
|
+
isOpen: !!config.openReservation
|
|
1373
|
+
};
|
|
1374
|
+
var key = OPERATION_NAME_MAP[type];
|
|
1375
|
+
var all = config["".concat(key, "Num")] || 0;
|
|
1376
|
+
var reserved = config["".concat(key, "ReservationNum")] || 0;
|
|
1377
|
+
return {
|
|
1378
|
+
all: all,
|
|
1379
|
+
reserved: reserved,
|
|
1380
|
+
left: all - reserved,
|
|
1381
|
+
isOpen: !!config[key]
|
|
1382
|
+
};
|
|
1383
|
+
}
|
|
1384
|
+
function getAttendanceOfThisDay(todaySetting) {
|
|
1385
|
+
if (!todaySetting) return '休息';
|
|
1386
|
+
return ATTENDANCE_MAP[todaySetting.attendanceSet];
|
|
1387
|
+
}
|
|
1388
|
+
function checkDisabledHalfDay(scheduleData, type) {
|
|
1389
|
+
var _a;
|
|
1390
|
+
if (!scheduleData || !type) return true;
|
|
1391
|
+
var schedulingDate = scheduleData.schedulingDate;
|
|
1392
|
+
var attendency = getAttendanceOfThisDay(scheduleData);
|
|
1393
|
+
if (!schedulingDate.isSameOrAfter(dayjs(), 'day')) return true;
|
|
1394
|
+
if (schedulingDate.isSame(dayjs(), 'day') && type === '上午' && dayjs().hours() >= 12) return true;
|
|
1395
|
+
var opposite = type === '上午' ? '下午' : '上午';
|
|
1396
|
+
return attendency === '休息' || attendency === opposite || ((_a = type === '上午' ? scheduleData === null || scheduleData === void 0 ? void 0 : scheduleData.morningReservationNum : scheduleData === null || scheduleData === void 0 ? void 0 : scheduleData.afternoonReservationNum) !== null && _a !== void 0 ? _a : 0) >= 25;
|
|
1397
|
+
}
|
|
1398
|
+
function getWeekStartEnd(date) {
|
|
1399
|
+
var startDayOfWeek = date.clone().subtract(date.weekday(), 'days');
|
|
1400
|
+
var endDayOfWeek = startDayOfWeek.clone().add(6, 'day');
|
|
1401
|
+
return [startDayOfWeek, endDayOfWeek];
|
|
1402
|
+
}
|
|
1403
|
+
function getMonthStartEnd(date) {
|
|
1404
|
+
var startDayOfWeek = date.clone().subtract(date.date() - 1, 'days');
|
|
1405
|
+
var endDayOfWeek = startDayOfWeek.clone().add(date.daysInMonth() - 1, 'day');
|
|
1406
|
+
return [startDayOfWeek, endDayOfWeek];
|
|
1407
|
+
}
|
|
1408
|
+
var getSchedulingData = function () {
|
|
1409
|
+
var allSchedulingData = {};
|
|
1410
|
+
return function _getSchedulingData(date) {
|
|
1411
|
+
var dateStr = date.format('YYYY-MM-DD');
|
|
1412
|
+
var data = allSchedulingData[dateStr];
|
|
1413
|
+
return new Promise(function (res, rej) {
|
|
1414
|
+
if (data && false) {
|
|
1415
|
+
res(data);
|
|
1416
|
+
} else {
|
|
1417
|
+
SModel_FamilyPlaningSchedulingDetails.getList({
|
|
1418
|
+
params: {
|
|
1419
|
+
schedulingDate: date
|
|
1420
|
+
}
|
|
1421
|
+
}).then(function (_) {
|
|
1422
|
+
var target = _[0];
|
|
1423
|
+
if (target) {
|
|
1424
|
+
allSchedulingData[dateStr] = target;
|
|
1425
|
+
res(target);
|
|
1426
|
+
} else {
|
|
1427
|
+
res(undefined);
|
|
1428
|
+
}
|
|
1429
|
+
});
|
|
1430
|
+
}
|
|
1431
|
+
});
|
|
1432
|
+
};
|
|
1433
|
+
}();
|
|
1434
|
+
function getTimeFrame(mode, selectMoment) {
|
|
1435
|
+
var start, end;
|
|
1436
|
+
if (mode === 'day') {
|
|
1437
|
+
start = selectMoment;
|
|
1438
|
+
end = selectMoment;
|
|
1439
|
+
} else if (mode === 'week') {
|
|
1440
|
+
var _a = getWeekStartEnd(selectMoment),
|
|
1441
|
+
_start = _a[0],
|
|
1442
|
+
_end = _a[1];
|
|
1443
|
+
start = _start;
|
|
1444
|
+
end = _end;
|
|
1445
|
+
} else {
|
|
1446
|
+
var _b = getMonthStartEnd(selectMoment),
|
|
1447
|
+
_start = _b[0],
|
|
1448
|
+
_end = _b[1];
|
|
1449
|
+
start = _start.subtract(7, 'day');
|
|
1450
|
+
end = _end.add(7, 'day');
|
|
1451
|
+
start = _start;
|
|
1452
|
+
end = _end;
|
|
1453
|
+
}
|
|
1454
|
+
return {
|
|
1455
|
+
start: start,
|
|
1456
|
+
end: end
|
|
1457
|
+
};
|
|
1458
|
+
}
|
|
1459
|
+
function findOperationColor(colorList, operationName) {
|
|
1460
|
+
var target = colorList.find(function (_) {
|
|
1461
|
+
return _.operationName === operationName;
|
|
1462
|
+
}) || colorList[0];
|
|
1463
|
+
return target ? [target.backgroundColor, target.fontColor] : ['#fff', '#000'];
|
|
1464
|
+
}
|
|
1465
|
+
function openBookingModal(appointmentDate, appointmentMorningOrAfternoon, data, onClose, stepNumber) {
|
|
1466
|
+
if (data === void 0) {
|
|
1467
|
+
data = {};
|
|
1468
|
+
}
|
|
1469
|
+
if (onClose === void 0) {
|
|
1470
|
+
onClose = function onClose() {};
|
|
1471
|
+
}
|
|
1472
|
+
mchcModal__.open('test', {
|
|
1473
|
+
onClose: onClose,
|
|
1474
|
+
modal_data: {
|
|
1475
|
+
content: /*#__PURE__*/React$1.createElement(BookingModalNew, {
|
|
1476
|
+
step: stepNumber === 0 || stepNumber === 1 ? stepNumber : data.id ? data.progressStatus === stupidEnums.EarlyPregnancyCheckSurgeryType.progressStatus.getValue('已签到') || data.progressStatus === stupidEnums.EarlyPregnancyCheckSurgeryType.progressStatus.getValue('已完成') ? 0 : 1 : 0,
|
|
1477
|
+
data: __assign(__assign({}, data), {
|
|
1478
|
+
appointmentMorningOrAfternoon: appointmentMorningOrAfternoon,
|
|
1479
|
+
appointmentDate: appointmentDate
|
|
1480
|
+
})
|
|
1481
|
+
})
|
|
1482
|
+
}
|
|
1483
|
+
});
|
|
1484
|
+
}
|
|
1485
|
+
var COLS_OF_SAME_INTERVAL_KEY = 'COLS_OF_SAME_INTERVAL_KEY';
|
|
1486
|
+
var DD = function () {
|
|
1487
|
+
function DD() {
|
|
1488
|
+
this.bookings = [];
|
|
1489
|
+
this.statisticData = {};
|
|
1490
|
+
this.scheduleArr = [];
|
|
1491
|
+
this.start = dayjs();
|
|
1492
|
+
this.end = dayjs();
|
|
1493
|
+
this.mode = 'day';
|
|
1494
|
+
this.selectMoment = dayjs();
|
|
1495
|
+
this.observers = [];
|
|
1496
|
+
this.disabledStartTime = dayjs('2000-01-01 12:00');
|
|
1497
|
+
this.disabledEndTime = dayjs('2000-01-01 14:00');
|
|
1498
|
+
this.colsOfSameInterval = 1;
|
|
1499
|
+
this.init();
|
|
1500
|
+
}
|
|
1501
|
+
DD.prototype.init = function (cols) {
|
|
1502
|
+
if (cols === void 0) {
|
|
1503
|
+
cols = store.get(COLS_OF_SAME_INTERVAL_KEY) || 6;
|
|
1504
|
+
}
|
|
1505
|
+
store.set(COLS_OF_SAME_INTERVAL_KEY, cols);
|
|
1506
|
+
this.colsOfSameInterval = 6;
|
|
1507
|
+
};
|
|
1508
|
+
DD.prototype.observe = function (o) {
|
|
1509
|
+
var _this = this;
|
|
1510
|
+
this.observers.push(o);
|
|
1511
|
+
return function () {
|
|
1512
|
+
_this.observers = _this.observers.filter(function (t) {
|
|
1513
|
+
return t !== o;
|
|
1514
|
+
});
|
|
1515
|
+
};
|
|
1516
|
+
};
|
|
1517
|
+
DD.prototype.setData = function (data) {
|
|
1518
|
+
this.bookings = data;
|
|
1519
|
+
this.emitChange();
|
|
1520
|
+
};
|
|
1521
|
+
DD.prototype.setStatisticData = function (data) {
|
|
1522
|
+
this.statisticData = __assign({}, data);
|
|
1523
|
+
};
|
|
1524
|
+
DD.prototype.setScheduleArr = function (data) {
|
|
1525
|
+
this.scheduleArr = __spreadArray([], data, true);
|
|
1526
|
+
};
|
|
1527
|
+
DD.prototype.setStartAndEnd = function (start, end) {
|
|
1528
|
+
this.start = start;
|
|
1529
|
+
this.end = end;
|
|
1530
|
+
};
|
|
1531
|
+
DD.prototype.addToDayView = function (data) {
|
|
1532
|
+
this.addToRemote(data);
|
|
1533
|
+
};
|
|
1534
|
+
DD.prototype.addToWeekView = function (data) {
|
|
1535
|
+
this.addToRemote(data);
|
|
1536
|
+
};
|
|
1537
|
+
DD.prototype.addToMonthView = function (data) {
|
|
1538
|
+
var _this = this;
|
|
1539
|
+
var dayStart = data.appointmentDate.clone().set({
|
|
1540
|
+
hour: START_HOUR
|
|
1541
|
+
});
|
|
1542
|
+
var arr = Array(DIFF_HOUR / HOUR_SPAN).fill(0).map(function (_, idx) {
|
|
1543
|
+
var s = dayStart.clone().add(idx * HOUR_SPAN * 60, 'minute');
|
|
1544
|
+
var e = dayStart.clone().add((idx + 1) * HOUR_SPAN * 60, 'minute');
|
|
1545
|
+
return {
|
|
1546
|
+
availableCols: _this.findStartColToAdd(s, e),
|
|
1547
|
+
s: s,
|
|
1548
|
+
e: e
|
|
1549
|
+
};
|
|
1550
|
+
}).filter(function (_) {
|
|
1551
|
+
return _.availableCols.length;
|
|
1552
|
+
});
|
|
1553
|
+
if (arr.length) {
|
|
1554
|
+
var target = arr[0];
|
|
1555
|
+
this.addToRemote({
|
|
1556
|
+
appointmentDate: target.s,
|
|
1557
|
+
data: data.data,
|
|
1558
|
+
appointmentMorningOrAfternoon: '上午'
|
|
1559
|
+
});
|
|
1560
|
+
this.emitChange();
|
|
1561
|
+
}
|
|
1562
|
+
};
|
|
1563
|
+
DD.prototype.equalDay = function (a, b) {
|
|
1564
|
+
return true;
|
|
1565
|
+
};
|
|
1566
|
+
DD.prototype.checkInRestTime = function (startTime) {
|
|
1567
|
+
return false;
|
|
1568
|
+
};
|
|
1569
|
+
DD.prototype.canAddInDayView = function (appointmentDate, colIndex, rowIndex, type) {
|
|
1570
|
+
return false;
|
|
1571
|
+
};
|
|
1572
|
+
DD.prototype.findStartColToAdd = function (startTime, endTime) {
|
|
1573
|
+
var _this = this;
|
|
1574
|
+
return Array(this.colsOfSameInterval).fill(0).map(function (_, i) {
|
|
1575
|
+
var isOk = _this.canAddInDayView(startTime, endTime, i, i + 1);
|
|
1576
|
+
return isOk ? i : -1;
|
|
1577
|
+
}).filter(function (_) {
|
|
1578
|
+
return _ !== -1;
|
|
1579
|
+
});
|
|
1580
|
+
};
|
|
1581
|
+
DD.prototype.canAddInWeekView = function (startTime, endTime) {
|
|
1582
|
+
var colArr = this.findStartColToAdd(startTime, endTime);
|
|
1583
|
+
return !!colArr.length;
|
|
1584
|
+
};
|
|
1585
|
+
DD.prototype.canAddInMonthView = function (startTime) {
|
|
1586
|
+
var _this = this;
|
|
1587
|
+
var dayStart = startTime.clone().set({
|
|
1588
|
+
hour: START_HOUR
|
|
1589
|
+
});
|
|
1590
|
+
return Array(DIFF_HOUR / HOUR_SPAN).fill(0).map(function (_, idx) {
|
|
1591
|
+
return _this.canAddInWeekView(dayStart.clone().add(idx * HOUR_SPAN * 60, 'minute'), dayStart.clone().add((idx + 1) * HOUR_SPAN * 60, 'minute'));
|
|
1592
|
+
}).some(function (_) {
|
|
1593
|
+
return _;
|
|
1594
|
+
});
|
|
1595
|
+
};
|
|
1596
|
+
DD.prototype.emitChange = function () {
|
|
1597
|
+
var _this = this;
|
|
1598
|
+
this.observers.forEach(function (o) {
|
|
1599
|
+
return o === null || o === void 0 ? void 0 : o.call(null, _this.bookings);
|
|
1600
|
+
});
|
|
1601
|
+
};
|
|
1602
|
+
DD.prototype.addToRemote = function (item) {
|
|
1603
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
1604
|
+
var data, appointmentDate, appointmentMorningOrAfternoon;
|
|
1605
|
+
var _this = this;
|
|
1606
|
+
return __generator(this, function (_a) {
|
|
1607
|
+
data = item.data, appointmentDate = item.appointmentDate, appointmentMorningOrAfternoon = item.appointmentMorningOrAfternoon;
|
|
1608
|
+
SModel_EarlyPregnancyCheckSurgeryType.appointmentSurgery(__assign(__assign({}, data), {
|
|
1609
|
+
progressStatus: stupidEnums.EarlyPregnancyCheckSurgeryType.progressStatus.getValue('待签到'),
|
|
1610
|
+
appointmentMorningOrAfternoon: appointmentMorningOrAfternoon,
|
|
1611
|
+
appointmentDate: appointmentDate
|
|
1612
|
+
})).then(function () {
|
|
1613
|
+
_this.initData();
|
|
1614
|
+
_this.getStatistic();
|
|
1615
|
+
_this.getBetweenList();
|
|
1616
|
+
})["catch"](function (e) {
|
|
1617
|
+
var _a;
|
|
1618
|
+
if ((_a = e === null || e === void 0 ? void 0 : e.msg) === null || _a === void 0 ? void 0 : _a.includes('号源不足')) ;
|
|
1619
|
+
});
|
|
1620
|
+
return [2];
|
|
1621
|
+
});
|
|
1622
|
+
});
|
|
1623
|
+
};
|
|
1624
|
+
DD.prototype.initData = function () {
|
|
1625
|
+
var _this = this;
|
|
1626
|
+
var start, end;
|
|
1627
|
+
if (this.mode === 'day') {
|
|
1628
|
+
start = this.selectMoment;
|
|
1629
|
+
end = this.selectMoment;
|
|
1630
|
+
} else if (this.mode === 'week') {
|
|
1631
|
+
var _a = getWeekStartEnd(this.selectMoment),
|
|
1632
|
+
_start = _a[0],
|
|
1633
|
+
_end = _a[1];
|
|
1634
|
+
start = _start;
|
|
1635
|
+
end = _end;
|
|
1636
|
+
} else {
|
|
1637
|
+
var _b = getMonthStartEnd(this.selectMoment),
|
|
1638
|
+
_start = _b[0],
|
|
1639
|
+
_end = _b[1];
|
|
1640
|
+
start = _start.subtract(7, 'day');
|
|
1641
|
+
end = _end.add(7, 'day');
|
|
1642
|
+
}
|
|
1643
|
+
SModel_EarlyPregnancyCheckSurgeryType.getList({
|
|
1644
|
+
params: {
|
|
1645
|
+
'appointmentDate.greaterOrEqualThan': start.format('YYYY-MM-DD'),
|
|
1646
|
+
'appointmentDate.lessOrEqualThan': end.format('YYYY-MM-DD')
|
|
1647
|
+
}
|
|
1648
|
+
}).then(function (r) {
|
|
1649
|
+
var resData = r.filter(function (_) {
|
|
1650
|
+
return _.progressStatus !== stupidEnums.EarlyPregnancyCheckSurgeryType.progressStatus.getValue('待预约');
|
|
1651
|
+
});
|
|
1652
|
+
if (Array.isArray(resData)) {
|
|
1653
|
+
var validData = resData.filter(function (_) {
|
|
1654
|
+
var _a;
|
|
1655
|
+
return (_a = _.appointmentDate) === null || _a === void 0 ? void 0 : _a.isValid();
|
|
1656
|
+
});
|
|
1657
|
+
var data = validData.map(function (_) {
|
|
1658
|
+
return {
|
|
1659
|
+
data: _,
|
|
1660
|
+
appointmentDate: _.appointmentDate,
|
|
1661
|
+
appointmentMorningOrAfternoon: _.appointmentMorningOrAfternoon || '上午'
|
|
1662
|
+
};
|
|
1663
|
+
});
|
|
1664
|
+
_this.setData(data);
|
|
1665
|
+
}
|
|
1666
|
+
});
|
|
1667
|
+
};
|
|
1668
|
+
DD.prototype.getStatistic = function () {
|
|
1669
|
+
var _this = this;
|
|
1670
|
+
var _a = getTimeFrame(this.mode, this.selectMoment),
|
|
1671
|
+
start = _a.start,
|
|
1672
|
+
end = _a.end;
|
|
1673
|
+
SModel_EarlyPregnancyCheckSurgeryType.getStatistic(start, end).then(function (res) {
|
|
1674
|
+
_this.setStatisticData(res);
|
|
1675
|
+
});
|
|
1676
|
+
};
|
|
1677
|
+
DD.prototype.getBetweenList = function () {
|
|
1678
|
+
var _this = this;
|
|
1679
|
+
var isMonth = this.mode === 'month';
|
|
1680
|
+
var _a = getTimeFrame(this.mode, this.selectMoment),
|
|
1681
|
+
start = _a.start,
|
|
1682
|
+
end = _a.end;
|
|
1683
|
+
this.setStartAndEnd(start, end);
|
|
1684
|
+
SModel_FamilyPlaningSchedulingDetails.getBetweenList(isMonth ? start.subtract(7, 'day') : start, isMonth ? end.add(7, 'day') : end).then(function (res) {
|
|
1685
|
+
_this.setScheduleArr(res);
|
|
1686
|
+
});
|
|
1687
|
+
};
|
|
1688
|
+
return DD;
|
|
1689
|
+
}();
|
|
1690
|
+
var ItemTypes = '__ItemTypes';
|
|
1691
|
+
var style = {
|
|
1692
|
+
cursor: 'move',
|
|
1693
|
+
listStyleType: 'none'
|
|
1694
|
+
};
|
|
1695
|
+
var DragItem = function DragItem(_a) {
|
|
1696
|
+
_a.name;
|
|
1697
|
+
var children = _a.children,
|
|
1698
|
+
onDragEnd = _a.onDragEnd,
|
|
1699
|
+
data = _a.data;
|
|
1700
|
+
var _b = useDrag({
|
|
1701
|
+
item: __assign(__assign({}, data), {
|
|
1702
|
+
type: ItemTypes
|
|
1703
|
+
}),
|
|
1704
|
+
collect: function collect(monitor) {
|
|
131
1705
|
return {
|
|
132
|
-
|
|
133
|
-
label: _
|
|
1706
|
+
isDragging: monitor.isDragging()
|
|
134
1707
|
};
|
|
135
|
-
}
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
}
|
|
180
|
-
|
|
181
|
-
|
|
1708
|
+
},
|
|
1709
|
+
end: function end(item, monitor) {
|
|
1710
|
+
var dropResult = monitor.getDropResult();
|
|
1711
|
+
if (item && dropResult) {
|
|
1712
|
+
onDragEnd && onDragEnd(item, dropResult.position);
|
|
1713
|
+
}
|
|
1714
|
+
}
|
|
1715
|
+
}),
|
|
1716
|
+
isDragging = _b[0].isDragging,
|
|
1717
|
+
dragRef = _b[1];
|
|
1718
|
+
_b[2];
|
|
1719
|
+
var opacity = isDragging ? 0.6 : 1;
|
|
1720
|
+
return /*#__PURE__*/React$1.createElement(React$1.Fragment, null, /*#__PURE__*/React$1.createElement("li", {
|
|
1721
|
+
ref: dragRef,
|
|
1722
|
+
style: __assign(__assign({}, style), {
|
|
1723
|
+
opacity: opacity
|
|
1724
|
+
})
|
|
1725
|
+
}, children));
|
|
1726
|
+
};
|
|
1727
|
+
var DragItem$1 = DragItem;
|
|
1728
|
+
var css_248z$1 = ".close {\n display: none;\n}\n.item .payment {\n position: absolute;\n top: 10px;\n right: 20px;\n}\n.item:hover .close {\n display: inline-block;\n}\n.lately-appointmentDate {\n display: flex;\n align-items: center;\n margin-bottom: 24px;\n padding: 2px 8px 2px;\n border-top: 2px solid #ff9b66;\n border-bottom: 2px solid #ff9b66;\n border-radius: 0 0 4px 4px;\n}\n.lately-appointmentDate .icon {\n color: #ff9b66;\n}\n.lately-appointmentDate .content {\n margin-left: 14px;\n color: #383f4a;\n}\n";
|
|
1729
|
+
styleInject(css_248z$1);
|
|
1730
|
+
var statusMap = {
|
|
1731
|
+
1: '正常',
|
|
1732
|
+
2: '异常',
|
|
1733
|
+
3: '未查',
|
|
1734
|
+
"null": '未查'
|
|
1735
|
+
};
|
|
1736
|
+
var colorMap = new Map([['正常', ''], ['异常', 'red'], ['未查', '']]);
|
|
1737
|
+
var dangerColor = '#FE547B';
|
|
1738
|
+
var weakColor = '#828C99';
|
|
1739
|
+
function getA(data, key) {
|
|
1740
|
+
if (!data || !key) return /*#__PURE__*/React$1.createElement("span", {
|
|
1741
|
+
style: {
|
|
1742
|
+
color: dangerColor
|
|
1743
|
+
}
|
|
1744
|
+
}, "\u7F3A\u5C11\u8BE5\u68C0\u67E5");
|
|
1745
|
+
var value = data[key] + '';
|
|
1746
|
+
var type = statusMap[value];
|
|
1747
|
+
var colorString = colorMap.get(type);
|
|
1748
|
+
var extraText = data["".concat(key, "Note")];
|
|
1749
|
+
return /*#__PURE__*/React$1.createElement("span", {
|
|
1750
|
+
style: {
|
|
1751
|
+
color: colorString || ''
|
|
1752
|
+
}
|
|
1753
|
+
}, extraText ? extraText : type);
|
|
1754
|
+
}
|
|
1755
|
+
var examEnties = Object.entries(EXAM_MAP);
|
|
1756
|
+
var firstExamEntry = examEnties.slice(0, 1)[0];
|
|
1757
|
+
var baseHeight = 140;
|
|
1758
|
+
function Item(_a) {
|
|
1759
|
+
var _b;
|
|
1760
|
+
var data = _a.data,
|
|
1761
|
+
onClose = _a.onClose,
|
|
1762
|
+
color = _a.color,
|
|
1763
|
+
dd = _a.dd;
|
|
1764
|
+
var _c = useState(true),
|
|
1765
|
+
hidden = _c[0],
|
|
1766
|
+
setHidden = _c[1];
|
|
1767
|
+
var _d = useState(false),
|
|
1768
|
+
isDel = _d[0],
|
|
1769
|
+
setIsDel = _d[1];
|
|
1770
|
+
return /*#__PURE__*/React$1.createElement(React$1.Fragment, null, /*#__PURE__*/React$1.createElement("div", {
|
|
1771
|
+
className: "item",
|
|
1772
|
+
style: {
|
|
1773
|
+
background: color || '#fff',
|
|
1774
|
+
padding: isDel ? 0 : 12,
|
|
1775
|
+
fontSize: 12,
|
|
1776
|
+
position: 'relative',
|
|
1777
|
+
transition: 'all 0.3s cubic-bezier(0.22, 0.61, 0.36, 1) 0s',
|
|
1778
|
+
lineHeight: '24px',
|
|
1779
|
+
overflow: 'hidden',
|
|
1780
|
+
height: isDel ? 0 : hidden ? baseHeight : baseHeight + Object.entries(EXAM_MAP).length * 24,
|
|
1781
|
+
borderRadius: 4
|
|
1782
|
+
},
|
|
1783
|
+
onMouseEnter: function onMouseEnter(e) {
|
|
1784
|
+
return setHidden(false);
|
|
1785
|
+
},
|
|
1786
|
+
onMouseLeave: function onMouseLeave(e) {
|
|
1787
|
+
return setHidden(true);
|
|
1788
|
+
}
|
|
1789
|
+
}, /*#__PURE__*/React$1.createElement(Popconfirm, {
|
|
1790
|
+
title: "\u5173\u95ED\u540E\uFF0C\u5F85\u9884\u7EA6\u5217\u8868\u5219\u4E0D\u518D\u663E\u793A\u8BE5\u60A3\u8005\u3002",
|
|
1791
|
+
onConfirm: function onConfirm() {
|
|
1792
|
+
setIsDel(true);
|
|
1793
|
+
onClose();
|
|
1794
|
+
},
|
|
1795
|
+
okText: "\u786E\u5B9A",
|
|
1796
|
+
cancelText: "\u53D6\u6D88"
|
|
1797
|
+
}, /*#__PURE__*/React$1.createElement(Button, {
|
|
1798
|
+
className: "close",
|
|
1799
|
+
type: "text",
|
|
1800
|
+
style: {
|
|
1801
|
+
position: 'absolute',
|
|
1802
|
+
top: 6,
|
|
1803
|
+
right: 6,
|
|
1804
|
+
border: '2px solid #828C99',
|
|
1805
|
+
color: '#828C99'
|
|
1806
|
+
},
|
|
1807
|
+
size: "small",
|
|
1808
|
+
shape: "circle",
|
|
1809
|
+
icon: /*#__PURE__*/React$1.createElement(CloseOutlined, null)
|
|
1810
|
+
})), /*#__PURE__*/React$1.createElement("div", null, /*#__PURE__*/React$1.createElement("span", {
|
|
1811
|
+
style: {
|
|
1812
|
+
color: '#150F55',
|
|
1813
|
+
fontWeight: 600,
|
|
1814
|
+
fontSize: 14,
|
|
1815
|
+
marginRight: 6
|
|
1816
|
+
}
|
|
1817
|
+
}, data.name), /*#__PURE__*/React$1.createElement("span", null, data.age, "\u5C81 / ", data.telephone), /*#__PURE__*/React$1.createElement("span", {
|
|
1818
|
+
style: {
|
|
1819
|
+
marginLeft: 12
|
|
1820
|
+
}
|
|
1821
|
+
}, data.payment ? null : /*#__PURE__*/React$1.createElement(Tag, {
|
|
1822
|
+
color: dangerColor
|
|
1823
|
+
}, "\u672A\u7F34\u8D39"))), /*#__PURE__*/React$1.createElement("div", null, /*#__PURE__*/React$1.createElement("span", {
|
|
1824
|
+
style: {
|
|
1825
|
+
color: weakColor
|
|
1826
|
+
}
|
|
1827
|
+
}, "\u63A5\u8BCA\uFF1A"), /*#__PURE__*/React$1.createElement("span", {
|
|
1828
|
+
style: {
|
|
1829
|
+
marginRight: 6
|
|
1830
|
+
}
|
|
1831
|
+
}, data.diagnoseDoctor, " "), /*#__PURE__*/React$1.createElement("span", {
|
|
1832
|
+
style: {
|
|
1833
|
+
color: weakColor
|
|
1834
|
+
}
|
|
1835
|
+
}, (_b = data.registrationDate) === null || _b === void 0 ? void 0 : _b.format('YYYY-MM-DD'))), /*#__PURE__*/React$1.createElement("div", null, /*#__PURE__*/React$1.createElement("span", {
|
|
1836
|
+
style: {
|
|
1837
|
+
color: weakColor
|
|
1838
|
+
}
|
|
1839
|
+
}, "\u533B\u5631\uFF1A"), data.doctorOrder), /*#__PURE__*/React$1.createElement("div", null, /*#__PURE__*/React$1.createElement("span", {
|
|
1840
|
+
style: {
|
|
1841
|
+
color: weakColor
|
|
1842
|
+
}
|
|
1843
|
+
}, "\u624B\u672F\u7C7B\u578B\uFF1A"), data.operationName), /*#__PURE__*/React$1.createElement("div", null, /*#__PURE__*/React$1.createElement("span", {
|
|
1844
|
+
style: {
|
|
1845
|
+
color: '#150F55',
|
|
1846
|
+
fontWeight: 600,
|
|
1847
|
+
fontSize: 14
|
|
1848
|
+
}
|
|
1849
|
+
}, "\u68C0\u9A8C\u68C0\u67E5\uFF1A"), /*#__PURE__*/React$1.createElement("span", {
|
|
1850
|
+
hidden: !hidden
|
|
1851
|
+
}, firstExamEntry[0], "\uFF1A", getA(data.preoperativeExamination, firstExamEntry[1]))), examEnties.map(function (_a) {
|
|
1852
|
+
var title = _a[0],
|
|
1853
|
+
key = _a[1];
|
|
1854
|
+
return /*#__PURE__*/React$1.createElement("div", null, /*#__PURE__*/React$1.createElement("span", null, /*#__PURE__*/React$1.createElement("span", {
|
|
1855
|
+
style: {
|
|
1856
|
+
color: weakColor
|
|
1857
|
+
}
|
|
1858
|
+
}, title, "\uFF1A"), getA(data.preoperativeExamination, key)));
|
|
1859
|
+
}), /*#__PURE__*/React$1.createElement(Button, {
|
|
1860
|
+
type: "text",
|
|
1861
|
+
style: {
|
|
1862
|
+
position: 'absolute',
|
|
1863
|
+
bottom: 6,
|
|
1864
|
+
right: 6,
|
|
1865
|
+
color: '#828C99'
|
|
1866
|
+
},
|
|
1867
|
+
shape: "circle",
|
|
1868
|
+
size: "small",
|
|
1869
|
+
icon: hidden ? /*#__PURE__*/React$1.createElement(DownOutlined, null) : /*#__PURE__*/React$1.createElement(UpOutlined, null)
|
|
1870
|
+
}), /*#__PURE__*/React$1.createElement("div", {
|
|
1871
|
+
className: "payment"
|
|
1872
|
+
}, data.payment === 1 ? "<img src={payment} />" : /*#__PURE__*/React$1.createElement(React$1.Fragment, null))), /*#__PURE__*/React$1.createElement("div", {
|
|
1873
|
+
className: "lately-appointmentDate"
|
|
1874
|
+
}, /*#__PURE__*/React$1.createElement("div", {
|
|
1875
|
+
className: "icon"
|
|
1876
|
+
}, /*#__PURE__*/React$1.createElement(ExclamationCircleOutlined, null)), /*#__PURE__*/React$1.createElement("div", {
|
|
1877
|
+
className: "content"
|
|
1878
|
+
}, dd.mode === 'month' ? '当前选中视图,无法预约,请切换日、周视图' : data.latelyAppointmentDateExplain)));
|
|
1879
|
+
}
|
|
1880
|
+
function WorkFlow$1(props) {
|
|
1881
|
+
var leftList = props.leftList,
|
|
1882
|
+
colorList = props.colorList,
|
|
1883
|
+
fetchLeftData = props.fetchLeftData,
|
|
1884
|
+
name = props.name,
|
|
1885
|
+
setName = props.setName,
|
|
1886
|
+
dd = props.dd;
|
|
1887
|
+
var handleDragEnd = function handleDragEnd(item, position) {};
|
|
1888
|
+
useEffect(function () {}, []);
|
|
1889
|
+
return /*#__PURE__*/React$1.createElement("div", {
|
|
1890
|
+
style: {
|
|
1891
|
+
height: '100%',
|
|
1892
|
+
display: 'flex',
|
|
1893
|
+
flexDirection: 'column'
|
|
1894
|
+
}
|
|
1895
|
+
}, /*#__PURE__*/React$1.createElement(Typography.Title, {
|
|
1896
|
+
onClick: function onClick(e) {},
|
|
1897
|
+
level: 5,
|
|
1898
|
+
style: {
|
|
1899
|
+
display: 'flex',
|
|
1900
|
+
justifyContent: 'space-between',
|
|
1901
|
+
alignItems: 'center',
|
|
1902
|
+
borderBottom: '1px solid #eee',
|
|
1903
|
+
height: 46,
|
|
1904
|
+
padding: '9px 0',
|
|
1905
|
+
margin: '0 12px'
|
|
1906
|
+
}
|
|
1907
|
+
}, /*#__PURE__*/React$1.createElement("span", {
|
|
1908
|
+
style: {
|
|
1909
|
+
color: '#150F55'
|
|
1910
|
+
},
|
|
1911
|
+
onClick: function onClick() {}
|
|
1912
|
+
}, "\u5F85\u9884\u7EA6\u60A3\u8005", /*#__PURE__*/React$1.createElement("span", {
|
|
1913
|
+
style: {
|
|
1914
|
+
color: '#828C99',
|
|
1915
|
+
fontSize: 12,
|
|
1916
|
+
paddingLeft: 8
|
|
1917
|
+
}
|
|
1918
|
+
}, "(".concat(leftList.length, ")")))), /*#__PURE__*/React$1.createElement(Input.Search, {
|
|
1919
|
+
style: {
|
|
1920
|
+
padding: 12
|
|
1921
|
+
},
|
|
1922
|
+
value: name,
|
|
1923
|
+
placeholder: "\u8BF7\u8F93\u5165\u60A3\u8005\u59D3\u540D",
|
|
1924
|
+
onChange: function onChange(e) {
|
|
1925
|
+
return setName(e.target.value);
|
|
1926
|
+
},
|
|
1927
|
+
allowClear: true,
|
|
1928
|
+
onSearch: function onSearch(value) {
|
|
1929
|
+
return fetchLeftData(value);
|
|
1930
|
+
}
|
|
1931
|
+
}), /*#__PURE__*/React$1.createElement("div", {
|
|
1932
|
+
style: {
|
|
1933
|
+
overflowY: 'auto'
|
|
1934
|
+
}
|
|
1935
|
+
}, leftList.length > 0 ? (/*#__PURE__*/React$1.createElement(React$1.Fragment, null, /*#__PURE__*/React$1.createElement("ul", {
|
|
1936
|
+
style: {
|
|
1937
|
+
padding: '0 12px'
|
|
1938
|
+
}
|
|
1939
|
+
}, leftList.map(function (_) {
|
|
1940
|
+
return /*#__PURE__*/React$1.createElement(DragItem$1, {
|
|
1941
|
+
name: "rect",
|
|
1942
|
+
data: _,
|
|
1943
|
+
onDragEnd: handleDragEnd,
|
|
1944
|
+
key: _.id
|
|
1945
|
+
}, /*#__PURE__*/React$1.createElement(Item, {
|
|
1946
|
+
color: findOperationColor(colorList, _ === null || _ === void 0 ? void 0 : _.operationName)[0],
|
|
1947
|
+
data: _,
|
|
1948
|
+
dd: dd,
|
|
1949
|
+
onClose: function onClose() {
|
|
1950
|
+
SModel_EarlyPregnancyCheckSurgeryType.del(_.id).then(function () {
|
|
1951
|
+
return fetchLeftData();
|
|
1952
|
+
});
|
|
1953
|
+
}
|
|
1954
|
+
}));
|
|
1955
|
+
})), /*#__PURE__*/React$1.createElement("div", {
|
|
1956
|
+
style: {
|
|
1957
|
+
fontSize: 12,
|
|
1958
|
+
color: '#8D8DAC',
|
|
1959
|
+
textAlign: 'center',
|
|
1960
|
+
marginBottom: 16
|
|
1961
|
+
}
|
|
1962
|
+
}, "\u6CA1\u6709\u66F4\u591A\u4E86"))) : (/*#__PURE__*/React$1.createElement("div", {
|
|
1963
|
+
style: {
|
|
1964
|
+
fontSize: 12,
|
|
1965
|
+
color: '#8D8DAC',
|
|
1966
|
+
textAlign: 'center'
|
|
1967
|
+
}
|
|
1968
|
+
}, /*#__PURE__*/React$1.createElement("div", {
|
|
1969
|
+
style: {
|
|
1970
|
+
margin: '16px 21px'
|
|
1971
|
+
}
|
|
1972
|
+
}, /*#__PURE__*/React$1.createElement("img", {
|
|
1973
|
+
src: "/lm_imgs/gy-not-thing.png"
|
|
1974
|
+
})), /*#__PURE__*/React$1.createElement("div", null, "\u6682\u65E0\u7528\u6237\u9700\u8981\u9884\u7EA6")))));
|
|
1975
|
+
}
|
|
1976
|
+
var OverlayType;
|
|
1977
|
+
(function (OverlayType) {
|
|
1978
|
+
OverlayType[OverlayType["IllegalMoveHover"] = 0] = "IllegalMoveHover";
|
|
1979
|
+
OverlayType[OverlayType["LegalMoveHover"] = 1] = "LegalMoveHover";
|
|
1980
|
+
OverlayType[OverlayType["PossibleMove"] = 2] = "PossibleMove";
|
|
1981
|
+
})(OverlayType || (OverlayType = {}));
|
|
1982
|
+
var Overlay = function Overlay(_a) {
|
|
1983
|
+
var type = _a.type;
|
|
1984
|
+
var color = getOverlayColor(type);
|
|
1985
|
+
return React.createElement("div", {
|
|
1986
|
+
className: "overlay",
|
|
1987
|
+
style: {
|
|
1988
|
+
position: 'absolute',
|
|
1989
|
+
top: 0,
|
|
1990
|
+
left: 0,
|
|
1991
|
+
height: '100%',
|
|
1992
|
+
width: '100%',
|
|
1993
|
+
zIndex: 1,
|
|
1994
|
+
opacity: 0.5,
|
|
1995
|
+
backgroundColor: color
|
|
1996
|
+
}
|
|
1997
|
+
});
|
|
1998
|
+
};
|
|
1999
|
+
function getOverlayColor(type) {
|
|
2000
|
+
switch (type) {
|
|
2001
|
+
case OverlayType.IllegalMoveHover:
|
|
2002
|
+
return 'red';
|
|
2003
|
+
case OverlayType.LegalMoveHover:
|
|
2004
|
+
return 'green';
|
|
2005
|
+
case OverlayType.PossibleMove:
|
|
2006
|
+
return '';
|
|
2007
|
+
}
|
|
2008
|
+
}
|
|
2009
|
+
var DropContainer = function DropContainer(_a) {
|
|
2010
|
+
var children = _a.children,
|
|
2011
|
+
dd = _a.dd,
|
|
2012
|
+
mode = _a.mode,
|
|
2013
|
+
appointmentDate = _a.appointmentDate,
|
|
2014
|
+
appointmentMorningOrAfternoon = _a.appointmentMorningOrAfternoon,
|
|
2015
|
+
scheduling = _a.scheduling,
|
|
2016
|
+
isDisabled = _a.isDisabled;
|
|
2017
|
+
var disabledAllday = checkDisabledHalfDay(scheduling, '上午') && checkDisabledHalfDay(scheduling, '下午');
|
|
2018
|
+
var disabled = mode === 'month' ? disabledAllday : checkDisabledHalfDay(scheduling, appointmentMorningOrAfternoon);
|
|
2019
|
+
var isBefore = handleIsBefore(appointmentDate);
|
|
2020
|
+
var isWeekend = isDisabled;
|
|
2021
|
+
var isBeforeFlag = isBefore < 0 ? true : false;
|
|
2022
|
+
var schedulingFlag = get(scheduling, 'attendanceSet') === 3 ? true : false;
|
|
2023
|
+
var _b = useDrop({
|
|
2024
|
+
accept: ItemTypes,
|
|
2025
|
+
canDrop: function canDrop(item) {
|
|
2026
|
+
return !disabled;
|
|
2027
|
+
},
|
|
2028
|
+
drop: function drop(item) {
|
|
2029
|
+
if (mode === 'day') dd.addToDayView({
|
|
2030
|
+
data: item,
|
|
2031
|
+
appointmentMorningOrAfternoon: appointmentMorningOrAfternoon,
|
|
2032
|
+
appointmentDate: appointmentDate
|
|
2033
|
+
});
|
|
2034
|
+
if (mode === 'week') dd.addToWeekView({
|
|
2035
|
+
data: item,
|
|
2036
|
+
appointmentMorningOrAfternoon: appointmentMorningOrAfternoon,
|
|
2037
|
+
appointmentDate: appointmentDate
|
|
2038
|
+
});
|
|
2039
|
+
return true;
|
|
2040
|
+
},
|
|
2041
|
+
collect: function collect(monitor) {
|
|
2042
|
+
return {
|
|
2043
|
+
isOver: monitor.isOver(),
|
|
2044
|
+
canDrop: monitor.canDrop()
|
|
2045
|
+
};
|
|
2046
|
+
}
|
|
2047
|
+
}),
|
|
2048
|
+
_c = _b[0],
|
|
2049
|
+
canDrop = _c.canDrop,
|
|
2050
|
+
isOver = _c.isOver,
|
|
2051
|
+
dropRef = _b[1];
|
|
2052
|
+
return /*#__PURE__*/React$1.createElement("div", {
|
|
2053
|
+
className: "drop-container",
|
|
2054
|
+
ref: dropRef,
|
|
2055
|
+
onClickCapture: function onClickCapture(e) {},
|
|
2056
|
+
style: {
|
|
2057
|
+
position: 'absolute',
|
|
2058
|
+
width: '100%',
|
|
2059
|
+
height: '100%',
|
|
2060
|
+
top: 0,
|
|
2061
|
+
left: 0,
|
|
2062
|
+
background: disabled ? '#F4F6FC' : 'unset',
|
|
2063
|
+
cursor: disabled ? 'not-allowed' : 'pointer'
|
|
2064
|
+
}
|
|
2065
|
+
}, children, /*#__PURE__*/React$1.createElement("div", {
|
|
2066
|
+
hidden: mode === 'day' ? true : isBeforeFlag || !isWeekend || schedulingFlag,
|
|
2067
|
+
style: {
|
|
2068
|
+
position: 'absolute',
|
|
2069
|
+
width: '100%',
|
|
2070
|
+
height: '100%',
|
|
2071
|
+
top: 0,
|
|
2072
|
+
left: 0,
|
|
2073
|
+
display: 'flex',
|
|
2074
|
+
justifyContent: 'center',
|
|
2075
|
+
alignItems: 'center'
|
|
2076
|
+
}
|
|
2077
|
+
}, /*#__PURE__*/React$1.createElement("span", {
|
|
2078
|
+
className: "disabled-img"
|
|
2079
|
+
}), /*#__PURE__*/React$1.createElement("span", {
|
|
2080
|
+
className: "disabled-word"
|
|
2081
|
+
}, "\u4E0D\u53EF\u7EA6")), isOver && !canDrop && /*#__PURE__*/React$1.createElement(Overlay, {
|
|
2082
|
+
type: OverlayType.IllegalMoveHover
|
|
2083
|
+
}), !isOver && canDrop && /*#__PURE__*/React$1.createElement(Overlay, {
|
|
2084
|
+
type: OverlayType.PossibleMove
|
|
2085
|
+
}), isOver && canDrop && /*#__PURE__*/React$1.createElement(Overlay, {
|
|
2086
|
+
type: OverlayType.LegalMoveHover
|
|
2087
|
+
}));
|
|
2088
|
+
};
|
|
2089
|
+
var DropContainer$1 = DropContainer;
|
|
2090
|
+
function DateSelect$2(props) {
|
|
2091
|
+
var bookingData = props.bookingData,
|
|
2092
|
+
dd = props.dd,
|
|
2093
|
+
selectedDate = props.selectedDate,
|
|
2094
|
+
findColor2 = props.findColor2,
|
|
2095
|
+
scheduleArr = props.scheduleArr,
|
|
2096
|
+
activeOperationType = props.activeOperationType;
|
|
2097
|
+
var morningNum = 5,
|
|
2098
|
+
afternoonNum = 5;
|
|
2099
|
+
var scheduleDataOfThisDay = scheduleArr[0];
|
|
2100
|
+
var rowHeight = "calc((100% - 30px) / ".concat(morningNum + afternoonNum, ")");
|
|
2101
|
+
var residueObj = getResidue(activeOperationType, scheduleDataOfThisDay);
|
|
2102
|
+
var getDateTips = function getDateTips() {
|
|
2103
|
+
var attendanceSet = get(scheduleDataOfThisDay, 'attendanceSet');
|
|
2104
|
+
if (attendanceSet === 0) {
|
|
2105
|
+
return /*#__PURE__*/React$1.createElement("div", {
|
|
2106
|
+
className: "date-tips-day date-tips"
|
|
2107
|
+
}, /*#__PURE__*/React$1.createElement("span", {
|
|
2108
|
+
className: "disabled-img"
|
|
2109
|
+
}), /*#__PURE__*/React$1.createElement("span", {
|
|
2110
|
+
className: "disabled-word"
|
|
2111
|
+
}, "\u5F53\u5929\u6682\u65E0\u5F00\u653E\u7684\u624B\u672F\u7C7B\u578B\uFF0C\u8BF7\u9009\u62E9\u5176\u4ED6\u65E5\u671F\u9884\u7EA6!"));
|
|
2112
|
+
}
|
|
2113
|
+
if (attendanceSet === 1) {
|
|
2114
|
+
return /*#__PURE__*/React$1.createElement("div", {
|
|
2115
|
+
className: "date-tips-afternoon date-tips"
|
|
2116
|
+
}, /*#__PURE__*/React$1.createElement("span", {
|
|
2117
|
+
className: "disabled-img"
|
|
2118
|
+
}), /*#__PURE__*/React$1.createElement("span", {
|
|
2119
|
+
className: "disabled-word"
|
|
2120
|
+
}, "\u5F53\u5929\u4E0B\u5348\u6682\u65E0\u5F00\u653E\u7684\u624B\u672F\u7C7B\u578B\uFF0C\u8BF7\u9009\u62E9\u5176\u4ED6\u65E5\u671F\u9884\u7EA6!"));
|
|
2121
|
+
}
|
|
2122
|
+
if (attendanceSet === 2) {
|
|
2123
|
+
return /*#__PURE__*/React$1.createElement("div", {
|
|
2124
|
+
className: "date-tips-morning date-tips"
|
|
2125
|
+
}, /*#__PURE__*/React$1.createElement("span", {
|
|
2126
|
+
className: "disabled-img"
|
|
2127
|
+
}), /*#__PURE__*/React$1.createElement("span", {
|
|
2128
|
+
className: "disabled-word"
|
|
2129
|
+
}, "\u5F53\u5929\u4E0A\u5348\u6682\u65E0\u5F00\u653E\u7684\u624B\u672F\u7C7B\u578B\uFF0C\u8BF7\u9009\u62E9\u5176\u4ED6\u65E5\u671F\u9884\u7EA6!"));
|
|
2130
|
+
}
|
|
2131
|
+
return /*#__PURE__*/React$1.createElement(React$1.Fragment, null);
|
|
2132
|
+
};
|
|
2133
|
+
return /*#__PURE__*/React$1.createElement("div", {
|
|
2134
|
+
style: {
|
|
2135
|
+
flex: 1,
|
|
2136
|
+
display: 'flex',
|
|
2137
|
+
justifyContent: 'center',
|
|
2138
|
+
position: 'relative'
|
|
2139
|
+
}
|
|
2140
|
+
}, handleIsBefore(selectedDate) >= 0 && getDateTips(), /*#__PURE__*/React$1.createElement("table", {
|
|
2141
|
+
width: "98%",
|
|
2142
|
+
cellSpacing: 0,
|
|
2143
|
+
cellPadding: 0,
|
|
2144
|
+
border: 1,
|
|
2145
|
+
style: {
|
|
2146
|
+
height: '100%'
|
|
2147
|
+
},
|
|
2148
|
+
borderColor: "#EDEEF6"
|
|
2149
|
+
}, /*#__PURE__*/React$1.createElement("tbody", {
|
|
2150
|
+
style: {
|
|
2151
|
+
height: '100%'
|
|
2152
|
+
}
|
|
2153
|
+
}, Array(morningNum + afternoonNum).fill(0).map(function (_, rowIndex) {
|
|
2154
|
+
var morningOrAfternoon = rowIndex < morningNum ? '上午' : '下午';
|
|
2155
|
+
var realRowIndex = morningOrAfternoon === '上午' ? rowIndex : rowIndex - morningNum;
|
|
2156
|
+
var realDataArr = bookingData.filter(function (_) {
|
|
2157
|
+
return _.appointmentMorningOrAfternoon === morningOrAfternoon;
|
|
2158
|
+
});
|
|
2159
|
+
var disabled = checkDisabledHalfDay(scheduleDataOfThisDay, morningOrAfternoon);
|
|
2160
|
+
return /*#__PURE__*/React$1.createElement("tr", {
|
|
2161
|
+
key: rowIndex,
|
|
2162
|
+
style: {
|
|
2163
|
+
height: rowHeight
|
|
2164
|
+
}
|
|
2165
|
+
}, rowIndex % ((morningNum + afternoonNum) / 2) === 0 ? (/*#__PURE__*/React$1.createElement("td", {
|
|
2166
|
+
width: 40,
|
|
2167
|
+
rowSpan: 5,
|
|
2168
|
+
style: {
|
|
2169
|
+
textAlign: 'center',
|
|
2170
|
+
writingMode: 'vertical-lr'
|
|
2171
|
+
}
|
|
2172
|
+
}, /*#__PURE__*/React$1.createElement("span", {
|
|
2173
|
+
style: {
|
|
2174
|
+
letterSpacing: 8,
|
|
2175
|
+
fontSize: 16
|
|
2176
|
+
}
|
|
2177
|
+
}, morningOrAfternoon))) : null, Array(OPERATION_ARR.length).fill(0).map(function (_, colIndex) {
|
|
2178
|
+
var realIndex = realRowIndex * OPERATION_ARR.length + colIndex;
|
|
2179
|
+
var item = realDataArr[realIndex];
|
|
2180
|
+
var data = item === null || item === void 0 ? void 0 : item.data;
|
|
2181
|
+
var _a = findColor2(data === null || data === void 0 ? void 0 : data.operationName),
|
|
2182
|
+
backgroundColor = _a[0],
|
|
2183
|
+
fontColor = _a[1],
|
|
2184
|
+
textColor = _a[2];
|
|
2185
|
+
var statusLabel = stupidEnums.EarlyPregnancyCheckSurgeryType.progressStatus.getLabel(data === null || data === void 0 ? void 0 : data.progressStatus);
|
|
2186
|
+
return /*#__PURE__*/React$1.createElement("td", {
|
|
2187
|
+
rowSpan: 1,
|
|
2188
|
+
key: colIndex,
|
|
2189
|
+
style: {
|
|
2190
|
+
position: 'relative'
|
|
2191
|
+
}
|
|
2192
|
+
}, /*#__PURE__*/React$1.createElement(DropContainer$1, {
|
|
2193
|
+
scheduling: scheduleDataOfThisDay,
|
|
2194
|
+
mode: 'day',
|
|
2195
|
+
appointmentDate: selectedDate,
|
|
2196
|
+
dd: dd,
|
|
2197
|
+
appointmentMorningOrAfternoon: morningOrAfternoon,
|
|
2198
|
+
isDisabled: disabled
|
|
2199
|
+
}, data ? (/*#__PURE__*/React$1.createElement("div", {
|
|
2200
|
+
onClick: statusLabel === '已完成' ? function () {
|
|
2201
|
+
openBookingModal(selectedDate, morningOrAfternoon, data, function () {
|
|
2202
|
+
dd.initData();
|
|
2203
|
+
dd.getStatistic();
|
|
2204
|
+
dd.getBetweenList();
|
|
2205
|
+
});
|
|
2206
|
+
} : function () {},
|
|
2207
|
+
className: "hover-shadow date-item",
|
|
2208
|
+
style: {
|
|
2209
|
+
cursor: 'pointer',
|
|
2210
|
+
borderLeft: "4px solid ".concat(fontColor),
|
|
2211
|
+
borderRadius: 4,
|
|
2212
|
+
display: 'flex',
|
|
2213
|
+
flex: 1,
|
|
2214
|
+
margin: 4,
|
|
2215
|
+
padding: '4px 0 4px 4px',
|
|
2216
|
+
background: backgroundColor,
|
|
2217
|
+
position: 'relative'
|
|
2218
|
+
}
|
|
2219
|
+
}, /*#__PURE__*/React$1.createElement("div", {
|
|
2220
|
+
style: {
|
|
2221
|
+
flex: 1,
|
|
2222
|
+
display: 'flex',
|
|
2223
|
+
flexDirection: 'column'
|
|
2224
|
+
}
|
|
2225
|
+
}, /*#__PURE__*/React$1.createElement(Row, {
|
|
2226
|
+
gutter: 8,
|
|
2227
|
+
className: "operation-name-row"
|
|
2228
|
+
}, /*#__PURE__*/React$1.createElement(Col, null, /*#__PURE__*/React$1.createElement("span", {
|
|
2229
|
+
className: "word",
|
|
2230
|
+
style: {
|
|
2231
|
+
color: textColor || '#150F55',
|
|
2232
|
+
fontWeight: 600
|
|
2233
|
+
}
|
|
2234
|
+
}, data.name)), /*#__PURE__*/React$1.createElement(Col, null, /*#__PURE__*/React$1.createElement("span", {
|
|
2235
|
+
className: "word",
|
|
2236
|
+
style: {
|
|
2237
|
+
color: textColor || '#383F4A',
|
|
2238
|
+
fontSize: 12
|
|
2239
|
+
}
|
|
2240
|
+
}, data.telephone))), /*#__PURE__*/React$1.createElement("span", {
|
|
2241
|
+
className: "word operation-name",
|
|
2242
|
+
style: {
|
|
2243
|
+
fontSize: 12,
|
|
2244
|
+
color: textColor
|
|
2245
|
+
}
|
|
2246
|
+
}, data.operationName)), /*#__PURE__*/React$1.createElement("div", {
|
|
2247
|
+
style: {
|
|
2248
|
+
display: 'flex',
|
|
2249
|
+
flexDirection: 'column',
|
|
2250
|
+
textAlign: 'center'
|
|
2251
|
+
}
|
|
2252
|
+
}, /*#__PURE__*/React$1.createElement(Tag, {
|
|
2253
|
+
color: fontColor
|
|
2254
|
+
}, statusLabel), /*#__PURE__*/React$1.createElement("div", {
|
|
2255
|
+
className: "handle"
|
|
2256
|
+
}, (statusLabel === '待签到' || statusLabel === '超时') && (/*#__PURE__*/React$1.createElement(React$1.Fragment, null, /*#__PURE__*/React$1.createElement(QuestionCircleOutlined, {
|
|
2257
|
+
title: "\u7B7E\u5230",
|
|
2258
|
+
style: {
|
|
2259
|
+
color: fontColor
|
|
2260
|
+
},
|
|
2261
|
+
onClick: function onClick(e) {
|
|
2262
|
+
e.stopPropagation();
|
|
2263
|
+
openBookingModal(selectedDate, morningOrAfternoon, data, function () {
|
|
2264
|
+
dd.initData();
|
|
2265
|
+
dd.getStatistic();
|
|
2266
|
+
dd.getBetweenList();
|
|
2267
|
+
}, 1);
|
|
2268
|
+
}
|
|
2269
|
+
}), /*#__PURE__*/React$1.createElement(EditOutlined, {
|
|
2270
|
+
title: "\u7F16\u8F91",
|
|
2271
|
+
className: "space",
|
|
2272
|
+
style: {
|
|
2273
|
+
color: fontColor
|
|
2274
|
+
},
|
|
2275
|
+
onClick: function onClick(e) {
|
|
2276
|
+
e.stopPropagation();
|
|
2277
|
+
openBookingModal(selectedDate, morningOrAfternoon, data, function () {
|
|
2278
|
+
dd.initData();
|
|
2279
|
+
dd.getStatistic();
|
|
2280
|
+
dd.getBetweenList();
|
|
2281
|
+
}, 0);
|
|
2282
|
+
}
|
|
2283
|
+
}), /*#__PURE__*/React$1.createElement(Popconfirm, {
|
|
2284
|
+
title: "\u53D6\u6D88\u540E\u5219\u4E0D\u518D\u663E\u793A\uFF0C\u662F\u5426\u786E\u8BA4\u53D6\u6D88?",
|
|
2285
|
+
onConfirm: function onConfirm() {
|
|
2286
|
+
SModel_EarlyPregnancyCheckSurgeryType.cancelAppointmentSurgery(data.id).then(function () {
|
|
2287
|
+
dd.initData();
|
|
2288
|
+
dd.getStatistic();
|
|
2289
|
+
dd.getBetweenList();
|
|
2290
|
+
});
|
|
2291
|
+
},
|
|
2292
|
+
okText: "\u786E\u5B9A",
|
|
2293
|
+
cancelText: "\u53D6\u6D88"
|
|
2294
|
+
}, /*#__PURE__*/React$1.createElement(DeleteOutlined, {
|
|
2295
|
+
title: "\u53D6\u6D88",
|
|
2296
|
+
style: {
|
|
2297
|
+
color: fontColor
|
|
2298
|
+
}
|
|
2299
|
+
})))), statusLabel === '已签到' && (/*#__PURE__*/React$1.createElement(React$1.Fragment, null, /*#__PURE__*/React$1.createElement(EditOutlined, {
|
|
2300
|
+
title: "\u7F16\u8F91",
|
|
2301
|
+
style: {
|
|
2302
|
+
color: fontColor
|
|
2303
|
+
},
|
|
2304
|
+
onClick: function onClick(e) {
|
|
2305
|
+
e.stopPropagation();
|
|
2306
|
+
openBookingModal(selectedDate, morningOrAfternoon, data, function () {
|
|
2307
|
+
dd.initData();
|
|
2308
|
+
dd.getStatistic();
|
|
2309
|
+
dd.getBetweenList();
|
|
2310
|
+
}, 1);
|
|
2311
|
+
}
|
|
2312
|
+
}))))))) : (/*#__PURE__*/React$1.createElement("div", {
|
|
2313
|
+
className: "date-booking-button ".concat(realDataArr.length === realIndex ? 'visible' : ''),
|
|
2314
|
+
hidden: disabled || !get(residueObj, 'isOpen'),
|
|
2315
|
+
title: "\u6DFB\u52A0\u6216\u62D6\u52A8\u9884\u7EA6",
|
|
2316
|
+
onClick: function onClick() {
|
|
2317
|
+
return openBookingModal(selectedDate, morningOrAfternoon, {}, function () {
|
|
2318
|
+
dd.initData();
|
|
2319
|
+
dd.getStatistic();
|
|
2320
|
+
dd.getBetweenList();
|
|
2321
|
+
});
|
|
2322
|
+
},
|
|
2323
|
+
style: {
|
|
2324
|
+
height: '100%',
|
|
2325
|
+
display: 'flex',
|
|
2326
|
+
alignItems: 'center',
|
|
2327
|
+
justifyContent: 'center',
|
|
2328
|
+
color: '#8A96A0'
|
|
2329
|
+
}
|
|
2330
|
+
}, /*#__PURE__*/React$1.createElement(PlusCircleOutlined, {
|
|
2331
|
+
style: {
|
|
2332
|
+
marginRight: 4
|
|
2333
|
+
}
|
|
2334
|
+
}), "\u6DFB\u52A0\u6216\u62D6\u52A8\u9884\u7EA6"))));
|
|
2335
|
+
}));
|
|
2336
|
+
}))));
|
|
2337
|
+
}
|
|
2338
|
+
function DateSelect$1(props) {
|
|
2339
|
+
var findColor2 = props.findColor2,
|
|
2340
|
+
dd = props.dd,
|
|
2341
|
+
selectedDate = props.selectedDate,
|
|
2342
|
+
setSelectedDate = props.setSelectedDate,
|
|
2343
|
+
setMode = props.setMode,
|
|
2344
|
+
scheduleArr = props.scheduleArr;
|
|
2345
|
+
var staticDataSouce = useMemo(function () {
|
|
2346
|
+
var firstDayOfMonth = selectedDate.clone().startOf('month');
|
|
2347
|
+
var firstDayOfFirstWeek = firstDayOfMonth.startOf('week');
|
|
2348
|
+
return Array(6).fill(0).map(function (zero, row) {
|
|
2349
|
+
var startMoment = firstDayOfFirstWeek.clone().add(7 * row, 'day').set({
|
|
2350
|
+
hour: START_HOUR
|
|
2351
|
+
});
|
|
2352
|
+
return {
|
|
2353
|
+
startMoment: startMoment,
|
|
2354
|
+
endMoment: startMoment,
|
|
2355
|
+
row: row
|
|
2356
|
+
};
|
|
2357
|
+
});
|
|
2358
|
+
}, [selectedDate]);
|
|
2359
|
+
var rowHeight = "".concat(100 / 6, "%");
|
|
2360
|
+
return /*#__PURE__*/React$1.createElement("div", {
|
|
2361
|
+
style: {
|
|
2362
|
+
flex: 1,
|
|
2363
|
+
display: 'flex',
|
|
2364
|
+
justifyContent: 'center',
|
|
2365
|
+
overflowY: 'auto'
|
|
2366
|
+
}
|
|
2367
|
+
}, /*#__PURE__*/React$1.createElement("table", {
|
|
2368
|
+
width: "98%",
|
|
2369
|
+
style: {
|
|
2370
|
+
height: '100%'
|
|
2371
|
+
},
|
|
2372
|
+
cellSpacing: 0,
|
|
2373
|
+
cellPadding: 0,
|
|
2374
|
+
border: 1,
|
|
2375
|
+
borderColor: "#EDEEF6"
|
|
2376
|
+
}, /*#__PURE__*/React$1.createElement("tr", {
|
|
2377
|
+
style: {
|
|
2378
|
+
height: 30,
|
|
2379
|
+
backgroundColor: '#F9F9FC'
|
|
2380
|
+
}
|
|
2381
|
+
}, Array(7).fill(0).map(function (_, colIndex) {
|
|
2382
|
+
return /*#__PURE__*/React$1.createElement("td", {
|
|
2383
|
+
style: {
|
|
2384
|
+
textAlign: 'center'
|
|
2385
|
+
}
|
|
2386
|
+
}, /*#__PURE__*/React$1.createElement("span", {
|
|
2387
|
+
style: {
|
|
2388
|
+
height: 1,
|
|
2389
|
+
lineHeight: '1px',
|
|
2390
|
+
color: '#8A96A0'
|
|
2391
|
+
}
|
|
2392
|
+
}, staticDataSouce[0].startMoment.clone().add(colIndex, 'day').format('dddd')));
|
|
2393
|
+
})), staticDataSouce.map(function (_a, rowIndex) {
|
|
2394
|
+
var startMoment = _a.startMoment;
|
|
2395
|
+
_a.endMoment;
|
|
2396
|
+
return /*#__PURE__*/React$1.createElement("tr", {
|
|
2397
|
+
key: rowIndex,
|
|
2398
|
+
style: {
|
|
2399
|
+
height: rowHeight
|
|
2400
|
+
}
|
|
2401
|
+
}, Array(7).fill(0).map(function (_, colIndex) {
|
|
2402
|
+
var targetStartMoment = startMoment.clone().add(colIndex, 'day');
|
|
2403
|
+
var scheduling = scheduleArr.find(function (_) {
|
|
2404
|
+
return _.schedulingDate.isSame(targetStartMoment, 'day');
|
|
2405
|
+
});
|
|
2406
|
+
var disabled = checkDisabledHalfDay(scheduling, '上午') && checkDisabledHalfDay(scheduling, '下午');
|
|
2407
|
+
var isInThisMonth = targetStartMoment.isSame(selectedDate, 'month');
|
|
2408
|
+
var _a = getOperationNum(scheduling),
|
|
2409
|
+
dayLeft = _a.left,
|
|
2410
|
+
isDayOpen = _a.isOpen;
|
|
2411
|
+
return /*#__PURE__*/React$1.createElement("td", {
|
|
2412
|
+
rowSpan: 1,
|
|
2413
|
+
key: colIndex,
|
|
2414
|
+
style: {
|
|
2415
|
+
position: 'relative'
|
|
2416
|
+
}
|
|
2417
|
+
}, /*#__PURE__*/React$1.createElement("div", {
|
|
2418
|
+
style: {
|
|
2419
|
+
position: 'relative',
|
|
2420
|
+
height: '100%',
|
|
2421
|
+
cursor: 'pointer'
|
|
2422
|
+
},
|
|
2423
|
+
onClick: function onClick() {
|
|
2424
|
+
setSelectedDate(targetStartMoment);
|
|
2425
|
+
setMode('day');
|
|
2426
|
+
}
|
|
2427
|
+
}, /*#__PURE__*/React$1.createElement(DropContainer$1, {
|
|
2428
|
+
mode: 'month',
|
|
2429
|
+
scheduling: scheduling,
|
|
2430
|
+
appointmentDate: targetStartMoment,
|
|
2431
|
+
appointmentMorningOrAfternoon: "\u4E0A\u5348",
|
|
2432
|
+
dd: dd,
|
|
2433
|
+
isDisabled: disabled
|
|
2434
|
+
}, /*#__PURE__*/React$1.createElement("div", {
|
|
2435
|
+
style: {
|
|
2436
|
+
userSelect: 'none',
|
|
2437
|
+
padding: '6px 8px',
|
|
2438
|
+
opacity: isInThisMonth ? 1 : 0.4
|
|
2439
|
+
},
|
|
2440
|
+
className: "month-item ".concat(targetStartMoment.isSame(dayjs(), 'day') ? 'today' : '')
|
|
2441
|
+
}, /*#__PURE__*/React$1.createElement("div", {
|
|
2442
|
+
className: "head-line"
|
|
2443
|
+
}, /*#__PURE__*/React$1.createElement("div", null, /*#__PURE__*/React$1.createElement("span", {
|
|
2444
|
+
className: "day-num"
|
|
2445
|
+
}, targetStartMoment.date())), /*#__PURE__*/React$1.createElement("div", null, /*#__PURE__*/React$1.createElement("span", {
|
|
2446
|
+
style: {
|
|
2447
|
+
fontSize: 12,
|
|
2448
|
+
color: '#828C99'
|
|
2449
|
+
},
|
|
2450
|
+
hidden: !isDayOpen
|
|
2451
|
+
}, handleIsBefore(targetStartMoment) >= 0 && dayLeft ? "\u5269\u4F59\u53EF\u9884\u7EA6".concat(dayLeft, "\u4E2A\u53F7\u6E90") : ''))), Object.entries(OPERATION_NAME_MAP).map(function (_a) {
|
|
2452
|
+
var title = _a[0];
|
|
2453
|
+
_a[1];
|
|
2454
|
+
var _b = findColor2(title);
|
|
2455
|
+
_b[0];
|
|
2456
|
+
var fontColor = _b[1],
|
|
2457
|
+
textColor = _b[2];
|
|
2458
|
+
var _c = getOperationNum(scheduling, title),
|
|
2459
|
+
isOpen = _c.isOpen,
|
|
2460
|
+
reserved = _c.reserved,
|
|
2461
|
+
all = _c.all;
|
|
2462
|
+
return isOpen ? (/*#__PURE__*/React$1.createElement("div", {
|
|
2463
|
+
style: {
|
|
2464
|
+
lineHeight: '20px'
|
|
2465
|
+
}
|
|
2466
|
+
}, /*#__PURE__*/React$1.createElement("span", {
|
|
2467
|
+
style: {
|
|
2468
|
+
color: "".concat(fontColor !== '#ddd' ? '#828C99' : fontColor),
|
|
2469
|
+
fontSize: 12,
|
|
2470
|
+
display: 'inline-block',
|
|
2471
|
+
verticalAlign: 'middle',
|
|
2472
|
+
maxWidth: '62%'
|
|
2473
|
+
}
|
|
2474
|
+
}, title), /*#__PURE__*/React$1.createElement("span", {
|
|
2475
|
+
style: {
|
|
2476
|
+
"float": 'right',
|
|
2477
|
+
color: textColor,
|
|
2478
|
+
fontSize: 12
|
|
2479
|
+
}
|
|
2480
|
+
}, /*#__PURE__*/React$1.createElement("span", {
|
|
2481
|
+
style: {
|
|
2482
|
+
color: "".concat(textColor !== '#ccc' ? '#333' : textColor)
|
|
2483
|
+
}
|
|
2484
|
+
}, reserved), ' ', "/", ' ', /*#__PURE__*/React$1.createElement("span", {
|
|
2485
|
+
style: {
|
|
2486
|
+
color: "".concat(textColor !== '#ccc' ? '#828c99' : textColor)
|
|
2487
|
+
}
|
|
2488
|
+
}, all)))) : null;
|
|
2489
|
+
})))));
|
|
2490
|
+
}));
|
|
2491
|
+
})));
|
|
2492
|
+
}
|
|
2493
|
+
var css_248z = ".month-item {\n position: relative;\n height: 100%;\n min-height: 100%;\n overflow: hidden;\n transition: all 0.2s;\n}\n.month-item .head-line {\n display: flex;\n flex-direction: row;\n flex-wrap: wrap;\n justify-content: space-between;\n}\n.month-item .day-num {\n color: #2b384f;\n font-weight: 600;\n font-size: 16px;\n line-height: 24px;\n}\n.month-item:hover {\n z-index: 1;\n height: unset;\n overflow: visible;\n background: #fff;\n box-shadow: 0px 0px 12px 2px #aaa;\n opacity: 1 !important;\n}\n.month-item.today {\n border-bottom: 1px solid #0f318d;\n}\n.month-item.today .day-num {\n padding: 5px;\n color: #fff;\n background-color: #0f318d;\n border-radius: 50%;\n}\n.border-left-right {\n border-right: 2px solid #2c81e2;\n border-left: 2px solid #2c81e2;\n}\n.date-item .handle {\n margin: 8px 8px 0 0;\n text-align: right;\n}\n.date-item .space {\n margin: 0 16px;\n}\n.date-item .ant-col {\n line-height: 14px;\n}\n.date-item .word.operation-name {\n margin: 14px 0 0 0;\n}\n.date-item .operation-name-row {\n padding-top: 4px;\n}\n.date-booking-button {\n opacity: 0;\n transition: all 0.3s;\n}\n.date-booking-button:hover {\n opacity: 1;\n}\n.date-booking-button.visible {\n opacity: 1;\n}\n.drop-container .disabled-img {\n display: inline-block;\n width: 24px;\n height: 24px;\n vertical-align: middle;\n background-size: contain;\n transform: rotateZ(45deg);\n}\n.drop-container .disabled-word {\n display: inline-block;\n padding-left: 6px;\n color: #fb9824;\n font-weight: 400;\n font-size: 14px;\n line-height: 20px;\n vertical-align: middle;\n}\n.date-tips {\n padding: 10px 20px;\n color: #856404;\n background: #fff3cd;\n border-radius: 4px 4px 4px 4px;\n box-shadow: 0px 0px 10px 1px rgba(158, 158, 158, 0.19);\n}\n.date-tips .disabled-img {\n display: inline-block;\n width: 24px;\n height: 24px;\n vertical-align: middle;\n background-size: contain;\n transform: rotateZ(45deg);\n}\n.date-tips .disabled-word {\n display: inline-block;\n padding-left: 6px;\n font-weight: 400;\n font-size: 14px;\n line-height: 20px;\n vertical-align: middle;\n}\n.date-tips-day {\n position: absolute;\n top: 50%;\n left: 50%;\n z-index: 2;\n transform: translate(-50%, -50%);\n}\n.date-tips-morning {\n position: absolute;\n top: 21%;\n left: 50%;\n z-index: 2;\n transform: translateX(-50%);\n}\n.date-tips-afternoon {\n position: absolute;\n bottom: 21%;\n left: 50%;\n z-index: 2;\n transform: translateX(-50%);\n}\n.stupid-modal-body .ant-table-thead > tr > th {\n background: #edeef6;\n}\n.week-add-button {\n color: #5a6676;\n border: 1px dashed #5a6676;\n}\n.week-add-button:hover {\n color: #383f4a;\n border: 1px dashed #383f4a;\n}\n.week-add-button.disabled {\n color: rgba(130, 140, 153, 0.2);\n border: 1px dashed rgba(130, 140, 153, 0.2);\n}\n@media (max-width: 1601px) {\n .date-item {\n margin: 0 2px !important;\n }\n .date-item .word {\n font-size: 12px;\n line-height: 14px;\n }\n .date-item .handle {\n margin: 2px 8px 0 0;\n }\n .date-item .space {\n margin: 0 8px;\n }\n .date-item .word.operation-name {\n margin: 0;\n }\n .date-item .operation-name-row {\n padding-top: 0;\n }\n .month-item:hover {\n z-index: 1;\n width: 188px;\n height: unset;\n overflow: visible;\n background: #fff;\n box-shadow: 0px 0px 12px 2px #aaa;\n opacity: 1 !important;\n }\n}\n";
|
|
2494
|
+
styleInject(css_248z);
|
|
2495
|
+
function DateSelect(props) {
|
|
2496
|
+
var setMode = props.setMode,
|
|
2497
|
+
setSelectedDate = props.setSelectedDate,
|
|
2498
|
+
bookingData = props.bookingData,
|
|
2499
|
+
dd = props.dd,
|
|
2500
|
+
selectedDate = props.selectedDate,
|
|
2501
|
+
findColor2 = props.findColor2,
|
|
2502
|
+
scheduleArr = props.scheduleArr,
|
|
2503
|
+
activeOperationType = props.activeOperationType;
|
|
2504
|
+
var _a = getWeekStartEnd(selectedDate),
|
|
2505
|
+
startDayOfWeek = _a[0];
|
|
2506
|
+
_a[1];
|
|
2507
|
+
var borderStyle = '1px solid #EDEEF6';
|
|
2508
|
+
var headHeight = 10;
|
|
2509
|
+
var renderResidueContent = function renderResidueContent(residueObj) {
|
|
2510
|
+
return map(residueObj, function (value, key) {
|
|
2511
|
+
if (key !== 'isOpen') {
|
|
2512
|
+
var _a = findColor2(NurseTypesMapping[key]['name']);
|
|
2513
|
+
_a[0];
|
|
2514
|
+
var fontColor = _a[1];
|
|
2515
|
+
_a[2];
|
|
2516
|
+
return /*#__PURE__*/React$1.createElement("div", {
|
|
2517
|
+
key: key,
|
|
2518
|
+
style: {
|
|
2519
|
+
fontSize: 12
|
|
2520
|
+
}
|
|
2521
|
+
}, /*#__PURE__*/React$1.createElement("span", {
|
|
2522
|
+
style: {
|
|
2523
|
+
color: fontColor,
|
|
2524
|
+
fontWeight: 600
|
|
2525
|
+
}
|
|
2526
|
+
}, NurseTypesMapping[key]['name'], ":"), /*#__PURE__*/React$1.createElement("span", {
|
|
2527
|
+
style: {
|
|
2528
|
+
color: '#8A96A0'
|
|
2529
|
+
}
|
|
2530
|
+
}, "\u5269\u4F59\u53EF\u7EA6\u53F7", value, "\u4E2A"));
|
|
2531
|
+
} else {
|
|
2532
|
+
return /*#__PURE__*/React$1.createElement(React$1.Fragment, null);
|
|
2533
|
+
}
|
|
2534
|
+
});
|
|
2535
|
+
};
|
|
2536
|
+
return /*#__PURE__*/React$1.createElement("div", {
|
|
2537
|
+
style: {
|
|
2538
|
+
flex: 1,
|
|
2539
|
+
display: 'flex',
|
|
2540
|
+
justifyContent: 'center'
|
|
2541
|
+
}
|
|
2542
|
+
}, /*#__PURE__*/React$1.createElement("table", {
|
|
2543
|
+
width: "98%",
|
|
2544
|
+
cellSpacing: '10px',
|
|
2545
|
+
cellPadding: 0,
|
|
2546
|
+
style: {
|
|
2547
|
+
height: '100%'
|
|
2548
|
+
},
|
|
2549
|
+
borderColor: "#EDEEF6",
|
|
2550
|
+
border: 1
|
|
2551
|
+
}, /*#__PURE__*/React$1.createElement("tr", {
|
|
2552
|
+
style: {
|
|
2553
|
+
height: '6%',
|
|
2554
|
+
backgroundColor: '#F9F9FC'
|
|
2555
|
+
}
|
|
2556
|
+
}, /*#__PURE__*/React$1.createElement("td", null), Array(7).fill(0).map(function (_, colIndex) {
|
|
2557
|
+
var date = startDayOfWeek.clone().add(colIndex, 'day');
|
|
2558
|
+
var isToday = date.isSame(dayjs(), 'day');
|
|
2559
|
+
return /*#__PURE__*/React$1.createElement("td", {
|
|
2560
|
+
style: {
|
|
2561
|
+
textAlign: 'center',
|
|
2562
|
+
lineHeight: "".concat(headHeight, "px"),
|
|
2563
|
+
height: headHeight
|
|
2564
|
+
}
|
|
2565
|
+
}, /*#__PURE__*/React$1.createElement(Button, {
|
|
2566
|
+
type: isToday ? 'primary' : 'text',
|
|
2567
|
+
size: "small",
|
|
2568
|
+
onClick: function onClick() {
|
|
2569
|
+
setSelectedDate(date);
|
|
2570
|
+
setMode('day');
|
|
2571
|
+
}
|
|
2572
|
+
}, date.format('MM-DD dddd')));
|
|
2573
|
+
})), [0, 0].map(function (_, rowIndex) {
|
|
2574
|
+
var morningOrAfternoon = rowIndex < 1 ? '上午' : '下午';
|
|
2575
|
+
var realDataArr = bookingData.filter(function (_) {
|
|
2576
|
+
return _.appointmentMorningOrAfternoon === morningOrAfternoon;
|
|
2577
|
+
});
|
|
2578
|
+
return /*#__PURE__*/React$1.createElement("tr", {
|
|
2579
|
+
key: rowIndex,
|
|
2580
|
+
style: {
|
|
2581
|
+
height: "47%"
|
|
2582
|
+
}
|
|
2583
|
+
}, /*#__PURE__*/React$1.createElement("td", {
|
|
2584
|
+
width: 40,
|
|
2585
|
+
style: {
|
|
2586
|
+
textAlign: 'center',
|
|
2587
|
+
writingMode: 'vertical-lr',
|
|
2588
|
+
borderRight: borderStyle
|
|
2589
|
+
}
|
|
2590
|
+
}, /*#__PURE__*/React$1.createElement("span", {
|
|
2591
|
+
style: {
|
|
2592
|
+
letterSpacing: 8,
|
|
2593
|
+
fontSize: 16
|
|
2594
|
+
}
|
|
2595
|
+
}, morningOrAfternoon)), Array(7).fill(0).map(function (_, colIndex) {
|
|
2596
|
+
var targetStartMoment = startDayOfWeek.clone().add(colIndex, 'day');
|
|
2597
|
+
var item = realDataArr.filter(function (_) {
|
|
2598
|
+
return _.appointmentDate.isSame(targetStartMoment, 'day');
|
|
2599
|
+
});
|
|
2600
|
+
var scheduling = scheduleArr.find(function (_) {
|
|
2601
|
+
return _.schedulingDate.isSame(targetStartMoment, 'day');
|
|
2602
|
+
});
|
|
2603
|
+
var disabled = checkDisabledHalfDay(scheduling, morningOrAfternoon);
|
|
2604
|
+
var isToday = targetStartMoment.isSame(dayjs(), 'day');
|
|
2605
|
+
var residueObj = getResidue(activeOperationType, scheduling);
|
|
2606
|
+
return /*#__PURE__*/React$1.createElement("td", {
|
|
2607
|
+
rowSpan: 1,
|
|
2608
|
+
key: colIndex,
|
|
2609
|
+
className: isToday ? 'border-left-right' : '',
|
|
2610
|
+
style: {
|
|
2611
|
+
position: 'relative'
|
|
2612
|
+
}
|
|
2613
|
+
}, /*#__PURE__*/React$1.createElement(DropContainer$1, {
|
|
2614
|
+
mode: 'week',
|
|
2615
|
+
scheduling: scheduling,
|
|
2616
|
+
appointmentDate: targetStartMoment,
|
|
2617
|
+
dd: dd,
|
|
2618
|
+
appointmentMorningOrAfternoon: morningOrAfternoon,
|
|
2619
|
+
isDisabled: disabled
|
|
2620
|
+
}, /*#__PURE__*/React$1.createElement("div", {
|
|
2621
|
+
style: {
|
|
2622
|
+
height: '100%',
|
|
2623
|
+
padding: 4,
|
|
2624
|
+
overflowY: 'auto'
|
|
2625
|
+
}
|
|
2626
|
+
}, item.map(function (_) {
|
|
2627
|
+
var _a;
|
|
2628
|
+
var data = _.data;
|
|
2629
|
+
var _b = findColor2((_a = _.data) === null || _a === void 0 ? void 0 : _a.operationName),
|
|
2630
|
+
backgroundColor = _b[0],
|
|
2631
|
+
fontColor = _b[1],
|
|
2632
|
+
textColor = _b[2];
|
|
2633
|
+
return /*#__PURE__*/React$1.createElement("div", {
|
|
2634
|
+
className: "hover-shadow",
|
|
2635
|
+
onClick: function onClick() {
|
|
2636
|
+
return openBookingModal(targetStartMoment, morningOrAfternoon, data, function () {
|
|
2637
|
+
dd.initData();
|
|
2638
|
+
dd.getStatistic();
|
|
2639
|
+
dd.getBetweenList();
|
|
2640
|
+
});
|
|
2641
|
+
},
|
|
2642
|
+
style: {
|
|
2643
|
+
borderLeft: "4px solid ".concat(fontColor),
|
|
2644
|
+
borderRadius: 4,
|
|
2645
|
+
display: 'flex',
|
|
2646
|
+
flex: 1,
|
|
2647
|
+
margin: '6px 4px',
|
|
2648
|
+
padding: '2px 0 2px 4px',
|
|
2649
|
+
background: backgroundColor,
|
|
2650
|
+
position: 'relative'
|
|
2651
|
+
}
|
|
2652
|
+
}, /*#__PURE__*/React$1.createElement(Row, {
|
|
2653
|
+
style: {
|
|
2654
|
+
lineHeight: '20px'
|
|
2655
|
+
}
|
|
2656
|
+
}, /*#__PURE__*/React$1.createElement(Col, null, /*#__PURE__*/React$1.createElement("span", {
|
|
2657
|
+
style: {
|
|
2658
|
+
color: textColor || '#150F55',
|
|
2659
|
+
fontWeight: 600,
|
|
2660
|
+
marginRight: 4
|
|
2661
|
+
}
|
|
2662
|
+
}, data.name)), /*#__PURE__*/React$1.createElement(Col, null, /*#__PURE__*/React$1.createElement("span", {
|
|
2663
|
+
style: {
|
|
2664
|
+
fontSize: 12,
|
|
2665
|
+
color: textColor
|
|
2666
|
+
}
|
|
2667
|
+
}, data.operationName))));
|
|
2668
|
+
}) || null, get(residueObj, 'isOpen') && Object.keys(residueObj).length > 1 ? (/*#__PURE__*/React$1.createElement(Popover, {
|
|
2669
|
+
content: renderResidueContent(residueObj),
|
|
2670
|
+
title: ""
|
|
2671
|
+
}, /*#__PURE__*/React$1.createElement(Button, {
|
|
2672
|
+
className: "week-add-button ".concat(!get(residueObj, 'isOpen') ? 'disabled' : ''),
|
|
2673
|
+
hidden: disabled,
|
|
2674
|
+
type: "dashed",
|
|
2675
|
+
block: true,
|
|
2676
|
+
icon: /*#__PURE__*/React$1.createElement(PlusCircleOutlined, null),
|
|
2677
|
+
style: {
|
|
2678
|
+
margin: '4px 0',
|
|
2679
|
+
position: 'sticky',
|
|
2680
|
+
bottom: 0
|
|
2681
|
+
},
|
|
2682
|
+
onClick: function onClick() {
|
|
2683
|
+
return openBookingModal(targetStartMoment, morningOrAfternoon, {}, function () {
|
|
2684
|
+
dd.initData();
|
|
2685
|
+
dd.getStatistic();
|
|
2686
|
+
dd.getBetweenList();
|
|
2687
|
+
});
|
|
2688
|
+
}
|
|
2689
|
+
}, "\u6DFB\u52A0"))) : (/*#__PURE__*/React$1.createElement(Button, {
|
|
2690
|
+
className: "week-add-button ".concat(!get(residueObj, 'isOpen') ? 'disabled' : ''),
|
|
2691
|
+
hidden: disabled,
|
|
2692
|
+
type: "dashed",
|
|
2693
|
+
block: true,
|
|
2694
|
+
icon: /*#__PURE__*/React$1.createElement(PlusCircleOutlined, null),
|
|
2695
|
+
style: {
|
|
2696
|
+
margin: '4px 0',
|
|
2697
|
+
position: 'sticky',
|
|
2698
|
+
bottom: 0,
|
|
2699
|
+
cursor: "".concat(!get(residueObj, 'isOpen') ? 'not-allowed' : 'pointer')
|
|
2700
|
+
},
|
|
2701
|
+
onClick: !get(residueObj, 'isOpen') ? function () {} : function () {
|
|
2702
|
+
return openBookingModal(targetStartMoment, morningOrAfternoon, {}, function () {
|
|
2703
|
+
dd.initData();
|
|
2704
|
+
dd.getStatistic();
|
|
2705
|
+
dd.getBetweenList();
|
|
2706
|
+
});
|
|
2707
|
+
}
|
|
2708
|
+
}, "\u6DFB\u52A0")))));
|
|
2709
|
+
}));
|
|
2710
|
+
})));
|
|
2711
|
+
}
|
|
2712
|
+
function Label(props) {
|
|
2713
|
+
return /*#__PURE__*/React$1.createElement("span", {
|
|
2714
|
+
style: {
|
|
2715
|
+
fontSize: 16,
|
|
2716
|
+
color: '#828C99'
|
|
2717
|
+
}
|
|
2718
|
+
}, props.title, "\uFF1A", /*#__PURE__*/React$1.createElement("span", {
|
|
2719
|
+
style: {
|
|
2720
|
+
fontSize: 36,
|
|
2721
|
+
color: props.color
|
|
2722
|
+
}
|
|
2723
|
+
}, props.num), "\u4EBA");
|
|
2724
|
+
}
|
|
2725
|
+
var tagHeight = 44;
|
|
2726
|
+
function Right(props) {
|
|
2727
|
+
var _a, _b, _c;
|
|
2728
|
+
var dd = props.dd,
|
|
2729
|
+
colorList = props.colorList,
|
|
2730
|
+
toggleNode = props.toggleNode;
|
|
2731
|
+
var _d = useState('day'),
|
|
2732
|
+
mode = _d[0],
|
|
2733
|
+
setMode = _d[1];
|
|
2734
|
+
var _e = useState([]),
|
|
2735
|
+
bookingData = _e[0],
|
|
2736
|
+
setBookingData = _e[1];
|
|
2737
|
+
var _f = useState(dayjs()),
|
|
2738
|
+
selectedDate = _f[0],
|
|
2739
|
+
setSelectedDate = _f[1];
|
|
2740
|
+
var _g = useState(),
|
|
2741
|
+
daysSetting = _g[0],
|
|
2742
|
+
setDaysSetting = _g[1];
|
|
2743
|
+
var _h = useState(new Set()),
|
|
2744
|
+
activeOperationType = _h[0],
|
|
2745
|
+
setActiveOperationType = _h[1];
|
|
2746
|
+
var _j = useState([]);
|
|
2747
|
+
_j[0];
|
|
2748
|
+
_j[1];
|
|
2749
|
+
var _k = useState();
|
|
2750
|
+
_k[0];
|
|
2751
|
+
_k[1];
|
|
2752
|
+
function findColor2(type) {
|
|
2753
|
+
if (!activeOperationType.size) return findOperationColor(colorList, type);
|
|
2754
|
+
return activeOperationType.has(type) ? findOperationColor(colorList, type) : ['transparent', '#ddd', '#ccc'];
|
|
2755
|
+
}
|
|
2756
|
+
var baseData = __assign({
|
|
2757
|
+
setMode: setMode,
|
|
2758
|
+
setSelectedDate: setSelectedDate,
|
|
2759
|
+
mode: mode,
|
|
2760
|
+
selectedDate: selectedDate,
|
|
2761
|
+
bookingData: bookingData,
|
|
2762
|
+
daysSetting: daysSetting,
|
|
2763
|
+
findColor2: findColor2,
|
|
2764
|
+
scheduleArr: dd.scheduleArr,
|
|
2765
|
+
activeOperationType: activeOperationType
|
|
2766
|
+
}, props);
|
|
2767
|
+
useEffect(function () {
|
|
2768
|
+
dd.selectMoment = selectedDate;
|
|
2769
|
+
dd.mode = mode;
|
|
2770
|
+
dd.initData();
|
|
2771
|
+
dd.getStatistic();
|
|
2772
|
+
dd.getBetweenList();
|
|
2773
|
+
setActiveOperationType(new Set());
|
|
2774
|
+
}, [mode, selectedDate, dd]);
|
|
2775
|
+
useEffect(function () {
|
|
2776
|
+
SModel_EarlyPregnancyCheckSurgeryType.getFamilyPlanningDefaultSetting().then(setDaysSetting);
|
|
2777
|
+
var cb = dd.observe(setBookingData);
|
|
2778
|
+
return cb;
|
|
2779
|
+
}, []);
|
|
2780
|
+
function next() {
|
|
2781
|
+
var target = selectedDate.clone().add(1, mode);
|
|
2782
|
+
setSelectedDate(target);
|
|
2783
|
+
}
|
|
2784
|
+
function pre() {
|
|
2785
|
+
var target = selectedDate.clone().subtract(1, mode);
|
|
2786
|
+
setSelectedDate(target);
|
|
2787
|
+
}
|
|
2788
|
+
function toggleActiveType(type) {
|
|
2789
|
+
var isActive = activeOperationType.has(type);
|
|
2790
|
+
activeOperationType[isActive ? 'delete' : 'add'](type);
|
|
2791
|
+
setActiveOperationType(new Set(activeOperationType));
|
|
2792
|
+
}
|
|
2793
|
+
var headHeight = 54;
|
|
2794
|
+
var middleHeight = 42;
|
|
2795
|
+
return /*#__PURE__*/React$1.createElement("div", {
|
|
2796
|
+
style: {
|
|
2797
|
+
background: '#fff',
|
|
2798
|
+
position: 'relative',
|
|
2799
|
+
height: '100%',
|
|
2800
|
+
display: 'flex',
|
|
2801
|
+
flexDirection: 'column'
|
|
2802
|
+
}
|
|
2803
|
+
}, toggleNode, /*#__PURE__*/React$1.createElement("div", {
|
|
2804
|
+
style: {
|
|
2805
|
+
height: headHeight,
|
|
2806
|
+
padding: '0 18px'
|
|
2807
|
+
}
|
|
2808
|
+
}, /*#__PURE__*/React$1.createElement("div", {
|
|
2809
|
+
style: {
|
|
2810
|
+
display: 'flex',
|
|
2811
|
+
justifyContent: 'space-evenly',
|
|
2812
|
+
alignItems: 'center',
|
|
2813
|
+
width: '100%'
|
|
2814
|
+
}
|
|
2815
|
+
}, /*#__PURE__*/React$1.createElement(Label, {
|
|
2816
|
+
title: "\u5DF2\u9884\u7EA6",
|
|
2817
|
+
num: (_a = dd.statisticData) === null || _a === void 0 ? void 0 : _a.appointmentNum,
|
|
2818
|
+
color: "#828C99"
|
|
2819
|
+
}), /*#__PURE__*/React$1.createElement(Label, {
|
|
2820
|
+
title: "\u5DF2\u7B7E\u5230",
|
|
2821
|
+
num: (_b = dd.statisticData) === null || _b === void 0 ? void 0 : _b.signNum,
|
|
2822
|
+
color: "#314BD2"
|
|
2823
|
+
}), /*#__PURE__*/React$1.createElement(Label, {
|
|
2824
|
+
title: "\u5DF2\u5B8C\u6210",
|
|
2825
|
+
num: (_c = dd.statisticData) === null || _c === void 0 ? void 0 : _c.completeNum,
|
|
2826
|
+
color: "#02937F"
|
|
2827
|
+
})), /*#__PURE__*/React$1.createElement(Divider, {
|
|
2828
|
+
style: {
|
|
2829
|
+
margin: 0
|
|
2830
|
+
}
|
|
2831
|
+
})), /*#__PURE__*/React$1.createElement("div", {
|
|
2832
|
+
style: {
|
|
2833
|
+
padding: '4px 18px 0',
|
|
2834
|
+
position: 'relative',
|
|
2835
|
+
height: middleHeight
|
|
2836
|
+
}
|
|
2837
|
+
}, /*#__PURE__*/React$1.createElement("div", null, /*#__PURE__*/React$1.createElement(Button, {
|
|
2838
|
+
style: {
|
|
2839
|
+
color: '#979797'
|
|
2840
|
+
},
|
|
2841
|
+
size: "small",
|
|
2842
|
+
type: "text",
|
|
2843
|
+
icon: /*#__PURE__*/React$1.createElement(LeftOutlined, null),
|
|
2844
|
+
onClick: pre
|
|
2845
|
+
}), /*#__PURE__*/React$1.createElement(DatePicker_L, {
|
|
2846
|
+
value: selectedDate,
|
|
2847
|
+
onChange: function onChange(v) {
|
|
2848
|
+
return v && setSelectedDate(v);
|
|
2849
|
+
},
|
|
2850
|
+
picker: mode === 'day' ? 'date' : mode,
|
|
2851
|
+
bordered: false,
|
|
2852
|
+
style: {
|
|
2853
|
+
width: 110
|
|
2854
|
+
}
|
|
2855
|
+
}), /*#__PURE__*/React$1.createElement(Button, {
|
|
2856
|
+
style: {
|
|
2857
|
+
color: '#979797'
|
|
2858
|
+
},
|
|
2859
|
+
size: "small",
|
|
2860
|
+
type: "text",
|
|
2861
|
+
icon: /*#__PURE__*/React$1.createElement(RightOutlined, null),
|
|
2862
|
+
onClick: next
|
|
2863
|
+
}), /*#__PURE__*/React$1.createElement(Button, {
|
|
2864
|
+
type: "text",
|
|
2865
|
+
style: {
|
|
2866
|
+
background: '#fff',
|
|
2867
|
+
color: '#979797',
|
|
2868
|
+
marginLeft: 16
|
|
2869
|
+
},
|
|
2870
|
+
onClick: function onClick() {
|
|
2871
|
+
return setSelectedDate(selectedDate.clone());
|
|
2872
|
+
},
|
|
2873
|
+
title: "\u5237\u65B0\u6570\u636E",
|
|
2874
|
+
icon: /*#__PURE__*/React$1.createElement(SyncOutlined, null)
|
|
2875
|
+
})), /*#__PURE__*/React$1.createElement("div", {
|
|
2876
|
+
style: {
|
|
2877
|
+
position: 'absolute',
|
|
2878
|
+
left: '50%',
|
|
2879
|
+
top: '50%',
|
|
2880
|
+
transform: 'translate(-50%,-50%)'
|
|
2881
|
+
}
|
|
2882
|
+
}, /*#__PURE__*/React$1.createElement(Button.Group, {
|
|
2883
|
+
style: {}
|
|
2884
|
+
}, /*#__PURE__*/React$1.createElement(Button, {
|
|
2885
|
+
type: mode === 'day' ? 'primary' : 'text',
|
|
2886
|
+
onClick: function onClick(e) {
|
|
2887
|
+
return setMode('day');
|
|
2888
|
+
},
|
|
2889
|
+
style: {
|
|
2890
|
+
borderRadius: 4
|
|
2891
|
+
}
|
|
2892
|
+
}, "\u65E5"), /*#__PURE__*/React$1.createElement(Button, {
|
|
2893
|
+
type: mode === 'week' ? 'primary' : 'text',
|
|
2894
|
+
onClick: function onClick(e) {
|
|
2895
|
+
return setMode('week');
|
|
2896
|
+
},
|
|
2897
|
+
style: {
|
|
2898
|
+
margin: '0 28px',
|
|
2899
|
+
borderRadius: 4
|
|
2900
|
+
}
|
|
2901
|
+
}, "\u5468"), /*#__PURE__*/React$1.createElement(Button, {
|
|
2902
|
+
type: mode === 'month' ? 'primary' : 'text',
|
|
2903
|
+
onClick: function onClick(e) {
|
|
2904
|
+
return setMode('month');
|
|
2905
|
+
},
|
|
2906
|
+
style: {
|
|
2907
|
+
borderRadius: 4
|
|
2908
|
+
}
|
|
2909
|
+
}, "\u6708"))), /*#__PURE__*/React$1.createElement(Divider, {
|
|
2910
|
+
style: {
|
|
2911
|
+
margin: '4px 0 0 0'
|
|
2912
|
+
}
|
|
2913
|
+
})), /*#__PURE__*/React$1.createElement("div", {
|
|
2914
|
+
style: {
|
|
2915
|
+
height: tagHeight,
|
|
2916
|
+
lineHeight: "".concat(tagHeight, "px"),
|
|
2917
|
+
background: '#fff',
|
|
2918
|
+
zIndex: 1,
|
|
2919
|
+
position: 'relative',
|
|
2920
|
+
overflowX: 'hidden',
|
|
2921
|
+
userSelect: 'none'
|
|
2922
|
+
}
|
|
2923
|
+
}, /*#__PURE__*/React$1.createElement("span", {
|
|
2924
|
+
style: {
|
|
2925
|
+
marginLeft: 24,
|
|
2926
|
+
color: '#828C99',
|
|
2927
|
+
fontSize: 14
|
|
2928
|
+
}
|
|
2929
|
+
}, "\u7C7B\u578B\uFF1A"), mode === 'day' && !get(dd.scheduleArr[0], 'attendanceSet') ? (/*#__PURE__*/React$1.createElement("span", {
|
|
2930
|
+
style: {
|
|
2931
|
+
color: 'rgb(130, 140, 153)'
|
|
2932
|
+
}
|
|
2933
|
+
}, "\u6682\u65E0")) : colorList.filter(function (_) {
|
|
2934
|
+
var isOpen = getOperationNum(dd.scheduleArr[0], _.operationName).isOpen;
|
|
2935
|
+
return mode === 'day' ? isOpen : OPERATION_ARR.includes(_.operationName);
|
|
2936
|
+
}).map(function (_) {
|
|
2937
|
+
var isActive = activeOperationType.has(_.operationName);
|
|
2938
|
+
var reservedData = getOperationNum(dd.scheduleArr[0], _.operationName);
|
|
2939
|
+
return /*#__PURE__*/React$1.createElement(Tag, {
|
|
2940
|
+
onClick: function onClick() {
|
|
2941
|
+
return toggleActiveType(_.operationName);
|
|
2942
|
+
},
|
|
2943
|
+
color: _.backgroundColor,
|
|
2944
|
+
style: {
|
|
2945
|
+
cursor: 'pointer',
|
|
2946
|
+
outline: isActive ? "2px solid ".concat(_.fontColor) : '',
|
|
2947
|
+
transform: isActive ? 'translateY(-8px)' : '',
|
|
2948
|
+
position: 'relative'
|
|
2949
|
+
}
|
|
2950
|
+
}, /*#__PURE__*/React$1.createElement("span", {
|
|
2951
|
+
style: {
|
|
2952
|
+
color: _.fontColor
|
|
2953
|
+
}
|
|
2954
|
+
}, _.operationName, mode === 'day' ? "".concat(reservedData.reserved, "/").concat(reservedData.all) : ''), isActive ? (/*#__PURE__*/React$1.createElement("span", {
|
|
2955
|
+
style: {
|
|
2956
|
+
width: 6,
|
|
2957
|
+
height: 6,
|
|
2958
|
+
borderRadius: '50%',
|
|
2959
|
+
position: 'absolute',
|
|
2960
|
+
left: '50%',
|
|
2961
|
+
bottom: '-11px',
|
|
2962
|
+
transform: 'translateX(-50%)',
|
|
2963
|
+
backgroundColor: _.fontColor
|
|
2964
|
+
}
|
|
2965
|
+
})) : '');
|
|
2966
|
+
})), /*#__PURE__*/React$1.createElement("div", {
|
|
2967
|
+
style: {
|
|
2968
|
+
height: "calc(100% - ".concat(headHeight, "px - ").concat(middleHeight, "px - ").concat(tagHeight, "px)"),
|
|
2969
|
+
display: 'flex'
|
|
2970
|
+
}
|
|
2971
|
+
}, mode === 'day' && /*#__PURE__*/React$1.createElement(DateSelect$2, __assign({}, baseData)), mode === 'week' && /*#__PURE__*/React$1.createElement(DateSelect, __assign({}, baseData)), mode === 'month' && /*#__PURE__*/React$1.createElement(DateSelect$1, __assign({}, baseData))));
|
|
2972
|
+
}
|
|
2973
|
+
var Content = Layout.Content,
|
|
2974
|
+
Sider = Layout.Sider;
|
|
2975
|
+
var FAMILY_PLANNING_BOOKING_MANAGEMENT_COLLAPSED_KEY = 'FAMILY_PLANNING_BOOKING_MANAGEMENT_COLLAPSED_KEY';
|
|
2976
|
+
function WorkFlow() {
|
|
2977
|
+
var _a = useState(store.get(FAMILY_PLANNING_BOOKING_MANAGEMENT_COLLAPSED_KEY) || false),
|
|
2978
|
+
collapsed = _a[0],
|
|
2979
|
+
setCollapsed = _a[1];
|
|
2980
|
+
var _b = useState([]),
|
|
2981
|
+
leftList = _b[0],
|
|
2982
|
+
setLeftList = _b[1];
|
|
2983
|
+
var _c = useState([]),
|
|
2984
|
+
colorList = _c[0],
|
|
2985
|
+
setColorList = _c[1];
|
|
2986
|
+
var _d = useState(),
|
|
2987
|
+
name = _d[0],
|
|
2988
|
+
setName = _d[1];
|
|
2989
|
+
var dd = useMemo(function () {
|
|
2990
|
+
return new DD();
|
|
2991
|
+
}, []);
|
|
2992
|
+
var onCollapse = function onCollapse(status) {
|
|
2993
|
+
store.set(FAMILY_PLANNING_BOOKING_MANAGEMENT_COLLAPSED_KEY, status);
|
|
2994
|
+
setCollapsed(status);
|
|
2995
|
+
};
|
|
2996
|
+
function fetchLeftData(_name) {
|
|
2997
|
+
if (_name === void 0) {
|
|
2998
|
+
_name = name;
|
|
2999
|
+
}
|
|
3000
|
+
SModel_EarlyPregnancyCheckSurgeryType.getList({
|
|
3001
|
+
params: {
|
|
3002
|
+
progressStatus: stupidEnums.EarlyPregnancyCheckSurgeryType.progressStatus.getValue('待预约'),
|
|
3003
|
+
name: _name,
|
|
3004
|
+
'schedulingDate.greaterOrEqualThan': dd.start.format('YYYY-MM-DD'),
|
|
3005
|
+
'schedulingDate.lessOrEqualThan': dd.end.format('YYYY-MM-DD')
|
|
3006
|
+
}
|
|
3007
|
+
}).then(function (r) {
|
|
3008
|
+
return setLeftList(r.length ? r : []);
|
|
3009
|
+
});
|
|
3010
|
+
SModel_EarlyPregnancySurgicalTemplate.getList().then(function (r) {
|
|
3011
|
+
setColorList(r);
|
|
3012
|
+
});
|
|
3013
|
+
}
|
|
3014
|
+
useEffect(function () {
|
|
3015
|
+
var cb = dd.observe(function (data) {
|
|
3016
|
+
return fetchLeftData(name);
|
|
3017
|
+
});
|
|
3018
|
+
return cb;
|
|
3019
|
+
}, [name]);
|
|
3020
|
+
useEffect(function () {}, []);
|
|
3021
|
+
var footHeight = 0;
|
|
3022
|
+
var ToggleIcon = collapsed ? RightOutlined : LeftOutlined;
|
|
3023
|
+
return /*#__PURE__*/React$1.createElement(DndProvider, {
|
|
3024
|
+
backend: HTML5Backend
|
|
3025
|
+
}, /*#__PURE__*/React$1.createElement("div", {
|
|
3026
|
+
style: {
|
|
3027
|
+
userSelect: 'none'
|
|
3028
|
+
}
|
|
3029
|
+
}, /*#__PURE__*/React$1.createElement("div", {
|
|
3030
|
+
style: {
|
|
3031
|
+
display: 'flex',
|
|
3032
|
+
height: "calc(((100vh - 48px) - 36px) - 24px - ".concat(footHeight, "px)"),
|
|
3033
|
+
overflowY: 'hidden'
|
|
3034
|
+
}
|
|
3035
|
+
}, /*#__PURE__*/React$1.createElement(Sider, {
|
|
3036
|
+
style: {},
|
|
3037
|
+
theme: "light",
|
|
3038
|
+
collapsedWidth: 0,
|
|
3039
|
+
width: 340,
|
|
3040
|
+
collapsed: collapsed,
|
|
3041
|
+
onCollapse: onCollapse
|
|
3042
|
+
}, /*#__PURE__*/React$1.createElement(WorkFlow$1, {
|
|
3043
|
+
leftList: leftList,
|
|
3044
|
+
name: name,
|
|
3045
|
+
setName: setName,
|
|
3046
|
+
fetchLeftData: fetchLeftData,
|
|
3047
|
+
colorList: colorList,
|
|
3048
|
+
dd: dd
|
|
3049
|
+
})), /*#__PURE__*/React$1.createElement(Content, {
|
|
3050
|
+
style: {
|
|
3051
|
+
margin: '0',
|
|
3052
|
+
paddingBottom: 6,
|
|
3053
|
+
background: '#fff',
|
|
3054
|
+
position: 'relative'
|
|
3055
|
+
}
|
|
3056
|
+
}, /*#__PURE__*/React$1.createElement(Right, {
|
|
3057
|
+
dd: dd,
|
|
3058
|
+
colorList: colorList,
|
|
3059
|
+
toggleNode: /*#__PURE__*/React$1.createElement(React$1.Fragment, null, /*#__PURE__*/React$1.createElement(Button, {
|
|
3060
|
+
type: "text",
|
|
3061
|
+
onClick: function onClick() {
|
|
3062
|
+
return onCollapse(!collapsed);
|
|
3063
|
+
},
|
|
3064
|
+
style: {
|
|
3065
|
+
background: '#fff',
|
|
3066
|
+
boxShadow: '0px 0px 9px 1px rgba(131, 131, 131, 0.12), 0px 2px 4px 1px rgba(0, 0, 0, 0.09)',
|
|
3067
|
+
position: 'absolute',
|
|
3068
|
+
left: 14,
|
|
3069
|
+
top: 12
|
|
3070
|
+
},
|
|
3071
|
+
shape: "circle",
|
|
3072
|
+
title: "\u5207\u6362",
|
|
3073
|
+
icon: /*#__PURE__*/React$1.createElement(ToggleIcon, null)
|
|
3074
|
+
}))
|
|
3075
|
+
})))));
|
|
3076
|
+
}
|
|
3077
|
+
export { WorkFlow as default };
|