summaryrefslogtreecommitdiffstats
path: root/usecaseui-portal/src/app/views/services/slicing-management/slicing-resource-management/nsi-management/nsi-model/nsi-model.component.ts
diff options
context:
space:
mode:
authorcyuamber <xuranyjy@chinamobile.com>2020-09-08 09:50:48 +0800
committercyuamber <xuranyjy@chinamobile.com>2020-09-08 10:03:42 +0800
commit43cb242d5a78e86786d4274fc539d81680fc15c4 (patch)
treee4635ef8ee1c7bc7102f6333e3ed2488b27b8cab /usecaseui-portal/src/app/views/services/slicing-management/slicing-resource-management/nsi-management/nsi-model/nsi-model.component.ts
parent926b57b4d540c73f1930e6d2d2070e5ac6939e5d (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/nsi-management/nsi-model/nsi-model.component.ts')
-rw-r--r--usecaseui-portal/src/app/views/services/slicing-management/slicing-resource-management/nsi-management/nsi-model/nsi-model.component.ts28
1 files changed, 12 insertions, 16 deletions
diff --git a/usecaseui-portal/src/app/views/services/slicing-management/slicing-resource-management/nsi-management/nsi-model/nsi-model.component.ts b/usecaseui-portal/src/app/views/services/slicing-management/slicing-resource-management/nsi-management/nsi-model/nsi-model.component.ts
index 71b3aba9..5deb91b7 100644
--- a/usecaseui-portal/src/app/views/services/slicing-management/slicing-resource-management/nsi-management/nsi-model/nsi-model.component.ts
+++ b/usecaseui-portal/src/app/views/services/slicing-management/slicing-resource-management/nsi-management/nsi-model/nsi-model.component.ts
@@ -24,23 +24,19 @@ export class NsiModelComponent implements OnInit {
this.getNsiDetail()
}
getNsiDetail() {
- this.myhttp.getSlicingNsiDetail(this.nsiId).subscribe(res => {
+ this.myhttp.getSlicingNsiDetail(this.nsiId).then(res => {
this.isSpinning = false;
- const {result_header: {result_code}, result_body: {hosted_business_list,included_nssi_list} } = res;
- if (+result_code === 200) {
- this.businessList = hosted_business_list.map((item)=>{
- if(item.service_instance_id !==null){
- return item
- }
- });
- this.nssiList = included_nssi_list.map((item)=>{
- if(item.service_instance_id !==null){
- return item
- }
- });
- }else{
- this.message.error(res.result_header.result_message)
- }
+ const { result_body: {hosted_business_list,included_nssi_list} } = res;
+ this.businessList = hosted_business_list.map((item)=>{
+ if(item.service_instance_id !==null){
+ return item
+ }
+ });
+ this.nssiList = included_nssi_list.map((item)=>{
+ if(item.service_instance_id !==null){
+ return item
+ }
+ });
})
}
showBusinessDetail(data){