Browse Source

Merge branch 'master' into develop

seimin 2 weeks ago
parent
commit
c74ff668d2

+ 46 - 2
src/app/components/configurationCenter/configuration-hospital/configuration-hospital.component.html

@@ -5,7 +5,7 @@
5 5
         <div class="contentItem" [title]="item.name" [ngClass]="{ active: item.id === activeDictionaryKey.id }" (click)="clickDictionaryKey(item)" *ngFor="let item of hospitalTabList">{{ item.name }}</div>
6 6
       </overlay-scrollbars>
7 7
     </div>
8
-    <div class="addressAssign" *ngIf="activeDictionaryKey.key=='property'">
8
+    <div class="addressAssign" *ngIf="activeDictionaryKey.key=='asset_consumables'">
9 9
 			<div class="hos-title">{{currentHospital.hosName}}</div>
10 10
       <overlay-scrollbars #osComponentRef2 class="contentBody2">
11 11
         <div class="contentBody">
@@ -52,7 +52,7 @@
52 52
       	</div>
53 53
       </overlay-scrollbars>
54 54
     </div>
55
-		<div class="addressAssign" *ngIf="activeDictionaryKey.key=='evaluate'">
55
+		<div class="addressAssign" *ngIf="activeDictionaryKey.key=='evaluation'">
56 56
 			<div class="hos-title">{{currentHospital.hosName}}</div>
57 57
 		  <overlay-scrollbars #osComponentRef2 class="contentBody2">
58 58
 		    <div class="contentBody">
@@ -106,6 +106,50 @@
106 106
 		  	</div>
107 107
 		  </overlay-scrollbars>
108 108
 		</div>
109
+		<div class="addressAssign" *ngIf="activeDictionaryKey.key=='alarm'">
110
+			<div class="hos-title">{{currentHospital.hosName}}</div>
111
+		  <overlay-scrollbars #osComponentRef2 class="contentBody2">
112
+		    <div class="contentBody">
113
+		      <div class="classList" *ngFor="let item of hospitalList">
114
+						<div class="mar-10" *ngIf="item.value2 == 'alarm' && item.key=='itsmAlarmAutoCreate'">
115
+							<span>{{ item.desc }}:</span>
116
+							<nz-radio-group [(ngModel)]="item.value" (ngModelChange)="radioAutoChange(item)">
117
+							  <label nz-radio nzValue="1">是</label>
118
+							  <label nz-radio nzValue="0">否</label>
119
+							</nz-radio-group>
120
+						</div>
121
+						
122
+						<div class="mar-10" *ngIf="item.value2 == 'alarm' && item.key=='itsmAlarmDefaultCategory' && alarmAutoSwitch">
123
+							<span>{{ item.desc }}:</span>
124
+							<nz-select class="w350px" nzShowSearch nzAllowClear [nzPlaceHolder]="'请选择'+item.desc" [(ngModel)]="item.value" (nzOnSearch)="changeCommonInp('category', $event)">
125
+							  <ng-container *ngFor="let option of malfunctionData">
126
+							    <nz-option *ngIf="!isLoading" [nzLabel]="option.mutiCategory" [nzValue]="option.id"></nz-option>
127
+							  </ng-container>
128
+							  <nz-option *ngIf="isLoading" nzDisabled nzCustomContent>
129
+							    <i nz-icon nzType="loading" class="loading-icon"></i> 搜索中...
130
+							  </nz-option>
131
+							</nz-select>
132
+						</div>
133
+						
134
+						<div class="mar-10" *ngIf="item.value2 == 'alarm' && item.key=='itsmAlarmUrgentRange' && alarmAutoSwitch">
135
+							<span>{{ item.desc }}:</span>
136
+							<nz-select class="w350px" nzShowSearch nzAllowClear nzMode="multiple"
137
+								[nzPlaceHolder]="'请选择'+item.desc" [(ngModel)]="item.value">
138
+							  <ng-container *ngFor="let option of alarmData">
139
+							    <nz-option [nzLabel]="option.name" [nzValue]="option.id"></nz-option>
140
+							  </ng-container>
141
+							</nz-select>
142
+						</div>
143
+		      </div>
144
+					<div class="mar-10 red" *ngIf="alarmAutoSwitch">
145
+						默认获取告警状态为“告警中”进行自动建单
146
+					</div>
147
+		    </div>
148
+		  	<div class="contentBtns">
149
+		  	  <button nz-button nzType="primary" [nzLoading]="btnLoading" (click)="submitMessageForm()">确定</button>
150
+		  	</div>
151
+		  </overlay-scrollbars>
152
+		</div>
109 153
   </div>
110 154
 </div>
111 155
 

+ 3 - 0
src/app/components/configurationCenter/configuration-hospital/configuration-hospital.component.less

@@ -8,6 +8,9 @@
8 8
 	.w220px{
9 9
 		width: 220px;
10 10
 	}
11
+	.w350px{
12
+		width: 350px;
13
+	}
11 14
 	.w100px{
12 15
 			width: 100px !important;
13 16
 		}

+ 80 - 6
src/app/components/configurationCenter/configuration-hospital/configuration-hospital.component.ts

@@ -3,6 +3,8 @@ import { ActivatedRoute } from "@angular/router";
3 3
 import { MainService } from "../../../services/main.service";
4 4
 import { ToolService } from 'src/app/services/tool.service';
5 5
 import { NzMessageService } from 'ng-zorro-antd';
6
+import { Subject } from 'rxjs';
7
+import { debounceTime } from 'rxjs/operators';
6 8
 
7 9
 @Component({
8 10
   selector: "app-configuration-hospital",
@@ -21,12 +23,19 @@ export class ConfigurationHospitalComponent implements OnInit {
21 23
   currentHospital; //当前院区
22 24
 	maintainDept:any=[];
23 25
 	@Input() hospitalTabList: any[] = [];
26
+	changeCommonInpSubject = new Subject();
24 27
 	
25 28
   ngOnInit() {
26 29
 		this.activeDictionaryKey = this.hospitalTabList[0];
27 30
 		this.maintainDept = this.tool.getUserInfoPermission().dutyList
28 31
     this.currentHospital = this.tool.getCurrentHospital();
32
+		this.changeCommonInpSubject.pipe(debounceTime(500)).subscribe((v) => {
33
+		  if(v[0] === 'category'){
34
+		    this.searchApplicationCategory(v[1]);
35
+		  }
36
+		});
29 37
 		this.getDicType();
38
+		this.searchApplicationCategory();
30 39
   }
31 40
 	
32 41
 	activeDictionaryKey:any;
@@ -37,11 +46,16 @@ export class ConfigurationHospitalComponent implements OnInit {
37 46
 	
38 47
 	// 获取评价字典
39 48
 	dicData:any=[];
49
+	alarmData:any = [];
40 50
 	getDicType(){
41 51
 		this.mainService.getDictionary("list", "incident_degree").subscribe((data) => {
42 52
 			this.dicData = data
43 53
 			this.getList();
44 54
 		});
55
+		
56
+		this.mainService.getDictionary("list", "alarm_urgency").subscribe((data) => {
57
+			this.alarmData = data
58
+		});
45 59
 	}
46 60
 	
47 61
 	itsmQuoteOtherDeptWorkHourType:any;
@@ -90,6 +104,42 @@ export class ConfigurationHospitalComponent implements OnInit {
90 104
 		
91 105
 	}
92 106
 	
107
+	// 获取故障现象数据
108
+	isLoading:boolean = false;
109
+	malfunctionData:any = [];
110
+	searchApplicationCategory(keyWord?){
111
+		let postData = {
112
+		  category: {
113
+	      category: keyWord,
114
+	      selectType: "mutlQuery",
115
+		    hierarchy: 3,
116
+		  },
117
+		};
118
+	  this.isLoading = true;
119
+		this.mainService.incidentPost("listIncidentCategory", postData).subscribe(data => {
120
+		  this.isLoading = false;
121
+	    if (data.status == 200) {
122
+	      this.malfunctionData = data.data || [];
123
+	    }
124
+		})
125
+	}
126
+	
127
+	// 是否开启告警自动建单
128
+	alarmAutoSwitch:boolean = false;
129
+	radioAutoChange(data){
130
+		if(data.key=='itsmAlarmAutoCreate' && data.value==1){
131
+			this.alarmAutoSwitch = true
132
+		}else if(data.key=='itsmAlarmAutoCreate' && data.value==0){
133
+			this.alarmAutoSwitch = false
134
+			this.hospitalList[1].value = null
135
+			this.hospitalList[2].value = null
136
+		}
137
+	}
138
+	
139
+	changeCommonInp(type, e) {
140
+	  this.changeCommonInpSubject.next([type, e]);
141
+	}
142
+	
93 143
   // 新增/编辑表单提交
94 144
   btnLoading: boolean = false; //提交按钮loading状态
95 145
   submitMessageForm(): void {
@@ -99,6 +149,11 @@ export class ConfigurationHospitalComponent implements OnInit {
99 149
 				i.value = i.value.join(',')
100 150
 			}
101 151
 		}
152
+		if(this.activeDictionaryKey.key=='alarm'){
153
+			if(this.hospitalList[0].value==1){
154
+				this.hospitalList[2].value = this.hospitalList[2].value.join(',')
155
+			}
156
+		}
102 157
 		setTimeout(_=>{
103 158
 			this.mainService
104 159
 			  .simplePost("addListData", "hospitalConfig", this.hospitalList)
@@ -124,6 +179,7 @@ export class ConfigurationHospitalComponent implements OnInit {
124 179
       hospitalConfig: {
125 180
         hosId: this.currentHospital.id,
126 181
         model: 'itsm',
182
+				value2: this.activeDictionaryKey.key
127 183
       },
128 184
     };
129 185
     this.loading1 = true;
@@ -165,14 +221,18 @@ export class ConfigurationHospitalComponent implements OnInit {
165 221
 							this.itsmQuoteOtherDeptConsumableType = false
166 222
 						}
167 223
 						
168
-						if(i.key=='itsmUserEvaluation' || i.key=='itsmCallbackEvaluation'){
169
-							i.value = Number(i.value)
224
+						if(i.key=='itsmUserEvaluation' || i.key=='itsmCallbackEvaluation' || i.key=='itsmAlarmDefaultCategory'){
225
+							if(i.value){
226
+								i.value = Number(i.value)
227
+							}
170 228
 						}
171 229
 						
172
-						if(i.key=='itsmUserBadEvaluationRange' || i.key=='itsmCallbackBadEvaluationRange'){
173
-							let arr = i.value.split(',')
174
-							arr = arr.map(i=>i = parseInt(i))
175
-							i.value = arr
230
+						if(i.key=='itsmUserBadEvaluationRange' || i.key=='itsmCallbackBadEvaluationRange' || i.key=='itsmAlarmUrgentRange'){
231
+							if(i.value){
232
+								let arr = i.value.split(',')
233
+								arr = arr.map(i=>i = parseInt(i))
234
+								i.value = arr
235
+							}
176 236
 						}
177 237
 						
178 238
 						if(i.key=='itsmSimpleHandle' && i.value==1){
@@ -182,6 +242,20 @@ export class ConfigurationHospitalComponent implements OnInit {
182 242
 							let item = newData.find(i=>i.key == 'itsmWriteSolution')
183 243
 							item.show = true
184 244
 						}
245
+						
246
+						if(i.key=='itsmAlarmAutoCreate' && i.value==1){
247
+							this.alarmAutoSwitch = true
248
+						}else if(i.key=='itsmAlarmAutoCreate' && i.value==0){
249
+							this.alarmAutoSwitch = false 
250
+							let item1 = newData.find(i=>i.key == 'itsmAlarmUrgentRange')
251
+							if(item1.value){
252
+								item1.value = null
253
+							}
254
+							let item2 = newData.find(i=>i.key == 'itsmAlarmDefaultCategory')
255
+							if(item2.value){
256
+								item2.value = null
257
+							}
258
+						}
185 259
 					}
186 260
 
187 261
           this.hospitalList = newData || [];

+ 2 - 1
src/app/share/edit-inspect-info2/edit-inspect-info2.component.ts

@@ -57,6 +57,7 @@ export class EditInspectInfo2Component implements OnInit {
57 57
     if(this.patient){
58 58
       this.inspectData.patientId = this.patient.id;
59 59
       this.patientList = [this.patient];
60
+      this.patientDTO = this.patient;
60 61
     }
61 62
 
62 63
     if(this.date){
@@ -193,7 +194,7 @@ export class EditInspectInfo2Component implements OnInit {
193 194
     }
194 195
     this.submitFormHand.emit({
195 196
       applyDeptId: this.inspectData.applyDeptId,
196
-      patientDTO: this.patientList.find(v => v.id == this.inspectData.patientId),
197
+      patientDTO: this.patientDTO,
197 198
       deptId: this.deptId,
198 199
       remark: this.remark,
199 200
       date: format(this.yyDate, 'yyyy-MM-dd') + ' ' + format(startOfMinute(this.yyTime), 'HH:mm:ss'),

+ 12 - 2
src/app/views/emergency-info/emergency-info.component.html

@@ -93,7 +93,7 @@
93 93
             <td>{{ data.alarmId || '-' }}</td>
94 94
             <td>{{ data.alarmSource || '-' }}</td>
95 95
             <td>{{ data.alarmContent || '-' }}</td>
96
-            <td>{{ data.alarmStatus?.name }}</td>
96
+            <td [ngClass]="{'red': data.alarmStatus?.value == 1, 'yellow ': data.alarmStatus?.value == 2, 'green ': data.alarmStatus?.value == 4}">{{ data.alarmStatus?.name }}</td>
97 97
 						<td>{{ data.alarmIp || '-' }}</td>
98 98
 						<td>{{ data.alarmUrgency?.name }}</td>
99 99
 						<td>{{ data.alarmActiveTime | date:'yyyy-MM-dd HH:mm:ss'}}</td>
@@ -101,7 +101,8 @@
101 101
             <td>
102 102
               <div class="coop">
103 103
                 <span *ngIf="coopBtns.view" (click)="look(data)">查看</span>
104
-                <span *ngIf="coopBtns.add && !data.incidentSign" (click)="addOrder(data)">建单</span>
104
+                <span *ngIf="coopBtns.send && data.alarmStatus.value == 1" (click)="send(data)">消息发送</span>
105
+								<span *ngIf="coopBtns.add && (data.alarmStatus.value == 1 || data.alarmStatus.value == 3)" (click)="addOrder(data)">建单</span>
105 106
               </div>
106 107
             </td>
107 108
           </tr>
@@ -213,6 +214,15 @@
213 214
  [btnLoading]="btnLoading" (confirmDelEvent)="confirmOpt()" 
214 215
  [content]="infoContent"></app-dialog-delete>
215 216
 
217
+<!-- 发送模态框 -->
218
+<app-dialog-delete
219
+  [delModal]="sendModal"
220
+  (hideDelModalEvent)="hideSendModal()"
221
+  [btnLoading]="btnLoading"
222
+  (confirmDelEvent)="confirmSend()"
223
+  [content]="tipsMsg2"
224
+></app-dialog-delete>
225
+
216 226
 <!-- 操作成功/失败提示框 -->
217 227
 <app-prompt-modal *ngIf="promptModalShow" [content]="promptContent" [success]="ifSuccess" [show]="promptModalShow" [info]="promptInfo"></app-prompt-modal>
218 228
 

+ 13 - 0
src/app/views/emergency-info/emergency-info.component.less

@@ -6,6 +6,19 @@
6 6
 	cursor: pointer;
7 7
 	text-decoration: underline;
8 8
 }
9
+
10
+.red{
11
+	color: red !important;
12
+}
13
+
14
+.yellow{
15
+	color: #ffaa00 !important;
16
+}
17
+
18
+.green{
19
+	color: #49b586 !important;
20
+}
21
+
9 22
 .save {
10 23
   position: fixed;
11 24
   left: 0;

+ 47 - 2
src/app/views/emergency-info/emergency-info.component.ts

@@ -9,6 +9,7 @@ import { debounceTime } from "rxjs/operators";
9 9
 import { EmergencyInfoService } from './emergency-info.service';
10 10
 import { format, startOfDay, endOfDay } from 'date-fns';
11 11
 import { NzMessageService } from "ng-zorro-antd";
12
+import { MainService } from 'src/app/services/main.service';
12 13
 
13 14
 @Component({
14 15
   selector: "app-emergency-info",
@@ -28,6 +29,7 @@ export class EmergencyInfoComponent implements OnInit {
28 29
 		private router: Router,
29 30
     private tool: ToolService,
30 31
     private quickOrderAcceptanceService: EmergencyInfoService,
32
+		private mainService: MainService,
31 33
   ) {}
32 34
 
33 35
   listOfData: any[] = []; //表格数据
@@ -154,8 +156,8 @@ export class EmergencyInfoComponent implements OnInit {
154 156
     let data = {
155 157
       pageIndex: this.pageIndex,
156 158
       pageSize: this.pageSize,
157
-      hosId: this.hosId,
158 159
 			alarm:{
160
+				hosId: this.hosId,
159 161
 				alarmStatus:{
160 162
 					id:this.alarmStatus
161 163
 				},
@@ -274,6 +276,7 @@ export class EmergencyInfoComponent implements OnInit {
274 276
         this.btnLoading = false;
275 277
         this.hideModal();
276 278
         this.initForm();
279
+				this.operateType = 'no'
277 280
         if (data.status == 200) {
278 281
           this.showPromptModal(this.add ? "新增" : "编辑", true, "");
279 282
         } else {
@@ -293,6 +296,7 @@ export class EmergencyInfoComponent implements OnInit {
293 296
         this.btnLoading = false;
294 297
         this.hideModal();
295 298
         this.initForm();
299
+				this.operateType = 'no'
296 300
         if (data.status == 200) {
297 301
           this.showPromptModal(this.add ? "新增" : "编辑", true, "");
298 302
         } else {
@@ -338,6 +342,7 @@ export class EmergencyInfoComponent implements OnInit {
338 342
 	  .subscribe((data) => {
339 343
 	    this.btnLoading = false;
340 344
 	    this.hideOptModal();
345
+			this.operateType = 'no'
341 346
 	    if (data.status == 200) {
342 347
 	      this.showPromptModal("操作", true, "");
343 348
 	    } else {
@@ -351,6 +356,42 @@ export class EmergencyInfoComponent implements OnInit {
351 356
 	  this.optModal = false;
352 357
 	}
353 358
 	
359
+	// 消息发送
360
+	sendModal:boolean = false;
361
+	tipsMsg2:any = '您确定要发送消息吗?';
362
+	send(data){
363
+		this.itemData = data;
364
+		this.sendModal = true;
365
+	}
366
+	
367
+	hideSendModal(){
368
+		this.sendModal = false;
369
+	}
370
+	
371
+	// 确定发送消息
372
+	operateType:any;
373
+	confirmSend(){
374
+		let data = {
375
+			alarm:{
376
+				operationType: 'sendMsg',
377
+				id: this.itemData.id,
378
+			}
379
+		};
380
+		this.btnLoading = true;
381
+		this.mainService
382
+		  .dataPost("updData", "alarm", data)
383
+		  .subscribe((data) => {
384
+		    this.btnLoading = false;
385
+				this.sendModal = false;
386
+		    if (data.status == 200) {
387
+					this.operateType = 'send'
388
+		      this.showPromptModal("操作", true, "");
389
+		    } else {
390
+		      this.showPromptModal("操作", false, data.msg);
391
+		    }
392
+		  });
393
+	}
394
+	
354 395
 	// 建单
355 396
 	addOrder(data){
356 397
 		this.tool.triggerEvent({
@@ -460,7 +501,11 @@ export class EmergencyInfoComponent implements OnInit {
460 501
     setTimeout(() => {
461 502
       this.promptModalShow = true;
462 503
     }, 100);
463
-    this.getList(true);
504
+		if(this.operateType = 'send'){
505
+			this.getList();
506
+		}else{
507
+			this.getList(true);
508
+		}
464 509
   }
465 510
 
466 511
   // 边输边搜节流阀

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

@@ -3601,7 +3601,8 @@ export class FuwutaiComponent implements OnInit {
3601 3601
       idx: 0,
3602 3602
       sum: 20,
3603 3603
       user: {
3604
-        hospital: this.isRelatedDepartment ? undefined : { id: this.incidentModel.hosId },
3604
+				statisticalHosId: this.isRelatedDepartment ? undefined :  this.incidentModel.hosId,
3605
+        // hospital: this.isRelatedDepartment ? undefined : { id: this.incidentModel.hosId },
3605 3606
         dept: this.isRelatedDepartment ? { id: this.incidentModel.department } : undefined,
3606 3607
         name: keyWord,
3607 3608
 				// phone: this.incidentModel.incomingPhone || undefined

+ 3 - 2
src/app/views/incident-config/incident-config.component.ts

@@ -36,8 +36,9 @@ export class IncidentConfigComponent implements OnInit, AfterViewInit {
36 36
 
37 37
   // 院区配置
38 38
   hospitalTabList:any[] = [
39
-    { id: 1, name: '资产及耗材', key: "property"},
40
-    { id: 2, name: '评价', key: "evaluate"}
39
+    { id: 1, name: '资产及耗材', key: "asset_consumables"},
40
+    { id: 2, name: '评价', key: "evaluation"},
41
+		{ id: 3, name: '告警自动建单', key: "alarm"},
41 42
   ]
42 43
 	
43 44
 	// 自动建单

+ 6 - 0
src/app/views/main/main-routing.module.ts

@@ -677,7 +677,13 @@ const routes: Routes = [
677 677
 			{
678 678
 			  path: "commonInfo",
679 679
 			  loadChildren: () => import("../common-info/common-info.module").then((m) => m.CommonInfoModule),
680
+			},
681
+			// 系统运行配置-工作日志
682
+			{
683
+			  path: "workLog",
684
+			  loadChildren: () => import("../work-log/work-log.module").then((m) => m.WorkLogModule),
680 685
 			}
686
+			
681 687
     ],
682 688
   },
683 689
 ];

+ 2 - 1
src/app/views/main/main.component.ts

@@ -1261,7 +1261,8 @@ export class MainComponent implements OnInit, OnDestroy {
1261 1261
 	    idx: 0,
1262 1262
 	    sum: 20,
1263 1263
 	    user: {
1264
-	      hospital: this.isRelatedDepartment ? undefined : { id: this.incidentModel.hosId },
1264
+				statisticalHosId: this.isRelatedDepartment ? undefined :  this.incidentModel.hosId,
1265
+	      // hospital: this.isRelatedDepartment ? undefined : { id: this.incidentModel.hosId },
1265 1266
 	      dept: this.isRelatedDepartment ? { id: this.incidentModel.department } : undefined,
1266 1267
 	      name: keyWord,
1267 1268
 	      // simpleQuery: true,

+ 14 - 0
src/app/views/work-log/work-log-routing.module.ts

@@ -0,0 +1,14 @@
1
+import { NgModule } from '@angular/core';
2
+import { Routes, RouterModule } from '@angular/router';
3
+import { WorkLogComponent } from './work-log.component';
4
+
5
+
6
+const routes: Routes = [
7
+  { path: '', component: WorkLogComponent }
8
+];
9
+
10
+@NgModule({
11
+  imports: [RouterModule.forChild(routes)],
12
+  exports: [RouterModule]
13
+})
14
+export class WorkLogRoutingModule { }

+ 70 - 0
src/app/views/work-log/work-log.component.html

@@ -0,0 +1,70 @@
1
+<div class="list-template">
2
+  <div class="list-template__content">
3
+   <div class="list-template__top" nz-row>
4
+      <div nz-col nzXl='17' class="list-template__searchBox">
5
+        <div class="list-template__searchItem">
6
+          <span class="label">操作时间</span>:
7
+          <nz-range-picker nzShowTime [(ngModel)]="dateRange" (nzOnCalendarChange)="onCalendarChangeDate($event)" (ngModelChange)="changeDate($event)"></nz-range-picker>
8
+        </div>
9
+        <div class="list-template__searchItem">
10
+          <span class="label">操作人</span>:
11
+          <nz-select class="formItem" [nzDropdownMatchSelectWidth]="false" nzServerSearch nzShowSearch
12
+            (nzOnSearch)="changeUser($event)" nzAllowClear nzPlaceHolder="请选择操作人" [(ngModel)]="operationUser">
13
+            <ng-container *ngFor="let option of allWorker">
14
+              <nz-option *ngIf="!isLoading" [nzLabel]="option.name" [nzValue]="option.id"></nz-option>
15
+            </ng-container>
16
+            <nz-option *ngIf="isLoading" nzDisabled nzCustomContent>
17
+              <i nz-icon nzType="loading" class="loading-icon"></i> 搜索中...
18
+            </nz-option>
19
+          </nz-select>
20
+        </div>
21
+				<div class="list-template__searchItem">
22
+				  <span class="label">类型</span>:
23
+				  <nz-select class="formItem" [nzDropdownMatchSelectWidth]="false" nzShowSearch
24
+				    nzAllowClear nzPlaceHolder="请选择类型" [(ngModel)]="logType">
25
+				    <ng-container *ngFor="let option of typeData">
26
+				      <nz-option *ngIf="!isLoading" [nzLabel]="option.name" [nzValue]="option.id"></nz-option>
27
+				    </ng-container>
28
+				  </nz-select>
29
+				</div>
30
+      </div>
31
+      <div nz-col nzLg="7" class="list-template__btns">
32
+        <button nz-button class="btn default ml8" (click)='search()'>搜索</button>
33
+        <button nz-button class="btn default ml8" (click)='reset()'>重置</button>
34
+      </div>
35
+    </div>
36
+    <div class="list-template__bottom">
37
+      <nz-table class="list-template__nzTable" [nzData]="listOfData" nzSize="middle" [nzShowPagination]="false"
38
+        [nzLoading]="loading1">
39
+        <thead>
40
+          <tr class="thead">
41
+            <th nzWidth="20%">操作人</th>
42
+            <th nzWidth="20%">类型</th>
43
+            <th nzWidth="20%">动作</th>
44
+            <th nzWidth="20%">备注</th>
45
+            <th nzWidth="20%">操作时间</th>
46
+          </tr>
47
+        </thead>
48
+        <tbody>
49
+          <tr *ngFor="let data of listOfData;let i = index">
50
+            <td>{{data.operationUserDTO?.name}}</td>
51
+            <td>{{data.logType?.name}}</td>
52
+            <td>{{data.operationType?.name}}</td>
53
+            <td>{{data.logRemarks}}</td>
54
+            <td>{{data.operationTime | date: "yyyy-MM-dd HH:mm:ss"}}</td>
55
+          </tr>
56
+        </tbody>
57
+      </nz-table>
58
+      <div class="list-template__pagination">
59
+        <nz-pagination [(nzPageIndex)]="pageIndex" [(nzTotal)]="listLength" [(nzPageSize)]="pageSize" nzShowSizeChanger
60
+          (nzPageIndexChange)="getList(0)" (nzPageSizeChange)="getList(0)">
61
+        </nz-pagination>
62
+      </div>
63
+    </div>
64
+  </div>
65
+</div>
66
+
67
+<!-- 操作成功/失败提示框 -->
68
+<app-prompt-modal *ngIf="promptModalShow" [content]="promptContent" [success]="ifSuccess" [show]="promptModalShow"
69
+  [info]="promptInfo">
70
+</app-prompt-modal>

+ 293 - 0
src/app/views/work-log/work-log.component.less

@@ -0,0 +1,293 @@
1
+@import "../../../../src/theme.less";
2
+
3
+:host {
4
+  // ::ng-deep .ant-calendar-picker {
5
+  //   width: 100% !important;
6
+  // }
7
+  .list-template__top{
8
+    overflow: visible!important;
9
+  }
10
+}
11
+.save {
12
+  position: fixed;
13
+  left: 0;
14
+  top: 0;
15
+  width: 100%;
16
+  height: 100%;
17
+  background: rgba(0, 0, 0, 0.4);
18
+  z-index: 99;
19
+
20
+  .modalBody {
21
+    width: 350px;
22
+    background: #fff;
23
+    border-radius: 5px;
24
+    padding: 10px 20px;
25
+    color: #333;
26
+
27
+    .title {
28
+      width: 100%;
29
+      text-align: center;
30
+      font-size: 18px;
31
+      position: relative;
32
+
33
+      i {
34
+        position: absolute;
35
+        right: 0;
36
+        top: 0;
37
+        font-size: 20px;
38
+        color: #666;
39
+        cursor: pointer;
40
+        padding: 0 5px;
41
+      }
42
+    }
43
+
44
+    .content {
45
+      width: 310px;
46
+      background: #f9fafb;
47
+      border: 1px solid #e5e9ed;
48
+      border-radius: 5px;
49
+      overflow: hidden;
50
+      margin-top: 12px;
51
+      padding: 16px 0;
52
+
53
+      .busyList{
54
+        display: flex;
55
+        margin-bottom: 8px;
56
+        .busyContent{
57
+          margin-right: 8px;
58
+          flex: 1;
59
+        }
60
+      }
61
+
62
+      & > div {
63
+        text-align: center;
64
+        margin: 0;
65
+
66
+        &.icon {
67
+          // margin-top: 17px;
68
+
69
+          i {
70
+            color: #34b349;
71
+            font-size: 30px !important;
72
+
73
+            &.transport-wenhao {
74
+              color: #f5a523;
75
+            }
76
+
77
+            &.transport-shibai {
78
+              color: #ff3a52;
79
+            }
80
+          }
81
+        }
82
+
83
+        &.defeat {
84
+          color: #333;
85
+          font-size: 14px;
86
+        }
87
+
88
+        &:nth-child(3) {
89
+          font-size: 14px;
90
+          color: #666;
91
+        }
92
+      }
93
+      .workAssignmentTips {
94
+        font-size: 12px;
95
+      }
96
+    }
97
+
98
+    button {
99
+      margin-top: 10px;
100
+
101
+      &.btn {
102
+        margin-left: 8px;
103
+      }
104
+    }
105
+  }
106
+
107
+  // 新增
108
+  &.add {
109
+    .modalBody {
110
+      width: 480px;
111
+      height: auto;
112
+
113
+      .content {
114
+        width: 100%;
115
+        height: auto;
116
+        padding: 16px;
117
+        max-height: 497px;
118
+        overflow-y: auto;
119
+
120
+        .addForm {
121
+          .ant-form-item {
122
+            margin-bottom: 0;
123
+
124
+            .ant-form-item-label {
125
+              text-align: left;
126
+            }
127
+
128
+            .desc {
129
+              margin-top: 5px;
130
+            }
131
+          }
132
+
133
+          .datesControl {
134
+            margin-top: -16px;
135
+
136
+            .ant-form-item-label {
137
+              line-height: 40px;
138
+            }
139
+          }
140
+
141
+          .timer {
142
+            .ant-form-item-label {
143
+              width: 100%;
144
+              text-align: left;
145
+            }
146
+
147
+            .numInp {
148
+              margin-right: 5px;
149
+            }
150
+
151
+            .line {
152
+              margin-right: 5px;
153
+            }
154
+          }
155
+
156
+          .timer2 {
157
+            .ant-form-item-label {
158
+              line-height: 20px;
159
+            }
160
+          }
161
+        }
162
+
163
+        .editForm {
164
+          .ant-form-item {
165
+            margin-bottom: 15px;
166
+
167
+            .ant-form-item-label {
168
+              line-height: 14px;
169
+              text-align: left;
170
+            }
171
+          }
172
+        }
173
+      }
174
+    }
175
+		
176
+		.modalLogBody {
177
+		  width: 80%;
178
+		  height: auto;
179
+		
180
+		  .content {
181
+		    width: 100%;
182
+		    height: auto;
183
+		    padding: 19px 14px 0 14px;
184
+		    max-height: 500px;
185
+		    overflow-y: auto;
186
+				
187
+				.list-template__bottom {
188
+				  background: #f9fafb;
189
+				  border: 1px solid #e5e9ed;
190
+				  border-radius: 8px;
191
+				  // padding-bottom: 56px;
192
+				  position: relative;
193
+				  .list-template__nzTable {
194
+				    padding: 16px 16px 0;
195
+				
196
+				    .thead {
197
+				      background-image: linear-gradient(to right, @bg-start, @bg-end);
198
+				
199
+				      th {
200
+				        background: transparent;
201
+				        color: #fff;
202
+				        text-align: center;
203
+				      }
204
+				    }
205
+				
206
+				    .ant-table-body {
207
+				      border-bottom: 1px solid #e5e9ed;
208
+				    }
209
+				
210
+				    .ant-table-tbody {
211
+				      tr {
212
+				        text-align: center;
213
+				        color: #333;
214
+				
215
+				        td {
216
+				          border: none;
217
+				
218
+				          &.tab_hover:hover{
219
+				            text-decoration: underline;
220
+				            cursor: pointer;
221
+				          }
222
+				
223
+				          .coop {
224
+				            button{
225
+				              color: #333;
226
+				            }
227
+				            span,button {
228
+				              display: inline-block;
229
+				              padding: 0 8px;
230
+				              cursor: pointer;
231
+				              position: relative;
232
+				
233
+				              &::after {
234
+				                content: "|";
235
+				                position: absolute;
236
+				                top: 0;
237
+				                right: 0;
238
+				              }
239
+				
240
+				              &:hover,
241
+				              &:active {
242
+				                color: @primary-color;
243
+				              }
244
+				
245
+				              &:nth-last-child(1) {
246
+				                &::after {
247
+				                  content: "";
248
+				                }
249
+				              }
250
+				            }
251
+				          }
252
+				        }
253
+				      }
254
+				    }
255
+				  }
256
+				}
257
+									
258
+		    .addForm {
259
+		      .ant-form-item {
260
+		        margin-bottom: 14px;
261
+		
262
+		        .ant-form-item-label {
263
+		          line-height: 14px;
264
+		          text-align: left;
265
+		        }
266
+		      }
267
+		    }
268
+		
269
+		    .editForm {
270
+		      .ant-form-item {
271
+		        margin-bottom: 14px;
272
+		
273
+		        .ant-form-item-label {
274
+		          line-height: 0;
275
+		          text-align: left;
276
+		        }
277
+		      }
278
+		    }
279
+				.list-template__pagination {
280
+					text-align: right;
281
+					padding: 20px 0;
282
+				}
283
+		  }
284
+			
285
+			
286
+		  button {
287
+		    &:nth-child(1) {
288
+		      margin-right: 20px;
289
+		    }
290
+		  }
291
+		}
292
+  }
293
+}

+ 196 - 0
src/app/views/work-log/work-log.component.ts

@@ -0,0 +1,196 @@
1
+import { Component, OnInit } from "@angular/core";
2
+import { ActivatedRoute, Router } from "@angular/router";
3
+import { FormBuilder, Validators, FormGroup } from "@angular/forms";
4
+
5
+import { MainService } from "../../services/main.service";
6
+import { ToolService } from "../../services/tool.service";
7
+import { NzMessageService } from 'ng-zorro-antd';
8
+import { Subject } from 'rxjs';
9
+import { debounceTime } from 'rxjs/operators';
10
+import { format } from 'date-fns';
11
+
12
+@Component({
13
+  selector: "app-work-log",
14
+  templateUrl: "./work-log.component.html",
15
+  styleUrls: ["./work-log.component.less"],
16
+})
17
+export class WorkLogComponent implements OnInit {
18
+  constructor(
19
+    private fb: FormBuilder,
20
+    private mainService: MainService,
21
+    private route: ActivatedRoute,
22
+    private router: Router,
23
+    private tool: ToolService,
24
+    private message: NzMessageService,
25
+  ) {}
26
+
27
+  listOfData: any[] = []; //表格数据
28
+  pageIndex: number = 1; //表格当前页码
29
+  pageSize: number = 10; //表格每页展示条数
30
+  listLength: number = 10; //表格总数据量
31
+  modal: boolean = false; //新增/编辑模态框
32
+  add: boolean; //true:新增;false:编辑
33
+  validateForm: FormGroup; //新增/编辑表单
34
+  coopData: any; //当前操作列
35
+  currentHospital; //当前院区
36
+
37
+  btnLoading: boolean = false; //提交按钮loading状态
38
+
39
+  promptContent: string; //操作提示框提示信息
40
+  ifSuccess: boolean; //操作成功/失败
41
+  promptInfo: string; //操作结果提示信息
42
+  promptModalShow: boolean; //操作提示框是否展示
43
+  nextSchemeName = ""; //下一个开启的方案名称
44
+  modelName = ""; //模态框名称
45
+
46
+  changeInpSubject = new Subject(); //防抖
47
+  showDropdown:boolean = false;
48
+
49
+  ngOnInit() {
50
+    this.currentHospital = this.tool.getCurrentHospital();
51
+		this.changeInpSubject.pipe(debounceTime(500)).subscribe((v) => {
52
+		  let fun = v[0];
53
+		  fun.call(this, v[1], v[2]);
54
+		});
55
+		this.getAllWorker();
56
+		this.getTypeData();
57
+    this.getList(1);
58
+  }
59
+	
60
+	// 日期选择
61
+	startDate: string; //发起时间开始
62
+	endDate: string; //发起时间结束
63
+	changeDate(result?): void {
64
+	  if (!result) {
65
+	    this.startDate = this.endDate = "";
66
+	    return;
67
+	  }
68
+	  this.startDate = format(result[0], 'yyyy-MM-dd HH:mm:ss');
69
+	  this.endDate = format(result[1], 'yyyy-MM-dd HH:mm:ss');
70
+	}
71
+	
72
+	// 选择时间
73
+	dateRange:any = [];
74
+	onCalendarChangeDate(dateArr){
75
+	  if(dateArr.length == 2){
76
+	    let dateStart = new Date(dateArr[0]);
77
+	    let dateEnd = new Date(dateArr[1]);
78
+	    dateStart.setHours(0,0,0);
79
+	    dateEnd.setHours(23,59,59);
80
+	    this.dateRange = [dateStart,dateEnd];
81
+	  }
82
+	}
83
+	
84
+	// 获取类型
85
+	typeData:any = [];
86
+	logType:any;
87
+	getTypeData(){
88
+		this.mainService.getDictionary("list", "work_log_type").subscribe((res) => {
89
+			this.typeData = res
90
+		});
91
+	}
92
+	
93
+	// 获取操作人
94
+	operationUser:any;
95
+	allWorker:any = [];
96
+	getAllWorker(e?, those?) {
97
+	  let that = those || this;
98
+	  let postData = {
99
+	    user: {
100
+	      name: e || "",
101
+	      hospital: { id: that.currentHospital.id },
102
+	    },
103
+	    idx: 0,
104
+	    sum: 20,
105
+	  };
106
+	  that.isLoading = true;
107
+	  that.mainService
108
+	    .getFetchDataList("data", "user", postData)
109
+	    .subscribe((data) => {
110
+	      that.allWorker = data.list;
111
+	      that.isLoading = false;
112
+	    });
113
+	}
114
+	
115
+	// 用户输入搜索配送人员
116
+	changeUser(e) {
117
+	  this.searchTimer(this.getAllWorker, e);
118
+	}
119
+	
120
+	// 边输入边搜索节流阀
121
+	isLoading:boolean = false;
122
+	searchTimer(fun, e) {
123
+	  this.isLoading = true;
124
+	  this.changeInpSubject.next([fun, e]);
125
+	}
126
+	
127
+  // 表格数据
128
+  searchDto: any = {};
129
+  productDto:any = {};
130
+  loading1 = false;
131
+  getList(type) {
132
+    if (type == 1) {
133
+      this.pageIndex = 1;
134
+    }
135
+    let data = {
136
+      idx: this.pageIndex - 1,
137
+      sum: this.pageSize,
138
+      baseWorkLog: {
139
+				hosId: this.currentHospital.id,
140
+        startTime: this.startDate || undefined,
141
+    		endTime: this.endDate || undefined,
142
+    		operationUser: this.operationUser || undefined,
143
+    		logType:{
144
+    			id: this.logType
145
+    		}
146
+      },
147
+    };
148
+    
149
+    if(this.logType){
150
+    	data.baseWorkLog.logType.id = this.logType
151
+    }else{
152
+    	delete data.baseWorkLog.logType 
153
+    }
154
+    this.loading1 = true;
155
+    this.mainService
156
+      .getFetchDataList("simple/data", "baseWorkLog", data)
157
+      .subscribe((data) => {
158
+        this.loading1 = false;
159
+        if (data.status == 200) {
160
+          this.listOfData = data.list;
161
+          this.listLength = data.totalNum;
162
+        }else{
163
+          this.message.error(data.msg || "请求数据失败");
164
+        }
165
+      });
166
+  }
167
+	
168
+	// 搜索
169
+	search() {
170
+	  this.pageIndex = 1;
171
+	  this.getList(1);
172
+	}
173
+	
174
+	// 重置
175
+	reset() {
176
+	  this.pageIndex = 1;
177
+	  this.logType = null;
178
+	  this.dateRange = [];
179
+		this.startDate = null;
180
+		this.endDate = null;
181
+	  this.operationUser = null;
182
+	  this.getList(1);
183
+	}
184
+	
185
+  // 展示信息提示框(con:提示信息,success:操作是否成功,promptInfo:操作结果提示信息)
186
+  showPromptModal(con, success, promptInfo?) {
187
+    this.promptModalShow = false;
188
+    this.promptContent = con;
189
+    this.ifSuccess = success;
190
+    this.promptInfo = promptInfo;
191
+    setTimeout(() => {
192
+      this.promptModalShow = true;
193
+    }, 100);
194
+    this.getList(0);
195
+  }
196
+}

+ 19 - 0
src/app/views/work-log/work-log.module.ts

@@ -0,0 +1,19 @@
1
+import { NgModule } from '@angular/core';
2
+import { CommonModule } from '@angular/common';
3
+
4
+import { WorkLogRoutingModule } from './work-log-routing.module';
5
+import { WorkLogComponent } from './work-log.component';
6
+import { ShareModule } from 'src/app/share/share.module';
7
+
8
+
9
+@NgModule({
10
+  declarations: [
11
+    WorkLogComponent
12
+  ],
13
+  imports: [
14
+    CommonModule,
15
+    WorkLogRoutingModule,
16
+    ShareModule
17
+  ]
18
+})
19
+export class WorkLogModule { }