详情页面增加开始时间,结束时间参数处理

dev
Yang 5 months ago
parent 501c16f4ab
commit 759e71b00d
  1. 26
      src/app/routes/config/layout/manage/path/path.component.ts

@ -14,6 +14,8 @@ export class PathComponent implements OnInit, OnChanges {
whiteListParam = {}; whiteListParam = {};
greyListParam = {}; greyListParam = {};
rules; rules;
startTime;
endTime;
constructor( constructor(
private noticeService: NoticeService, private noticeService: NoticeService,
@ -52,14 +54,22 @@ export class PathComponent implements OnInit, OnChanges {
parseData() { parseData() {
for (const dataKey in this.detail_data) { for (const dataKey in this.detail_data) {
if (this.detail_data.hasOwnProperty(dataKey)) { if (this.detail_data.hasOwnProperty(dataKey)) {
if (dataKey === 'type') { switch (dataKey) {
this.viewType = this.detail_data[dataKey]; case 'type':
} else { this.viewType = this.detail_data[dataKey];
this.data = this.detail_data[dataKey]; break;
this.data.forEach(item => { case 'startTime':
item['is_in_white_list'] = 0; this.startTime = this.detail_data[dataKey];
item['is_in_grey_list'] = 0; break;
}); case 'endTime':
this.endTime = this.detail_data[dataKey];
break;
default:
this.data = this.detail_data[dataKey];
this.data.forEach(item => {
item['is_in_white_list'] = 0;
item['is_in_grey_list'] = 0;
});
} }
} }
} }

Loading…
Cancel
Save