From af6675263adbcddc40d71d8030a99b5427d6c094 Mon Sep 17 00:00:00 2001 From: Taric Xin Date: Wed, 15 Dec 2021 21:06:32 +0800 Subject: [PATCH] edit --- .../driver/captain/captain.component.less | 22 ++++++++++ .../driver/captain/captain.component.spec.ts | 31 -------------- .../driver/captain/captain.component.ts | 42 +++++++++---------- .../driver/detail/detail.component.html | 2 +- .../freight/list/detail/detail.component.html | 12 +++--- .../freight/list/new/new.component.less | 1 + .../freight/list/new/new.component.ts | 42 ++++++++++++++----- 7 files changed, 82 insertions(+), 70 deletions(-) create mode 100644 src/app/routes/usercenter/components/driver/captain/captain.component.less delete mode 100644 src/app/routes/usercenter/components/driver/captain/captain.component.spec.ts diff --git a/src/app/routes/usercenter/components/driver/captain/captain.component.less b/src/app/routes/usercenter/components/driver/captain/captain.component.less new file mode 100644 index 00000000..4d14e2a8 --- /dev/null +++ b/src/app/routes/usercenter/components/driver/captain/captain.component.less @@ -0,0 +1,22 @@ +.expend-options { + margin-top: 0px; +} + + +@media (min-width: 1200px) { + .expend-options { + margin-top: -40px; + max-width : 400px; + position : absolute; + right : 0; + bottom : 30px; + } + +} + +:host::ng-deep { + + nz-range-picker { + width: 100%; + } +} \ No newline at end of file diff --git a/src/app/routes/usercenter/components/driver/captain/captain.component.spec.ts b/src/app/routes/usercenter/components/driver/captain/captain.component.spec.ts deleted file mode 100644 index 8ca6e88c..00000000 --- a/src/app/routes/usercenter/components/driver/captain/captain.component.spec.ts +++ /dev/null @@ -1,31 +0,0 @@ -/* - * @Author: your name - * @Date: 2021-11-30 16:56:15 - * @LastEditTime: 2021-11-30 20:36:30 - * @LastEditors: Please set LastEditors - * @Description: 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE - * @FilePath: \tms-obc-web\src\app\routes\usercenter\components\driver\driver.component.spec.ts - */ -import { async, ComponentFixture, TestBed } from '@angular/core/testing'; -import { UserCenterComponentsDriverCaptainComponent } from './captain.component'; - -describe('UserCenterComponentsDriverCaptainComponent', () => { - let component: UserCenterComponentsDriverCaptainComponent; - let fixture: ComponentFixture; - - beforeEach(async(() => { - TestBed.configureTestingModule({ - declarations: [UserCenterComponentsDriverCaptainComponent], - }).compileComponents(); - })); - - beforeEach(() => { - fixture = TestBed.createComponent(UserCenterComponentsDriverCaptainComponent); - component = fixture.componentInstance; - fixture.detectChanges(); - }); - - it('should create', () => { - expect(component).toBeTruthy(); - }); -}); diff --git a/src/app/routes/usercenter/components/driver/captain/captain.component.ts b/src/app/routes/usercenter/components/driver/captain/captain.component.ts index f3f2f016..24afedcd 100644 --- a/src/app/routes/usercenter/components/driver/captain/captain.component.ts +++ b/src/app/routes/usercenter/components/driver/captain/captain.component.ts @@ -7,6 +7,7 @@ import { UsermanageService } from '../../../services/usercenter.service'; @Component({ selector: 'app-usercenter-components-driver-captain', templateUrl: './captain.component.html', + styleUrls: ['./captain.component.less'] }) export class UserCenterComponentsDriverCaptainComponent implements OnInit { _$expand = false; @@ -41,8 +42,8 @@ export class UserCenterComponentsDriverCaptainComponent implements OnInit { unifiedSocialCreditCode3: '常用服务', unifiedSocialCreditCode2: '正常', tenantId: 2 - }, - ] + } + ]; @ViewChild('st', { static: false }) st!: STComponent; @ViewChild('sf', { static: false }) sf!: SFComponent; @@ -59,7 +60,7 @@ export class UserCenterComponentsDriverCaptainComponent implements OnInit { */ get reqParams() { const params: any = { - ...(this.sf && this.sf.value), + ...(this.sf && this.sf.value) }; if (this.sf?.value.effectiveDate) { params.effectiveDateStart = this.sf?.value.effectiveDate[0]; @@ -71,13 +72,13 @@ export class UserCenterComponentsDriverCaptainComponent implements OnInit { } get selectedRows() { - return this.st?.list.filter((item) => item.checked) || []; + return this.st?.list.filter(item => item.checked) || []; } ngOnInit() { this.initSF(); this.initST(); - this.ar.url.subscribe((params) => { + this.ar.url.subscribe(params => { this.st?.load(1); }); } @@ -93,8 +94,8 @@ export class UserCenterComponentsDriverCaptainComponent implements OnInit { expand: { type: 'boolean', ui: { - hidden: true, - }, + hidden: true + } }, storeName: { title: '司机姓名', type: 'string', ui: { showRequired: false } }, phone: { @@ -103,15 +104,15 @@ export class UserCenterComponentsDriverCaptainComponent implements OnInit { format: 'mobile', maxLength: 11, ui: { - placeholder: '请输入手机号', - }, + placeholder: '请输入手机号' + } }, phon747e: { title: '银行卡号', type: 'string', ui: { - placeholder: '请输入银行卡号', - }, + placeholder: '请输入银行卡号' + } }, phone2: { @@ -124,10 +125,9 @@ export class UserCenterComponentsDriverCaptainComponent implements OnInit { visibleIf: { expand: (value: boolean) => value } - }, - }, - - }, + } + } + } }; this.ui = { '*': { spanLabelFixed: 110, grid: { span: 8, gutter: 4 }, enter: () => this.st.load() } }; } @@ -149,13 +149,13 @@ export class UserCenterComponentsDriverCaptainComponent implements OnInit { buttons: [ { text: '查看', - click: (item) => { + click: item => { this.router.navigate(['/usercenter/driver/detail', item.tenantId], { relativeTo: this.ar }); // this.router.navigate(['./view', item.id], { relativeTo: this.ar, queryParams: { tenantId: item.tenantId } }); - }, - }, - ], - }, + } + } + ] + } ]; } daoyun(item: any) { @@ -166,7 +166,7 @@ export class UserCenterComponentsDriverCaptainComponent implements OnInit { this.sf?.setValue('/expand', this._$expand); } creat() { - this.router.navigate(['./new',], { relativeTo: this.ar }); + this.router.navigate(['./new'], { relativeTo: this.ar }); } /** * 重置表单 diff --git a/src/app/routes/usercenter/components/driver/detail/detail.component.html b/src/app/routes/usercenter/components/driver/detail/detail.component.html index 56f36be3..175ddb64 100644 --- a/src/app/routes/usercenter/components/driver/detail/detail.component.html +++ b/src/app/routes/usercenter/components/driver/detail/detail.component.html @@ -296,7 +296,7 @@
- +
diff --git a/src/app/routes/usercenter/components/freight/list/detail/detail.component.html b/src/app/routes/usercenter/components/freight/list/detail/detail.component.html index eb43eca2..9450473f 100644 --- a/src/app/routes/usercenter/components/freight/list/detail/detail.component.html +++ b/src/app/routes/usercenter/components/freight/list/detail/detail.component.html @@ -35,11 +35,11 @@