mirror of
https://github.com/continew-org/continew-admin-ui.git
synced 2025-09-09 18:59:26 +08:00
refactor: 系统日志默认查询近 7 天日志数据
This commit is contained in:
@@ -48,7 +48,7 @@ export interface LogQuery {
|
||||
module?: string
|
||||
ip?: string
|
||||
createUserString?: string
|
||||
createTime?: string
|
||||
createTime: Array<string>
|
||||
status?: number
|
||||
sort: Array<string>
|
||||
}
|
||||
|
@@ -13,6 +13,8 @@
|
||||
import type { ShortcutType } from '@arco-design/web-vue'
|
||||
import dayjs from 'dayjs'
|
||||
|
||||
defineOptions({ name: 'DateRangePicker' })
|
||||
|
||||
defineProps({
|
||||
format: {
|
||||
type: String,
|
||||
@@ -57,10 +59,4 @@ const shortcuts = computed<ShortcutType[]>(() => {
|
||||
})
|
||||
</script>
|
||||
|
||||
<script lang="ts">
|
||||
export default {
|
||||
name: 'DateRangePicker'
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped lang="less"></style>
|
||||
|
@@ -49,6 +49,7 @@ import { exportLoginLog, listLog } from '@/apis'
|
||||
import type { TableInstanceColumns } from '@/components/GiTable/type'
|
||||
import DateRangePicker from '@/components/DateRangePicker/index.vue'
|
||||
import { useTable, useDownload } from '@/hooks'
|
||||
import dayjs from 'dayjs'
|
||||
|
||||
defineOptions({ name: 'LoginLog' })
|
||||
|
||||
@@ -93,7 +94,10 @@ const queryForm = reactive({
|
||||
module: '登录',
|
||||
ip: undefined,
|
||||
createUserString: undefined,
|
||||
createTime: undefined,
|
||||
createTime: [
|
||||
dayjs().subtract(6, 'day').startOf('day').format('YYYY-MM-DD HH:mm:ss'),
|
||||
dayjs().endOf('day').format('YYYY-MM-DD HH:mm:ss')
|
||||
],
|
||||
status: undefined,
|
||||
sort: ['createTime,desc']
|
||||
})
|
||||
@@ -109,7 +113,10 @@ const {
|
||||
const reset = () => {
|
||||
queryForm.ip = undefined
|
||||
queryForm.createUserString = undefined
|
||||
queryForm.createTime = undefined
|
||||
queryForm.createTime = [
|
||||
dayjs().subtract(6, 'day').startOf('day').format('YYYY-MM-DD HH:mm:ss'),
|
||||
dayjs().endOf('day').format('YYYY-MM-DD HH:mm:ss')
|
||||
]
|
||||
queryForm.status = undefined
|
||||
search()
|
||||
}
|
||||
|
@@ -61,6 +61,7 @@ import type { TableInstanceColumns } from '@/components/GiTable/type'
|
||||
import DateRangePicker from '@/components/DateRangePicker/index.vue'
|
||||
import OperationLogDetailDrawer from './OperationLogDetailDrawer.vue'
|
||||
import { useTable, useDownload } from '@/hooks'
|
||||
import dayjs from 'dayjs'
|
||||
|
||||
defineOptions({ name: 'OperationLog' })
|
||||
|
||||
@@ -105,7 +106,10 @@ const queryForm = reactive({
|
||||
description: undefined,
|
||||
ip: undefined,
|
||||
createUserString: undefined,
|
||||
createTime: undefined,
|
||||
createTime: [
|
||||
dayjs().subtract(6, 'day').startOf('day').format('YYYY-MM-DD HH:mm:ss'),
|
||||
dayjs().endOf('day').format('YYYY-MM-DD HH:mm:ss')
|
||||
],
|
||||
status: undefined,
|
||||
sort: ['createTime,desc']
|
||||
})
|
||||
@@ -122,7 +126,10 @@ const reset = () => {
|
||||
queryForm.description = undefined
|
||||
queryForm.ip = undefined
|
||||
queryForm.createUserString = undefined
|
||||
queryForm.createTime = undefined
|
||||
queryForm.createTime = [
|
||||
dayjs().subtract(6, 'day').startOf('day').format('YYYY-MM-DD HH:mm:ss'),
|
||||
dayjs().endOf('day').format('YYYY-MM-DD HH:mm:ss')
|
||||
]
|
||||
queryForm.status = undefined
|
||||
search()
|
||||
}
|
||||
|
@@ -21,7 +21,7 @@
|
||||
<a-input v-model="form.moduleName" placeholder="项目模块名称,例如:continew-admin-system" />
|
||||
</a-form-item>
|
||||
<a-form-item label="模块包名" field="packageName">
|
||||
<a-input v-model="form.packageName" placeholder="项目模块包名,例如:top.charles7c.continew.admin.system" />
|
||||
<a-input v-model="form.packageName" placeholder="项目模块包名,例如:top.continew.admin.system" />
|
||||
</a-form-item>
|
||||
<a-form-item label="去表前缀" field="tablePrefix">
|
||||
<a-input v-model="form.tablePrefix" placeholder="数据库表前缀,例如:sys_" />
|
||||
|
Reference in New Issue
Block a user