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

export const columns = (_this) => [
  {
    prop: 'taskName',
    label: '任务名称'
  },
  {
    prop: 'taskTime',
    label: '任务时间',
    width: '200'
  },
  {
    prop: 'undamaged',
    label: '装备完好率',
    render: (h, params) => {
      return h('span', {}, params.row.undamaged + '%')
    }
  },
  {
    prop: 'favorable',
    label: '任务航材保障良好率',
    render: (h, params) => {
      return h('span', {}, params.row.favorable + '%')
    }
  },
  {
    prop: 'onMissionAviationMaterials',
    label: '非任务携行航材利用率',
    render: (h, params) => {
      return h('span', {}, params.row.onMissionAviationMaterials + '%')
    }
  },
  {
    prop: 'missionAviationMaterials',
    label: '任务携行航材利用率',
    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%', guaranteeGoodRate: '41%', noForceUtilization: '13%', forceUtilization: '35%' },
  { taskName: '任务二', taskTime: '2023-9-1', equipmentCompletion: '23%', guaranteeGoodRate: '12%', noForceUtilization: '14%', forceUtilization: '36%' },
  { taskName: '任务三', taskTime: '2024-9-1', equipmentCompletion: '10%', guaranteeGoodRate: '98%', noForceUtilization: '14%', forceUtilization: '35%' },
  { taskName: '任务四', taskTime: '2025-9-1', equipmentCompletion: '56%', guaranteeGoodRate: '23%', noForceUtilization: '15%', forceUtilization: '37%' },
  { taskName: '任务五', taskTime: '2026-9-1', equipmentCompletion: '54%', guaranteeGoodRate: '42%', noForceUtilization: '16%', forceUtilization: '35%' },
  { taskName: '任务六', taskTime: '2027-9-1', equipmentCompletion: '55%', guaranteeGoodRate: '43%', noForceUtilization: '17%', forceUtilization: '39%' },
  { taskName: '任务七', taskTime: '2028-9-1', equipmentCompletion: '53%', guaranteeGoodRate: '44%', noForceUtilization: '18%', forceUtilization: '35%' }
]

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