<template>
    <el-card shadow="always" class="search_header_top_row1">
        <el-form :inline="true" ref="formRef" :model="filterForm" class="demo-form-inline">
            <el-form-item label="企业类型">
                <el-input v-model.trim="filterForm.name" placeholder="请输入企业类型" clearable maxlength="30" />
            </el-form-item>
            <el-form-item label="是否启用">
                <el-select v-model.trim="filterForm.status" placeholder="请选择是否启用" clearable filterable>
                    <el-option v-for="item in isEnableList.list" :key="item.value" :label="item.label"
                        :value="item.value" />
                </el-select>
            </el-form-item>
            <el-form-item>
                <el-button type="primary" @click="serachFn">查询</el-button>
                <el-button type="plain" @click="resetFn">重置</el-button>
            </el-form-item>
        </el-form>
        <div>
            <el-button type="primary" @click="addFn">新增</el-button>
            <el-button type="primary" @click="exportFn">导出</el-button>
        </div>
    </el-card>
</template>
 
<script lang="ts" setup>
const emits = defineEmits(['search', 'reset', 'export', 'add'])
const formRef = ref()
const isEnableList = reactive({
    list: [{

        value: '1',
        label: '启用',
    },
    {
        value: '0',
        label: '禁用',

    }]
})
const filterForm = reactive({
    name: '',
    status: '',
})

const serachFn = () => {
    emits('search', filterForm)
}

const resetFn = () => {
    filterForm.name = ''
    filterForm.status = ''
    emits('reset',filterForm)
}

const exportFn = () => {
    emits('export')
}
const addFn = () => {
    emits('add')
}


</script>

<style scoped lang="scss"></style>
