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

<script>
import RandomRuleOption from './component/RandomRuleOption.vue'
import RandomRuleTable from './component/RandomRuleTable.vue'

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