edit
This commit is contained in:
@ -55,9 +55,8 @@ export class SystemLogsComponent implements OnInit {
|
|||||||
title: '登录时间',
|
title: '登录时间',
|
||||||
type: 'string',
|
type: 'string',
|
||||||
ui: {
|
ui: {
|
||||||
widget: 'item-date',
|
widget: 'sl-from-to-search',
|
||||||
format: 'yyyy-MM-dd HH:mm:ss',
|
format: 'yyyy-MM-dd HH:mm:ss',
|
||||||
placeholder: '请选择',
|
|
||||||
nzShowTime: true,
|
nzShowTime: true,
|
||||||
visibleIf: {
|
visibleIf: {
|
||||||
expand: (value: boolean) => value
|
expand: (value: boolean) => value
|
||||||
@ -85,8 +84,8 @@ export class SystemLogsComponent implements OnInit {
|
|||||||
if (this.sf) {
|
if (this.sf) {
|
||||||
Object.assign(requestOptions.body, {
|
Object.assign(requestOptions.body, {
|
||||||
...this.sf.value,
|
...this.sf.value,
|
||||||
endTime: this.sf.value.time?.end ? dateTimePickerUtil.format(this.sf.value.time?.end, 'yyyy-MM-dd HH:mm:ss') : null,
|
endTime: this.sf.value.time?.[1] || null,
|
||||||
startTime: this.sf.value.time?.start ? dateTimePickerUtil.format(this.sf.value.time?.start, 'yyyy-MM-dd HH:mm:ss') : null
|
startTime: this.sf.value.time?.[0] || null
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
return requestOptions;
|
return requestOptions;
|
||||||
|
|||||||
@ -68,7 +68,7 @@ export class UserLogsComponent implements OnInit {
|
|||||||
title: '登录时间',
|
title: '登录时间',
|
||||||
type: 'string',
|
type: 'string',
|
||||||
ui: {
|
ui: {
|
||||||
widget: 'item-date',
|
widget: 'sl-from-to-search',
|
||||||
format: 'yyyy-MM-dd HH:mm:ss',
|
format: 'yyyy-MM-dd HH:mm:ss',
|
||||||
placeholder: '请选择',
|
placeholder: '请选择',
|
||||||
nzShowTime: true,
|
nzShowTime: true,
|
||||||
@ -100,8 +100,8 @@ export class UserLogsComponent implements OnInit {
|
|||||||
Object.assign(requestOptions.body, {
|
Object.assign(requestOptions.body, {
|
||||||
...this.sf.value,
|
...this.sf.value,
|
||||||
time: {
|
time: {
|
||||||
start: this.sf.value.time?.start ? dateTimePickerUtil.format(this.sf.value.time?.start, 'yyyy-MM-dd HH:mm:ss') : null,
|
start: this.sf.value.time?.[0] || null,
|
||||||
end: this.sf.value.time?.end ? dateTimePickerUtil.format(this.sf.value.time?.end, 'yyyy-MM-dd HH:mm:ss') : null
|
end: this.sf.value.time?.[1] || null
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|||||||
@ -61,12 +61,11 @@ export class VersionLogsComponent implements OnInit {
|
|||||||
placeholder: '请输入'
|
placeholder: '请输入'
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
createTime: {
|
time: {
|
||||||
title: '发布时间',
|
title: '发布时间',
|
||||||
type: 'string',
|
type: 'string',
|
||||||
ui: {
|
ui: {
|
||||||
widget: 'date',
|
widget: 'sl-from-to-search',
|
||||||
mode: 'range',
|
|
||||||
format: 'yyyy-MM-dd',
|
format: 'yyyy-MM-dd',
|
||||||
visibleIf: {
|
visibleIf: {
|
||||||
expand: (value: boolean) => value
|
expand: (value: boolean) => value
|
||||||
@ -97,8 +96,8 @@ export class VersionLogsComponent implements OnInit {
|
|||||||
Object.assign(requestOptions.body, {
|
Object.assign(requestOptions.body, {
|
||||||
...this.sf.value,
|
...this.sf.value,
|
||||||
publishTime: {
|
publishTime: {
|
||||||
start: this.sf.value.time?.start ? dateTimePickerUtil.format(this.sf.value.time?.start, 'yyyy-MM-dd HH:mm:ss') : null,
|
start: this.sf.value.time?.[0] || null,
|
||||||
end: this.sf.value.time?.end ? dateTimePickerUtil.format(this.sf.value.time?.end, 'yyyy-MM-dd HH:mm:ss') : null
|
end: this.sf.value.time?.[1] || null
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,21 +1,11 @@
|
|||||||
<sf-item-wrap [id]="id" [schema]="schema" [ui]="ui" [showError]="showError" [error]="error" [showTitle]="schema.title">
|
<sf-item-wrap [id]="id" [schema]="schema" [ui]="ui" [showError]="showError" [error]="error" [showTitle]="schema.title">
|
||||||
<ng-container *ngIf="type === 'date'">
|
<ng-container *ngIf="type === 'date'">
|
||||||
<div style="display: flex">
|
<div style="justify-content: space-between;display: flex;align-items: center;">
|
||||||
<nz-date-picker
|
<nz-date-picker [nzMode]="mode" [nzFormat]="displayFormat" [(ngModel)]="startDate"
|
||||||
[nzMode]="mode"
|
(ngModelChange)="onChange($event)" nzPlaceHolder="开始时间" style="min-width: 45%;"></nz-date-picker>
|
||||||
[nzFormat]="displayFormat"
|
|
||||||
[(ngModel)]="startDate"
|
|
||||||
(ngModelChange)="onChange($event)"
|
|
||||||
nzPlaceHolder="开始时间"
|
|
||||||
></nz-date-picker>
|
|
||||||
<span style="padding: 4px">-</span>
|
<span style="padding: 4px">-</span>
|
||||||
<nz-date-picker
|
<nz-date-picker [nzMode]="mode" [nzFormat]="displayFormat" [(ngModel)]="endDate"
|
||||||
[nzMode]="mode"
|
(ngModelChange)="onChange($event)" nzPlaceHolder="结束时间" style="min-width: 45%;"></nz-date-picker>
|
||||||
[nzFormat]="displayFormat"
|
|
||||||
[(ngModel)]="endDate"
|
|
||||||
(ngModelChange)="onChange($event)"
|
|
||||||
nzPlaceHolder="结束时间"
|
|
||||||
></nz-date-picker>
|
|
||||||
</div>
|
</div>
|
||||||
</ng-container>
|
</ng-container>
|
||||||
</sf-item-wrap>
|
</sf-item-wrap>
|
||||||
@ -1,24 +0,0 @@
|
|||||||
import { ComponentFixture, TestBed } from '@angular/core/testing';
|
|
||||||
|
|
||||||
import { SLFromToSearchWidget } from './from-to-search.widget';
|
|
||||||
|
|
||||||
describe('SLFromToSearchWidget', () => {
|
|
||||||
let component: SLFromToSearchWidget;
|
|
||||||
let fixture: ComponentFixture<SLFromToSearchWidget>;
|
|
||||||
|
|
||||||
beforeEach(async () => {
|
|
||||||
await TestBed.configureTestingModule({
|
|
||||||
declarations: [SLFromToSearchWidget],
|
|
||||||
}).compileComponents();
|
|
||||||
});
|
|
||||||
|
|
||||||
beforeEach(() => {
|
|
||||||
fixture = TestBed.createComponent(SLFromToSearchWidget);
|
|
||||||
component = fixture.componentInstance;
|
|
||||||
fixture.detectChanges();
|
|
||||||
});
|
|
||||||
|
|
||||||
it('should create', () => {
|
|
||||||
expect(component).toBeTruthy();
|
|
||||||
});
|
|
||||||
});
|
|
||||||
Reference in New Issue
Block a user