From 486eac7c54e84e2db7e19389d319c0cea03f649b Mon Sep 17 00:00:00 2001
From: cpf <1105965053@qq.com>
Date: Fri, 24 Jun 2022 14:27:46 +0800
Subject: [PATCH 1/2] =?UTF-8?q?=E8=8F=9C=E5=8D=95=E7=AE=A1=E7=90=86?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/app/pages/audit/audit-record/audit-record.component.html | 2 +-
src/app/pages/audit/audit-record/audit-record.component.ts | 5 ++++-
2 files changed, 5 insertions(+), 2 deletions(-)
diff --git a/src/app/pages/audit/audit-record/audit-record.component.html b/src/app/pages/audit/audit-record/audit-record.component.html
index 78b4492..1f1bfb3 100644
--- a/src/app/pages/audit/audit-record/audit-record.component.html
+++ b/src/app/pages/audit/audit-record/audit-record.component.html
@@ -6,7 +6,7 @@
-
+
diff --git a/src/app/pages/audit/audit-record/audit-record.component.ts b/src/app/pages/audit/audit-record/audit-record.component.ts
index 51282b4..4224da9 100644
--- a/src/app/pages/audit/audit-record/audit-record.component.ts
+++ b/src/app/pages/audit/audit-record/audit-record.component.ts
@@ -20,12 +20,15 @@ export class AuditRecordComponent implements OnInit {
constructor(private element: ElementRef, private modal: NzModalService, private viewContainerRef: ViewContainerRef, private toTree: TreeService, private http: HttpClient, private fb: FormBuilder) { }
list = []
-
+ level=false
tableScrollHeight
resizeListener
startdate
enddate
async ngOnInit(): Promise {
+ if(JSON.parse(sessionStorage.getItem('userdata')).organization.level==1){
+ this.level=true
+ }
this.tableScrollHeight = '100px'
// 页面监听
this.resizeListener = fromEvent(window, 'resize').pipe(debounceTime(100)).subscribe((event) => {
From 7832fe3acbca7c64a6304d284fb60c0df9bae268 Mon Sep 17 00:00:00 2001
From: cpf <1105965053@qq.com>
Date: Sat, 25 Jun 2022 10:33:28 +0800
Subject: [PATCH 2/2] =?UTF-8?q?=E8=8F=9C=E5=8D=95=E7=AE=A1=E7=90=86?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/app/pages/home/home.component.html | 3 +-
src/app/pages/home/home.component.ts | 34 +++++++++++++++++--
.../navigation/navigation.component.html | 10 ++----
.../navigation/navigation.component.ts | 23 ++++++++++++-
4 files changed, 57 insertions(+), 13 deletions(-)
diff --git a/src/app/pages/home/home.component.html b/src/app/pages/home/home.component.html
index f1b69bc..cc28d1e 100644
--- a/src/app/pages/home/home.component.html
+++ b/src/app/pages/home/home.component.html
@@ -48,7 +48,8 @@
基本信息
器材信息
修改密码
- 系统管理
+
+ 系统管理
退出系统
diff --git a/src/app/pages/home/home.component.ts b/src/app/pages/home/home.component.ts
index 59cc89e..f91982b 100644
--- a/src/app/pages/home/home.component.ts
+++ b/src/app/pages/home/home.component.ts
@@ -58,6 +58,17 @@ export class HomeComponent implements OnInit {
{ name: '预警记录', url: '/records_nav/petrolStation' },
{ name: '证照管理', url: '/license/petrolStation' },
]
+ menu3 = [
+ { name: '组织机构管理', url: '/system/organization' },
+ { name: '用户管理', url: '/system/user' },
+ { name: '角色管理', url: '/system/role' },
+ { name: '分析主机管理', url: '/system/host' },
+ { name: '推送管理', url: '/system/push' },
+ { name: '经营类证照管理', url: '/system/updateOfLicense' },
+ { name: '资产类证照管理', url: '/system/fileOfLicense' },
+ { name: '菜单管理', url: '/system/menu' },
+ ]
+ xitongguanli=false
userMenu=[]
tap=[]
menuList1=[]
@@ -91,12 +102,11 @@ export class HomeComponent implements OnInit {
for (let index = 0; index < this.menu2.length; index++) {
for (let k = 0; k < this.tap.length; k++) {
if (this.tap[k]==this.menu2[index].name) {
- this.menuList2.push(this.menu2[index])
+ this.menuList1.push(this.menu2[index])
}
}
}
- console.log( this.menuList2);
} else {//初始化登陆 如果是管理者用户
this.isGasStationNav = false
this.isGasStationBack = false
@@ -107,7 +117,12 @@ export class HomeComponent implements OnInit {
}
}
}
-
+ for (let index = 0; index < this.tap.length; index++) {
+ if (this.tap[index]=="系统管理") {
+ this.xitongguanli=true
+ }
+
+ }
}
this.router.events.pipe(
@@ -436,7 +451,20 @@ export class HomeComponent implements OnInit {
navChange(router) {
this.router.navigate([router])
}
+ navChange2() {
+ for (let index = 0; index < this.menu3.length; index++) {
+ let url=""
+ for (let k = 0; k < this.tap.length; k++) {
+ if (this.tap[k]==this.menu3[index].name) {
+ this.menuList2.push(this.menu3[index])
+ }
+
+ }
+
+ }
+ this.router.navigate([this.menuList2[0].url])
+ }
goback() {
this.router.navigate(['/plan'])
this.isGasStationNav = false
diff --git a/src/app/system-management/navigation/navigation.component.html b/src/app/system-management/navigation/navigation.component.html
index ad79f57..2e0c2e4 100644
--- a/src/app/system-management/navigation/navigation.component.html
+++ b/src/app/system-management/navigation/navigation.component.html
@@ -13,14 +13,8 @@
- - 组织机构管理
- - 用户管理
- - 角色管理
- - 分析主机管理
- - 推送管理
- - 经营类证照管理
- - 资产类证照管理
- - 菜单管理
+ - {{item.name}}
+
diff --git a/src/app/system-management/navigation/navigation.component.ts b/src/app/system-management/navigation/navigation.component.ts
index 600c810..8696ee7 100644
--- a/src/app/system-management/navigation/navigation.component.ts
+++ b/src/app/system-management/navigation/navigation.component.ts
@@ -13,6 +13,7 @@ export class NavigationComponent implements OnInit {
menu=[]
tap=[]
menuList1=[]
+ menuList2=[]
menu1 = [
{ name: '首页', url: '/homepage' },
{ name: '数字油站', url: '/plan' },
@@ -20,6 +21,16 @@ export class NavigationComponent implements OnInit {
{ name: '预警记录', url: '/records_nav' },
{ name: '证照管理', url: '/audit' },
]
+ menu3 = [
+ { name: '组织机构管理', url: '/system/organization' ,img:'../../../assets/images/icon/organization.png'},
+ { name: '用户管理', url: '/system/user' ,img:'../../../assets/images/icon/user.png'},
+ { name: '角色管理', url: '/system/role' ,img:'../../../assets/images/icon/role.png'},
+ { name: '分析主机管理', url: '/system/host' ,img:'../../../assets/images/icon/host.png'},
+ { name: '推送管理', url: '/system/push' ,img:'../../../assets/images/icon/push.png'},
+ { name: '经营类证照管理', url: '/system/updateOfLicense' ,img:'../../../assets/images/icon/license.png'},
+ { name: '资产类证照管理', url: '/system/fileOfLicense' ,img:'../../../assets/images/icon/license.png'},
+ { name: '菜单管理', url: '/system/menu' ,img:'../../../assets/images/icon/license.png'},
+ ]
ngOnInit(): void {
let a= sessionStorage.getItem('userdata')
this.userMenu=JSON.parse(a).menus
@@ -36,7 +47,17 @@ export class NavigationComponent implements OnInit {
}
console.log(this.menuList1);
}
-
+ for (let index = 0; index < this.menu3.length; index++) {
+ let url=""
+ for (let k = 0; k < this.tap.length; k++) {
+ if (this.tap[k]==this.menu3[index].name) {
+ this.menuList2.push(this.menu3[index])
+
+ }
+
+ }
+
+ }
}
signOut() {