Compare commits

..

3 Commits

Author SHA1 Message Date
TANGWY 408210d66e Merge branch 'master' into dev 4 months ago
Yang e8d932deaa 列表明细页面 4 months ago
Yang 3bf6595c59 列表明细页面 4 months ago
  1. 8
      src/app/routes/config/layout/manage/manage.component.html
  2. 18
      src/app/routes/config/layout/manage/path/path.component.ts

@ -141,12 +141,12 @@
</nz-table> </nz-table>
</div> </div>
<app-process [visible]="submitLoading" (onCancel)="cancelSearch()"> <app-process [visible]="submitLoading" (onCancel)="cancelSearch()">
</app-process> </app-process>
<nz-modal [(nzVisible)]="isVisible" nzWidth="80%" nzTitle="The first Modal" (nzOnCancel)="isVisible = false" > <nz-modal [(nzVisible)]="isVisible" nzWidth="80%" nzTitle="明细" (nzOnCancel)="isVisible = false" [nzFooter]="null">
<app-path [detail_data]="detail_data"></app-path> <app-path [detail_data]="detail_data"></app-path>
</nz-modal> </nz-modal>
</div> </div>

@ -8,7 +8,7 @@ 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() datas: any; @Input() detail_data: any;
data; data;
viewType = 0; viewType = 0;
@ -19,19 +19,19 @@ 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"}]}' // 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) { // if (this.detail_data == null) {
// this.datas = JSON.parse(jsonStr); // this.detail_data = JSON.parse(jsonStr);
// } // }
this.parseData(this.datas); this.parseData(this.detail_data);
} }
parseData(datas: any) { parseData(detail_data: any) {
for (const dataKey in datas) { for (const dataKey in detail_data) {
if (datas.hasOwnProperty(dataKey)) { if (detail_data.hasOwnProperty(dataKey)) {
if (dataKey === 'type') { if (dataKey === 'type') {
this.viewType = datas[dataKey]; this.viewType = detail_data[dataKey];
} else { } else {
this.data = datas[dataKey]; this.data = detail_data[dataKey];
} }
} }
} }

Loading…
Cancel
Save