import { defineStore } from 'pinia'

const useFlightSupportStore = defineStore('informationDisclosure', {
    state: () => {
        return {
            searchData: {
                startT: '1721163600000',
                stopT: '1721249999000',
                acTerminals2: 'WUH',
                sortType: 'stdChn',
                apiPwd: 'Ifar$2_0160_525_Mocp',
                isAsc: '1',
                pageIndex: 1,
                pageSize: 50,
                requestFrom: 6,
                realUserId: 10
            },
            details: undefined,
            screenData: {}
        }
    },
    getters: {},
    actions: {
        resetForm() {
            this.searchData = {
                startT: '',
                stopT: '',
                acTerminals2: '',
                sortType: '',
                apiPwd: '',
                isAsc: '',
                pageIndex: '',
                pageSize: '',
                requestFrom: '',
                realUserId: ''
            }
        },
        setState(...args) {
            this.$patch({ [args[0]]: args[1] })
        }
    },
    // 配置持久化
    persist: false
})
export default useFlightSupportStore
