| 
					
				 | 
			
			
				@@ -2,7 +2,7 @@ import { Component, OnInit, ViewChild } from '@angular/core'; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 import { _HttpClient, ModalHelper } from '@delon/theme'; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 import { STColumn, STComponent } from '@delon/abc'; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 import { SFSchema } from '@delon/form'; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-import { NzDrawerService } from 'ng-zorro-antd'; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+import { NzDrawerService, NzNotificationService } from 'ng-zorro-antd'; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 import { ContractManagementContractFileAddComponent } from './add/add.component'; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 import { I18NService } from '@core'; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 import { ContractFile } from 'app/entity/contract-management/contract-file'; 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -14,32 +14,11 @@ import { ContractManagementContractFileUpdateComponent } from './update/update.c 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				   templateUrl: './contract-file.component.html', 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 }) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 export class ContractManagementContractFileComponent implements OnInit { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-  url = `/user`; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-  searchSchema: SFSchema = { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-    properties: { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-      no: { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        type: 'string', 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        title: '编号' 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-      } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-    } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-  }; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-  @ViewChild('st') st: STComponent; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-  columns: STColumn[] = [ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-    { title: '编号', index: 'no' }, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-    { title: '调用次数', type: 'number', index: 'callNo' }, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-    { title: '头像', type: 'img', width: '50px', index: 'avatar' }, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-    { title: '时间', type: 'date', index: 'updatedAt' }, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-    { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-      title: '', 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-      buttons: [ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        // { text: '查看', click: (item: any) => `/form/${item.id}` }, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        // { text: '编辑', type: 'static', component: FormEditComponent, click: 'reload' }, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-      ] 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-    } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-  ]; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+   
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				   constructor(private nzDrawerService:NzDrawerService,private i18NService:I18NService, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-    private contractFileService:ContractFileService) { } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    private contractFileService:ContractFileService, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    private nzNotificationService:NzNotificationService) { } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				   ngOnInit() { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     this.getList() 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -74,7 +53,7 @@ export class ContractManagementContractFileComponent implements OnInit { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     return new Promise((resolve)=>{ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       this.isSpinning=true; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       this.contractFile.pkOrg=sessionStorage.getItem("pkOrg");//组织 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-      this.contractFileService.getList(this.contractFile).then((response)=>{ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      this.contractFileService.getPageList(this.contractFile).then((response)=>{ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         if(response.success){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				           this.listOfData=JSON.parse(JSON.stringify((response.result.records))); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				           this.page=JSON.parse(JSON.stringify(response.result)) 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -110,7 +89,7 @@ export class ContractManagementContractFileComponent implements OnInit { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     //关闭抽屉的回调 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     drawerRef.afterClose.subscribe((isRefresh) => { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       if (isRefresh) {//刷新list列表 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        // this.getList(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        this.getList(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     }); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				   } 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -119,7 +98,18 @@ export class ContractManagementContractFileComponent implements OnInit { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    * 删除 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    */ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				   delete(id){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				- 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    return new Promise((resolve)=>{ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      this.contractFileService.deleteMainAndChild(id).then((response)=>{ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        if (response.success) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+          //删除成功 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+          this.nzNotificationService.success(this.i18NService.fanyi('successful.deletion'), ''); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+          this.getList(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        } else { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+          //删除失败 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+          this.nzNotificationService.error(this.i18NService.fanyi('delete.failed'), ''); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      }) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    }) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				   } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				   add() { 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -137,7 +127,7 @@ export class ContractManagementContractFileComponent implements OnInit { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     //关闭抽屉的回调 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     drawerRef.afterClose.subscribe((isRefresh) => { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       if (isRefresh) {//刷新list列表 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        // this.getList(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        this.getList(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     }); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				   } 
			 |