edit
This commit is contained in:
@ -1,6 +1,7 @@
|
||||
import { Component, OnInit, ViewChild } from '@angular/core';
|
||||
import { STComponent, STColumn, STChange } from '@delon/abc/st';
|
||||
import { STComponent, STColumn, STChange, STRequestOptions } from '@delon/abc/st';
|
||||
import { SFComponent, SFDateWidgetSchema, SFSchema, SFUISchema } from '@delon/form';
|
||||
import { dateTimePickerUtil } from '@delon/util';
|
||||
import { NzModalService } from 'ng-zorro-antd/modal';
|
||||
import { SystemService } from '../../services/system.service';
|
||||
|
||||
@ -15,8 +16,6 @@ export class SystemLogsComponent implements OnInit {
|
||||
@ViewChild('sf', { static: false })
|
||||
sf!: SFComponent;
|
||||
|
||||
url = `/rule?_allow_anonymous=true`;
|
||||
|
||||
searchSchema: SFSchema = {
|
||||
properties: {
|
||||
expand: {
|
||||
@ -25,24 +24,24 @@ export class SystemLogsComponent implements OnInit {
|
||||
hidden: true
|
||||
}
|
||||
},
|
||||
receiveName: {
|
||||
operator: {
|
||||
type: 'string',
|
||||
title: '操作人',
|
||||
ui: { placeholder: '请输入' }
|
||||
},
|
||||
phone: {
|
||||
telephone: {
|
||||
type: 'string',
|
||||
title: '手机号码',
|
||||
ui: { placeholder: '请输入' }
|
||||
},
|
||||
page: {
|
||||
operatePage: {
|
||||
type: 'string',
|
||||
title: '操作页面',
|
||||
ui: {
|
||||
placeholder: '请输入'
|
||||
}
|
||||
},
|
||||
content: {
|
||||
operationContent: {
|
||||
type: 'string',
|
||||
title: '操作内容',
|
||||
ui: {
|
||||
@ -52,13 +51,14 @@ export class SystemLogsComponent implements OnInit {
|
||||
}
|
||||
}
|
||||
},
|
||||
createTime: {
|
||||
title: '操作时间',
|
||||
time: {
|
||||
title: '登录时间',
|
||||
type: 'string',
|
||||
ui: {
|
||||
widget: 'date',
|
||||
mode: 'range',
|
||||
format: 'yyyy-MM-dd',
|
||||
widget: 'item-date',
|
||||
format: 'yyyy-MM-dd HH:mm:ss',
|
||||
placeholder: '请选择',
|
||||
nzShowTime: true,
|
||||
visibleIf: {
|
||||
expand: (value: boolean) => value
|
||||
}
|
||||
@ -68,28 +68,29 @@ export class SystemLogsComponent implements OnInit {
|
||||
};
|
||||
|
||||
columns: STColumn[] = [
|
||||
{ title: '操作时间', index: 'updatedAt', type: 'date' },
|
||||
{ title: '操作人', index: 'description' },
|
||||
{ title: '操作人手机号码', index: 'description' },
|
||||
{ title: '操作页面', index: 'description' },
|
||||
{ title: '操作内容', index: 'description' },
|
||||
{
|
||||
title: '创建时间',
|
||||
index: 'updatedAt',
|
||||
type: 'date'
|
||||
}
|
||||
{ title: '操作时间', index: 'operatorTimestamp', type: 'date' },
|
||||
{ title: '操作人', index: 'operator' },
|
||||
{ title: '操作人手机号码', index: 'telephone' },
|
||||
{ title: '操作页面', index: 'operatePage' },
|
||||
{ title: '操作内容', index: 'operationContent' }
|
||||
];
|
||||
|
||||
selectedRows: any[] = [];
|
||||
|
||||
reqParams = { pageIndex: 1, pageSize: 10 };
|
||||
_$expand = false;
|
||||
|
||||
constructor(public service: SystemService, private nzModalService: NzModalService) {}
|
||||
|
||||
ngOnInit(): void {}
|
||||
|
||||
stChange(e: STChange): void {}
|
||||
beforeReq = (requestOptions: STRequestOptions) => {
|
||||
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
|
||||
});
|
||||
}
|
||||
return requestOptions;
|
||||
};
|
||||
|
||||
/**
|
||||
* 重置表单
|
||||
|
||||
Reference in New Issue
Block a user