From 2b6a5dda00bf8086b7a724205417e3a2b9e88e7f Mon Sep 17 00:00:00 2001 From: TANGWY Date: Thu, 13 Jun 2024 18:34:03 +0800 Subject: [PATCH] =?UTF-8?q?=E8=A7=A3=E5=86=B3=E5=86=B2=E7=AA=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../layout/manage/path/path.component.html | 103 +++++++++++++++++- .../layout/manage/path/path.component.ts | 35 +++++- 2 files changed, 133 insertions(+), 5 deletions(-) diff --git a/src/app/routes/config/layout/manage/path/path.component.html b/src/app/routes/config/layout/manage/path/path.component.html index 9460a35..e7b50a2 100644 --- a/src/app/routes/config/layout/manage/path/path.component.html +++ b/src/app/routes/config/layout/manage/path/path.component.html @@ -1,6 +1,103 @@ - + +
-

Name: {{ detail_data.type }}

-
\ No newline at end of file + + + + 访问源IP + 访问频次 + 操作 + + + + + {{ data.req_ip }} + {{ data.req_frequency }} + + 白名单 + + 灰名单 + + + + + + + + + 账号 + 访问频次 + 工号 + 操作 + + + + + {{ data.req_account }} + {{ data.req_frequency }} + {{ data.req_jobnum }} + + 白名单 + + 灰名单 + + + + + + + + + 接口地址 + 访问IP + 访问账号 + 访问频次 + 工号 + 操作 + + + + + {{ data.interface_addr }} + {{ data.req_ip }} + {{ data.req_account }} + {{ data.req_frequency }} + {{ data.req_jobnum }} + + 白名单 + + 灰名单 + + + + + + + + + 菜单名称 + 访问IP + 访问账号 + 访问频次 + 工号 + 操作 + + + + + {{ data.menu_name }} + {{ data.req_ip }} + {{ data.req_account }} + {{ data.req_frequency }} + {{ data.req_jobnum }} + + 白名单 + + 灰名单 + + + + + diff --git a/src/app/routes/config/layout/manage/path/path.component.ts b/src/app/routes/config/layout/manage/path/path.component.ts index 568ba5c..86cc095 100644 --- a/src/app/routes/config/layout/manage/path/path.component.ts +++ b/src/app/routes/config/layout/manage/path/path.component.ts @@ -8,7 +8,9 @@ import { NoticeService } from '../../../service/https/notice.service'; styleUrls: ['./path.component.styl'] }) export class PathComponent implements OnInit { - @Input() detail_data: any; + @Input() datas: any; + data; + viewType = 0; constructor( private noticeService: NoticeService, @@ -16,6 +18,35 @@ export class PathComponent implements OnInit { ) {} ngOnInit() { - + // const jsonStr = '{"type":3,"http://190.89.233.2:8909/getpublicconfig":[{"req_ip":"192.156.3.12","interface_addr":"http://190.89.233.2:8909/getpublicconfig","req_jobnum":43327,"req_frequency":43,"req_account":"liuhr"},{"req_ip":"192.156.3.12","interface_addr":"http://190.89.233.2:8909/getpublicconfig","req_jobnum":43328,"req_frequency":44,"req_account":"sunxq01"},{"req_ip":"192.156.3.18","interface_addr":"http://190.89.233.2:8909/getpublicconfig","req_jobnum":65341,"req_frequency":45,"req_account":"shicl"},{"req_ip":"192.106.3.33","interface_addr":"http://190.89.233.2:8909/getpublicconfig","req_jobnum":65342,"req_frequency":46,"req_account":"gongxs"},{"req_ip":"192.106.3.34","interface_addr":"http://190.89.233.2:8909/getpublicconfig","req_jobnum":65343,"req_frequency":47,"req_account":"sunzs"}]}' + // if (this.datas == null) { + // this.datas = JSON.parse(jsonStr); + // } + this.parseData(this.datas); } + + parseData(datas: any) { + for (const dataKey in datas) { + if (datas.hasOwnProperty(dataKey)) { + if (dataKey === 'type') { + this.viewType = datas[dataKey]; + } else { + this.data = datas[dataKey]; + } + } + } + } + + clickWihteList(data) { + alert("点击白名单"); + } + + clickGreyList(data) { + alert("点击灰名单"); + } + + clickFrequency(data) { + alert("点击超链接"); + } + }