diff options
author | cyuamber <xuranyjy@chinamobile.com> | 2020-09-03 11:58:00 +0800 |
---|---|---|
committer | cyuamber <xuranyjy@chinamobile.com> | 2020-09-03 11:58:05 +0800 |
commit | 0b5db174d96c70baa84d19b1dab579f7cdccc69d (patch) | |
tree | 097273b58c5da2a33f69f0b444f57d2503bed192 /usecaseui-portal/src/app/shared/components | |
parent | e53241039a071a5822880bee058bff84b5d2e754 (diff) |
feat: Business Requirement Info Add some parameters of 5g task
Change-Id: I430bf23a65ccb149e890d539badc8316793f7929
Issue-ID: USECASEUI-444
Signed-off-by: cyuamber <xuranyjy@chinamobile.com>
Diffstat (limited to 'usecaseui-portal/src/app/shared/components')
-rw-r--r-- | usecaseui-portal/src/app/shared/components/basic-info/basic-info.component.ts | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/usecaseui-portal/src/app/shared/components/basic-info/basic-info.component.ts b/usecaseui-portal/src/app/shared/components/basic-info/basic-info.component.ts index 538b08c5..6539bbd3 100644 --- a/usecaseui-portal/src/app/shared/components/basic-info/basic-info.component.ts +++ b/usecaseui-portal/src/app/shared/components/basic-info/basic-info.component.ts @@ -27,6 +27,20 @@ export class BasicInfoComponent implements OnInit { this.businessListAfterSorting = []; this.businessList = BUSINESS_REQUIREMENT.concat([]); if(this.businessRequirement && this.businessRequirement.length !== 0){ + let businessListkeysList = []; + this.businessList.map(ite=>{ + if(!Array.isArray(ite)){businessListkeysList.push(ite["key"])} + }) + // Filter the difference between the local businessList and the requirement data returned by the backend. + // When the key is missing in the data returned by the backend, the local businessList data is deleted and filtered + let filterSubtractionKeysList = businessListkeysList.filter(item=>Object.keys(this.businessRequirement[0]).indexOf(item)==-1); + filterSubtractionKeysList.map(key=>{ + this.businessList.map((item,k)=>{ + if(Array.isArray(item) === false && item["key"] === key){ + this.businessList.splice(k,1) + } + }) + }); 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]; |