/**
 * 通用的任务飞行任务状态
 * @param {*}   h 函数
 * @param {*}   status 状态码
 * @returns
 */

export const taskStatus = (h, status) => {
  const dictionaries = {
    1: {
      text: '待提交',
      class: 'other-state'
    },
    2: {
      text: '机务编制中',
      class: 'receive-state'
    },
    3: {
      text: '机务确认中',
      class: 'theme-state'
    },
    4: {
      text: '机务待审核',
      class: 'warning-state'
    },
    5: {
      text: '航材编制中',
      class: 'other-state'
    },
    6: {
      text: '航材确认中',
      class: 'info-state'
    },
    7: {
      text: '执行情况登记中',
      class: 'receive-state'
    },
    8: {
      text: '执行情况待确认',
      class: 'theme-state'
    },
    9: {
      text: '携行使用登记中',
      class: 'danger-state'
    },
    10: {
      text: '已完成',
      class: 'success-state'
    }
  }
  return h('span', { class: dictionaries[status].class }, dictionaries[status].text)
}

export const statusList = [
  {
    value: null,
    label: '全部'
  },
  {
    value: '1',
    label: '待提交'
  },
  {
    value: '2',
    label: '机务编制中'
  },
  {
    value: '3',
    label: '机务确认中'
  },
  {
    value: '4',
    label: '机务待审核'
  },
  {
    value: '5',
    label: '航材编制中'
  },
  {
    value: '6',
    label: '航材确认中'
  },
  {
    value: '7',
    label: '执行情况登记中'
  },
  {
    value: '8',
    label: '执行情况待确认'
  },
  {
    value: '9',
    label: '携行使用登记中'
  },
  {
    value: '10',
    label: '已完成'
  }
]
