import { reactive, ref } from 'vue'

export const formData = reactive({
    acreg: '',
    acu: undefined,
    aircaraftoperator: '',
    asu: undefined,
    charger: undefined,
    cherryPicker: undefined,
    customerSignImg: '',
    date: '',
    flightNo: '',
    gpu: undefined,
    hanger: undefined,
    id: 0,
    jackscrew: undefined,
    ladder: undefined,
    legs: '',
    material1: '',
    material2: '',
    material3: '',
    model: '',
    nickname: '',
    number1: undefined,
    number2: undefined,
    number3: undefined,
    oxygenCharging: undefined,
    powerTool: undefined,
    shockStrutCharging: undefined,
    station: '',
    tails: undefined,
    tireCharging: undefined,
    tools: undefined,
    tractor: undefined,
    username: '',
    work1: '',
    work2: '',
    work3: '',
    workingHours1: undefined,
    workingHours2: undefined,
    workingHours3: undefined
})

export const rules = reactive({
    station: [
        {
            required: true,
            message: '请选择航站',
            trigger: ['blur', 'change']
        }
    ],
    date: [
        {
            type: 'number',
            required: true,
            message: '请选择日期',
            trigger: ['blur', 'change']
        }
    ],
    acreg: [
        {
            required: true,
            message: '请选择机号',
            trigger: ['blur', 'change']
        }
    ],
    aircaraftoperator: [
        {
            required: true,
            message: '请选择飞机所属单位',
            trigger: ['blur', 'change']
        }
    ],
    model: [
        {
            required: true,
            message: '请选择机型',
            trigger: ['blur', 'change']
        }
    ],
    flightNo: [
        {
            required: true,
            message: '请选择航班号',
            trigger: ['blur', 'change']
        }
    ]
})
