summaryrefslogtreecommitdiffstats
path: root/usecaseui-portal
diff options
context:
space:
mode:
authorTao Shen <shentao@chinamobile.com>2019-12-10 02:16:48 +0000
committerGerrit Code Review <gerrit@onap.org>2019-12-10 02:16:48 +0000
commit85164a3048e72787655d927dea8c98b1dcda6ecb (patch)
treef4c3be3959b81e4c841df1c2e6d82aa8ab735545 /usecaseui-portal
parenta5dcec98423c9a8e4abf04104aec152f93d1ab49 (diff)
parent640d376e2bbe93361aa827bc97ac1975d7736be9 (diff)
Merge "feat: Optimize the code"
Diffstat (limited to 'usecaseui-portal')
-rw-r--r--usecaseui-portal/src/app/app.component.less3
-rw-r--r--usecaseui-portal/src/app/shared/components/basic-info/basic-info.component.html138
-rw-r--r--usecaseui-portal/src/app/views/services/slicing-management/slicing-task-management/check-process-model/check-process-model.component.ts6
-rw-r--r--usecaseui-portal/src/app/views/services/slicing-management/slicing-task-management/slicing-task-management.component.html131
-rw-r--r--usecaseui-portal/src/app/views/services/slicing-management/slicing-task-management/slicing-task-management.component.ts2
-rw-r--r--usecaseui-portal/src/app/views/services/slicing-management/slicing-task-management/slicing-task-model/slicing-task-model.component.ts10
-rw-r--r--usecaseui-portal/src/constants/constants.ts2
7 files changed, 185 insertions, 107 deletions
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 @@
-<nz-list class="taskmodel_list" [nzDataSource]="checkDetail" nzBordered [nzHeader]="'配置审核详情:'" [nzFooter]="null" *ngIf="taskModel!==false"
- [nzRenderItem]="checkItem">
- <ng-template #checkItem let-check>
- <nz-list-item nz-row nzType="flex" nzJustify="start" [nzGutter]="8">
- <div nz-col nzSpan="10">
- <span>Task ID: {{ check.task_id }}</span>
- </div>
- <div nz-col nzSpan="8">
- <span>Task Name: {{ check.task_name }}</span>
- </div>
- <div nz-col nzSpan="6">
- <span>S-NSSAI:{{ check.service_snssai }}</span>
- </div>
- </nz-list-item>
- <nz-list-item nz-row nzType="flex" nzJustify="start" [nzGutter]="8">
- <div nz-col nzSpan="10">
- <span>Arrived Time: {{ check.create_time | date: 'yyyy-MM-dd HH:mm:ss' }}</span>
- </div>
- <div nz-col nzSpan="8">
- <span>Status: {{ check.processing_status }}</span>
- </div>
- </nz-list-item>
- </ng-template>
- </nz-list>
+<nz-list
+ class="taskmodel_list"
+ [nzDataSource]="checkDetail"
+ nzBordered
+ [nzHeader]="'配置审核详情:'"
+ [nzFooter]="null"
+ *ngIf="taskModel !== false"
+ [nzRenderItem]="checkItem"
+>
+ <ng-template #checkItem let-check>
+ <nz-list-item nz-row nzType="flex" nzJustify="start" [nzGutter]="8">
+ <div nz-col nzSpan="10">
+ <span>Task ID: {{ check.task_id }}</span>
+ </div>
+ <div nz-col nzSpan="8">
+ <span>Task Name: {{ check.task_name }}</span>
+ </div>
+ <div nz-col nzSpan="6">
+ <span>S-NSSAI:{{ check.service_snssai }}</span>
+ </div>
+ </nz-list-item>
+ <nz-list-item nz-row nzType="flex" nzJustify="start" [nzGutter]="8">
+ <div nz-col nzSpan="10">
+ <span>
+ Arrived Time:
+ {{ check.create_time | date: "yyyy-MM-dd HH:mm:ss" }}
+ </span >
+ </div>
+ <div nz-col nzSpan="8">
+ <span>Status: {{ check.processing_status }}</span>
+ </div>
+ </nz-list-item>
+ </ng-template>
+</nz-list>
- <nz-list class="taskmodel_list" [nzDataSource]="businessRequirement" nzBordered [nzHeader]="'业务需求信息:'"
- [nzFooter]="null" [nzRenderItem]="businessItem">
- <ng-template #businessItem let-item>
- <nz-list-item nz-row nzType="flex" nzJustify="start" [nzGutter]="8" *ngFor="let list of businessList ">
- <div nz-col [nzSpan]="list.length === 1 ? '24' : '8'" *ngFor="let ite of list">
- <span class="ant-typography" *ngIf="ite!=='区域'">{{ ite.title }} : &nbsp;{{ item[ite.key] }}</span>
- <span class="ant-typography" *ngIf="ite==='区域'">
- {{ ite.title }} : &nbsp;
- <span style="display: inline-block" *ngFor="let items of item[ite.key]">{{ items }}&nbsp;&nbsp;&nbsp;&nbsp;</span>
- </span>
- </div>
- </nz-list-item>
- </ng-template>
- </nz-list>
+<nz-list
+ class="taskmodel_list"
+ [nzDataSource]="businessRequirement"
+ nzBordered
+ [nzHeader]="'业务需求信息:'"
+ [nzFooter]="null"
+ [nzRenderItem]="businessItem"
+>
+ <ng-template #businessItem let-item>
+ <nz-list-item
+ nz-row
+ nzType="flex"
+ nzJustify="start"
+ [nzGutter]="8"
+ *ngFor="let list of businessList"
+ >
+ <div
+ nz-col
+ [nzSpan]="list.length === 1 ? '24' : '8'"
+ *ngFor="let ite of list"
+ >
+ <span class="ant-typography" *ngIf="ite.title !== '区域'">
+ {{ ite.title }} : &nbsp;{{ item[ite.key] }}
+ </span>
+ <span class="ant-typography" *ngIf="ite.title === '区域'">
+ {{ ite.title }} : &nbsp;
+ <nz-tag *ngFor="let value of item[ite.key]">
+ {{value}}
+ </nz-tag>
+ </span>
+ </div>
+ </nz-list-item>
+ </ng-template>
+</nz-list>
- <nz-list class="taskmodel_list" [nzDataSource]="NSTinfo" nzBordered [nzHeader]="'匹配NST信息:'" [nzFooter]="null"
- [nzRenderItem]="taskItem">
- <ng-template #taskItem let-item>
- <nz-list-item nz-row nzType="flex" nzJustify="start" [nzGutter]="8">
- <div nz-col nzSpan="12">
- <span>NST ID: {{ item.nst_id }}</span>
- </div>
- <div nz-col nzSpan="12">
- <span>NST Name: {{ item.nst_name }}</span>
- </div>
- </nz-list-item>
- </ng-template>
- </nz-list>
+<nz-list
+ class="taskmodel_list"
+ [nzDataSource]="NSTinfo"
+ nzBordered
+ [nzHeader]="'匹配NST信息:'"
+ [nzFooter]="null"
+ [nzRenderItem]="taskItem"
+>
+ <ng-template #taskItem let-item>
+ <nz-list-item nz-row nzType="flex" nzJustify="start" [nzGutter]="8">
+ <div nz-col nzSpan="12">
+ <span>NST ID: {{ item.nst_id }}</span>
+ </div>
+ <div nz-col nzSpan="12">
+ <span>NST Name: {{ item.nst_name }}</span>
+ </div>
+ </nz-list-item>
+ </ng-template>
+</nz-list>
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 @@
<div>
- <div nz-row>
- <div nz-col nzSpan="12" class="task_status">
- <span>Status : </span>
- <nz-select nzShowSearch nzAllowClear [(ngModel)]="selectedValue" nzPlaceHolder="Select a processing status"
- (ngModelChange)="processingStatusChange()">
- <nz-option *ngFor="let item of statusOptions" [nzLabel]="item.title" [nzValue]="item.value"></nz-option>
- </nz-select>
- </div>
- </div>
- <div>
- <nz-table #basicTable nzShowPagination nzPageSizeOptions nzShowSizeChanger [nzTotal]="total" [nzLoading]="loading"
- [nzData]="listOfData" [nzFrontPagination]="false" (nzPageSizeChange)="pageSizeChange($event)"
- (nzPageIndexChange)="pageNumChange($event)">
- <thead>
- <tr>
- <th>任务ID</th>
- <th>任务名称</th>
- <th>S-NSSAI</th>
- <th>切片业务类型</th>
- <th>到达时间</th>
- <th>处理环节</th>
- <th>操作</th>
- </tr>
- </thead>
- <tbody>
- <tr *ngFor="let data of basicTable.data">
- <td>{{ data.task_id }}</td>
- <td>{{ data.task_name }}</td>
- <td>{{ data.service_snssai }}</td>
- <td>{{ data.service_type }}</td>
- <td>{{ data.create_time }}</td>
- <td>{{ data.status }}</td>
- <td>
- <span *ngIf="data.processing_status === 'Planning'"
- class="task_operation_disabled">{{ data.operation }}</span>
- <a (click)="showdetail(data)" *ngIf="data.processing_status !== 'Planning'">{{ data.operation }}</a>
- </td>
- </tr>
- </tbody>
- </nz-table>
- </div>
- <app-slicing-task-model [moduleTitle]="moduleTitle" [showDetail]="showDetail" [taskId]="taskId"
- (cancel)="showDetail=$event">
- </app-slicing-task-model>
- <app-check-process-model [moduleTitle]="moduleTitle" [showProcess]="showProcess" [taskId]="taskId"
- (cancel)="showProcess=$event">
- </app-check-process-model>
-</div> \ No newline at end of file
+ <div nz-row>
+ <div nz-col nzSpan="12" class="task_status">
+ <span>Status : </span>
+ <nz-select
+ nzShowSearch
+ nzAllowClear
+ [(ngModel)]="selectedValue"
+ nzPlaceHolder="Select a processing status"
+ (ngModelChange)="processingStatusChange()"
+ >
+ <nz-option
+ *ngFor="let item of statusOptions"
+ [nzLabel]="item.title"
+ [nzValue]="item.value"
+ ></nz-option>
+ </nz-select>
+ </div>
+ </div>
+ <div>
+ <nz-table
+ #basicTable
+ nzShowPagination
+ nzPageSizeOptions
+ nzShowSizeChanger
+ [nzTotal]="total"
+ [nzLoading]="loading"
+ [nzData]="listOfData"
+ [nzPageIndex]="pageNum"
+ [nzPageSize]="pageSize"
+ [nzFrontPagination]="false"
+ (nzPageSizeChange)="pageSizeChange($event)"
+ (nzPageIndexChange)="pageNumChange($event)"
+ >
+ <thead>
+ <tr>
+ <th>任务ID</th>
+ <th>任务名称</th>
+ <th>S-NSSAI</th>
+ <th>切片业务类型</th>
+ <th>到达时间</th>
+ <th>处理环节</th>
+ <th>操作</th>
+ </tr>
+ </thead>
+ <tbody>
+ <tr *ngFor="let data of basicTable.data">
+ <td>{{ data.task_id }}</td>
+ <td>{{ data.task_name }}</td>
+ <td>{{ data.service_snssai }}</td>
+ <td>{{ data.service_type }}</td>
+ <td>{{ data.create_time | date: "yyyy-MM-dd HH:mm:ss"}}</td>
+ <td>{{ data.status }}</td>
+ <td>
+ <span
+ *ngIf="data.processing_status === 'Planning'"
+ class="task_operation_disabled"
+ >{{ data.operation }}</span
+ >
+ <a
+ (click)="showdetail(data)"
+ *ngIf="data.processing_status !== 'Planning'"
+ >{{ data.operation }}</a
+ >
+ </td>
+ </tr>
+ </tbody>
+ </nz-table>
+ </div>
+ <app-slicing-task-model
+ [moduleTitle]="moduleTitle"
+ [showDetail]="showDetail"
+ [taskId]="taskId"
+ (cancel)="showDetail = $event"
+ >
+ </app-slicing-task-model>
+ <app-check-process-model
+ [moduleTitle]="moduleTitle"
+ [showProcess]="showProcess"
+ [taskId]="taskId"
+ (cancel)="showProcess = $event"
+ >
+ </app-check-process-model>
+</div>
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'
},
],