瀏覽代碼

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

seimin 2 年之前
父節點
當前提交
470f33a497

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

@@ -34,7 +34,7 @@
34
         </div>
34
         </div>
35
       </div>
35
       </div>
36
       <div nz-col nzXl="8" class="list-template__btns">
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
         <button nz-button class="btn default ml8" (click)='reset()'>重置</button>
38
         <button nz-button class="btn default ml8" (click)='reset()'>重置</button>
39
         <button nz-button class="btn default ml8" (click)='getList(1)'>搜索</button>
39
         <button nz-button class="btn default ml8" (click)='getList(1)'>搜索</button>
40
       </div>
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
 export class DrugSearchComponent implements OnInit {
12
 export class DrugSearchComponent implements OnInit {
13
   constructor(private mainService: MainService, private tool: ToolService) {}
13
   constructor(private mainService: MainService, private tool: ToolService) {}
14
 
14
 
15
+  currentUserAccount: any = JSON.parse(localStorage.getItem("user")).user.account; //当前登录人账号
15
   searchCriteria = {
16
   searchCriteria = {
16
     //搜索条件
17
     //搜索条件
17
     packid: "", //请领单号
18
     packid: "", //请领单号

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

@@ -30,8 +30,7 @@ export class HospitalManagementComponent implements OnInit {
30
     this.initFormCopy();
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
   listOfData: any[] = []; //表格数据
34
   listOfData: any[] = []; //表格数据
36
   pageIndex: number = 1; //表格当前页码
35
   pageIndex: number = 1; //表格当前页码
37
   pageSize: number = 10; //表格每页展示条数
36
   pageSize: number = 10; //表格每页展示条数

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

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

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

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