<template>
    <div class="random">
        <special-rule-option @query="handleQuery"></special-rule-option>
        <special-rule-table ref="table"></special-rule-table>
    </div>
</template>

<script>
import SpecialRuleOption from './component/SpecialRuleOption'
import SpecialRuleTable from './component/SpecialRuleTable'

export default {
    components: {
        SpecialRuleOption,
        SpecialRuleTable
    },
    methods: {
        resetForm() {
            if (this.$refs.table) {
                this.$refs.table.resetForm()
            }
        },
        handleQuery(data) {
            if (this.$refs.table) {
                this.$refs.table.resetForm(data)
            }
        }
    }
}
</script>
