maotao 1 månad sedan
förälder
incheckning
32cc9dba7b

+ 3 - 3
src/app/components/display-form/display-form.component.html

@@ -6,7 +6,7 @@
6 6
     </div>
7 7
     <div class="content">
8 8
       <div class="conditions" *ngIf="!isLoading">
9
-        <div nz-row>
9
+        <div nz-row *ngIf="hsmsData.hsmsSwitch">
10 10
           <div nz-col nzSpan="4">护工信息隐藏:</div>
11 11
           <div nz-col nzSpan="20">
12 12
             <nz-radio-group class="w100" [(ngModel)]="hurseInfoHiding">
@@ -15,7 +15,7 @@
15 15
             </nz-radio-group>
16 16
           </div>
17 17
         </div>
18
-        <div nz-row>
18
+        <div nz-row *ngIf="hsmsData.hsmsSwitch">
19 19
           <div nz-col nzSpan="4">护工信息:</div>
20 20
           <div nz-col nzSpan="20">
21 21
             <nz-radio-group class="w100" [(ngModel)]="patientCareCol">
@@ -34,7 +34,7 @@
34 34
             </nz-radio-group>
35 35
           </div>
36 36
         </div>
37
-        <div nz-row>
37
+        <div nz-row *ngIf="hsmsData.hsmsSwitch">
38 38
           <div nz-col nzSpan="4">配送人员刷新:</div>
39 39
           <div nz-col nzSpan="4">
40 40
             <nz-input-group nzAddOnAfter="秒">

+ 2 - 0
src/app/components/display-form/display-form.component.ts

@@ -10,6 +10,7 @@ import { NzMessageService } from 'ng-zorro-antd';
10 10
   styleUrls: ['./display-form.component.less']
11 11
 })
12 12
 export class DisplayFormComponent implements OnInit {
13
+	@Input() hsmsData:any;
13 14
   @Output() confirmModal = new EventEmitter();
14 15
   @Output() cancelModal = new EventEmitter();
15 16
   constructor(
@@ -32,6 +33,7 @@ export class DisplayFormComponent implements OnInit {
32 33
 	rightMenuLocation: any = 2; //右侧菜单
33 34
 	showSource: any = 2; //是否展示来源
34 35
   ngOnInit() {
36
+		console.log(778778, this.hsmsData)
35 37
     this.initControlView();
36 38
   }
37 39
 

+ 0 - 2
src/app/services/tool.service.ts

@@ -15,7 +15,6 @@ export class ToolService {
15 15
 	 
16 16
 	// 提供方法来触发事件
17 17
 	triggerEvent(data: any) {
18
-		console.log(9999,data)
19 18
 		this.allSubject.next(data);
20 19
 	}
21 20
 	
@@ -26,7 +25,6 @@ export class ToolService {
26 25
 	
27 26
 	// 提供方法来订阅事件
28 27
 	getEventObservable() {
29
-		console.log(3333333)
30 28
 		return this.allSubject.asObservable();
31 29
 	}
32 30
 	

+ 2 - 2
src/app/views/fuwutai/fuwutai.component.html

@@ -1,5 +1,5 @@
1 1
 <div class="fuwutai">
2
-  <div class="top" id="top" *ngIf="hurseInfoHiding != 1 && hsmsData.hsmsSwitch==1">
2
+  <div class="top" id="top" *ngIf="hurseInfoHiding != 1 && hsmsData.hsmsSwitch">
3 3
     <!-- 头部Tab -->
4 4
     <div class="tabBox">
5 5
       <div class="tab" #tabs>
@@ -2062,7 +2062,7 @@
2062 2062
 <!-- 工单范围 -->
2063 2063
 <app-order-scope *ngIf="showInitModal" [showGovDutyConfig]="showGovDutyConfig" [hsmsData]="hsmsData" [itsmData]="itsmData" [coopBtns]="coopBtns" (confirmModal)="confirmOrderScope($event)" (cancelModal)="cancelOrderScope($event)"></app-order-scope>
2064 2064
 <!-- 展示形式 -->
2065
-<app-display-form *ngIf="showDisplayFormModal" (confirmModal)="confirmDisplayForm($event)" (cancelModal)="cancelDisplayForm($event)"></app-display-form>
2065
+<app-display-form *ngIf="showDisplayFormModal" [hsmsData]="hsmsData" (confirmModal)="confirmDisplayForm($event)" (cancelModal)="cancelDisplayForm($event)"></app-display-form>
2066 2066
 <!-- 消息弹框模板 -->
2067 2067
 <ng-template #msgTemplate let-msg="data">
2068 2068
   <div class="msgTemBox ant-notification-notice-content">

+ 36 - 1
src/app/views/fuwutai/fuwutai.component.ts

@@ -2688,7 +2688,42 @@ export class FuwutaiComponent implements OnInit {
2688 2688
   fixedTab: string = "";
2689 2689
   checkFixedTab(type: string) {
2690 2690
     if (type == "toSystem") {
2691
-      this.router.navigateByUrl("main");
2691
+			let roleMenus = JSON.parse(localStorage.getItem("user")).menu;
2692
+			let sy = false;
2693
+			let gglb = false;
2694
+			let gzgd = false;
2695
+			roleMenus.forEach((e) => {
2696
+				if (e.link == "home") {
2697
+				  sy = true;
2698
+				}else if (e.link == "orderManagement") {
2699
+			    gglb = true;
2700
+			  }else if (e.link == "incidentManagement") {
2701
+			    gzgd = true;
2702
+			  }
2703
+			});
2704
+			
2705
+			if(!gglb && !gzgd && !sy){
2706
+				this.msg.error("暂无权限进入系统!", {
2707
+				  nzDuration: 2000,
2708
+				});
2709
+				return
2710
+			}
2711
+			if(sy){
2712
+				this.router.navigateByUrl("main");
2713
+				return
2714
+			}else if(gglb){
2715
+				this.router.navigateByUrl("/main/orderManagement");
2716
+				return
2717
+			}else if(gzgd){
2718
+				this.router.navigateByUrl("/main/incidentManagement");
2719
+				return
2720
+			}
2721
+			if(gglb && gzgd){
2722
+				this.router.navigateByUrl("/main/orderManagement");
2723
+			}
2724
+			if(!gglb && !gzgd && sy){
2725
+				this.router.navigateByUrl("/main/home");
2726
+			}
2692 2727
       return;
2693 2728
     }
2694 2729
     if (type == "logout") {

+ 7 - 5
src/app/views/incident-management/incident-management.component.ts

@@ -74,17 +74,18 @@ export class IncidentManagementComponent implements OnInit, OnDestroy {
74 74
   changeTab(key){
75 75
     this.queryTask = key;
76 76
 		let itemDept = this.maintainDept.find(i=>i.id == this.hosIds)
77
+		let list = this.tool.getUserInfoPermission().dutyGroupList || []
77 78
 		if(itemDept){
78 79
 			this.searchDTO.maintainDepartment = itemDept.id
79 80
 			if(this.queryTask!='todo' && this.queryTask!='doing' && this.queryTask!='storage'){
80
-				let arr = this.tool.getUserInfoPermission().dutyGroupList.filter(i=>i.hospital.id == itemDept.id)
81
+				let arr = list.filter(i=>i.hospital.id == itemDept.id)
81 82
 				if(arr){
82 83
 					this.maintainGroup = arr
83 84
 				}else{
84
-					this.maintainGroup = this.tool.getUserInfoPermission().dutyGroupList
85
+					this.maintainGroup = list
85 86
 				}
86 87
 			}else{
87
-				this.maintainGroup = this.tool.getUserInfoPermission().dutyGroupList
88
+				this.maintainGroup = list
88 89
 			}
89 90
 
90 91
 		}
@@ -177,11 +178,12 @@ export class IncidentManagementComponent implements OnInit, OnDestroy {
177 178
 	// 选择维修科室
178 179
 	deptChange(e){
179 180
 		this.searchDTO.maintainGroup = null
180
-		let arr  = this.tool.getUserInfoPermission().dutyGroupList.filter(i=>i.hospital.id == e)
181
+		let list = this.tool.getUserInfoPermission().dutyGroupList || []
182
+		let arr = list.filter(i=>i.hospital.id == e)
181 183
 		if(arr){
182 184
 			this.maintainGroup = arr
183 185
 		}else{
184
-			this.maintainGroup = this.tool.getUserInfoPermission().dutyGroupList
186
+			this.maintainGroup = list
185 187
 		}
186 188
 		this.searchDTO.department = null
187 189
 		this.searchDTO.todoingUser = null

+ 3 - 0
src/app/views/main/main.component.html

@@ -641,6 +641,9 @@
641 641
 <!-- 查询范围 -->
642 642
 <app-query-range [hospital]="hospital" [duty]="duty" [queryType]="queryType" [parent]="parent" [hiddenParent]="true" (cancelQueryRange)="cancelQueryRange()" (submitQueryRange)="submitQueryRange($event)" *ngIf="queryRangeFlag"></app-query-range>
643 643
 
644
+<!-- 知识库查看 -->
645
+<app-knowledge-look (cancelKnowledgeModal)="cancelKnowledgeModal()" *ngIf="isShowKnowledge" [knowledgeData]="coopData"></app-knowledge-look>
646
+
644 647
 <!-- 操作成功/失败提示框 -->
645 648
 <app-prompt-modal
646 649
   *ngIf="promptModalShow"

+ 35 - 8
src/app/views/main/main.component.ts

@@ -1055,6 +1055,24 @@ export class MainComponent implements OnInit, OnDestroy {
1055 1055
 	      }
1056 1056
 	    });
1057 1057
 	}
1058
+	
1059
+	// 引入知识库
1060
+	importKnowage(item){
1061
+	  console.log(item)
1062
+	  this.incidentModel = {...this.incidentModel, description:  `引用知识库解决,知识库编号:${item.solutionNumber}`};
1063
+	  this.solutionId = item.id;
1064
+	}
1065
+	// 知识库查看-知道了
1066
+	isShowKnowledge:boolean = false;
1067
+	showKnowledgeModal(data) {
1068
+	  this.coopData = data || {};
1069
+	  this.isShowKnowledge = true;
1070
+	}
1071
+	
1072
+	cancelKnowledgeModal(flag) {
1073
+	  this.isShowKnowledge = false;
1074
+	}
1075
+	
1058 1076
 	// 获取患者信息
1059 1077
 	searchPatientList(id, searchWords) {
1060 1078
 	  this.searchPatientListSubject.next([id, searchWords]);
@@ -1833,22 +1851,31 @@ export class MainComponent implements OnInit, OnDestroy {
1833 1851
 							this.applicationRequesterList.push({
1834 1852
 								name: this.userInfo.user.name,
1835 1853
 								id: this.userInfo.user.id,
1854
+								account: this.userInfo.user.account
1836 1855
 							})
1837 1856
 							this.incidentModel.requester = this.userInfo.user.id;
1857
+							let id = this.eventData.data.alarmId?this.eventData.data.alarmId:''
1858
+							let ly = this.eventData.data.alarmSource?this.eventData.data.alarmSource:''
1859
+							let dd = this.eventData.data.alarmLocation?this.eventData.data.alarmLocation:''
1860
+							let jjd = this.eventData.data.alarmUrgency?this.eventData.data.alarmUrgency.name:''
1861
+							let time = this.eventData.data.alarmActiveTime?format(new Date(this.eventData.data.alarmActiveTime), 'yyyy-MM-dd HH:mm:ss'):''
1862
+							let ip = this.eventData.data.alarmIp?this.eventData.data.alarmIp:''
1863
+							let ms = this.eventData.data.alarmDescription?this.eventData.data.alarmDescription:''
1864
+							let content = this.eventData.data.alarmContent?this.eventData.data.alarmContent:''
1838 1865
 							this.incidentModel.description =
1839
-							'告警id:' + this.eventData.data.alarmId + ';' +
1840
-							'告警来源:' + this.eventData.data.alarmSource + ';' +
1866
+							'告警id:' + id + ';' +
1867
+							'告警来源:' + ly + ';' +
1841 1868
 							'\n' +
1842
-							'告警地点:' + this.eventData.data.alarmLocation + ';' +
1869
+							'告警地点:' + dd + ';' +
1843 1870
 							'\n' +
1844
-							'紧急度:' + this.eventData.data.alarmUrgency.name + ';' +
1845
-							'告警时间:' + format(new Date(this.eventData.data.alarmActiveTime), 'yyyy-MM-dd HH:mm:ss') + ';' +
1871
+							'紧急度:' + jjd + ';' +
1872
+							'告警时间:' + time + ';' +
1846 1873
 							'\n' +
1847
-							'告警ip:' + this.eventData.data.alarmIp + ';' +
1874
+							'告警ip:' + ip + ';' +
1848 1875
 							'\n' +
1849
-							'告警描述:' + this.eventData.data.alarmDescription + ';' +
1876
+							'告警描述:' + ms + ';' +
1850 1877
 							'\n' +
1851
-							'告警内容:' + this.eventData.data.alarmContent
1878
+							'告警内容:' + content
1852 1879
 						}
1853 1880
 	          this.applicationDeptList = data.list;
1854 1881
 	          let ids = this.applicationDeptList.map(v => v.id);

+ 2 - 0
src/app/views/main/main.module.ts

@@ -7,6 +7,7 @@ import { ShareModule } from 'src/app/share/share.module';
7 7
 import { SelectMenuComponent } from 'src/app/components/select-menu/select-menu.component';
8 8
 import { IncidentDicrectOrderModule } from 'src/app/components/incidentManagement/incident-direct-order/incident-direct-order.module';
9 9
 import { QueryRangeModule } from '../new-statistics/components/query-range/query-range.module';
10
+import { KnowledgeLookModule } from 'src/app/components/knowledge-look/knowledge-look.module';
10 11
 
11 12
 @NgModule({
12 13
   declarations: [
@@ -19,6 +20,7 @@ import { QueryRangeModule } from '../new-statistics/components/query-range/query
19 20
     ShareModule,
20 21
 		IncidentDicrectOrderModule,
21 22
     QueryRangeModule,
23
+		KnowledgeLookModule
22 24
   ]
23 25
 })
24 26
 export class MainModule { }

+ 39 - 1
src/app/views/new-statistics/new-statistics.component.ts

@@ -2,6 +2,7 @@ import { Component, OnInit, OnDestroy } from "@angular/core";
2 2
 import { ToolService } from 'src/app/services/tool.service';
3 3
 import { ActivatedRoute, Router } from '@angular/router';
4 4
 import { TabService } from './services/tab.service';
5
+import { NzMessageService } from "ng-zorro-antd/message";
5 6
 import { SimpleReuseStrategy } from 'src/app/SimpleReuseStrategy';
6 7
 @Component({
7 8
   selector: "app-new-statistics",
@@ -12,6 +13,7 @@ export class NewStatisticsComponent implements OnInit, OnDestroy {
12 13
   constructor(
13 14
     public tool: ToolService,
14 15
     public route: ActivatedRoute,
16
+		public msg: NzMessageService,
15 17
     public router: Router,
16 18
     public tabService: TabService,
17 19
   ) {}
@@ -121,7 +123,43 @@ export class NewStatisticsComponent implements OnInit, OnDestroy {
121 123
 
122 124
   // 返回
123 125
   goBack(){
124
-    this.router.navigate(['/main/home']);
126
+		let roleMenus = JSON.parse(localStorage.getItem("user")).menu;
127
+		let sy = false;
128
+		let gglb = false;
129
+		let gzgd = false;
125 130
 		sessionStorage.removeItem('maintenanceData')
131
+		roleMenus.forEach((e) => {
132
+			if (e.link == "home") {
133
+			  sy = true;
134
+			}else if (e.link == "orderManagement") {
135
+		    gglb = true;
136
+		  }else if (e.link == "incidentManagement") {
137
+		    gzgd = true;
138
+		  }
139
+		});
140
+		
141
+		if(!gglb && !gzgd && !sy){
142
+			this.msg.error("暂无权限进入系统!", {
143
+			  nzDuration: 2000,
144
+			});
145
+			return
146
+		}
147
+		if(sy){
148
+			this.router.navigateByUrl("main");
149
+			return
150
+		}else if(gglb){
151
+			this.router.navigateByUrl("/main/orderManagement");
152
+			return
153
+		}else if(gzgd){
154
+			this.router.navigateByUrl("/main/incidentManagement");
155
+			return
156
+		}
157
+		if(gglb && gzgd){
158
+			this.router.navigateByUrl("/main/orderManagement");
159
+		}
160
+		if(!gglb && !gzgd && sy){
161
+			this.router.navigateByUrl("main");
162
+		}
163
+    // this.router.navigate(['/main/home']);
126 164
   }
127 165
 }

+ 2 - 2
src/app/views/users-management/users-management.component.html

@@ -96,8 +96,8 @@
96 96
                 <span *ngIf="coopBtns.look && !checkOptionsOne[0].checked" (click)="detail(data.id)">查看</span>
97 97
                 <span *ngIf="coopBtns.edit || checkOptionsOne[0].checked" (click)="edit(data)">编辑</span>
98 98
 								<span *ngIf="checkOptionsOne[0].checked" (click)="recover(data)">恢复</span>
99
-                <span *ngIf="coopBtns.unlock && data.accountStatus.value==2" (click)="unlock(data,1)">解锁</span>
100
-								<span *ngIf="coopBtns.lock && data.accountStatus.value==1" (click)="unlock(data,2)">锁定</span>
99
+                <span *ngIf="coopBtns.unlock && data.accountStatus && data.accountStatus.value==2" (click)="unlock(data,1)">解锁</span>
100
+								<span *ngIf="(coopBtns.lock && data.accountStatus && data.accountStatus.value==1) || (coopBtns.lock && !data.accountStatus)" (click)="unlock(data,2)">锁定</span>
101 101
 								<span *ngIf="coopBtns.del && !checkOptionsOne[0].checked" (click)="del(data)">删除</span>
102 102
                 <span *ngIf="coopBtns.resetPwd && !checkOptionsOne[0].checked" (click)="resetPwd(data)">重置密码</span>
103 103
               </div>