refactor: 优化 queryForm 的 Query 类型使用

This commit is contained in:
2024-05-02 20:22:10 +08:00
parent 05ab89d03f
commit 5b71369251
22 changed files with 82 additions and 96 deletions

View File

@@ -45,7 +45,7 @@
</template>
<script setup lang="ts">
import { exportLoginLog, listLog } from '@/apis'
import { exportLoginLog, listLog, type LogQuery } from '@/apis'
import type { TableInstanceColumns } from '@/components/GiTable/type'
import DateRangePicker from '@/components/DateRangePicker/index.vue'
import { useTable, useDownload } from '@/hooks'
@@ -90,15 +90,12 @@ const columns: TableInstanceColumns[] = [
{ title: '终端系统', dataIndex: 'os', ellipsis: true, tooltip: true }
]
const queryForm = reactive({
const queryForm = reactive<LogQuery>({
module: '登录',
ip: undefined,
createUserString: 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']
})