Browse Source

标本打印优化

maotao 4 months ago
parent
commit
bfd66f0ff0

+ 3 - 2
src/app/app-routing.module.ts

@@ -23,7 +23,8 @@ import { IncidentConfigGuard } from './guard/IncidentConfig.guard';
23
 import { OtherConfigGuard } from './guard/OtherConfig.guard';
23
 import { OtherConfigGuard } from './guard/OtherConfig.guard';
24
 //业务页面控制查看权限
24
 //业务页面控制查看权限
25
 import { PageConfigGuard } from './guard/PageConfig.guard';
25
 import { PageConfigGuard } from './guard/PageConfig.guard';
26
-
26
+//系统配置查看权限
27
+import { SystemConfigGuard } from './guard/SystemConfig.guard';
27
 const routes: Routes = [
28
 const routes: Routes = [
28
   // 默认
29
   // 默认
29
   {
30
   {
@@ -116,7 +117,7 @@ const routes: Routes = [
116
 	{
117
 	{
117
 	  path: 'systemConfig',
118
 	  path: 'systemConfig',
118
 	  loadChildren: () => import('./views/system-config/system-config.module').then(m => m.SystemConfigModule),
119
 	  loadChildren: () => import('./views/system-config/system-config.module').then(m => m.SystemConfigModule),
119
-	  canActivate: [PageConfigGuard]
120
+	  canActivate: [SystemConfigGuard]
120
 	},
121
 	},
121
   // 业务页面控制查看
122
   // 业务页面控制查看
122
   {
123
   {

+ 22 - 0
src/app/guard/SystemConfig.guard.ts

@@ -0,0 +1,22 @@
1
+import { Injectable } from '@angular/core';
2
+import { CanActivate, Router } from '@angular/router';
3
+
4
+@Injectable({
5
+  providedIn: 'root'
6
+})
7
+export class SystemConfigGuard implements CanActivate  {
8
+  constructor(public router: Router) { }
9
+
10
+  canActivate(): boolean {
11
+    const menus = JSON.parse(localStorage.getItem('menu'));
12
+    let can = false;
13
+    if (menus) {
14
+      can = menus.some(e => e.link == 'systemConfig');
15
+    }
16
+    if (!can) {
17
+      this.router.navigate(['login']);
18
+      return false
19
+    }
20
+    return true;
21
+  }
22
+}

+ 3 - 46
src/app/share/pathology-add/pathology-add.component.html

@@ -281,7 +281,7 @@
281
   <!-- 打印 -->
281
   <!-- 打印 -->
282
   <div id="report" style="display: none;">
282
   <div id="report" style="display: none;">
283
 		<div class="monad">
283
 		<div class="monad">
284
-			<div *ngIf="printData && printData.specimenList && printData.specimenList.length>1 && operation != 'addPrint'" style="border: 1px solid #AAAAAA;
284
+			<div *ngIf="printData && printData.specimenList && printData.specimenList.length" style="border: 1px solid #AAAAAA;
285
 				border-radius: 5px;font-size: 12px;">
285
 				border-radius: 5px;font-size: 12px;">
286
 				 <div style="display: flex;align-items: center;flex-wrap: nowrap;height: 80px;padding: 0 1px;">
286
 				 <div style="display: flex;align-items: center;flex-wrap: nowrap;height: 80px;padding: 0 1px;">
287
 					 <div style="width: 60%;height: 70px;text-align: center;">
287
 					 <div style="width: 60%;height: 70px;text-align: center;">
@@ -325,51 +325,8 @@
325
 				</div>
325
 				</div>
326
 			</div>
326
 			</div>
327
 			
327
 			
328
-			<div *ngIf="printData && printData.specimenList && printData.specimenList.length>0 && operation == 'addPrint'" style="border: 1px solid #AAAAAA;
329
-				border-radius: 5px;font-size: 12px;">
330
-				 <div style="display: flex;align-items: center;flex-wrap: nowrap;height: 80px;padding: 0 1px;">
331
-					 <div style="width: 60%;height: 70px;text-align: center;">
332
-						 <img style="max-width: 90%;height: 80%;" [src]="printData.applyBarCode" alt="">
333
-						 <div>{{printData.applyCode}}</div>
334
-					 </div>
335
-					 <div style="width: 40%;height: 100%;text-align: center;display: flex;align-items: center;">
336
-						 <img style="max-width: 100%;max-height: 100%;" [src]="tool.logoUrl" alt="">
337
-					 </div>
338
-				 </div>
339
-				<div style="display: flex;border-bottom: 1px solid #AAAAAA;">
340
-					<div style="width:20%;border-right: 1px solid #AAAAAA;border-top: 1px solid #aaa;padding:1px;">患者姓名</div>
341
-					<div style="width:50%;border-right: 1px solid #AAAAAA;border-top: 1px solid #aaa;padding:1px;">{{printData.patientName}}</div>
342
-					<div style="width:14%;border-right: 1px solid #AAAAAA;border-top: 1px solid #aaa;padding:1px;">性别</div>
343
-					<div style="width:16%;padding:1px;border-top: 1px solid #aaa;">{{printData.specimenList[0].patientGender}}</div>
344
-				</div>
345
-				<div style="display: flex;border-bottom: 1px solid #AAAAAA;">
346
-					<div style="width:20%;border-right: 1px solid #AAAAAA;padding:1px;">住院号</div>
347
-					<div style="width:50%;border-right: 1px solid #AAAAAA;padding:1px;">{{printData.residenceNo}}</div>
348
-					<div style="width:14%;border-right: 1px solid #AAAAAA;padding:1px;">年龄</div>
349
-					<div style="width:16%;padding:1px;"> {{printData.patientAge}}岁</div>
350
-				</div>
351
-				<div style="display: flex;border-bottom: 1px solid #AAAAAA;">
352
-					<div style="width:20%;border-right: 1px solid #AAAAAA;padding:1px;">科室 </div>
353
-					<div style="width:50%;border-right: 1px solid #AAAAAA;
354
-					padding:1px;overflow: hidden;white-space: nowrap">{{printData.patientDept}}</div>
355
-					<div style="width:14%;border-right: 1px solid #AAAAAA;padding:1px;">床号</div>
356
-					<div style="width:16%;padding:1px;">{{printData.patientBedNum}}床</div>
357
-				</div>
358
-				<div style="display: flex;border-bottom: 1px solid #AAAAAA;">
359
-					<div style="width:20%;border-right: 1px solid #AAAAAA;padding:1px;">部位 </div>
360
-					<div style="width:50%;border-right: 1px solid #AAAAAA;
361
-					padding:1px;overflow: hidden;white-space: nowrap">{{printData.takePart}}</div>
362
-					<div style="width:14%;border-right: 1px solid #AAAAAA;padding:1px;">标本数</div>
363
-					<div style="width:16%;padding:1px;">{{printData.specimenNum}}</div>
364
-				</div>
365
-				<div style="display: flex;">
366
-					<div style="width:20%;box-sizing: border-box;border-right: 1px solid #AAAAAA;padding:1px;">日期</div>
367
-					<div style="width:80%;box-sizing: border-box;padding:1px;border-right: 1px solid #fff;">{{printData.specimenList[0].inVitroTime|date:'yyyy-MM-dd'}}</div>
368
-				</div>
369
-			</div>
370
-			
371
-			<div style="height: 70px;" *ngIf="printData && printData.specimenList && printData.specimenList.length==1 && operation == 'addPrint'"></div>
372
-			<div style="height: 20px;" *ngIf="printData && printData.specimenList && printData.specimenList.length>1 && operation != 'addPrint'"></div>
328
+			<div style="height: 70px;" *ngIf="printData && printData.specimenList && printData.specimenList.length==1"></div>
329
+			<div style="height: 20px;" *ngIf="printData && printData.specimenList && printData.specimenList.length>1"></div>
373
 			<div style="font-size: 12px;" *ngIf="printData && printData.specimenList && printData.specimenList.length>0">
330
 			<div style="font-size: 12px;" *ngIf="printData && printData.specimenList && printData.specimenList.length>0">
374
 				<div *ngFor="let data of printData.specimenList; let index=index;">
331
 				<div *ngFor="let data of printData.specimenList; let index=index;">
375
 				 <div style="height: 50px;" *ngIf="printData && printData.specimenList && printData.specimenList.length>1"></div>
332
 				 <div style="height: 50px;" *ngIf="printData && printData.specimenList && printData.specimenList.length>1"></div>

+ 1 - 0
src/app/share/pathology-detail/pathology-detail.component.html

@@ -156,6 +156,7 @@
156
 				</div>
156
 				</div>
157
 				
157
 				
158
 			</div>
158
 			</div>
159
+			<div style="height: 70px;" *ngIf="printData && printData.specimenList && printData.specimenList.length==1"></div>
159
 			<div style="height: 20px;" *ngIf="printData && printData.specimenList && printData.specimenList.length>1"></div>
160
 			<div style="height: 20px;" *ngIf="printData && printData.specimenList && printData.specimenList.length>1"></div>
160
 			<div style="font-size: 12px;" *ngIf="printData && printData.specimenList && printData.specimenList.length>0">
161
 			<div style="font-size: 12px;" *ngIf="printData && printData.specimenList && printData.specimenList.length>0">
161
 				<div *ngFor="let data of printData.specimenList; let index=index;">
162
 				<div *ngFor="let data of printData.specimenList; let index=index;">

+ 4 - 3
src/app/views/fuwutai/fuwutai.component.ts

@@ -2832,7 +2832,7 @@ export class FuwutaiComponent implements OnInit {
2832
         "category": this.incidentModel.category ? { id: this.incidentModel.category } : undefined,
2832
         "category": this.incidentModel.category ? { id: this.incidentModel.category } : undefined,
2833
         "priorityId": this.incidentModel.priorityId || undefined,
2833
         "priorityId": this.incidentModel.priorityId || undefined,
2834
         "source": this.incidentModel.source ? { id: this.incidentModel.source } : undefined,
2834
         "source": this.incidentModel.source ? { id: this.incidentModel.source } : undefined,
2835
-        "title": category.mutiCategory,
2835
+        // "title": category.mutiCategory,
2836
         "description": this.incidentModel.description,
2836
         "description": this.incidentModel.description,
2837
         "directProcess": 1,
2837
         "directProcess": 1,
2838
         "handleDescription": this.incidentModel.handleDescription,
2838
         "handleDescription": this.incidentModel.handleDescription,
@@ -3522,7 +3522,8 @@ export class FuwutaiComponent implements OnInit {
3522
     }
3522
     }
3523
 
3523
 
3524
     let category = this.applicationCategoryList.find(v => v.id == this.incidentModel.category);
3524
     let category = this.applicationCategoryList.find(v => v.id == this.incidentModel.category);
3525
-    if(!this.incidentModel.duty){
3525
+    console.log('故障现象对象=>>>>>',category)
3526
+		if(!this.incidentModel.duty){
3526
       this.msg.warning(`故障现象【${category.mutiCategory}】没有设置责任部门!`);
3527
       this.msg.warning(`故障现象【${category.mutiCategory}】没有设置责任部门!`);
3527
       return;
3528
       return;
3528
     }
3529
     }
@@ -3572,7 +3573,7 @@ export class FuwutaiComponent implements OnInit {
3572
         "category": this.incidentModel.category ? { id: this.incidentModel.category } : undefined,
3573
         "category": this.incidentModel.category ? { id: this.incidentModel.category } : undefined,
3573
         "priorityId": this.incidentModel.priorityId || undefined,
3574
         "priorityId": this.incidentModel.priorityId || undefined,
3574
         "source": this.incidentModel.source ? { id: this.incidentModel.source } : undefined,
3575
         "source": this.incidentModel.source ? { id: this.incidentModel.source } : undefined,
3575
-        "title": category.mutiCategory,
3576
+        // "title": category.mutiCategory,
3576
         "description": this.incidentModel.description,
3577
         "description": this.incidentModel.description,
3577
         "yyTime": this.incidentModel.yyTime ? format(new Date(this.incidentModel.yyTime), 'yyyy-MM-dd HH:mm:ss') : undefined,
3578
         "yyTime": this.incidentModel.yyTime ? format(new Date(this.incidentModel.yyTime), 'yyyy-MM-dd HH:mm:ss') : undefined,
3578
         "requester": this.incidentModel.requester ? { id: this.incidentModel.requester } : undefined,
3579
         "requester": this.incidentModel.requester ? { id: this.incidentModel.requester } : undefined,