<template>
    <ele-modal
        :width="400"
        title="生成任务规则"
        v-model="visible"
        :body-style="{ padding: '20px' }"
    >
        <div class="mb-4">
            <div class="mb-2 text-base font-bold">1、60天没有更新价格</div>
            <div class="mb-4 text-base font-bold">2、回收折扣0.5-0.6</div>
            <el-checkbox
                v-model="priority"
                label="是否将其他规则任务中的数据优先处理"
            />
        </div>
        <template #footer>
            <el-button @click="visible = false">取消</el-button>
            <el-button type="success" @click="handleGenerate"
                >生成规则</el-button
            >
        </template>
    </ele-modal>
</template>

<script setup>
    import { ref } from 'vue';
    import { ElMessage } from 'element-plus';

    const visible = defineModel({ type: Boolean });
    const priority = ref(true);

    const handleGenerate = () => {
        // Mock generation
        ElMessage.success('规则生成成功');
        visible.value = false;
    };
</script>
