解决冲突

pull/1/head
TANGWY 5 months ago
parent b17724ea27
commit 2b6a5dda00
  1. 103
      src/app/routes/config/layout/manage/path/path.component.html
  2. 35
      src/app/routes/config/layout/manage/path/path.component.ts

@ -1,6 +1,103 @@
<!-- <app-wechart-robot [data]="wechartRobotData"></app-wechart-robot> --> <!-- <app-wechart-robot [data]="wechartRobotData"></app-wechart-robot> -->
<!-- <div>cdfddffff</div> -->
<div> <div>
<p>Name: {{ detail_data.type }}</p> <nz-table *ngIf="viewType === 1" #basicTable [nzData]="data" [nzPageSize]="10" nzShowSizeChanger [nzPageSize]="10" [nzPageSizeOptions]="[10, 20, 50, 100]">
</div> <thead>
<tr>
<th>访问源IP</th>
<th>访问频次</th>
<th nzRight>操作</th>
</tr>
</thead>
<tbody>
<tr *ngFor="let data of basicTable.data">
<td>{{ data.req_ip }}</td>
<td><a (click)="clickFrequency(data)">{{ data.req_frequency }}</a></td>
<td nzRight>
<a (click)="clickWihteList(data)">白名单</a>
<nz-divider nzType="vertical"></nz-divider>
<a (click)="clickGreyList(data)">灰名单</a>
</td>
</tr>
</tbody>
</nz-table>
<nz-table *ngIf="viewType === 2" #basicTable [nzData]="data" [nzPageSize]="10" nzShowSizeChanger [nzPageSize]="10" [nzPageSizeOptions]="[10, 20, 50, 100]">
<thead>
<tr>
<th>账号</th>
<th>访问频次</th>
<th>工号</th>
<th nzRight>操作</th>
</tr>
</thead>
<tbody>
<tr *ngFor="let data of basicTable.data">
<td>{{ data.req_account }}</td>
<td><a (click)="clickFrequency(data)">{{ data.req_frequency }}</a></td>
<td>{{ data.req_jobnum }}</td>
<td nzRight>
<a (click)="clickWihteList(data)">白名单</a>
<nz-divider nzType="vertical"></nz-divider>
<a (click)="clickGreyList(data)">灰名单</a>
</td>
</tr>
</tbody>
</nz-table>
<nz-table *ngIf="viewType === 3" #basicTable [nzData]="data" [nzPageSize]="10" nzShowSizeChanger [nzPageSize]="10" [nzPageSizeOptions]="[10, 20, 50, 100]">
<thead>
<tr>
<th>接口地址</th>
<th>访问IP</th>
<th>访问账号</th>
<th>访问频次</th>
<th>工号</th>
<th nzRight>操作</th>
</tr>
</thead>
<tbody>
<tr *ngFor="let data of basicTable.data">
<td>{{ data.interface_addr }}</td>
<td>{{ data.req_ip }}</td>
<td>{{ data.req_account }}</td>
<td><a (click)="clickFrequency(data)">{{ data.req_frequency }}</a></td>
<td>{{ data.req_jobnum }}</td>
<td nzRight>
<a (click)="clickWihteList(data)">白名单</a>
<nz-divider nzType="vertical"></nz-divider>
<a (click)="clickGreyList(data)">灰名单</a>
</td>
</tr>
</tbody>
</nz-table>
<nz-table *ngIf="viewType === 4" #basicTable [nzData]="data" [nzPageSize]="10" nzShowSizeChanger [nzPageSize]="10" [nzPageSizeOptions]="[10, 20, 50, 100]">
<thead>
<tr>
<th>菜单名称</th>
<th>访问IP</th>
<th>访问账号</th>
<th>访问频次</th>
<th>工号</th>
<th nzRight>操作</th>
</tr>
</thead>
<tbody>
<tr *ngFor="let data of basicTable.data">
<td>{{ data.menu_name }}</td>
<td>{{ data.req_ip }}</td>
<td>{{ data.req_account }}</td>
<td><a (click)="clickFrequency(data)">{{ data.req_frequency }}</a></td>
<td>{{ data.req_jobnum }}</td>
<td nzRight>
<a (click)="clickWihteList(data)">白名单</a>
<nz-divider nzType="vertical"></nz-divider>
<a (click)="clickGreyList(data)">灰名单</a>
</td>
</tr>
</tbody>
</nz-table>
</div>

@ -8,7 +8,9 @@ import { NoticeService } from '../../../service/https/notice.service';
styleUrls: ['./path.component.styl'] styleUrls: ['./path.component.styl']
}) })
export class PathComponent implements OnInit { export class PathComponent implements OnInit {
@Input() detail_data: any; @Input() datas: any;
data;
viewType = 0;
constructor( constructor(
private noticeService: NoticeService, private noticeService: NoticeService,
@ -16,6 +18,35 @@ export class PathComponent implements OnInit {
) {} ) {}
ngOnInit() { 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("点击超链接");
}
} }

Loading…
Cancel
Save