From 759e71b00d7f4cf8158b778a4d2ea7d2b3ade71b Mon Sep 17 00:00:00 2001 From: Yang <774655719@qq.com> Date: Mon, 17 Jun 2024 11:39:40 +0800 Subject: [PATCH] =?UTF-8?q?=E8=AF=A6=E6=83=85=E9=A1=B5=E9=9D=A2=E5=A2=9E?= =?UTF-8?q?=E5=8A=A0=E5=BC=80=E5=A7=8B=E6=97=B6=E9=97=B4=EF=BC=8C=E7=BB=93?= =?UTF-8?q?=E6=9D=9F=E6=97=B6=E9=97=B4=E5=8F=82=E6=95=B0=E5=A4=84=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../layout/manage/path/path.component.ts | 26 +++++++++++++------ 1 file changed, 18 insertions(+), 8 deletions(-) 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 5576769..017f9c2 100644 --- a/src/app/routes/config/layout/manage/path/path.component.ts +++ b/src/app/routes/config/layout/manage/path/path.component.ts @@ -14,6 +14,8 @@ export class PathComponent implements OnInit, OnChanges { whiteListParam = {}; greyListParam = {}; rules; + startTime; + endTime; constructor( private noticeService: NoticeService, @@ -52,14 +54,22 @@ export class PathComponent implements OnInit, OnChanges { parseData() { for (const dataKey in this.detail_data) { if (this.detail_data.hasOwnProperty(dataKey)) { - if (dataKey === 'type') { - this.viewType = this.detail_data[dataKey]; - } else { - this.data = this.detail_data[dataKey]; - this.data.forEach(item => { - item['is_in_white_list'] = 0; - item['is_in_grey_list'] = 0; - }); + switch (dataKey) { + case 'type': + this.viewType = this.detail_data[dataKey]; + break; + case 'startTime': + this.startTime = this.detail_data[dataKey]; + 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; + }); } } }