"processing_status": "WaitingToConfirm",\r
"business_demand_info": {\r
"service_name": "5G Slice eMMB",\r
- "service_snssai": "1-010101",\r
+ "service_snssai": "",\r
"exp_data_rate_dl": "300",\r
"exp_data_rate_ul": "300",\r
"ue_mobility_level": "stationary",\r
<nz-list
class="taskmodel_list"
- [nzDataSource]="businessRequirement"
+ [nzDataSource]="requirement"
nzBordered
[nzHeader]="businessItemTitle"
[nzFooter]="null"
nzType="flex"
nzJustify="start"
[nzGutter]="8"
- *ngFor="let list of businessList"
+ *ngFor="let list of businessListAfterSorting"
>
<div
nz-col
<nz-tag *ngFor="let value of item[ite.key]">
{{value}}
</nz-tag>
- </span>
+ </span>
</div>
</nz-list-item>
</ng-template>
import { Component, OnInit, Input } from '@angular/core';
-import { BUSINESS_REQUIREMENT } from '../../../../constants/constants';
+import { BUSINESS_REQUIREMENT } from '@src/constants/constants';
+import {el} from "@angular/platform-browser/testing/src/browser_util";
@Component({
selector: 'app-basic-info',
templateUrl: './basic-info.component.html',
// 业务需求列表
businessList: object[] = BUSINESS_REQUIREMENT;
-
+ requirement: object = [{}];
+ businessListAfterSorting: object[] = [];
constructor() { }
ngOnInit() {
+
}
+ ngOnChanges() { // Business Requirement Info: Render the page according to whether there is a value
+ this.businessListAfterSorting = [];
+ this.businessList = BUSINESS_REQUIREMENT.concat([]);
+ if(this.businessRequirement && this.businessRequirement.length !== 0){
+ Object.keys(this.businessRequirement[0]).map((item,index)=>{
+ if(this.businessRequirement[0][item] !== '' && this.businessRequirement[0][item] !== null){
+ this.requirement[0][item] = this.businessRequirement[0][item];
+
+ }else{
+ this.businessList.map((items,indexs)=>{
+ if(Array.isArray(items) === false && items["key"] === item){
+ this.businessList.splice(indexs,1)
+ }
+ })
+ }
+ });
+ let area = this.businessList.pop();
+ for(let i=0;i<this.businessList.length-1;i+=3){
+ this.businessListAfterSorting.push(this.businessList.slice(i,i+3));
+ }
+ this.businessListAfterSorting.push(area);
+ }
+ }
+
}
]\r
\r
export const BUSINESS_REQUIREMENT = [\r
- [\r
+\r
{\r
title: 'Slicing Business Name',\r
key: 'service_name'\r
title: 'Data Rate Downlink (Mbps) ',\r
key: 'exp_data_rate_dl'\r
},\r
- ],\r
- [\r
{\r
title: 'Data Rate Uplink (Mbps) ',\r
key: 'exp_data_rate_ul'\r
title: 'Latency (ms)',\r
key: 'latency'\r
},\r
- ],\r
- [\r
{\r
- title: 'Use Interval (Moon) ',\r
+ title: 'Use Interval (Month) ',\r
key: 'use_interval'\r
},\r
\r
title: 'Resource Sharing Level',\r
key: 'resource_sharing_level'\r
},\r
- ],\r
- [\r
{\r
title: 'Max Number of UEs',\r
key: 'max_number_of_ues'\r
{\r
title: 'Downlink Regional Traffic Density(Mbps/km )',\r
key: 'area_traffic_cap_dl'\r
- }\r
- ],\r
- [\r
- {\r
- title: 'Area',\r
- key: 'area'\r
},\r
- ],\r
-\r
+ [\r
+ {\r
+ title: 'Area',\r
+ key: 'area'\r
+ }\r
+ ]\r
\r
]\r
\r