|
@@ -12,7 +12,7 @@ import { debounceTime } from "rxjs/operators";
|
12
|
12
|
})
|
13
|
13
|
export class OrderManagementComponent implements OnInit {
|
14
|
14
|
constructor(
|
15
|
|
- private route: ActivatedRoute,
|
|
15
|
+ public route: ActivatedRoute,
|
16
|
16
|
private router: Router,
|
17
|
17
|
private mainService: MainService,
|
18
|
18
|
private tool: ToolService
|
|
@@ -36,9 +36,10 @@ export class OrderManagementComponent implements OnInit {
|
36
|
36
|
this.getAllHos();
|
37
|
37
|
this.getGdStates();
|
38
|
38
|
}
|
39
|
|
-
|
|
39
|
+ loginUser: any = localStorage.getItem("user")
|
|
40
|
+ ? JSON.parse(localStorage.getItem("user")).user
|
|
41
|
+ : null; //登录人信息
|
40
|
42
|
listOfData: any[] = []; //表格数据
|
41
|
|
-
|
42
|
43
|
modal: boolean = false; //回复模态框
|
43
|
44
|
coopId: string; //表格中执行操作的id
|
44
|
45
|
hospital: string; //选中院区
|
|
@@ -94,7 +95,10 @@ export class OrderManagementComponent implements OnInit {
|
94
|
95
|
this.association = null;
|
95
|
96
|
this.worker = null;
|
96
|
97
|
this.tasktype = null;
|
97
|
|
- this.department = null;
|
|
98
|
+ if (this.loginUser.usertype.value != 1) {
|
|
99
|
+ // 人员类型不是护士
|
|
100
|
+ this.department = null;
|
|
101
|
+ }
|
98
|
102
|
this.gdcode = "";
|
99
|
103
|
this.gdState = null;
|
100
|
104
|
this.specialCloseFlag = null;
|
|
@@ -107,7 +111,6 @@ export class OrderManagementComponent implements OnInit {
|
107
|
111
|
getAllHos() {
|
108
|
112
|
this.hospital = this.tool.getCurrentHospital().id + "";
|
109
|
113
|
this.changeHos();
|
110
|
|
- this.getList();
|
111
|
114
|
}
|
112
|
115
|
// 修改院区获取对应科室,工单类型,执行支助人员
|
113
|
116
|
changeHos() {
|
|
@@ -124,8 +127,7 @@ export class OrderManagementComponent implements OnInit {
|
124
|
127
|
// 获取关联类型
|
125
|
128
|
getAssociation() {
|
126
|
129
|
let that = this;
|
127
|
|
- console.log(that.mainService
|
128
|
|
- .getDictionary("list", "association_types"))
|
|
130
|
+ console.log(that.mainService.getDictionary("list", "association_types"));
|
129
|
131
|
that.mainService
|
130
|
132
|
.getDictionary("list", "association_types")
|
131
|
133
|
.subscribe((data) => {
|
|
@@ -268,6 +270,14 @@ export class OrderManagementComponent implements OnInit {
|
268
|
270
|
.subscribe((data) => {
|
269
|
271
|
this.alldepart = data.list;
|
270
|
272
|
this.isLoading = false;
|
|
273
|
+ if (dept === undefined && this.loginUser.usertype.value == 1) {
|
|
274
|
+ // 初次渲染,人员类型是护士,则回显申请科室,并禁用
|
|
275
|
+ this.alldepart = [this.loginUser.dept];
|
|
276
|
+ this.department = this.loginUser.dept.id;
|
|
277
|
+ this.getList();
|
|
278
|
+ }else{
|
|
279
|
+ this.getList();
|
|
280
|
+ }
|
271
|
281
|
});
|
272
|
282
|
}
|
273
|
283
|
|