summaryrefslogtreecommitdiffstats
path: root/usecaseui-portal/src/app/views/services/slicing-management/slicing-task-management/check-process-model
diff options
context:
space:
mode:
Diffstat (limited to 'usecaseui-portal/src/app/views/services/slicing-management/slicing-task-management/check-process-model')
-rw-r--r--usecaseui-portal/src/app/views/services/slicing-management/slicing-task-management/check-process-model/check-process-model.component.html70
-rw-r--r--usecaseui-portal/src/app/views/services/slicing-management/slicing-task-management/check-process-model/check-process-model.component.ts22
2 files changed, 56 insertions, 36 deletions
diff --git a/usecaseui-portal/src/app/views/services/slicing-management/slicing-task-management/check-process-model/check-process-model.component.html b/usecaseui-portal/src/app/views/services/slicing-management/slicing-task-management/check-process-model/check-process-model.component.html
index 07599bfb..ebe1e15b 100644
--- a/usecaseui-portal/src/app/views/services/slicing-management/slicing-task-management/check-process-model/check-process-model.component.html
+++ b/usecaseui-portal/src/app/views/services/slicing-management/slicing-task-management/check-process-model/check-process-model.component.html
@@ -5,39 +5,39 @@
(nzOnCancel)="handleCancel()"
(nzOnOk)="handleOk()"
>
- <app-basic-info
- [checkDetail]="checkDetail"
- [businessRequirement]="businessRequirement"
- [NSTinfo]="NSTinfo"
- >
- </app-basic-info>
- <nz-list [nzDataSource]="data" nzBordered nzHeader="任务详情:" [nzFooter]="null" [nzRenderItem]="defaultItem" >
- <ng-template #defaultItem let-item>
- <nz-list-item nz-row nzType="flex" nzJustify="center" >
- <nz-steps
- nzType="navigation"
- [nzCurrent]="item.currentProgress"
- nz-col
- nzSpan="20"
- nzSize="small"
- *ngFor="let item of data[0]; let i = index" class="task_progress"
- [ngStyle]="{paddingBottom: i === data[0].length -1 ? '30px': '0px'}"
- >
- <nz-step [nzTitle]="item.title"></nz-step>
- <nz-step
- [nzTitle]="item.currentProgress > 1 ? null : 'in progress'"
- [nzStatus]="item.status" nzIcon="anticon anticon-spin anticon-loading"
- > </nz-step>
- <nz-step
- [nzTitle]="item.status === 'finish' ? 'success' : null"
- [nzStatus]="item.status === 'finish' ? 'finish' : 'wait'"
- nzIcon='loading'
- ></nz-step>
- </nz-steps>
-
- </nz-list-item>
- </ng-template>
- </nz-list>
-
-
+ <nz-spin [nzSpinning]="isSpinning">
+ <app-basic-info
+ [checkDetail]="checkDetail"
+ [businessRequirement]="businessRequirement"
+ [NSTinfo]="NSTinfo"
+ >
+ </app-basic-info>
+ <nz-list [nzDataSource]="data" nzBordered nzHeader="任务详情:" [nzFooter]="null" [nzRenderItem]="defaultItem" >
+ <ng-template #defaultItem let-item>
+ <nz-list-item nz-row nzType="flex" nzJustify="center" >
+ <nz-steps
+ nzType="navigation"
+ [nzCurrent]="item.currentProgress"
+ nz-col
+ nzSpan="20"
+ nzSize="small"
+ *ngFor="let item of data[0]; let i = index" class="task_progress"
+ [ngStyle]="{paddingBottom: i === data[0].length -1 ? '30px': '0px'}"
+ >
+ <nz-step [nzTitle]="item.title"></nz-step>
+ <nz-step
+ [nzTitle]="item.currentProgress > 1 ? null : 'in progress'"
+ [nzStatus]="item.status" nzIcon="anticon anticon-spin anticon-loading"
+ > </nz-step>
+ <nz-step
+ [nzTitle]="item.status === 'finish' ? 'success' : null"
+ [nzStatus]="item.status === 'finish' ? 'finish' : 'wait'"
+ nzIcon='loading'
+ ></nz-step>
+ </nz-steps>
+
+ </nz-list-item>
+ </ng-template>
+ </nz-list>
+ </nz-spin>
</nz-modal>
diff --git a/usecaseui-portal/src/app/views/services/slicing-management/slicing-task-management/check-process-model/check-process-model.component.ts b/usecaseui-portal/src/app/views/services/slicing-management/slicing-task-management/check-process-model/check-process-model.component.ts
index 77a36a06..4656c32e 100644
--- a/usecaseui-portal/src/app/views/services/slicing-management/slicing-task-management/check-process-model/check-process-model.component.ts
+++ b/usecaseui-portal/src/app/views/services/slicing-management/slicing-task-management/check-process-model/check-process-model.component.ts
@@ -1,4 +1,5 @@
import { Component, OnInit, Input, Output, EventEmitter } from '@angular/core';
+import { NzMessageService } from 'ng-zorro-antd';
import { SlicingTaskServices } from '../../../../../core/services/slicingTaskServices'
@Component({
@@ -14,7 +15,7 @@ export class CheckProcessModelComponent implements OnInit {
@Output() cancel = new EventEmitter<boolean>();
- constructor(private http: SlicingTaskServices) { }
+ constructor(private http: SlicingTaskServices, private message: NzMessageService) { }
checkDetail: any[];
businessRequirement: any[];
@@ -22,20 +23,29 @@ export class CheckProcessModelComponent implements OnInit {
data: any[];
currentProgress: number = 1;
timer: any = null;
+ isSpinning: boolean = false;
+ isGetData: boolean = false;
ngOnInit() { }
ngOnChanges() {
if (this.showProcess) {
+ this.isSpinning = true;
this.getInfo();
this.getProgress();
}else {
clearTimeout(this.timer);
+ this.isGetData = false;
}
}
getInfo(): void {
this.http.getSlicingBasicInfo(this.taskId).subscribe(res => {
+ if (this.isGetData) {
+ this.isSpinning = false;
+ } else {
+ this.isGetData = true;
+ }
const { result_body, result_header: { result_code } } = res;
if (+result_code === 200) {
const {
@@ -53,12 +63,20 @@ export class CheckProcessModelComponent implements OnInit {
this.businessRequirement = [business_demand_info];
// 匹配NST信息
this.NSTinfo = [nst_info];
+ } else {
+ const errorMessage = this.moduleTitle === '切片创建中' ? 'Failed to get data' : 'Viewing results failed';
+ this.message.error(errorMessage)
}
})
}
getProgress(): void {
this.http.getSlicingCreateProgress(this.taskId).subscribe(res => {
+ if (this.isGetData) {
+ this.isSpinning = false;
+ } else {
+ this.isGetData = true;
+ }
const { result_body, result_header: {result_code } } = res;
if (+result_code === 200) {
this.data = [];
@@ -85,6 +103,8 @@ export class CheckProcessModelComponent implements OnInit {
this.getProgress()
}, 5000)
}
+ } else {
+ this.message.error('Failed to get progress')
}
})
}