export const defaultProps = {
  children: 'children',
  label: 'aircraftTypeName'
}

export const mockMenuTreeData = [
  {
    aircraftTypeName: '常规航材',
    parentTypeName: '',
    parentTypeId: '',
    id: '1',
    numbering: '01',
    sequence: '1',
    status: 1,
    children: [
      {
        aircraftTypeName: '灯泡',
        parentTypeName: '作战飞机',
        parentTypeId: '1',
        id: '1.1',
        numbering: '01.1',
        sequence: '1.1',
        status: 0
      },
      {
        aircraftTypeName: '滤芯',
        parentTypeName: '作战飞机',
        parentTypeId: '1',
        id: '1.2',
        numbering: '01.2',
        sequence: '1.2',
        status: 0
      }
    ]
  },
  {
    aircraftTypeName: '消耗品',
    parentTypeName: '',
    parentTypeId: '',
    id: '2',
    numbering: '02',
    sequence: '2',
    status: 1,
    children: [
      {
        aircraftTypeName: '密封胶',
        parentTypeName: '消耗品',
        parentTypeId: '2',
        id: '2.1',
        numbering: '02.1',
        sequence: '2.1',
        status: 0
      },
      {
        aircraftTypeName: '燃料',
        parentTypeName: '消耗品',
        parentTypeId: '2',
        id: '2.2',
        numbering: '02.2',
        sequence: '2.2',
        status: 0
      }
    ]
  },
  {
    aircraftTypeName: '修理航材',
    parentTypeName: '',
    parentTypeId: '',
    id: '3',
    numbering: '03',
    sequence: '3',
    status: 1,
    children: [
      {
        aircraftTypeName: '发动机',
        parentTypeName: '消耗品',
        parentTypeId: '3',
        id: '3.1',
        numbering: '03.1',
        sequence: '3.1',
        status: 0
      },
      {
        aircraftTypeName: '航电系统',
        parentTypeName: '消耗品',
        parentTypeId: '3',
        id: '3.2',
        numbering: '03.2',
        sequence: '3.2',
        status: 0
      }
    ]
  }
]

export const columns = (_this) => [
  {
    prop: 'sparePartsName',
    label: '航材名称'
  },
  {
    prop: 'spareNumber',
    label: '航材编号'
  },

  {
    button: true,
    label: '操作',
    width: '240px',
    group: [
      {
        name: '选择',
        type: 'text',
        round: false,
        plain: false,
        onClick: (row, index, scope) => {
          _this.select(row)
        }
      }
    ]
  }
]

export const tableData = [
  {
    sparePartsName: '后轮',
    spareNumber: '201',
    classification: '轮胎',
    unitPrice: '2000',
    carryingAmount: '16000',
    autoGeneration: '1',
    isModified: '0'
  },
  {
    sparePartsName: '前轮',
    spareNumber: '202',
    classification: '轮胎',
    unitPrice: '2400',
    carryingAmount: '11000',
    autoGeneration: '1',
    isModified: '0'
  },
  {
    sparePartsName: '侧轮',
    spareNumber: '203',
    classification: '轮胎',
    unitPrice: '2200',
    carryingAmount: '17000',
    autoGeneration: '1',
    isModified: '0'
  },
  {
    sparePartsName: '上轮',
    spareNumber: '204',
    classification: '轮胎',
    unitPrice: '3000',
    carryingAmount: '11000',
    autoGeneration: '1',
    isModified: '0'
  },
  {
    sparePartsName: '下轮',
    spareNumber: '205',
    classification: '轮胎',
    unitPrice: '1000',
    carryingAmount: '18000',
    autoGeneration: '1',
    isModified: '0'
  }
]
export const options = {
  stripe: true, // 斑马纹
  mutiSelect: false, // 多选框
  index: false, // 显示序号， 多选则 mutiSelect
  loading: false, // 表格动画
  initTable: true, // 是否一挂载就加载数据
  border: true,
  height: 'calc(100vh - 380px)'
}
