summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorcyuamber <xuranyjy@chinamobile.com>2020-09-08 12:40:27 +0800
committercyuamber <xuranyjy@chinamobile.com>2020-09-08 12:40:33 +0800
commitcf5ac1658730e1cf44f0ba9ed9c4178eb49dfba5 (patch)
tree2f714b99f69eff48a131081468f5d192238e4e64
parent4900b654e209223e5948d51f0b629972a8eb917c (diff)
feat: Delete the useless message.error code of slicing-task-management page
Change-Id: I65d902038279c59c214ad8d6d842527a9c1a1d9c Issue-ID: USECASEUI-444 Signed-off-by: cyuamber <xuranyjy@chinamobile.com>
-rw-r--r--usecaseui-portal/src/app/views/services/slicing-management/slicing-task-management/slicing-task-management.component.ts24
1 files changed, 11 insertions, 13 deletions
diff --git a/usecaseui-portal/src/app/views/services/slicing-management/slicing-task-management/slicing-task-management.component.ts b/usecaseui-portal/src/app/views/services/slicing-management/slicing-task-management/slicing-task-management.component.ts
index b15421b6..4e765055 100644
--- a/usecaseui-portal/src/app/views/services/slicing-management/slicing-task-management/slicing-task-management.component.ts
+++ b/usecaseui-portal/src/app/views/services/slicing-management/slicing-task-management/slicing-task-management.component.ts
@@ -1,5 +1,4 @@
import {Component, OnInit, Input, SimpleChanges} from '@angular/core';
-import { NzMessageService } from 'ng-zorro-antd';
import { SlicingTaskServices } from '@src/app/core/services/slicingTaskServices';
import { TASK_PROCESSING_STATUS } from '@src/constants/constants';
@@ -10,7 +9,7 @@ import { TASK_PROCESSING_STATUS } from '@src/constants/constants';
})
export class SlicingTaskManagementComponent implements OnInit {
- constructor(private myhttp: SlicingTaskServices, private message: NzMessageService) { }
+ constructor(private myhttp: SlicingTaskServices) { }
@Input() currentTabTitle;
@@ -38,15 +37,14 @@ export class SlicingTaskManagementComponent implements OnInit {
getTaskList(): void {
const { pageNum, pageSize } = this;
this.loading = true;
- this.myhttp.getSlicingTaskList(pageNum, pageSize).then(res => {
- const { result_body } = res;
- const { slicing_task_list, record_number } = result_body;
+ let getSlicingTaskListFailedCallback = () => {
+ this.loading = false;
+ }
+ this.myhttp.getSlicingTaskList(pageNum, pageSize, getSlicingTaskListFailedCallback).then(res => {
+ const { slicing_task_list, record_number } = res.result_body;
this.dataFormatting(slicing_task_list);
this.total = record_number;
this.loading = false;
- }, ({ status, statusText }) => {
- this.message.error(status + ' (' + statusText + ')');
- this.loading = false;
})
}
@@ -63,16 +61,16 @@ export class SlicingTaskManagementComponent implements OnInit {
getListOfProcessingStatus(): void {
const { selectedValue, pageNum, pageSize } = this;
this.loading = true;
- this.myhttp.getTaskProcessingStatus(selectedValue, pageNum + '', pageSize + '').then(res => {
+ let getTaskProcessingStatusFailedCallback = () => {
+ this.loading = false;
+ this.listOfData = [];
+ }
+ this.myhttp.getTaskProcessingStatus(selectedValue, pageNum + '', pageSize + '', getTaskProcessingStatusFailedCallback).then(res => {
const { result_body } = res
const { slicing_task_list, record_number } = result_body;
this.dataFormatting(slicing_task_list)
this.total = record_number;
this.loading = false;
- }, ({ status, statusText }) => {
- this.message.error(status + ' (' + statusText + ')');
- this.listOfData = [];
- this.loading = false;
})
}