import { defineStore } from 'pinia'

const useTechnologyEvaluationStore = defineStore('technologyEvaluation', {
    state: () => {
        return {
            searchData: {
                state: 1,
                ac: '',
                model: '',
                ata: '',
                startDateTime: null,
                endDateTime: null
            },
            details: undefined
        }
    },
    getters: {},
    actions: {
        resetForm() {
            this.searchData = {
                state: 1,
                ac: '',
                model: '',
                aviation: '',
                ata: '',
                startDateTime: null,
                endDateTime: null
            }
        },
        setState(...args) {
            this.$patch({ [args[0]]: args[1] })
        }
    },
    // 配置持久化
    persist: false
})
export default useTechnologyEvaluationStore
