浏览代码

清空药品和清空标本判断账号只能dsadmin才能执行删除

seimin 2 年之前
父节点
当前提交
470f33a497

+ 1 - 1
src/app/views/drug-search/drug-search.component.html

@@ -34,7 +34,7 @@
34 34
         </div>
35 35
       </div>
36 36
       <div nz-col nzXl="8" class="list-template__btns">
37
-        <button nz-button class="btn default" (click)="showDelModal('您确认要清空药品吗?')">清空药品</button>
37
+        <button nz-button class="btn default" (click)="showDelModal('您确认要清空药品吗?')" *ngIf="currentUserAccount == 'dsadmin'">清空药品</button>
38 38
         <button nz-button class="btn default ml8" (click)='reset()'>重置</button>
39 39
         <button nz-button class="btn default ml8" (click)='getList(1)'>搜索</button>
40 40
       </div>

+ 1 - 0
src/app/views/drug-search/drug-search.component.ts

@@ -12,6 +12,7 @@ import { ToolService } from "src/app/services/tool.service";
12 12
 export class DrugSearchComponent implements OnInit {
13 13
   constructor(private mainService: MainService, private tool: ToolService) {}
14 14
 
15
+  currentUserAccount: any = JSON.parse(localStorage.getItem("user")).user.account; //当前登录人账号
15 16
   searchCriteria = {
16 17
     //搜索条件
17 18
     packid: "", //请领单号

+ 1 - 2
src/app/views/hospital-management/hospital-management.component.ts

@@ -30,8 +30,7 @@ export class HospitalManagementComponent implements OnInit {
30 30
     this.initFormCopy();
31 31
   }
32 32
 
33
-  currentUserAccount: any = JSON.parse(localStorage.getItem("user")).user
34
-    .account; //当前登录人账号
33
+  currentUserAccount: any = JSON.parse(localStorage.getItem("user")).user.account; //当前登录人账号
35 34
   listOfData: any[] = []; //表格数据
36 35
   pageIndex: number = 1; //表格当前页码
37 36
   pageSize: number = 10; //表格每页展示条数

+ 2 - 1
src/app/views/specimen-search/specimen-search.component.html

@@ -129,7 +129,8 @@
129 129
         <button
130 130
           nz-button
131 131
           class="btn default"
132
-          (click)="showDelModal('您确认要清空标本吗?')"
132
+          (click)="showDelModal('您确认要清空标本吗?')"  
133
+          *ngIf="currentUserAccount == 'dsadmin'"
133 134
         >
134 135
           清空标本
135 136
         </button>

+ 1 - 0
src/app/views/specimen-search/specimen-search.component.ts

@@ -12,6 +12,7 @@ import { format } from "date-fns";
12 12
 export class SpecimenSearchComponent implements OnInit {
13 13
   constructor(private mainService: MainService, private tool: ToolService) {}
14 14
 
15
+  currentUserAccount: any = JSON.parse(localStorage.getItem("user")).user.account; //当前登录人账号
15 16
   searchCriteria = {
16 17
     //搜索条件
17 18
     scode: "",