<template>
    <ele-card :body-style="{ paddingBottom: '8px' }">
        <ProSearch :items="formItems" @search="search" />
    </ele-card>
</template>

<script setup>
    import { computed, defineEmits } from 'vue';
    import ProSearch from '@/components/CommonPage/ProSearch2.vue';

    const emit = defineEmits(['search']);

    const formItems = computed(() => {
        return [
            { type: 'input', label: '书名', prop: 'bookName' },
            { type: 'input', label: 'ISBN', prop: 'isbn' },
            {
                type: 'select',
                label: '任务状态',
                prop: 'status',
                options: [
                    { label: '待分配', value: 1 },
                    { label: '待作业', value: 2 },
                    { label: '作业中', value: 3 },
                    { label: '已完成', value: 4 },
                    { label: '已撤销', value: 5 }
                ]
            },
            { type: 'input', label: '操作员', prop: 'operator' }
        ];
    });

    const search = (data) => emit('search', data);
</script>
