From 640d376e2bbe93361aa827bc97ac1975d7736be9 Mon Sep 17 00:00:00 2001 From: cyuamber Date: Tue, 10 Dec 2019 09:51:55 +0800 Subject: feat: Optimize the code Change-Id: I8bda1a8630f8150d5a71a10cd21ac7d977f083d5 Issue-ID: USECASEUI-368 Signed-off-by: cyuamber --- .../check-process-model.component.ts | 6 +- .../slicing-task-management.component.html | 131 +++++++++++++-------- .../slicing-task-management.component.ts | 2 - .../slicing-task-model.component.ts | 10 +- 4 files changed, 96 insertions(+), 53 deletions(-) (limited to 'usecaseui-portal/src/app/views/services/slicing-management/slicing-task-management') diff --git a/usecaseui-portal/src/app/views/services/slicing-management/slicing-task-management/check-process-model/check-process-model.component.ts b/usecaseui-portal/src/app/views/services/slicing-management/slicing-task-management/check-process-model/check-process-model.component.ts index 4656c32e..80cad730 100644 --- a/usecaseui-portal/src/app/views/services/slicing-management/slicing-task-management/check-process-model/check-process-model.component.ts +++ b/usecaseui-portal/src/app/views/services/slicing-management/slicing-task-management/check-process-model/check-process-model.component.ts @@ -55,11 +55,15 @@ export class CheckProcessModelComponent implements OnInit { processing_status, business_demand_info, nst_info, - business_demand_info: { service_snssai } + business_demand_info: { service_snssai, coverage_area_ta_list } } = result_body; // 处理配置审核详情数据 this.checkDetail = [{ task_id, task_name, create_time, processing_status, service_snssai }]; // 业务需求信息数据 + business_demand_info.area = coverage_area_ta_list.map(item => { + item = item.split(';').join('-') + return item + }) this.businessRequirement = [business_demand_info]; // 匹配NST信息 this.NSTinfo = [nst_info]; diff --git a/usecaseui-portal/src/app/views/services/slicing-management/slicing-task-management/slicing-task-management.component.html b/usecaseui-portal/src/app/views/services/slicing-management/slicing-task-management/slicing-task-management.component.html index 85ed0880..ff5ec273 100644 --- a/usecaseui-portal/src/app/views/services/slicing-management/slicing-task-management/slicing-task-management.component.html +++ b/usecaseui-portal/src/app/views/services/slicing-management/slicing-task-management/slicing-task-management.component.html @@ -1,49 +1,84 @@
-
-
- Status : - - - -
-
-
- - - - 任务ID - 任务名称 - S-NSSAI - 切片业务类型 - 到达时间 - 处理环节 - 操作 - - - - - {{ data.task_id }} - {{ data.task_name }} - {{ data.service_snssai }} - {{ data.service_type }} - {{ data.create_time }} - {{ data.status }} - - {{ data.operation }} - {{ data.operation }} - - - - -
- - - - -
\ No newline at end of file +
+
+ Status : + + + +
+
+
+ + + + 任务ID + 任务名称 + S-NSSAI + 切片业务类型 + 到达时间 + 处理环节 + 操作 + + + + + {{ data.task_id }} + {{ data.task_name }} + {{ data.service_snssai }} + {{ data.service_type }} + {{ data.create_time | date: "yyyy-MM-dd HH:mm:ss"}} + {{ data.status }} + + {{ data.operation }} + {{ data.operation }} + + + + +
+ + + + + diff --git a/usecaseui-portal/src/app/views/services/slicing-management/slicing-task-management/slicing-task-management.component.ts b/usecaseui-portal/src/app/views/services/slicing-management/slicing-task-management/slicing-task-management.component.ts index e70e6d44..fd135a61 100644 --- a/usecaseui-portal/src/app/views/services/slicing-management/slicing-task-management/slicing-task-management.component.ts +++ b/usecaseui-portal/src/app/views/services/slicing-management/slicing-task-management/slicing-task-management.component.ts @@ -1,6 +1,5 @@ import { Component, OnInit } from '@angular/core'; import { NzMessageService } from 'ng-zorro-antd'; -import * as moment from 'moment'; import { SlicingTaskServices } from '.././../../../core/services/slicingTaskServices'; import { TASK_PROCESSING_STATUS } from '../../../../../constants/constants'; @@ -93,7 +92,6 @@ export class SlicingTaskManagementComponent implements OnInit { dataFormatting(list: any): void { this.listOfData = list.map(item => { - item.create_time = moment(item.create_time).format('YYYY-MM-DD hh:mm') switch (item.processing_status) { case 'Planning': item.status = '规划阶段'; diff --git a/usecaseui-portal/src/app/views/services/slicing-management/slicing-task-management/slicing-task-model/slicing-task-model.component.ts b/usecaseui-portal/src/app/views/services/slicing-management/slicing-task-management/slicing-task-model/slicing-task-model.component.ts index f9ef1511..3ccd8698 100644 --- a/usecaseui-portal/src/app/views/services/slicing-management/slicing-task-management/slicing-task-model/slicing-task-model.component.ts +++ b/usecaseui-portal/src/app/views/services/slicing-management/slicing-task-management/slicing-task-model/slicing-task-model.component.ts @@ -96,8 +96,9 @@ export class SlicingTaskModelComponent implements OnInit { create_time, processing_status, business_demand_info, - nst_info, nsi_nssi_info, - business_demand_info: { service_snssai } + nst_info, + nsi_nssi_info, + business_demand_info: { service_snssai, coverage_area_ta_list } } = res.result_body; const { suggest_nsi_id, @@ -127,6 +128,10 @@ export class SlicingTaskModelComponent implements OnInit { // 处理配置审核详情数据 this.checkDetail = [{ task_id, task_name, create_time, processing_status, service_snssai }]; // 业务需求信息数据 + business_demand_info.area = coverage_area_ta_list.map(item => { + item = item.split(';').join('-') + return item + }) this.businessRequirement = [business_demand_info]; // 匹配NST信息 this.NSTinfo = [nst_info]; @@ -347,6 +352,7 @@ export class SlicingTaskModelComponent implements OnInit { cn_suggest_nssi_name: slicingSubnet[2].slicingName, ...slicingSubnet[2].params, } + delete businessRequirement[0].area let reqBody = {...checkDetail[0], business_demand_info: businessRequirement[0], nst_info: NSTinfo[0], nsi_nssi_info}; delete reqBody.service_snssai; this.notification1.notificationStart('Task', 'Sumbit', this.taskId) -- cgit 1.2.3-korg