<template>
    <el-card shadow="never" class="!border-none">
        <el-form ref="formRef" class="mb-[-16px]" :model="modelValue" :inline="true">
            <el-form-item label="提交人">
                <el-input class="w-[280px]" placeholder="请输入" v-model="modelValue.userName" clearable @keyup.enter="$emit('resetPage')" />
            </el-form-item>
            <el-form-item label="提交时间">
                <daterange-picker
                    type="datetimerange"
                    format="YYYY-MM-DD HH:mm:ss"
                    v-model:startTime="modelValue.startTime"
                    v-model:endTime="modelValue.endTime"
                />
            </el-form-item>
            <el-form-item>
                <el-button type="primary" @click="$emit('resetPage')">查询</el-button>
                <el-button @click="$emit('resetParams')">重置</el-button>
            </el-form-item>
        </el-form>
    </el-card>
</template>

<script setup lang="ts">
defineProps({
    modelValue: {
        type: Object,
        default: () => ({
            submitName: '',
            startTime: '',
            endTime: ''
        })
    }
})
defineEmits(['resetPage', 'resetParams'])
</script>
<style scoped></style>
