Browse Source

[修改]类型管理新建限制

zhuzhou
chenjingyu 4 years ago
parent
commit
da7eafcefb
  1. 2
      src/app/plan-management/type-plan/type-plan.component.html
  2. 12
      src/app/plan-management/type-plan/type-plan.component.ts

2
src/app/plan-management/type-plan/type-plan.component.html

@ -62,7 +62,7 @@
<mat-divider></mat-divider>
<div class="newadd">
<div>
<button mat-raised-button color="primary" (click)='addunit()' *ngIf="level=='0'"><img style="margin-bottom: 3px;" src="../../../assets/images/newadd.png"> 新增</button>
<button mat-raised-button color="primary" (click)='addunit()' *ngIf="levels=='0'"><img style="margin-bottom: 3px;" src="../../../assets/images/newadd.png"> 新增</button>
</div>
<div class="progressBox" style="margin-left: 100px;" *ngIf="downloadisLoading">

12
src/app/plan-management/type-plan/type-plan.component.ts

@ -4,7 +4,7 @@
* @Author: sueRimn
* @Date: 2021-01-06 09:47:43
* @LastEditors: sueRimn
* @LastEditTime: 2021-02-05 14:43:41
* @LastEditTime: 2021-02-06 09:08:16
*/
import { Component, OnInit, ViewChild, Inject } from '@angular/core';
import { HttpClient } from '@angular/common/http'
@ -30,7 +30,7 @@ export class TypePlanComponent implements OnInit {
ngOnInit(): void {
this.level = sessionStorage.getItem("level");
if(this.level == "0"){//如果是总队
if(this.levels == "0"){//如果是总队
this.preparelevels = [
{name:"总队",value:"1"},
{name:"支队",value:"2"},
@ -38,20 +38,20 @@ export class TypePlanComponent implements OnInit {
{name:"中队",value:"8"}
]
}
if(this.level == "1"){//如果是支队
if(this.levels == "1"){//如果是支队
this.preparelevels = [
{name:"支队",value:"2"},
{name:"大队",value:"4"},
{name:"中队",value:"8"}
]
}
if(this.level == "2"){//如果是大队
if(this.levels == "2"){//如果是大队
this.preparelevels = [
{name:"大队",value:"4"},
{name:"中队",value:"8"}
]
}
if(this.level == "3"){//如果是中队
if(this.levels == "3"){//如果是中队
this.preparelevels = [
{name:"中队",value:"8"}
]
@ -59,7 +59,7 @@ export class TypePlanComponent implements OnInit {
this.getAlltabledate()
}
level
levels
preparelevels:any
plcheck:boolean //编制级别勾选框
displayedColumns: string[] = ['unitname','addname','addtime', 'plantype', 'passstate','isopen','projectlevel','operation'];

Loading…
Cancel
Save