export const columns = (_this) => [
  {
    prop: 'aircaftCatalogCode',
    label: '飞机编号'
  },
  {
    prop: 'aircaftModelName',
    label: '指向机型'
  },
  {
    prop: 'aircaftTypeName',
    label: '机种'
  },
  {
    prop: 'mechanician',
    label: '机械师'
  },
  {
    prop: 'planFlyDuration',
    label: '计划飞行时长（h）'
  },
  {
    prop: 'flyDuration',
    label: '飞行时长（h）',
    edit: true,
    onChange: (scope, oldRow) => {
      const { row } = scope
      if (oldRow.flyDuration == row.flyDuration) return
      _this.updateRow(row, scope)
    }
  },
  {
    prop: 'aircraftActualNum',
    label: '飞机实有架日',
    edit: true,
    onChange: (scope, oldRow) => {
      const { row } = scope
      if (oldRow.aircraftActualNum == row.aircraftActualNum) return
      _this.updateRow(row, scope)
    }
  },
  {
    prop: 'aircraftIntactNum',
    label: '飞机完好架日',
    edit: true,
    onChange: (scope, oldRow) => {
      const { row } = scope
      if (oldRow.aircraftIntactNum == row.aircraftIntactNum) return
      _this.updateRow(row, scope)
    }
  },
  {
    prop: 'lackMaterStopFlyNum',
    label: '缺航材停飞架日',
    edit: true,
    onChange: (scope, oldRow) => {
      const { row } = scope
      if (oldRow.lackMaterStopFlyNum == row.lackMaterStopFlyNum) return
      _this.updateRow(row, scope)
    }
  },
  {
    prop: 'aircraftIntactRatio',
    label: '装备完好率（%）'
  },
  {
    prop: 'lackMaterStopFlyRatio',
    label: '缺材停飞率（%）'
  },
  {
    prop: 'guaranteedRatio',
    label: '保障良好率（%）'
  }
]

export const options = {
  stripe: true, // 斑马纹
  mutiSelect: false, // 多选框
  index: false, // 显示序号， 多选则 mutiSelect
  loading: false, // 表格动画
  initTable: true, // 是否一挂载就加载数据
  border: true,
  height: 'calc(100vh - 300px)'
}
