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 --- usecaseui-portal/src/app/app.component.less | 3 +- .../basic-info/basic-info.component.html | 138 +++++++++++++-------- .../check-process-model.component.ts | 6 +- .../slicing-task-management.component.html | 131 ++++++++++++------- .../slicing-task-management.component.ts | 2 - .../slicing-task-model.component.ts | 10 +- usecaseui-portal/src/constants/constants.ts | 2 +- 7 files changed, 185 insertions(+), 107 deletions(-) (limited to 'usecaseui-portal') diff --git a/usecaseui-portal/src/app/app.component.less b/usecaseui-portal/src/app/app.component.less index 8a2d6e6c..548d21ab 100644 --- a/usecaseui-portal/src/app/app.component.less +++ b/usecaseui-portal/src/app/app.component.less @@ -50,12 +50,11 @@ nz-layout { position: fixed; left: 0; z-index: 100; - // min-height: 937px; height: 100vh; background: #313449; // background: #313449 url('assets/images/UUIMenuBar.png') no-repeat; // background-size: 100%; - overflow: scroll; + overflow: auto; .siderContent { width: 100%; diff --git a/usecaseui-portal/src/app/shared/components/basic-info/basic-info.component.html b/usecaseui-portal/src/app/shared/components/basic-info/basic-info.component.html index 5a600ce3..f659bd47 100644 --- a/usecaseui-portal/src/app/shared/components/basic-info/basic-info.component.html +++ b/usecaseui-portal/src/app/shared/components/basic-info/basic-info.component.html @@ -1,53 +1,89 @@ - - - -
- Task ID: {{ check.task_id }} -
-
- Task Name: {{ check.task_name }} -
-
- S-NSSAI:{{ check.service_snssai }} -
-
- -
- Arrived Time: {{ check.create_time | date: 'yyyy-MM-dd HH:mm:ss' }} -
-
- Status: {{ check.processing_status }} -
-
-
-
+ + + +
+ Task ID: {{ check.task_id }} +
+
+ Task Name: {{ check.task_name }} +
+
+ S-NSSAI:{{ check.service_snssai }} +
+
+ +
+ + Arrived Time: + {{ check.create_time | date: "yyyy-MM-dd HH:mm:ss" }} + +
+
+ Status: {{ check.processing_status }} +
+
+
+
- - - -
- {{ ite.title }} :  {{ item[ite.key] }} - - {{ ite.title }} :   - {{ items }}     - -
-
-
-
+ + + +
+ + {{ ite.title }} :  {{ item[ite.key] }} + + + {{ ite.title }} :   + + {{value}} + + +
+
+
+
- - - -
- NST ID: {{ item.nst_id }} -
-
- NST Name: {{ item.nst_name }} -
-
-
-
+ + + +
+ NST ID: {{ item.nst_id }} +
+
+ NST Name: {{ item.nst_name }} +
+
+
+
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) diff --git a/usecaseui-portal/src/constants/constants.ts b/usecaseui-portal/src/constants/constants.ts index e8ab5c48..160a3282 100644 --- a/usecaseui-portal/src/constants/constants.ts +++ b/usecaseui-portal/src/constants/constants.ts @@ -78,7 +78,7 @@ export const BUSINESS_REQUIREMENT = [ [ { title: '区域', - key: 'coverage_area_ta_list' + key: 'area' }, ], -- cgit 1.2.3-korg