<template>
    <Table url="/api/v1/logger/login" rowKey="logId" addBtn :actions="actions" ref="table">
        <template #search="{query}">
            <my-form-item label="开始时间">
                <a-date-picker
                    class="tw-w-full"
                    show-time
                    v-model="query.startTime"
                    valueFormat="YYYY-MM-DD HH:mm:ss"
                />
            </my-form-item>
        </template>

        <template #drawer="{hidden}">
            <Form :hidden="hidden" />
        </template>

        <a-table-column title="用户Id" data-index="userId" />
        <a-table-column title="登录用户" data-index="userName" />
        <a-table-column title="登录IP" data-index="loginIp" />
        <a-table-column title="事件类型" data-index="loginTypeName" />
        <a-table-column title="事件状态" data-index="isSuccessName" />
        <a-table-column title="登录时间" data-index="loginTime" />
        <a-table-column title="说明" data-index="logResultContent" />
    </Table>
</template>

<script>
import Table from '@/components/table/table.vue';
import Form from './form.vue';

export default {
    components: { Table, Form },
    data: () => ({
        addBtn: {
            text: '新增',
        },
        actions: [],
    }),
};
</script>
