const config = {
  remoteUrl: {
    url: '/master/eisErrorLogService/log/error',
    headers: {
      'Content-Type': 'application/JSON'
    },
    method: 'post'
  },
  items: [
    {
      span: 8,
      type: 'select',
      name: 'type',
      label: '接口描述',
      options: [
        { label: '前端日志', value: 1 },
        { label: '后台日志', value: 2 }
      ],
      value: ''
    },

    {
      span: 8,
      type: 'input',
      name: 'name',
      label: '错误名',
      value: ''
    },
    {
      span: 24,
      type: 'buttonGroup',
      style: { textAlign: 'right' },
      options: [
        {
          value: '查询',
          icon: 'search',
          btnType: 'primary',
          style: 'margin-right:10px',
          htmlType: 'submit'
        },
        {
          value: '重置',
          icon: 'redo',
          style: 'margin-right:50px',
          on: {
            click: (event, form) => {
              console.log(form)
              form.resetFields()
            }
          }
        }
      ]
    }
  ],
  columns: [
    {
      dataIndex: 'type',
      key: 'type',
      align: 'center',
      title: '日志类型',
      customRender(text) {
        text == 1 && (text = '前端日志')
        text == 2 && (text = '后台日志')
        return text
      }
    },
    {
      title: '错误时间',
      dataIndex: 'date',
      align: 'center',
      key: 'date'
    },
    {
      title: '使用者',
      dataIndex: 'userid',
      align: 'center',
      key: 'userid'
      //   customRender(text) {
      //     text == 1 && (text = '出库口')
      //     text == 2 && (text = '在线拣选')
      //     return text
      //   }
    },
    {
      title: '错误名',
      key: 'name',
      dataIndex: 'name',
      align: 'center'
      //   customRender(text) {
      //     text == 1 && (text = '存储位')
      //     text == 2 && (text = '工作位')
      //     text == 3 && (text = '输送线点位')
      //     return text
      //   }
    },
    {
      title: '错误原因',
      dataIndex: 'cause',
      align: 'center',
      key: 'cause'
      //   customRender(text) {
      //     text == 0 && (text = '否')
      //     text == 1 && (text = '是')
      //     return text
      //   }
    }
  ],
  Modelitems: [
    {
      span: 24,
      type: 'input',
      name: 'stationNo',
      required: true,
      label: '站台编号',
      value: ''
    },
    {
      span: 24,
      type: 'input',
      name: 'id',
      hidden: true,
      label: 'id',
      value: ''
    },
    {
      span: 24,
      type: 'input',
      hidden: true,
      name: 'createTime',
      label: 'createTime',
      value: ''
    },
    {
      span: 24,
      type: 'input',
      name: 'areaNo',
      required: true,
      label: '站台区域',
      value: ''
    },

    {
      span: 24,
      type: 'select',
      required: true,
      name: 'type',
      label: '站台类型',
      value: 1,
      options: [
        { label: '出库口', value: 1 },
        { label: '在线拣选', value: 2 }
      ]
    },
    {
      span: 24,
      type: 'radio',
      required: true,
      name: 'isLock',
      label: '是否锁定',
      value: 0,
      options: [
        {
          value: 0,
          label: '开启'
        },
        {
          value: 1,
          label: '关闭'
        }
      ]
    },
    {
      span: 24,
      type: 'radio',
      name: 'claim',
      required: true,
      label: '是否索取',
      value: 1,
      options: [
        {
          value: 0,
          label: '不索取'
        },
        {
          value: 1,
          label: '索取'
        }
      ]
    }
  ],
  details: {
    currentArea: '当前节点区域',
    nextArea: '下个节点区域',
    routeTaskState: '任务状态',
    routeExecuteState: '执行状态',
    currentLocation: '当前节点点位',
    nextLocation: '下个节点点位',
    deviceTask_id: '设备任务ID',
    deviceNo: '执行设备编号',
    arriveTime: '到位时间',
    errorMsg: '错误消息',
    updateTime: '修改时间'
  }
}
export default config
