eduit
This commit is contained in:
		| @ -1,31 +0,0 @@ | ||||
| /* | ||||
|  * @Author: your name | ||||
|  * @Date: 2021-12-07 17:30:18 | ||||
|  * @LastEditTime: 2021-12-09 17:47:33 | ||||
|  * @LastEditors: your name | ||||
|  * @Description: 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE | ||||
|  * @FilePath: \tms-obc-web\src\app\routes\vehicle\components\list\img-view\img-view.component.spec.ts | ||||
|  */ | ||||
| import { async, ComponentFixture, TestBed } from '@angular/core/testing'; | ||||
| import { VehicleImgViewComponent } from './img-view.component'; | ||||
|  | ||||
| describe('VehicleImgViewComponent', () => { | ||||
|   let component: VehicleImgViewComponent; | ||||
|   let fixture: ComponentFixture<VehicleImgViewComponent>; | ||||
|  | ||||
|   beforeEach(async(() => { | ||||
|     TestBed.configureTestingModule({ | ||||
|       declarations: [VehicleImgViewComponent], | ||||
|     }).compileComponents(); | ||||
|   })); | ||||
|  | ||||
|   beforeEach(() => { | ||||
|     fixture = TestBed.createComponent(VehicleImgViewComponent); | ||||
|     component = fixture.componentInstance; | ||||
|     fixture.detectChanges(); | ||||
|   }); | ||||
|  | ||||
|   it('should create', () => { | ||||
|     expect(component).toBeTruthy(); | ||||
|   }); | ||||
| }); | ||||
| @ -12,30 +12,19 @@ | ||||
|   <!-- 搜索区 --> | ||||
|   <!-- 搜索表单 --> | ||||
|   <div nz-row nzGutter="8"> | ||||
|     <!-- 查询字段小于或等于3个时,不显示伸缩按钮 --> | ||||
|     <div nz-col nzSpan="24" *ngIf="queryFieldCount <= 4"> | ||||
|       <sf #sf [schema]="schema" [ui]="ui" [mode]="'search'" [disabled]="!sf?.valid" (formSubmit)="st?.load(1)" | ||||
|         (formReset)="resetSF()"></sf> | ||||
|  | ||||
|     <div nz-col [nzSpan]="_$expand ? 24 : 18"> | ||||
|       <sf #sf [schema]="schema" [ui]="ui" [compact]="true" [button]="'none'"></sf> | ||||
|     </div> | ||||
|     <div nz-col [nzSpan]="_$expand ? 24 : 6" class="text-right"> | ||||
|       <button nz-button nzType="primary" [nzLoading]="service.http.loading" (click)="st?.load(1)">查询</button> | ||||
|       <button nz-button nzType="primary" [disabled]="service.http.loading" (click)="exportFire()" acl | ||||
|         [acl-ability]="'YUNLI-CART-DAOCHU'">导出</button> | ||||
|       <button nz-button [disabled]="service.http.loading" (click)="resetSF()">重置</button> | ||||
|       <button nz-button nzType="link" (click)="expandToggle()"> | ||||
|         {{ !_$expand ? '展开' : '收起' }} | ||||
|         <i nz-icon [nzType]="!_$expand ? 'down' : 'up'"></i> | ||||
|       </button> | ||||
|     </div> | ||||
|     <!-- [loading]="service.http.loading" --> | ||||
|  | ||||
|     <!-- 查询字段大于3个时,根据展开状态调整布局 --> | ||||
|     <ng-container *ngIf="queryFieldCount > 4"> | ||||
|       <div nz-col [nzSpan]="_$expand ? 24 : 18"> | ||||
|         <sf #sf [schema]="schema" [ui]="ui" [compact]="true" [button]="'none'"></sf> | ||||
|       </div> | ||||
|       <div nz-col [nzSpan]="_$expand ? 24 : 6" class="text-right"> | ||||
|         <button nz-button nzType="primary" [nzLoading]="service.http.loading" (click)="st?.load(1)">查询</button> | ||||
|         <button nz-button nzType="primary" [disabled]="service.http.loading" (click)="exportFire()" acl | ||||
|           [acl-ability]="'YUNLI-CART-DAOCHU'">导出</button> | ||||
|         <button nz-button [disabled]="service.http.loading" (click)="resetSF()">重置</button> | ||||
|         <button nz-button nzType="link" (click)="expandToggle()"> | ||||
|           {{ !_$expand ? '展开' : '收起' }} | ||||
|           <i nz-icon [nzType]="!_$expand ? 'down' : 'up'"></i> | ||||
|         </button> | ||||
|       </div> | ||||
|     </ng-container> | ||||
|   </div> | ||||
| </nz-card> | ||||
| <nz-card> | ||||
|  | ||||
| @ -1,31 +0,0 @@ | ||||
| /* | ||||
|  * @Author: your name | ||||
|  * @Date: 2021-12-01 20:05:59 | ||||
|  * @LastEditTime: 2021-12-01 20:35:33 | ||||
|  * @LastEditors: your name | ||||
|  * @Description: 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE | ||||
|  * @FilePath: \tms-obc-web\src\app\routes\vehicle\components\list\list.component.spec.ts | ||||
|  */ | ||||
| import { async, ComponentFixture, TestBed } from '@angular/core/testing'; | ||||
| import { VehicleComponentsListComponent } from './list.component'; | ||||
|  | ||||
| describe('VehicleComponentsListComponent', () => { | ||||
|   let component: VehicleComponentsListComponent; | ||||
|   let fixture: ComponentFixture<VehicleComponentsListComponent>; | ||||
|  | ||||
|   beforeEach(async(() => { | ||||
|     TestBed.configureTestingModule({ | ||||
|       declarations: [VehicleComponentsListComponent], | ||||
|     }).compileComponents(); | ||||
|   })); | ||||
|  | ||||
|   beforeEach(() => { | ||||
|     fixture = TestBed.createComponent(VehicleComponentsListComponent); | ||||
|     component = fixture.componentInstance; | ||||
|     fixture.detectChanges(); | ||||
|   }); | ||||
|  | ||||
|   it('should create', () => { | ||||
|     expect(component).toBeTruthy(); | ||||
|   }); | ||||
| }); | ||||
| @ -13,7 +13,6 @@ import { VehicleService } from '../../../vehicle/services/vehicle.service'; | ||||
| }) | ||||
| export class VehicleComponentsListComponent implements OnInit { | ||||
|   _$expand = false; | ||||
|   url = `/rule?_allow_anonymous=true`; | ||||
|  | ||||
|   ui!: SFUISchema; | ||||
|   schema!: SFSchema; | ||||
| @ -22,12 +21,6 @@ export class VehicleComponentsListComponent implements OnInit { | ||||
|   @ViewChild('sf', { static: false }) sf!: SFComponent; | ||||
|  | ||||
|   constructor(public service: VehicleService, private modal: NzModalService, private router: Router, private ar: ActivatedRoute) {} | ||||
|   /** | ||||
|    * 查询字段个数navigate | ||||
|    */ | ||||
|   get queryFieldCount(): number { | ||||
|     return Object.keys(this.schema?.properties || {}).length; | ||||
|   } | ||||
|  | ||||
|   /** | ||||
|    * 查询参数 | ||||
| @ -45,10 +38,6 @@ export class VehicleComponentsListComponent implements OnInit { | ||||
|     return params; | ||||
|   } | ||||
|  | ||||
|   get selectedRows() { | ||||
|     return this.st?.list.filter((item) => item.checked) || []; | ||||
|   } | ||||
|  | ||||
|   ngOnInit() { | ||||
|     this.initSF(); | ||||
|     this.initST(); | ||||
| @ -91,9 +80,6 @@ export class VehicleComponentsListComponent implements OnInit { | ||||
|                 return of([]); | ||||
|               } | ||||
|             }, | ||||
|             visibleIf: { | ||||
|               _$expand: (value: boolean) => value | ||||
|             } | ||||
|           } as SFSelectWidgetSchema | ||||
|         }, | ||||
|         carNoColor: { | ||||
|  | ||||
		Reference in New Issue
	
	Block a user