import {
  remote
} from '@/views/EIS/remote/index.js'

const baseUrl = '/api/eis-lppz2-maintain-service'
const config = {
  remoteUrl: {
    url: baseUrl + '/api/v1/eis/maintain/queryMaintainTasks',
    headers: {
      'Content-Type': 'application/JSON'
    },
    method: 'post',
  },
  items: [{
      span: 8,
      type: 'input',
      name: 'deviceCompany',
      label: '设备厂商',
      value: ''
    },
    {
      span: 8,
      type: 'input',
      name: 'deviceType',
      label: '设备类型',
      value: ''
    },
    {
      span: 8,
      type: 'input',
      name: 'equipmentNo',
      label: '设备编号',
      value: ''
    },
    {
      span: 8,
      type: 'input',
      name: 'maintainContent',
      label: '养护内容',
      value: ''
    }, {
      span: 8,
      type: 'buttonGroup',
      style: {
        textAlign: 'left'
      },
      options: [{
          value: '查询',
          icon: 'search',
          btnType: 'primary',
          style: 'margin-right:10px',
          htmlType: 'submit'
        },
        {
          value: '重置',
          icon: 'redo',
          on: {
            click: (event, form) => {
              console.log(form)
              form.resetFields()
            }
          }
        }
      ]
    }
  ],
  columns: [{
      title: 'id',
      dataIndex: 'id',
      width: 100,
      ellipsis: true,
      align: 'center',
      key: 'id'
    }, {
      title: '设备厂商',
      dataIndex: 'deviceCompany',
      width: 100,
      align: 'center',
      key: 'deviceCompany'
    }, {
      title: '设备类型',
      dataIndex: 'deviceType',
      width: 100,
      align: 'center',
      key: 'deviceType'
    }, {
      title: '设备编号',
      dataIndex: 'equipmentNo',
      width: 100,
      align: 'center',
      key: 'equipmentNo'
    }, {
      title: '保养内容',
      dataIndex: 'maintainContent',
      width: 100,
      align: 'center',
      key: 'maintainContent'
    }, {
      title: '最后一次养护时间',
      dataIndex: 'lastMaintainDate',
      ellipsis: true,
      width: 100,
      align: 'center',
      key: 'lastMaintainDate'
    }, {
      title: '保养周期',
      dataIndex: 'maintainCycle',
      ellipsis: true,
      width: 100,
      align: 'center',
      key: 'maintainCycle'
    }, {
      title: '下次保养周期',
      dataIndex: 'nextMaintainDate',
      ellipsis: true,
      width: 100,
      align: 'center',
      key: 'nextMaintainDate'
    }, {
      title: '下次保养通知日期',
      dataIndex: 'noticeMaintainDate',
      ellipsis: true,
      width: 100,
      align: 'center',
      key: 'noticeMaintainDate'
    },
    {
      title: '操作',
      key: 'operation',
      scopedSlots: {
        customRender: 'operation'
      },
      //   fixed: 'right',
      align: 'center',
    }
  ]
}


export default config
