feat:Optimize the display of page status values and progress bars 36/101736/1
authorcyuamber <xuranyjy@chinamobile.com>
Fri, 14 Feb 2020 11:52:38 +0000 (19:52 +0800)
committercyuamber <xuranyjy@chinamobile.com>
Fri, 14 Feb 2020 11:52:42 +0000 (19:52 +0800)
Change-Id: I27fd8346148c7652d531a018331828f64d6664b7
Issue-ID: USECASEUI-368
Signed-off-by: cyuamber <xuranyjy@chinamobile.com>
usecaseui-portal/src/app/views/services/slicing-management/csmf-slicing-business-management/csmf-slicing-business-management.component.html
usecaseui-portal/src/app/views/services/slicing-management/csmf-slicing-business-management/csmf-slicing-business-management.component.ts

index ea4e55e..01a592c 100644 (file)
@@ -18,7 +18,7 @@
         <th width=100>No</th>
         <th width=280>Service Instance Id</th>
         <th width=200>Service Instance Name</th>
-        <th width=200>Creation Time</th>
+        <th width=200>Created Time</th>
         <!--<th width=110>Service Type</th>-->
         <th width=110>S-NSSAI</th>
         <th width=110>Status</th>
@@ -44,7 +44,7 @@
           <td>
             <div class="action-icon">
               <nz-switch [ngModel]="data.order_status==='activated'?true:false"
-                         [nzDisabled]="data.last_operation_type && data.last_operation_progress && data.last_operation_progress !== '100'"
+                         [nzDisabled]="data.order_status === 'processing'|| (data.order_status !== 'processing' && data.last_operation_progress && data.last_operation_progress !== '100')"
                          (ngModelChange)="switchChange(data,i)"></nz-switch>
               <nz-progress
                       *ngIf="data.last_operation_type && data.last_operation_progress && data.last_operation_progress !== '100' && data.last_operation_type !== 'DELETE'"
@@ -54,7 +54,7 @@
           </td>
             <td>
                 <div class="action-icon">
-                    <i [ngClass]="{'cannotclick': data.last_operation_type && data.last_operation_progress && data.last_operation_progress !== '100' && (data.last_operation_type !== 'DELETE' || data.order_status==='activated')}"
+                    <i [ngClass]="{'cannotclick':data.order_status === 'processing' || ( data.last_operation_progress && data.last_operation_progress !== '100' && (data.last_operation_type === 'DELETE' || data.last_operation_type === 'activated'))}"
                        nz-icon nzType="poweroff" nzTheme="outline" class="anticon anticon-poweroff"
                        (click)="terminate(data,i)"></i>
                     <nz-progress
@@ -68,5 +68,5 @@
       </tbody>
     </nz-table>
   </div>
-  <app-business-order [showModel]="businessOrderShow" (cancel)="businessOrderShow=$event"></app-business-order>
+  <app-business-order [showModel]="businessOrderShow" (cancel)="orderModelClose($event)"></app-business-order>
 </div>
\ No newline at end of file
index 766f9ed..446f7fc 100644 (file)
@@ -58,7 +58,7 @@ export class CsmfSlicingBusinessManagementComponent implements OnInit {
                 this.total = record_number;
                 if (slicing_order_list !== null && slicing_order_list.length > 0) {
                     this.listOfData = slicing_order_list.map((item, index) => {
-                        item.order_creation_time =  moment(Number(item.order_creation_time)).format('YYYY-MM-DD');
+                        item.order_creation_time =  moment(Number(item.order_creation_time)).format('YYYY-MM-DD hh:mm:ss');
                         if (item.last_operation_progress && item.last_operation_type && Number(item.last_operation_progress) < 100) {
                             let updata = (prodata: { operation_progress: string }) => {
                                 item.last_operation_progress = prodata.operation_progress || item.last_operation_progress;
@@ -222,4 +222,9 @@ export class CsmfSlicingBusinessManagementComponent implements OnInit {
     OrderModelShow(){
         this.businessOrderShow = true;
     }
+    orderModelClose($event){
+        console.log($event,"$event------")
+        this.businessOrderShow = $event;
+        this.getCSMFBusinessList();
+    }
 }