/**
 *
 * @param {*} _this 当前vue 的实例
 * @returns  返回一个表格配置数组
 */

export const columns = (_this) => [
  {
    prop: 'taskName',
    label: '任务名称'
  },
  {
    prop: 'taskTime',
    label: '任务时间',
    width: '200'
  },
  {
    prop: 'taskType',
    label: '任务类型'
  },
  {
    prop: 'taskSite',
    label: '任务地点'
  },
  {
    prop: 'onMissionAviationMaterials',
    label: '非任务携行航材利用率',
    width: '180',
    render: (h, params) => {
      return h('span', {}, params.row.onMissionAviationMaterials + '%')
    }
  },
  {
    prop: 'missionAviationMaterials',
    label: '任务携行航材利用率',
    width: '180',
    render: (h, params) => {
      return h('span', {}, params.row.missionAviationMaterials + '%')
    }
  }
]
/**
 *
 * @returns 返回表格基础配置项
 */
export const options = {
  stripe: true, // 斑马纹
  mutiSelect: false, // 多选框
  index: false, // 显示序号， 多选则 mutiSelect
  loading: false, // 表格动画
  initTable: true, // 是否一挂载就加载数据
  border: true,
  height: '100%'
}

export const data = [
  { taskName: '任务一', taskTime: '2022-9-1', equipmentCompletion: '12%', taskType: '侦查', taskPlace: '山地', guaranteeGoodRate: '41%', noForceUtilization: '13%', forceUtilization: '35%', a: '全部' },
  { taskName: '任务二', taskTime: '2023-9-1', equipmentCompletion: '23%', taskType: '侦查', taskPlace: '山地', guaranteeGoodRate: '12%', noForceUtilization: '13%', forceUtilization: '35%', a: '大灯' },
  { taskName: '任务三', taskTime: '2024-9-1', equipmentCompletion: '10%', taskType: '侦查', taskPlace: '山地', guaranteeGoodRate: '98%', noForceUtilization: '13%', forceUtilization: '35%', a: '煤油' },
  { taskName: '任务四', taskTime: '2025-9-1', equipmentCompletion: '56%', taskType: '侦查', taskPlace: '山地', guaranteeGoodRate: '23%', noForceUtilization: '13%', forceUtilization: '35%', a: '雾灯' },
  { taskName: '任务五', taskTime: '2026-9-1', equipmentCompletion: '54%', taskType: '侦查', taskPlace: '山地', guaranteeGoodRate: '42%', noForceUtilization: '13%', forceUtilization: '35%', a: '雾灯' },
  { taskName: '任务六', taskTime: '2027-9-1', equipmentCompletion: '55%', taskType: '侦查', taskPlace: '山地', guaranteeGoodRate: '42%', noForceUtilization: '13%', forceUtilization: '35%', a: '煤油' },
  { taskName: '任务七', taskTime: '2028-9-1', equipmentCompletion: '56%', taskType: '侦查', taskPlace: '山地', guaranteeGoodRate: '42%', noForceUtilization: '13%', forceUtilization: '35%', a: '大灯' }
]

export const selectOptions = ['全部', '大灯', '雾灯', '煤油', '飞机发动机']

export const tableDataDetail = [
  {
    taskName: '任务一',
    taskTime: '2021-02-01/2022-09-01',
    taskLength: '12',
    flightEnvironment: '盆地',
    taskType: '打靶',
    status: '1',
    taskNumber: '65',
    sparePartsNumber: '500',
    taskSite: '成都',
    updateTime: '2021-05-20',
    ddld: '张三',
    rwdh: 'F0-54',
    zcxs: '空运',
    a: '全部'
  },
  {
    taskName: '任务二',
    taskTime: '2021-12-01/2023-09-01',
    taskLength: '45',
    flightEnvironment: '林地',
    taskType: '轰炸',
    status: '2',
    taskNumber: '15',
    sparePartsNumber: '500',
    taskSite: '武汉',
    updateTime: '2021-05-20',
    ddld: '张三',
    rwdh: 'F0-54',
    zcxs: '空运'
  },
  {
    taskName: '任务三',
    taskTime: '2000-08-01/2023-07-01',
    taskLength: '60',
    flightEnvironment: '海洋',
    taskType: '实战模拟',
    status: '3',
    taskNumber: '95',
    sparePartsNumber: '500',
    taskSite: '天津',
    updateTime: '2021-05-20',
    ddld: '张三',
    rwdh: 'F0-54',
    zcxs: '空运'
  },
  {
    taskName: '任务四',
    taskTime: '2023-08-01/2023-09-01',
    taskLength: '80',
    flightEnvironment: '城市',
    taskType: '打靶',
    status: '4',
    taskNumber: '35',
    sparePartsNumber: '500',
    taskSite: '南昌',
    updateTime: '2021-05-20',
    ddld: '张三',
    rwdh: 'F0-54',
    zcxs: '空运'
  },
  {
    taskName: '任务五',
    taskTime: '2023-08-01/2023-09-01',
    taskLength: '80',
    flightEnvironment: '城市',
    taskType: '打靶',
    status: '4',
    taskNumber: '35',
    sparePartsNumber: '500',
    taskSite: '南昌',
    updateTime: '2021-05-20',
    ddld: '张三',
    rwdh: 'F0-54',
    zcxs: '空运'
  },
  {
    taskName: '任务六',
    taskTime: '2023-08-01/2023-09-01',
    taskLength: '80',
    flightEnvironment: '城市',
    taskType: '打靶',
    status: '4',
    taskNumber: '35',
    sparePartsNumber: '500',
    taskSite: '南昌',
    updateTime: '2021-05-20',
    ddld: '张三',
    rwdh: 'F0-54',
    zcxs: '空运'
  },
  {
    taskName: '任务七',
    taskTime: '2023-08-01/2023-09-01',
    taskLength: '80',
    flightEnvironment: '城市',
    taskType: '打靶',
    status: '4',
    taskNumber: '35',
    sparePartsNumber: '500',
    taskSite: '南昌',
    updateTime: '2021-05-20',
    ddld: '张三',
    rwdh: 'F0-54',
    zcxs: '空运'
  }
]
