import { toRaw } from 'vue'
import { formData, formRef } from './search.compositions'

export const handleReset = () => {
    formData.value = {
        status: null,
        valid: null,
        department: '',
        appraisee: '',
        ac: null,
        acOwn: '',
        acType: '',
        startTime: null,
        stopTime: null,
        eventType: null,
        examineType: '',
        appealInfo: null
    }
    formRef.value?.resetFields()
    handleConfirm()
}
export const handleConfirm = () => {
    uni.$mocpJump.navigateBack()
    uni.$emit('appraisalRecordReload', { params: toRaw(formData.value) })
}
