update
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
import React, { Component } from 'react'
|
||||
import { Alert, Button, Card, Descriptions, Form, Popconfirm, Input, message as Message, Select } from 'antd'
|
||||
import { Alert, Button, Card, Descriptions, Form, Popconfirm, Input, message as Message, Select, DatePicker } from 'antd'
|
||||
import { Auth, Container, QueryTable } from 'components'
|
||||
import { api } from 'common/api'
|
||||
import { toCamelCase } from 'util/format'
|
||||
@@ -7,6 +7,8 @@ import { isEqual } from 'lodash'
|
||||
import getDicData from 'util/dic'
|
||||
import moment from 'moment'
|
||||
|
||||
const { RangePicker } = DatePicker;
|
||||
|
||||
const apiAction = {
|
||||
page: api.sysOpLogPage,
|
||||
delete: api.sysOpLogDelete
|
||||
@@ -95,11 +97,11 @@ export default class index extends Component {
|
||||
* @returns
|
||||
*/
|
||||
loadData = async (params, query) => {
|
||||
// if (query.dates && query.dates.length) {
|
||||
// query.searchBeginTime = moment(query.dates[0]).format('YYYY-MM-DD HH:mm:ss');
|
||||
// query.searchEndTime = moment(query.dates[1]).format('YYYY-MM-DD HH:mm:ss');
|
||||
// delete query.dates;
|
||||
// }
|
||||
if (query.dates && query.dates.length) {
|
||||
query.searchBeginTime = moment(query.dates[0]).format('YYYY-MM-DD HH:mm:ss');
|
||||
query.searchEndTime = moment(query.dates[1]).format('YYYY-MM-DD HH:mm:ss');
|
||||
delete query.dates;
|
||||
}
|
||||
const { data } = await apiAction.page({
|
||||
...params,
|
||||
...query,
|
||||
@@ -182,7 +184,7 @@ export default class index extends Component {
|
||||
}
|
||||
</Select>
|
||||
</Form.Item>
|
||||
<Form.Item label="操作类型" name="success">
|
||||
<Form.Item label="是否成功" name="success">
|
||||
<Select placeholder="请选择是否成功" style={{ width: '170px' }}>
|
||||
<Select.Option
|
||||
key='true'
|
||||
@@ -194,6 +196,18 @@ export default class index extends Component {
|
||||
否</Select.Option>
|
||||
</Select>
|
||||
</Form.Item>
|
||||
<Form.Item label="操作时间" name="dates">
|
||||
<RangePicker
|
||||
showTime={
|
||||
{
|
||||
hideDisabledOptions: true,
|
||||
defaultValue: [moment('00:00:00', 'HH:mm:ss'), moment('23:59:59', 'HH:mm:ss')]
|
||||
}
|
||||
}
|
||||
format="YYYY-MM-DD HH:mm:ss"
|
||||
>
|
||||
</RangePicker>
|
||||
</Form.Item>
|
||||
</Auth>
|
||||
}
|
||||
operator={
|
||||
|
||||
Reference in New Issue
Block a user