edit
This commit is contained in:
		| @ -0,0 +1,15 @@ | |||||||
|  | <div nz-row nzGutter="8"> | ||||||
|  |     <div nz-col nzSpan="19"> | ||||||
|  |         <sf #sf [schema]="searchSchema" [ui]="{ '*': {grid: { span: 8 } }}" [compact]="true" [button]="'none'"></sf> | ||||||
|  |     </div> | ||||||
|  |     <div nz-col [nzSpan]="5" class="text-right mb-md"> | ||||||
|  |         <button nz-button nzType="primary" [nzLoading]="service.http.loading" (click)="st?.load(1)">查询</button> | ||||||
|  |         <button nz-button (click)="resetSF()">重置</button> | ||||||
|  |     </div> | ||||||
|  |  | ||||||
|  |     <st #st [data]="service.$mock_url" [columns]="columns" bordered size="small" | ||||||
|  |         [req]="{ method: 'POST', allInBody: true, reName: { pi: 'pageIndex', ps: 'pageSize' }, process: beforeReq }" | ||||||
|  |         [res]="{ reName: { list: 'data.records', total: 'data.total' } }" | ||||||
|  |         [page]="{ show: true, showSize: true, pageSizes: [10, 20, 30, 50, 100] }" [loading]="service.http.loading" | ||||||
|  |         [scroll]="{ x:'810px',y: '400px' }" (change)="stChange($event)"></st> | ||||||
|  | </div> | ||||||
| @ -0,0 +1,79 @@ | |||||||
|  | import { Component, OnInit, ViewChild } from '@angular/core'; | ||||||
|  | import { Router } from '@angular/router'; | ||||||
|  | import { STComponent, STColumn, STRequestOptions, STChange } from '@delon/abc/st'; | ||||||
|  | import { SFComponent, SFSchema } from '@delon/form'; | ||||||
|  | import { NzModalService } from 'ng-zorro-antd/modal'; | ||||||
|  | import { TicketService } from 'src/app/routes/ticket-management/services/ticket.service'; | ||||||
|  |  | ||||||
|  | @Component({ | ||||||
|  |   selector: 'app-selected-captain', | ||||||
|  |   templateUrl: './selected-captain.component.html' | ||||||
|  | }) | ||||||
|  | export class SelectedCaptainComponent implements OnInit { | ||||||
|  |   data = []; | ||||||
|  |   selectedData: any[] = []; | ||||||
|  |   @ViewChild('st', { static: true }) | ||||||
|  |   st!: STComponent; | ||||||
|  |   @ViewChild('sf', { static: false }) | ||||||
|  |   sf!: SFComponent; | ||||||
|  |   columns: STColumn[] = [ | ||||||
|  |     { title: '', index: 'key', type: 'checkbox' }, | ||||||
|  |     { title: '企业名称', index: 'no' }, | ||||||
|  |     { title: '联系人姓名', index: 'callNo' }, | ||||||
|  |     { title: '联系人手机号', index: 'callNo' }, | ||||||
|  |     { title: '认证状态', index: 'callNo' } | ||||||
|  |   ]; | ||||||
|  |   searchSchema: SFSchema = { | ||||||
|  |     properties: { | ||||||
|  |       params1: { | ||||||
|  |         title: '', | ||||||
|  |         type: 'string', | ||||||
|  |         ui: { | ||||||
|  |           placeholder: '请输入企业名称' | ||||||
|  |         } | ||||||
|  |       }, | ||||||
|  |       params2: { | ||||||
|  |         title: '', | ||||||
|  |         type: 'string', | ||||||
|  |         ui: { | ||||||
|  |           placeholder: '请输入姓名' | ||||||
|  |         } | ||||||
|  |       }, | ||||||
|  |       params3: { | ||||||
|  |         title: '', | ||||||
|  |         type: 'string', | ||||||
|  |         ui: { | ||||||
|  |           placeholder: '请输入手机号' | ||||||
|  |         } | ||||||
|  |       } | ||||||
|  |     } | ||||||
|  |   }; | ||||||
|  |  | ||||||
|  |   constructor(public service: TicketService, private nzModalService: NzModalService, private router: Router) {} | ||||||
|  |  | ||||||
|  |   ngOnInit(): void {} | ||||||
|  |  | ||||||
|  |   beforeReq = (requestOptions: STRequestOptions) => { | ||||||
|  |     if (this.sf) { | ||||||
|  |       Object.assign(requestOptions.body, { | ||||||
|  |         ...this.sf.value | ||||||
|  |       }); | ||||||
|  |     } | ||||||
|  |     return requestOptions; | ||||||
|  |   }; | ||||||
|  |  | ||||||
|  |   stChange(e: STChange): void { | ||||||
|  |     switch (e.type) { | ||||||
|  |       case 'checkbox': | ||||||
|  |         this.selectedData = e.checkbox!; | ||||||
|  |         break; | ||||||
|  |     } | ||||||
|  |   } | ||||||
|  |  | ||||||
|  |   /** | ||||||
|  |    * 重置表单 | ||||||
|  |    */ | ||||||
|  |   resetSF() { | ||||||
|  |     this.sf.reset(); | ||||||
|  |   } | ||||||
|  | } | ||||||
| @ -0,0 +1 @@ | |||||||
|  | <p>selected-driver works!</p> | ||||||
| @ -0,0 +1,14 @@ | |||||||
|  | import { Component, OnInit } from '@angular/core'; | ||||||
|  |  | ||||||
|  | @Component({ | ||||||
|  |   selector: 'app-selected-driver', | ||||||
|  |   templateUrl: './selected-driver.component.html', | ||||||
|  | }) | ||||||
|  | export class SelectedDriverComponent implements OnInit { | ||||||
|  |  | ||||||
|  |   constructor() { } | ||||||
|  |  | ||||||
|  |   ngOnInit(): void { | ||||||
|  |   } | ||||||
|  |  | ||||||
|  | } | ||||||
| @ -0,0 +1 @@ | |||||||
|  | <p>selected-freight works!</p> | ||||||
| @ -0,0 +1,14 @@ | |||||||
|  | import { Component, OnInit } from '@angular/core'; | ||||||
|  |  | ||||||
|  | @Component({ | ||||||
|  |   selector: 'app-selected-freight', | ||||||
|  |   templateUrl: './selected-freight.component.html', | ||||||
|  | }) | ||||||
|  | export class SelectedFreightComponent implements OnInit { | ||||||
|  |  | ||||||
|  |   constructor() { } | ||||||
|  |  | ||||||
|  |   ngOnInit(): void { | ||||||
|  |   } | ||||||
|  |  | ||||||
|  | } | ||||||
| @ -0,0 +1 @@ | |||||||
|  | <p>selected-network-freight works!</p> | ||||||
| @ -0,0 +1,14 @@ | |||||||
|  | import { Component, OnInit } from '@angular/core'; | ||||||
|  |  | ||||||
|  | @Component({ | ||||||
|  |   selector: 'app-selected-network-freight', | ||||||
|  |   templateUrl: './selected-network-freight.component.html', | ||||||
|  | }) | ||||||
|  | export class SelectedNetworkFreightComponent implements OnInit { | ||||||
|  |  | ||||||
|  |   constructor() { } | ||||||
|  |  | ||||||
|  |   ngOnInit(): void { | ||||||
|  |   } | ||||||
|  |  | ||||||
|  | } | ||||||
| @ -61,7 +61,7 @@ const NOTROUTECOMPONENTS = [ | |||||||
|   AuditResonConfigActionModalComponent, |   AuditResonConfigActionModalComponent, | ||||||
|   CartConfigActionModalComponent, |   CartConfigActionModalComponent, | ||||||
|   SettingRoleEditComponent, |   SettingRoleEditComponent, | ||||||
|   SettingMenuComponent |   SettingMenuComponent, | ||||||
| ]; | ]; | ||||||
| @NgModule({ | @NgModule({ | ||||||
|   declarations: [...COMPONENTS, ...NOTROUTECOMPONENTS], |   declarations: [...COMPONENTS, ...NOTROUTECOMPONENTS], | ||||||
|  | |||||||
| @ -8,7 +8,6 @@ import { TicketService } from '../../../services/ticket.service'; | |||||||
| @Component({ | @Component({ | ||||||
|   selector: 'app-add-cart', |   selector: 'app-add-cart', | ||||||
|   templateUrl: './add-cart.component.html', |   templateUrl: './add-cart.component.html', | ||||||
|   styleUrls: ['./add-cart.component.less'] |  | ||||||
| }) | }) | ||||||
| export class AddCartComponent implements OnInit { | export class AddCartComponent implements OnInit { | ||||||
|   data = []; |   data = []; | ||||||
|  | |||||||
| @ -7,8 +7,7 @@ import { TicketService } from '../../../services/ticket.service'; | |||||||
|  |  | ||||||
| @Component({ | @Component({ | ||||||
|   selector: 'app-add-owner', |   selector: 'app-add-owner', | ||||||
|   templateUrl: './add-owner.component.html', |   templateUrl: './add-owner.component.html' | ||||||
|   styleUrls: ['./add-owner.component.less'] |  | ||||||
| }) | }) | ||||||
| export class AddOwnerComponent implements OnInit { | export class AddOwnerComponent implements OnInit { | ||||||
|   data = []; |   data = []; | ||||||
|  | |||||||
		Reference in New Issue
	
	Block a user