diff options
author | 2019-08-21 18:28:53 +0800 | |
---|---|---|
committer | 2019-08-22 09:41:56 +0800 | |
commit | 56923755c761897cc86ca2457667fcc3e6a0e43f (patch) | |
tree | 0960d4586e3631b41760a4d40b1bc4fdcd48873d /usecaseui-portal/src/app/services/services-list/services-list.component.ts | |
parent | 0568ef38b7c3b90ceaea6f2ae43309132a322b1e (diff) |
style:services-list page style optimization
Change-Id: Ic5f3078b03a2b1dee4d5c0458815c716a1945c86
Issue-ID: USECASEUI-307
Signed-off-by: cyuamber <xuranyjy@chinamobile.com>
Diffstat (limited to 'usecaseui-portal/src/app/services/services-list/services-list.component.ts')
-rw-r--r-- | usecaseui-portal/src/app/services/services-list/services-list.component.ts | 63 |
1 files changed, 8 insertions, 55 deletions
diff --git a/usecaseui-portal/src/app/services/services-list/services-list.component.ts b/usecaseui-portal/src/app/services/services-list/services-list.component.ts index 3c22b7d8..3a07c1fe 100644 --- a/usecaseui-portal/src/app/services/services-list/services-list.component.ts +++ b/usecaseui-portal/src/app/services/services-list/services-list.component.ts @@ -18,6 +18,7 @@ import { MyhttpService } from '../../myhttp.service'; import { slideToRight } from '../../animates'; import { NzModalService } from 'ng-zorro-antd'; import { NzNotificationService } from 'ng-zorro-antd'; +import { Observable } from 'rxjs/Rx'; @Component({ selector: 'app-services-list', @@ -28,11 +29,16 @@ import { NzNotificationService } from 'ng-zorro-antd'; export class ServicesListComponent implements OnInit { @HostBinding('@routerAnimate') routerAnimateState; + public width:number = document.documentElement.clientWidth; + constructor(private myhttp: MyhttpService, private modalService: NzModalService, private notification: NzNotificationService) { } ngOnInit() { this.getallCustomers(); + Observable.fromEvent(window, 'resize').subscribe((event) => { + this.width = document.documentElement.clientWidth + }); } // customer servicetype @@ -1273,19 +1279,6 @@ export class ServicesListComponent implements OnInit { queryProgress(obj, callback) { let mypromise = new Promise((res, rej) => { - // let data = { - // operationStatus:{ - // "operationId": "XXXXXX", - // "operation": "create|delete|update|scale", - // "result": "finished|error|processing", - // "reason": "", - // "userId": "", - // "operationContent": "Be creating pop.", - // "progress": 0, - // "operateAt": "", - // "finishedAt": "" - // } - // } let errorNums = 180; let requery = () => { this.myhttp.getProgress(obj) @@ -1319,17 +1312,6 @@ export class ServicesListComponent implements OnInit { res(data.operationStatus); } }) - // setTimeout(()=>{ - // console.log(data.operationStatus.progress) - // data.operationStatus.progress++; - // if(data.operationStatus.progress<100){ - // callback(data.operationStatus); - // requery() - // }else{ - // callback(data.operationStatus); - // res(data.operationStatus) - // } - // },100) } requery(); }) @@ -1338,25 +1320,7 @@ export class ServicesListComponent implements OnInit { queryNsProgress(jobid, id, callback, operationType) { let mypromise = new Promise((res, rej) => { - // let data = { - // "jobId": "string", - // "responseDescriptor": { - // "status": "string", - // "progress": 0, - // "statusDescription": "string", - // "errorCode": "string", - // "responseId": "string", - // "responseHistoryList": [ - // { - // "status": "string", - // "progress": "string", - // "statusDescription": "string", - // "errorCode": "string", - // "responseId": "string" - // } - // ] - // } - // } + let errorNums = 180; let requery = () => { this.myhttp.getNsProgress(jobid, id, operationType) @@ -1366,7 +1330,6 @@ export class ServicesListComponent implements OnInit { return false; } if (data.responseDescriptor == null || data.responseDescriptor.progress == undefined) { - // console.log(data); errorNums--; if (errorNums == 0) { callback({ progress: 255, status: "time over" }); @@ -1390,17 +1353,7 @@ export class ServicesListComponent implements OnInit { res(data); } }) - // setTimeout(()=>{ - // console.log(data.responseDescriptor.progress) - // data.responseDescriptor.progress++; - // if(data.responseDescriptor.progress<100){ - // callback(data.responseDescriptor); - // requery() - // }else{ - // callback(data); - // res(data) - // } - // },100) + }; requery(); }); |