|
@@ -1,5 +1,4 @@
|
1
|
1
|
import {
|
2
|
|
- AfterViewInit,
|
3
|
2
|
Component,
|
4
|
3
|
ElementRef,
|
5
|
4
|
OnInit,
|
|
@@ -31,7 +30,7 @@ import { differenceInCalendarDays, format, setSeconds } from "date-fns";
|
31
|
30
|
templateUrl: "./hushijiandan.component.html",
|
32
|
31
|
styleUrls: ["./hushijiandan.component.less"],
|
33
|
32
|
})
|
34
|
|
-export class HushijiandanComponent implements OnInit, AfterViewInit {
|
|
33
|
+export class HushijiandanComponent implements OnInit {
|
35
|
34
|
@ViewChild("remarksEle", { static: false }) remarksEle: ElementRef;
|
36
|
35
|
@ViewChild("osComponentRef1", {
|
37
|
36
|
read: OverlayScrollbarsComponent,
|
|
@@ -53,11 +52,6 @@ export class HushijiandanComponent implements OnInit, AfterViewInit {
|
53
|
52
|
static: false,
|
54
|
53
|
})
|
55
|
54
|
osComponentRef4: OverlayScrollbarsComponent;
|
56
|
|
- @ViewChild("osComponentRef5", {
|
57
|
|
- read: OverlayScrollbarsComponent,
|
58
|
|
- static: false,
|
59
|
|
- })
|
60
|
|
- osComponentRef5: OverlayScrollbarsComponent;
|
61
|
55
|
@ViewChild("osComponentRef6", {
|
62
|
56
|
read: OverlayScrollbarsComponent,
|
63
|
57
|
static: false,
|
|
@@ -133,12 +127,6 @@ export class HushijiandanComponent implements OnInit, AfterViewInit {
|
133
|
127
|
this.initRole();
|
134
|
128
|
this.getWebsocket();
|
135
|
129
|
}
|
136
|
|
- ngAfterViewInit() {
|
137
|
|
- this.windowResize();
|
138
|
|
- window.addEventListener("resize", () => {
|
139
|
|
- this.tableHeight = window.innerHeight - 426;
|
140
|
|
- });
|
141
|
|
- }
|
142
|
130
|
ngOnDestroy() {
|
143
|
131
|
console.log("关闭护士端", this.webs.ws);
|
144
|
132
|
clearInterval(this.moveId);
|
|
@@ -163,7 +151,6 @@ export class HushijiandanComponent implements OnInit, AfterViewInit {
|
163
|
151
|
hsPromptModalShow: boolean = true; //护士端科室切换提示框是否展示
|
164
|
152
|
|
165
|
153
|
deptTaskTypeRules: any = {}; //当前登录科室任务类型信息规则
|
166
|
|
- tableHeight: number; //表格动态高
|
167
|
154
|
|
168
|
155
|
orderSelectList: any = []; //工单列表筛选选项
|
169
|
156
|
orderSelected = "-1"; //工单列表下拉框选中
|
|
@@ -171,9 +158,6 @@ export class HushijiandanComponent implements OnInit, AfterViewInit {
|
171
|
158
|
tabSearchCont: string = ""; //左侧tab搜索框内容
|
172
|
159
|
pLoading: boolean = true; //患者信息loading
|
173
|
160
|
patientList: any = []; //左侧tab患者信息list
|
174
|
|
- iLoading: boolean = true; //检查信息loading
|
175
|
|
- inspectList: any = []; //左侧tab检查信息list
|
176
|
|
- checkedInfo: string = "patient"; //左侧tab
|
177
|
161
|
infoPageIdx: number = 1; //左侧tab页码
|
178
|
162
|
infoLength: number = 5; //左侧tab信息总数
|
179
|
163
|
|
|
@@ -238,17 +222,6 @@ export class HushijiandanComponent implements OnInit, AfterViewInit {
|
238
|
222
|
return this.mainService.getFetchDataList("configuration", "taskType", list);
|
239
|
223
|
}
|
240
|
224
|
|
241
|
|
- // mainRole: boolean = false;//回到系统管理权限
|
242
|
|
- // initRole() {
|
243
|
|
- // let roles = JSON.parse(localStorage.getItem('user')).user.role;
|
244
|
|
- // let that = this
|
245
|
|
- // roles.forEach(e => {
|
246
|
|
- // if (e.id == 25) {
|
247
|
|
- // that.mainRole = true;
|
248
|
|
- // return;
|
249
|
|
- // }
|
250
|
|
- // });
|
251
|
|
- // }
|
252
|
225
|
// 关闭其他建单保存结果
|
253
|
226
|
closeModel(e) {
|
254
|
227
|
console.log(e);
|
|
@@ -312,7 +285,6 @@ export class HushijiandanComponent implements OnInit, AfterViewInit {
|
312
|
285
|
if (data && data.content) {
|
313
|
286
|
that.createBasicNotification(data);
|
314
|
287
|
}
|
315
|
|
- that.windowResize();
|
316
|
288
|
});
|
317
|
289
|
}
|
318
|
290
|
|
|
@@ -581,16 +553,6 @@ export class HushijiandanComponent implements OnInit, AfterViewInit {
|
581
|
553
|
}
|
582
|
554
|
});
|
583
|
555
|
}
|
584
|
|
- // 打开搜索框
|
585
|
|
- // openChange(type){
|
586
|
|
- // if (type == 'target') {
|
587
|
|
- // this.shortcutForm.controls.targetOffice.setValue(null)
|
588
|
|
- // this.patientForm.controls.targetOffice.setValue(null)
|
589
|
|
- // } else if (type == 'start') {
|
590
|
|
- // this.shortcutForm.controls.originOffice.setValue(null)
|
591
|
|
- // this.patientForm.controls.originOffice.setValue(null)
|
592
|
|
- // }
|
593
|
|
- // }
|
594
|
556
|
// 目标科室输入搜索
|
595
|
557
|
searchDept(type, msg, e) {
|
596
|
558
|
this.getDeptList(type, msg, e);
|
|
@@ -640,9 +602,8 @@ export class HushijiandanComponent implements OnInit, AfterViewInit {
|
640
|
602
|
}
|
641
|
603
|
|
642
|
604
|
// 切换左侧tab
|
643
|
|
- changeInfo(type) {
|
|
605
|
+ changeInfo() {
|
644
|
606
|
if (!this.deptTaskTypeRules.openInspection) return;
|
645
|
|
- this.checkedInfo = type;
|
646
|
607
|
this.infoPageIdx = 1;
|
647
|
608
|
this.getPatient();
|
648
|
609
|
}
|
|
@@ -652,51 +613,30 @@ export class HushijiandanComponent implements OnInit, AfterViewInit {
|
652
|
613
|
getPatient(e?) {
|
653
|
614
|
let that = this;
|
654
|
615
|
that.pLoading = true;
|
655
|
|
- that.iLoading = true;
|
656
|
616
|
let postData = {
|
657
|
617
|
idx: that.infoPageIdx - 1,
|
658
|
|
- sum: that.checkedInfo == "patient" ? 9999 : 5,
|
|
618
|
+ sum: 9999,
|
659
|
619
|
};
|
660
|
|
- if (that.checkedInfo == "patient") {
|
661
|
|
- // 患者信息
|
662
|
|
- postData["patient"] = {
|
663
|
|
- keyWord: e ? e : that.tabSearchCont,
|
664
|
|
- };
|
665
|
|
- postData["patient"]["department"] = { id: that.loginUserDeptId };
|
666
|
|
- delete postData["inspect"];
|
667
|
|
- } else if (that.checkedInfo == "inspect") {
|
668
|
|
- // 检查信息
|
669
|
|
- postData["inspect"] = {
|
670
|
|
- hosId: this.currentHospital.id,
|
671
|
|
- keyWord: e ? e : that.tabSearchCont,
|
672
|
|
- searchDays: 10000,
|
673
|
|
- platForm: 1,
|
674
|
|
- applyDept: { id: that.loginUserDeptId },
|
675
|
|
- };
|
676
|
|
- delete postData["patient"];
|
677
|
|
- }
|
|
620
|
+ // 患者信息
|
|
621
|
+ postData["patient"] = {
|
|
622
|
+ keyWord: e ? e : that.tabSearchCont,
|
|
623
|
+ };
|
|
624
|
+ postData["patient"]["department"] = { id: that.loginUserDeptId };
|
678
|
625
|
this.snum++;
|
679
|
626
|
that.mainService
|
680
|
|
- .getFetchDataList("nurse", that.checkedInfo, postData)
|
|
627
|
+ .getFetchDataList("nurse", "patient", postData)
|
681
|
628
|
.subscribe((data) => {
|
682
|
629
|
this.snum--;
|
683
|
|
- if (that.checkedInfo == "patient") {
|
684
|
|
- if (data.list.length > 0) {
|
685
|
|
- data.list.forEach((item) => {
|
686
|
|
- if (item.focusPatient === undefined) {
|
687
|
|
- item.focusPatient = 0;
|
688
|
|
- }
|
689
|
|
- });
|
690
|
|
- }
|
691
|
|
- that.patientList = data.list || [];
|
692
|
|
- if (this.snum === 0) {
|
693
|
|
- that.pLoading = false;
|
694
|
|
- }
|
695
|
|
- } else if (that.checkedInfo == "inspect") {
|
696
|
|
- that.inspectList = data.list || [];
|
697
|
|
- if (this.snum === 0) {
|
698
|
|
- that.iLoading = false;
|
699
|
|
- }
|
|
630
|
+ if (data.list.length > 0) {
|
|
631
|
+ data.list.forEach((item) => {
|
|
632
|
+ if (item.focusPatient === undefined) {
|
|
633
|
+ item.focusPatient = 0;
|
|
634
|
+ }
|
|
635
|
+ });
|
|
636
|
+ }
|
|
637
|
+ that.patientList = data.list || [];
|
|
638
|
+ if (this.snum === 0) {
|
|
639
|
+ that.pLoading = false;
|
700
|
640
|
}
|
701
|
641
|
that.infoLength = data.totalNum || 0;
|
702
|
642
|
});
|
|
@@ -786,8 +726,6 @@ export class HushijiandanComponent implements OnInit, AfterViewInit {
|
786
|
726
|
urgentReason: any = ""; //加急原因
|
787
|
727
|
|
788
|
728
|
// 初始化form表单
|
789
|
|
- allowUrgentInspect: any = "0";
|
790
|
|
- urgentReasonInspect: any = "";
|
791
|
729
|
initForm() {
|
792
|
730
|
// 初始化患者信息一键建单表单
|
793
|
731
|
this.patientForm = this.fb.group({
|
|
@@ -800,14 +738,6 @@ export class HushijiandanComponent implements OnInit, AfterViewInit {
|
800
|
738
|
urgentReason: [null], //加急原因
|
801
|
739
|
});
|
802
|
740
|
|
803
|
|
- // 初始化检查信息一键建单表单
|
804
|
|
- this.inspectionForm = this.fb.group({
|
805
|
|
- goods: [null],
|
806
|
|
- linkCheck: [null, []],
|
807
|
|
- allowUrgentInspect: [null], //加急
|
808
|
|
- urgentReasonInspect: [null], //加急原因
|
809
|
|
- });
|
810
|
|
-
|
811
|
741
|
// 初始化一键发起建单表单
|
812
|
742
|
this.shortcutForm = this.fb.group({
|
813
|
743
|
targetOffice: [null, [this.targetOfficeShortCutValidator]],
|
|
@@ -886,16 +816,6 @@ export class HushijiandanComponent implements OnInit, AfterViewInit {
|
886
|
816
|
this.clickYYFlag = false;
|
887
|
817
|
this.openYYTime(true, "parent");
|
888
|
818
|
}
|
889
|
|
- yyTimeInspectChange(e) {
|
890
|
|
- if (e) {
|
891
|
|
- this.yyTimeInspect = format(e, "yyyy-MM-dd HH:mm") + ":00";
|
892
|
|
- this.timeOperate(this.yyTimeInspect);
|
893
|
|
- } else {
|
894
|
|
- this.yyTimeInspect = null;
|
895
|
|
- }
|
896
|
|
- this.clickYYInspectFlag = false;
|
897
|
|
- this.openYYTime(true, "inspect");
|
898
|
|
- }
|
899
|
819
|
yyTimeZyChange(e) {
|
900
|
820
|
if (e) {
|
901
|
821
|
this.yyTimeZy = format(e, "yyyy-MM-dd HH:mm") + ":00";
|
|
@@ -945,8 +865,6 @@ export class HushijiandanComponent implements OnInit, AfterViewInit {
|
945
|
865
|
) {
|
946
|
866
|
return;
|
947
|
867
|
}
|
948
|
|
- // console.log(this.patientForm.controls.checkedType.value,this.checkTypeLis )
|
949
|
|
- // return;
|
950
|
868
|
var that = this;
|
951
|
869
|
for (const i in that.patientForm.controls) {
|
952
|
870
|
that.patientForm.controls[i].markAsDirty();
|
|
@@ -1157,31 +1075,6 @@ export class HushijiandanComponent implements OnInit, AfterViewInit {
|
1157
|
1075
|
this.showPromptModal("创建", false, data.msg);
|
1158
|
1076
|
}
|
1159
|
1077
|
});
|
1160
|
|
- } else if (this.accompanyType == "inspect") {
|
1161
|
|
- this.mainService
|
1162
|
|
- .postCustom(
|
1163
|
|
- "api",
|
1164
|
|
- this.accompanyYuyue ? "appointmentOrder" : "startOrder",
|
1165
|
|
- this.accompanyPostData
|
1166
|
|
- )
|
1167
|
|
- .subscribe((data) => {
|
1168
|
|
- this.hideInspectionOrder();
|
1169
|
|
- this.accompanyModal = false;
|
1170
|
|
- this.accompanyLoading = false;
|
1171
|
|
- if (data.status == 200) {
|
1172
|
|
- this.showPromptModal("创建", true, "");
|
1173
|
|
- this.goodsLis = [];
|
1174
|
|
- this.getOrderList();
|
1175
|
|
- this.getDeptTaskType();
|
1176
|
|
- } else if (data.status == 100042) {
|
1177
|
|
- this.showPromptModal("创建", true, data.msg);
|
1178
|
|
- this.goodsLis = [];
|
1179
|
|
- this.getOrderList();
|
1180
|
|
- this.getDeptTaskType();
|
1181
|
|
- } else {
|
1182
|
|
- this.showPromptModal("创建", false, data.msg);
|
1183
|
|
- }
|
1184
|
|
- });
|
1185
|
1078
|
}
|
1186
|
1079
|
}
|
1187
|
1080
|
hideAccompanyModal() {
|
|
@@ -1232,36 +1125,10 @@ export class HushijiandanComponent implements OnInit, AfterViewInit {
|
1232
|
1125
|
this.showPromptModal("创建", false, data.msg);
|
1233
|
1126
|
}
|
1234
|
1127
|
});
|
1235
|
|
- } else if (this.accompanyType == "inspect") {
|
1236
|
|
- this.mainService
|
1237
|
|
- .postCustom(
|
1238
|
|
- "api",
|
1239
|
|
- this.accompanyYuyue ? "appointmentOrder" : "startOrder",
|
1240
|
|
- this.accompanyPostData
|
1241
|
|
- )
|
1242
|
|
- .subscribe((data) => {
|
1243
|
|
- this.hideInspectionOrder();
|
1244
|
|
- this.accompanyModal = false;
|
1245
|
|
- this.cancenlLoading = false;
|
1246
|
|
- if (data.status == 200) {
|
1247
|
|
- this.showPromptModal("创建", true, "");
|
1248
|
|
- this.goodsLis = [];
|
1249
|
|
- this.getOrderList();
|
1250
|
|
- this.getDeptTaskType();
|
1251
|
|
- } else if (data.status == 100042) {
|
1252
|
|
- this.showPromptModal("创建", true, data.msg);
|
1253
|
|
- this.goodsLis = [];
|
1254
|
|
- this.getOrderList();
|
1255
|
|
- this.getDeptTaskType();
|
1256
|
|
- } else {
|
1257
|
|
- this.showPromptModal("创建", false, data.msg);
|
1258
|
|
- }
|
1259
|
|
- });
|
1260
|
1128
|
}
|
1261
|
1129
|
}
|
1262
|
1130
|
// 切换患者送检检查项目
|
1263
|
1131
|
checkedShowMsg: any = {}; //患者送检检查项目对应展示信息
|
1264
|
|
- // checkedShowFlag: any;//切换到患者检查
|
1265
|
1132
|
current_allowUrgent = false; //当前任务类型是否允许加急
|
1266
|
1133
|
changeCheckedType() {
|
1267
|
1134
|
this.clickYYFlag = false;
|
|
@@ -1289,7 +1156,6 @@ export class HushijiandanComponent implements OnInit, AfterViewInit {
|
1289
|
1156
|
// 判断这个任务类型是否允许加急 end
|
1290
|
1157
|
let that = this;
|
1291
|
1158
|
this.linkCheckLisTrue = true;
|
1292
|
|
- // this.checkedShowFlag = that.patientForm.controls.checkedType.value == 3;
|
1293
|
1159
|
console.log(
|
1294
|
1160
|
that.patientForm.controls.linkCheck.value,
|
1295
|
1161
|
this.linkCheckLis,
|
|
@@ -1375,47 +1241,6 @@ export class HushijiandanComponent implements OnInit, AfterViewInit {
|
1375
|
1241
|
);
|
1376
|
1242
|
}
|
1377
|
1243
|
}
|
1378
|
|
- // 患者送检检查项目-选择检查项目
|
1379
|
|
- hasTime1 = false; //是否有已选择,并且是否有预约时间(检查信息)
|
1380
|
|
- lessTime1 = false; //预约时间列表中预约时间少于生效时长,则是false
|
1381
|
|
- lessTime1List = []; //预约时间列表
|
1382
|
|
- linkCheckInsLisChange() {
|
1383
|
|
- this.clickYYInspectFlag = false;
|
1384
|
|
- this.lessTime1List = [];
|
1385
|
|
- if (this.initLessTime1) {
|
1386
|
|
- this.lessTime1List.push(this.initLessTime1);
|
1387
|
|
- }
|
1388
|
|
- let linkCheckInsLis = this.linkCheckInsLis.filter(
|
1389
|
|
- (item) => Boolean(item.yyTime) && item.checked
|
1390
|
|
- );
|
1391
|
|
- linkCheckInsLis.forEach((item) => {
|
1392
|
|
- this.lessTime1List.push(item.yyTime);
|
1393
|
|
- });
|
1394
|
|
- this.lessTime1 = this.lessTime1List.every((item) => {
|
1395
|
|
- return (
|
1396
|
|
- new Date(item).getTime() - new Date().getTime() >
|
1397
|
|
- this.leadTime * 60 * 1000
|
1398
|
|
- );
|
1399
|
|
- });
|
1400
|
|
- //回显预约时间2021年5月10日
|
1401
|
|
- if (this.lessTime1 && linkCheckInsLis.length) {
|
1402
|
|
- let timeList = linkCheckInsLis
|
1403
|
|
- .map((item) => new Date(item.yyTime).getTime())
|
1404
|
|
- .sort();
|
1405
|
|
- this.yyTimeInspect = format(
|
1406
|
|
- new Date(timeList[0] - this.leadTime * 60 * 1000),
|
1407
|
|
- "yyyy-MM-dd HH:mm"
|
1408
|
|
- );
|
1409
|
|
- }
|
1410
|
|
- let linkCheckInsLisTrue = this.linkCheckInsLis.some((item) => item.checked);
|
1411
|
|
- if (!linkCheckInsLisTrue) {
|
1412
|
|
- this.hasTime1 = false;
|
1413
|
|
- } else {
|
1414
|
|
- this.hasTime1 = this.linkCheckInsLis.some(
|
1415
|
|
- (item) => Boolean(item.yyTime) && item.checked
|
1416
|
|
- );
|
1417
|
|
- }
|
1418
|
|
- }
|
1419
|
1244
|
// 日期禁用
|
1420
|
1245
|
range(start: number, end: number): number[] {
|
1421
|
1246
|
const result: number[] = [];
|
|
@@ -1501,227 +1326,6 @@ export class HushijiandanComponent implements OnInit, AfterViewInit {
|
1501
|
1326
|
};
|
1502
|
1327
|
};
|
1503
|
1328
|
}
|
1504
|
|
- // 检查信息一键建单
|
1505
|
|
- inspectionModal: boolean = false; //检查信息一键建单模态框
|
1506
|
|
- inspectionInfo; //检查信息
|
1507
|
|
- inspMsg: any = {}; //检查信息提示
|
1508
|
|
- // 打开检查信息一键建单模态框
|
1509
|
|
- hasYyTime = false;
|
1510
|
|
- initLessTime1 = "";
|
1511
|
|
- newInspectionOrder(info) {
|
1512
|
|
- console.log(info);
|
1513
|
|
- if (info.yyTime) {
|
1514
|
|
- this.hasYyTime = true;
|
1515
|
|
- this.lessTime1List.push(info.yyTime);
|
1516
|
|
- this.initLessTime1 = info.yyTime;
|
1517
|
|
- this.lessTime1 =
|
1518
|
|
- new Date(info.yyTime).getTime() - new Date().getTime() >
|
1519
|
|
- this.leadTime * 60 * 1000;
|
1520
|
|
- //回显预约时间
|
1521
|
|
- if (this.lessTime1) {
|
1522
|
|
- this.yyTimeInspect = format(
|
1523
|
|
- new Date(new Date(info.yyTime).getTime() - this.leadTime * 60 * 1000),
|
1524
|
|
- "yyyy-MM-dd HH:mm"
|
1525
|
|
- );
|
1526
|
|
- }
|
1527
|
|
- } else {
|
1528
|
|
- this.hasYyTime = false;
|
1529
|
|
- }
|
1530
|
|
- let that = this;
|
1531
|
|
- that.linkCheckInsLis = [];
|
1532
|
|
- that.inspMsg = {};
|
1533
|
|
- that.inspectionInfo = info;
|
1534
|
|
- if (this.allowUrgentFlag) {
|
1535
|
|
- this.allowUrgentInspect = "0"; //加急
|
1536
|
|
- this.urgentReasonInspect = ""; //加急原因
|
1537
|
|
- }
|
1538
|
|
- let postData = {
|
1539
|
|
- type: 1,
|
1540
|
|
- inspectId: info.id,
|
1541
|
|
- };
|
1542
|
|
- this.maskFlag = this.message.loading("正在加载中..", {
|
1543
|
|
- nzDuration: 0,
|
1544
|
|
- }).messageId;
|
1545
|
|
- that.mainService
|
1546
|
|
- .postCustom("nurse", "workOrder/buildTrip2", postData)
|
1547
|
|
- .subscribe((data) => {
|
1548
|
|
- this.message.remove(this.maskFlag);
|
1549
|
|
- this.maskFlag = false;
|
1550
|
|
- that.inspectionModal = true;
|
1551
|
|
- that.inspMsg = data;
|
1552
|
|
- that.goodsLis = [];
|
1553
|
|
- if (data.goods && data.goods.length) {
|
1554
|
|
- data.goods.forEach((e) => {
|
1555
|
|
- that.goodsLis.push({
|
1556
|
|
- label: e.name,
|
1557
|
|
- value: e.id,
|
1558
|
|
- checked: false,
|
1559
|
|
- });
|
1560
|
|
- });
|
1561
|
|
- }
|
1562
|
|
- if (data.data && data.data.length) {
|
1563
|
|
- let arr = [];
|
1564
|
|
- data.data.forEach((e) => {
|
1565
|
|
- arr.push({
|
1566
|
|
- yyTime: e.yyTime,
|
1567
|
|
- label:
|
1568
|
|
- (e.yyTime || "") +
|
1569
|
|
- " " +
|
1570
|
|
- e.execDept.dept +
|
1571
|
|
- " 进行 " +
|
1572
|
|
- (e.inspectName || "检查"),
|
1573
|
|
- value: e.id,
|
1574
|
|
- checked: false,
|
1575
|
|
- });
|
1576
|
|
- });
|
1577
|
|
- that.linkCheckInsLis = arr;
|
1578
|
|
- } else {
|
1579
|
|
- that.linkCheckInsLis = [];
|
1580
|
|
- }
|
1581
|
|
- });
|
1582
|
|
- }
|
1583
|
|
- hideInspectionOrder() {
|
1584
|
|
- this.clickYYInspectFlag = false;
|
1585
|
|
- this.inspectionModal = false;
|
1586
|
|
- this.lessTime1List = [];
|
1587
|
|
- this.initLessTime1 = "";
|
1588
|
|
- }
|
1589
|
|
- btnLoading2 = false;
|
1590
|
|
- confirmInspection1() {
|
1591
|
|
- this.confirmInspection("yuyue");
|
1592
|
|
- }
|
1593
|
|
- inspectionForm: FormGroup; //信息检查一键建单表单
|
1594
|
|
- // 检查信息一键建单关联检查
|
1595
|
|
- linkCheckInsLis: any = [];
|
1596
|
|
- // 检查信息保存
|
1597
|
|
- clickYYInspectFlag = false; //是否点击预约建单
|
1598
|
|
- confirmInspection(yuyue?) {
|
1599
|
|
- if (yuyue) {
|
1600
|
|
- this.clickYYInspectFlag = true;
|
1601
|
|
- } else {
|
1602
|
|
- this.clickYYInspectFlag = false;
|
1603
|
|
- }
|
1604
|
|
- //预约时间不能为空
|
1605
|
|
- if (!this.yyTimeInspect) {
|
1606
|
|
- return;
|
1607
|
|
- }
|
1608
|
|
- var that = this;
|
1609
|
|
- for (const i in that.inspectionForm.controls) {
|
1610
|
|
- that.inspectionForm.controls[i].markAsDirty();
|
1611
|
|
- that.inspectionForm.controls[i].updateValueAndValidity();
|
1612
|
|
- }
|
1613
|
|
- if (that.inspectionForm.invalid) return;
|
1614
|
|
- if (yuyue) {
|
1615
|
|
- that.btnLoading2 = true;
|
1616
|
|
- } else {
|
1617
|
|
- that.btnLoading = true;
|
1618
|
|
- }
|
1619
|
|
-
|
1620
|
|
- let typeId;
|
1621
|
|
- that.patientMsgList.forEach((e) => {
|
1622
|
|
- if (e.associationType.value == "inspect") {
|
1623
|
|
- typeId = e.id;
|
1624
|
|
- }
|
1625
|
|
- });
|
1626
|
|
- console.log(that.inspectionForm);
|
1627
|
|
- let postData: any = {
|
1628
|
|
- workOrder: {
|
1629
|
|
- taskType: { id: typeId },
|
1630
|
|
- createDept: that.loginUserDeptId,
|
1631
|
|
- startDept: { id: that.loginUserDeptId },
|
1632
|
|
- patient: {
|
1633
|
|
- patientCode: that.inspectionInfo.patientCode,
|
1634
|
|
- },
|
1635
|
|
- checkList: [],
|
1636
|
|
- },
|
1637
|
|
- };
|
1638
|
|
- if (
|
1639
|
|
- that.inspectionForm.value.linkCheck &&
|
1640
|
|
- that.inspectionForm.value.linkCheck.length
|
1641
|
|
- ) {
|
1642
|
|
- that.inspectionForm.value.linkCheck.forEach((e) => {
|
1643
|
|
- if (e.checked) {
|
1644
|
|
- postData.workOrder["checkList"].push({ id: e.value });
|
1645
|
|
- }
|
1646
|
|
- });
|
1647
|
|
- }
|
1648
|
|
- postData.workOrder["checkList"].push({ id: that.inspectionInfo.id });
|
1649
|
|
-
|
1650
|
|
- // 携带设备
|
1651
|
|
- let goods = "";
|
1652
|
|
- if (
|
1653
|
|
- that.inspectionForm.value.goods &&
|
1654
|
|
- that.inspectionForm.value.goods.length
|
1655
|
|
- ) {
|
1656
|
|
- that.inspectionForm.value.goods.forEach((e) => {
|
1657
|
|
- if (e.checked) {
|
1658
|
|
- goods += e.value + ",";
|
1659
|
|
- }
|
1660
|
|
- });
|
1661
|
|
- goods = goods.slice(0, goods.length - 1);
|
1662
|
|
- }
|
1663
|
|
- postData.workOrder["goods"] = goods;
|
1664
|
|
- if (!yuyue && that.allowUrgentFlag) {
|
1665
|
|
- postData.workOrder["urgentDetails"] = {
|
1666
|
|
- checkStatus: { id: 329 },
|
1667
|
|
- urgentReason: that.urgentReasonInspect,
|
1668
|
|
- };
|
1669
|
|
- }
|
1670
|
|
- // 添加预约时间
|
1671
|
|
- if (yuyue) {
|
1672
|
|
- postData.workOrder.yyTime = format(
|
1673
|
|
- new Date(this.yyTimeInspect),
|
1674
|
|
- "yyyy-MM-dd HH:mm:ss"
|
1675
|
|
- );
|
1676
|
|
- }
|
1677
|
|
- console.log(this.inspectionInfo);
|
1678
|
|
- //是否需要医护陪同检查
|
1679
|
|
- let isAccompany = false;
|
1680
|
|
- if (this.inspectionInfo.careLevel && !isAccompany) {
|
1681
|
|
- //特级护理或一级护理
|
1682
|
|
- if (
|
1683
|
|
- this.inspectionInfo.careLevel.value === "0" ||
|
1684
|
|
- this.inspectionInfo.careLevel.value === "1"
|
1685
|
|
- ) {
|
1686
|
|
- isAccompany = true;
|
1687
|
|
- this.btnLoading = false;
|
1688
|
|
- this.btnLoading2 = false;
|
1689
|
|
- this.accompany(postData, yuyue, "inspect");
|
1690
|
|
- return;
|
1691
|
|
- }
|
1692
|
|
- }
|
1693
|
|
- if (this.inspectionInfo.illnessState && !isAccompany) {
|
1694
|
|
- //病危或病重
|
1695
|
|
- if (
|
1696
|
|
- this.inspectionInfo.illnessState.value === "2" ||
|
1697
|
|
- this.inspectionInfo.illnessState.value === "3"
|
1698
|
|
- ) {
|
1699
|
|
- this.btnLoading = false;
|
1700
|
|
- this.btnLoading2 = false;
|
1701
|
|
- this.accompany(postData, yuyue, "inspect");
|
1702
|
|
- return;
|
1703
|
|
- }
|
1704
|
|
- }
|
1705
|
|
- postData.workOrder.isAccompany = 0; //是否需要医护陪同检查
|
1706
|
|
- that.mainService
|
1707
|
|
- .postCustom("api", yuyue ? "appointmentOrder" : "startOrder", postData)
|
1708
|
|
- .subscribe((data) => {
|
1709
|
|
- that.hideInspectionOrder();
|
1710
|
|
- if (data.status == 200) {
|
1711
|
|
- that.showPromptModal("创建", true, "");
|
1712
|
|
- that.goodsLis = [];
|
1713
|
|
- that.getOrderList();
|
1714
|
|
- that.getDeptTaskType();
|
1715
|
|
- } else if (data.status == 100042) {
|
1716
|
|
- that.showPromptModal("创建", true, data.msg);
|
1717
|
|
- that.goodsLis = [];
|
1718
|
|
- that.getOrderList();
|
1719
|
|
- that.getDeptTaskType();
|
1720
|
|
- } else {
|
1721
|
|
- that.showPromptModal("创建", false, data.msg);
|
1722
|
|
- }
|
1723
|
|
- });
|
1724
|
|
- }
|
1725
|
1329
|
|
1726
|
1330
|
// 快捷一键发起建单
|
1727
|
1331
|
shortcutMsg; //一键发起信息
|
|
@@ -1838,9 +1442,6 @@ export class HushijiandanComponent implements OnInit, AfterViewInit {
|
1838
|
1442
|
{ id: that.buildMsg.end.end.list[0].id },
|
1839
|
1443
|
];
|
1840
|
1444
|
}
|
1841
|
|
- // if (that.buildMsg.status == 100013 || that.buildMsg.status == 100012) {
|
1842
|
|
- // delete postData.workOrder['endDepts'];
|
1843
|
|
- // }
|
1844
|
1445
|
}
|
1845
|
1446
|
console.log(postData);
|
1846
|
1447
|
that.mainService
|
|
@@ -1961,7 +1562,6 @@ export class HushijiandanComponent implements OnInit, AfterViewInit {
|
1961
|
1562
|
checkedTableType: string = "other";
|
1962
|
1563
|
checkTable(type) {
|
1963
|
1564
|
this.checkedTableType = type;
|
1964
|
|
- this.tableHeight = window.innerHeight - 426;
|
1965
|
1565
|
}
|
1966
|
1566
|
|
1967
|
1567
|
// 意见箱表格数据
|
|
@@ -1970,6 +1570,7 @@ export class HushijiandanComponent implements OnInit, AfterViewInit {
|
1970
|
1570
|
advicePageSize: number = 10; //表格每页展示条数
|
1971
|
1571
|
adviceListLength: number = 10; //表格总数据量
|
1972
|
1572
|
adviceSearchInp: string = ""; //意见箱搜索
|
|
1573
|
+ adviceLoading = false;
|
1973
|
1574
|
getAdvice() {
|
1974
|
1575
|
let that = this;
|
1975
|
1576
|
let postData = {
|
|
@@ -1985,9 +1586,11 @@ export class HushijiandanComponent implements OnInit, AfterViewInit {
|
1985
|
1586
|
idx: that.advicePageIndex - 1 < 0 ? 0 : that.advicePageIndex - 1,
|
1986
|
1587
|
sum: that.advicePageSize,
|
1987
|
1588
|
};
|
|
1589
|
+ this.adviceLoading = true;
|
1988
|
1590
|
that.mainService
|
1989
|
1591
|
.getFetchDataList("adviceCollection", "advice", postData)
|
1990
|
1592
|
.subscribe((data) => {
|
|
1593
|
+ this.adviceLoading = false;
|
1991
|
1594
|
that.adviceList = data.list || [];
|
1992
|
1595
|
that.adviceListLength = data.totalNum || 0;
|
1993
|
1596
|
});
|
|
@@ -2122,7 +1725,6 @@ export class HushijiandanComponent implements OnInit, AfterViewInit {
|
2122
|
1725
|
this.detailModel = true;
|
2123
|
1726
|
let user = JSON.parse(localStorage.getItem("user"));
|
2124
|
1727
|
let postData = {
|
2125
|
|
- // hosIds: user.infoPermission.hospitals[0].id,
|
2126
|
1728
|
deptId: user.user.dept.id,
|
2127
|
1729
|
urgent: speDetailType,
|
2128
|
1730
|
};
|
|
@@ -2397,7 +1999,6 @@ export class HushijiandanComponent implements OnInit, AfterViewInit {
|
2397
|
1999
|
showPromptModal(con, success, promptInfo?, back?) {
|
2398
|
2000
|
this.btnLoading = false;
|
2399
|
2001
|
this.btnLoading1 = false;
|
2400
|
|
- this.btnLoading2 = false;
|
2401
|
2002
|
this.promptModalShow = false;
|
2402
|
2003
|
this.promptContent = con;
|
2403
|
2004
|
this.ifSuccess = success;
|
|
@@ -2427,11 +2028,6 @@ export class HushijiandanComponent implements OnInit, AfterViewInit {
|
2427
|
2028
|
});
|
2428
|
2029
|
}
|
2429
|
2030
|
|
2430
|
|
- // window resize事件 获取表格动态高
|
2431
|
|
- windowResize() {
|
2432
|
|
- this.tableHeight = window.innerHeight - 426;
|
2433
|
|
- }
|
2434
|
|
-
|
2435
|
2031
|
// 格式化时分秒
|
2436
|
2032
|
// (时间小于一分钟则显示秒,时间大于一分钟则显示分钟数,如超出一小时则显示小时和分钟。)time单位:秒
|
2437
|
2033
|
formatTime(time) {
|
|
@@ -2455,7 +2051,6 @@ export class HushijiandanComponent implements OnInit, AfterViewInit {
|
2455
|
2051
|
|
2456
|
2052
|
// 计算历史记录耗时
|
2457
|
2053
|
filterTime(step) {
|
2458
|
|
- // step = [{ difTime: 2 }, { difTime: 6 }]
|
2459
|
2054
|
let num = 0;
|
2460
|
2055
|
step.forEach((e) => {
|
2461
|
2056
|
num += e.difTime;
|
|
@@ -2523,7 +2118,6 @@ export class HushijiandanComponent implements OnInit, AfterViewInit {
|
2523
|
2118
|
|
2524
|
2119
|
mainRole: boolean = false; //回到系统管理权限
|
2525
|
2120
|
initRole() {
|
2526
|
|
- // let roles = JSON.parse(localStorage.getItem('user')).user.role;
|
2527
|
2121
|
let menus = JSON.parse(localStorage.getItem("menu"));
|
2528
|
2122
|
let that = this;
|
2529
|
2123
|
console.log("菜单数量" + menus.length);
|