<template>
    <div class="random">
        <special-check-record-option @query="handleQuery"></special-check-record-option>
        <special-check-record-table ref="table" :task_id="taskId"></special-check-record-table>
    </div>
</template>

<script>
import SpecialCheckRecordOption from './component/SpecialCheckRecordOption'
import SpecialCheckRecordTable from './component/SpecialCheckRecordTable'

export default {
    components: {
        SpecialCheckRecordOption,
        SpecialCheckRecordTable
    },
    created() {
        this.taskId = this.$route.query.id
    },
    mounted() {
        this.taskId = this.$route.query.id
    },
    data() {
        return {
            taskId: ''
        }
    },
    methods: {
        back() {
            this.$router.back()
        },
        resetForm() {
            if (this.$refs.table) {
                this.$refs.table.resetForm()
            }
        },
        handleQuery(data) {
            if (this.$refs.table) {
                this.$refs.table.resetForm(data)
            }
        }
    }
}
</script>
