This commit is contained in:
Taric Xin
2021-12-28 10:02:41 +08:00
parent 1454acc726
commit b7d054ab18
5 changed files with 16 additions and 52 deletions

View File

@ -55,9 +55,8 @@ export class SystemLogsComponent implements OnInit {
title: '登录时间',
type: 'string',
ui: {
widget: 'item-date',
widget: 'sl-from-to-search',
format: 'yyyy-MM-dd HH:mm:ss',
placeholder: '请选择',
nzShowTime: true,
visibleIf: {
expand: (value: boolean) => value
@ -85,8 +84,8 @@ export class SystemLogsComponent implements OnInit {
if (this.sf) {
Object.assign(requestOptions.body, {
...this.sf.value,
endTime: this.sf.value.time?.end ? dateTimePickerUtil.format(this.sf.value.time?.end, 'yyyy-MM-dd HH:mm:ss') : null,
startTime: this.sf.value.time?.start ? dateTimePickerUtil.format(this.sf.value.time?.start, 'yyyy-MM-dd HH:mm:ss') : null
endTime: this.sf.value.time?.[1] || null,
startTime: this.sf.value.time?.[0] || null
});
}
return requestOptions;

View File

@ -68,7 +68,7 @@ export class UserLogsComponent implements OnInit {
title: '登录时间',
type: 'string',
ui: {
widget: 'item-date',
widget: 'sl-from-to-search',
format: 'yyyy-MM-dd HH:mm:ss',
placeholder: '请选择',
nzShowTime: true,
@ -100,8 +100,8 @@ export class UserLogsComponent implements OnInit {
Object.assign(requestOptions.body, {
...this.sf.value,
time: {
start: this.sf.value.time?.start ? dateTimePickerUtil.format(this.sf.value.time?.start, 'yyyy-MM-dd HH:mm:ss') : null,
end: this.sf.value.time?.end ? dateTimePickerUtil.format(this.sf.value.time?.end, 'yyyy-MM-dd HH:mm:ss') : null
start: this.sf.value.time?.[0] || null,
end: this.sf.value.time?.[1] || null
}
});
}

View File

@ -61,12 +61,11 @@ export class VersionLogsComponent implements OnInit {
placeholder: '请输入'
}
},
createTime: {
time: {
title: '发布时间',
type: 'string',
ui: {
widget: 'date',
mode: 'range',
widget: 'sl-from-to-search',
format: 'yyyy-MM-dd',
visibleIf: {
expand: (value: boolean) => value
@ -97,8 +96,8 @@ export class VersionLogsComponent implements OnInit {
Object.assign(requestOptions.body, {
...this.sf.value,
publishTime: {
start: this.sf.value.time?.start ? dateTimePickerUtil.format(this.sf.value.time?.start, 'yyyy-MM-dd HH:mm:ss') : null,
end: this.sf.value.time?.end ? dateTimePickerUtil.format(this.sf.value.time?.end, 'yyyy-MM-dd HH:mm:ss') : null
start: this.sf.value.time?.[0] || null,
end: this.sf.value.time?.[1] || null
}
});
}