From dc2d38249ca5ac3127c260745af6251604e35a80 Mon Sep 17 00:00:00 2001 From: liuwh7 Date: Mon, 21 Mar 2022 14:11:42 +0800 Subject: feat: intent instance management Signed-off-by: liuwh7 Change-Id: I7d8047e7ccc86617399ce57a5be62907d09292eb Issue-ID: REQ-1075 --- .../business-order/business-order.component.ts | 36 ++++++++++++++++++++-- 1 file changed, 34 insertions(+), 2 deletions(-) (limited to 'usecaseui-portal/src/app/views/services/slicing-management') diff --git a/usecaseui-portal/src/app/views/services/slicing-management/csmf-slicing-business-management/business-order/business-order.component.ts b/usecaseui-portal/src/app/views/services/slicing-management/csmf-slicing-business-management/business-order/business-order.component.ts index aa5a5db1..70ef4ef8 100644 --- a/usecaseui-portal/src/app/views/services/slicing-management/csmf-slicing-business-management/business-order/business-order.component.ts +++ b/usecaseui-portal/src/app/views/services/slicing-management/csmf-slicing-business-management/business-order/business-order.component.ts @@ -51,6 +51,7 @@ export class BusinessOrderComponent implements OnInit { uEMobilityLevel: "stationary", coverageArea: "", coverageAreaNumber: null, + intentContent: '', }; areaList: any[] = []; validateRulesShow: any[] = []; @@ -95,6 +96,7 @@ export class BusinessOrderComponent implements OnInit { uEMobilityLevel: "stationary", coverageArea: "", coverageAreaNumber: null, + intentContent: '' }; this.validateRulesShow = []; } @@ -152,7 +154,18 @@ export class BusinessOrderComponent implements OnInit { this.handleCancel(); }; this.loading = true; - this.myhttp + + // csmfSlicingPurchaseWithContent + const { intentContent } = this.slicing_order_info; + if (intentContent) { + this.csmfSlicingPurchaseWithContent(paramsObj, csmfSlicingPurchaseFailedCallback); + return; + } + this.csmfSlicingPurchase(paramsObj, csmfSlicingPurchaseFailedCallback); + } + + csmfSlicingPurchase(paramsObj, csmfSlicingPurchaseFailedCallback): void { + this.myhttp .csmfSlicingPurchase(paramsObj, csmfSlicingPurchaseFailedCallback) .then((res) => { const result = res.result_header; @@ -168,5 +181,24 @@ export class BusinessOrderComponent implements OnInit { this.loading = false; this.handleCancel(); }); - } + } + + csmfSlicingPurchaseWithContent(paramsObj, csmfSlicingPurchaseFailedCallback): void { + this.myhttp + .csmfSlicingPurchaseWithContent(paramsObj, csmfSlicingPurchaseFailedCallback) + .then((res) => { + const result = res.result_header; + if ( + result && + result.result_code && + +result.result_code === 200 + ) { + console.log(res); + } else { + this.message.create("error", "Network error"); + } + this.loading = false; + this.handleCancel(); + }); + } } -- cgit 1.2.3-korg