diff options
author | 2020-09-08 09:50:48 +0800 | |
---|---|---|
committer | 2020-09-08 10:03:42 +0800 | |
commit | 43cb242d5a78e86786d4274fc539d81680fc15c4 (patch) | |
tree | e4635ef8ee1c7bc7102f6333e3ed2488b27b8cab /usecaseui-portal/src/app/views/services/slicing-management/slicing-resource-management/slicing-business-management/slicing-business-model/slicing-business-model.component.ts | |
parent | 926b57b4d540c73f1930e6d2d2070e5ac6939e5d (diff) |
feat: Optimize the public request method of axios
Change-Id: Iab9e86c66628c9a0c39e0a9ed56607417805c9d4
Issue-ID: USECASEUI-444
Signed-off-by: cyuamber <xuranyjy@chinamobile.com>
Diffstat (limited to 'usecaseui-portal/src/app/views/services/slicing-management/slicing-resource-management/slicing-business-management/slicing-business-model/slicing-business-model.component.ts')
-rw-r--r-- | usecaseui-portal/src/app/views/services/slicing-management/slicing-resource-management/slicing-business-management/slicing-business-model/slicing-business-model.component.ts | 35 |
1 files changed, 15 insertions, 20 deletions
diff --git a/usecaseui-portal/src/app/views/services/slicing-management/slicing-resource-management/slicing-business-management/slicing-business-model/slicing-business-model.component.ts b/usecaseui-portal/src/app/views/services/slicing-management/slicing-resource-management/slicing-business-management/slicing-business-model/slicing-business-model.component.ts index b27e5a31..7bed4304 100644 --- a/usecaseui-portal/src/app/views/services/slicing-management/slicing-resource-management/slicing-business-management/slicing-business-model/slicing-business-model.component.ts +++ b/usecaseui-portal/src/app/views/services/slicing-management/slicing-resource-management/slicing-business-management/slicing-business-model/slicing-business-model.component.ts @@ -29,27 +29,22 @@ export class SlicingBusinessModelComponent implements OnInit { } getDetail() { - this.myhttp.getSlicingBusinessDetail(this.businessId).subscribe(res => { + this.myhttp.getSlicingBusinessDetail(this.businessId).then(res => { this.isSpinning = false; - const { result_body, result_header: { result_code } } = res; - if (+result_code === 200) { - const { business_demand_info, business_demand_info: { coverage_area_ta_list }, nst_info, nsi_info } = result_body; - business_demand_info.area = coverage_area_ta_list.map(item => { - item = item.split(';').join('-'); - return item - }); - // area : Front-end analog data - let area = ["Haidian District;Beijing;Beijing", "Xicheng District;Beijing;Beijing", "Changping District;Beijing;Beijing"].map(item => { - item = item.split(';').join(' - '); - return item - }); - this.businessRequirement = [{ ...business_demand_info, area }]; - this.NSTinfo = [nst_info]; - if (nsi_info.nsi_id !== null) { - this.nsiInfo = [nsi_info]; - } - }else{ - this.message.error(res.result_header.result_message) + const { business_demand_info, business_demand_info: { coverage_area_ta_list }, nst_info, nsi_info } = res.result_body; + business_demand_info.area = coverage_area_ta_list.map(item => { + item = item.split(';').join('-'); + return item + }); + // area : Front-end analog data + let area = ["Haidian District;Beijing;Beijing", "Xicheng District;Beijing;Beijing", "Changping District;Beijing;Beijing"].map(item => { + item = item.split(';').join(' - '); + return item + }); + this.businessRequirement = [{ ...business_demand_info, area }]; + this.NSTinfo = [nst_info]; + if (nsi_info.nsi_id !== null) { + this.nsiInfo = [nsi_info]; } }) } |