const config = {
  remoteUrl: {
    url: '/master/eisSpsLogService/log/sps',
    headers: {
      'Content-Type': 'application/JSON'
    },
    method: 'post'
  },
  items: [
    {
      span: 8,
      type: 'input',
      name: 'descri',
      label: '接口描述',
      value: ''
    },

    {
      span: 8,
      type: 'row',
      label: '创建时间',
      list: [
        {
          type: 'date',
          name: 'starttime',
          placeholder: '请输入开始日期',
          value: '',
          format: 'YYYY-MM-DD HH:mm:ss',
          style: 'padding-right:5px;'
        },
        {
          type: 'date',
          name: 'endtime',
          placeholder: '请输入结束日期',
          format: 'YYYY-MM-DD HH:mm:ss',
          value: ''
        }
      ]
    },
    {
      span: 8,
      type: 'select',
      name: 'success',
      label: '是否成功',
      options: [
        { label: '是', value: true },
        { label: '否', value: false }
      ],
      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: 'descri',
      key: 'descri',
      align: 'center',
      title: '接口描述'
    },
    {
      title: '方法流向',
      dataIndex: 'direct',
      align: 'center',
      key: 'direct'
    },
    {
      title: '任务类型',
      dataIndex: 'type',
      align: 'center',
      key: 'type',
      customRender(text) {
        text == 1 && (text = '入库')
        text == 2 && (text = '出库')
        return text
      }
    },
    {
      title: '方法名',
      key: 'method_name',
      dataIndex: 'method_name',
      ellipsis: true,
      align: 'center'
      //   customRender(text) {
      //     text == 1 && (text = '存储位')
      //     text == 2 && (text = '工作位')
      //     text == 3 && (text = '输送线点位')
      //     return text
      //   }
    },
    {
      title: '传入参数',
      dataIndex: 'params',
      ellipsis: true,
      align: 'center',
      key: 'params'
    },
    {
      title: '返回体',
      dataIndex: 'returnBody',
      ellipsis: true,
      align: 'center',
      key: 'returnBody'
    },
    {
      title: '是否成功',
      dataIndex: 'success',
      align: 'center',
      key: 'success',
      customRender(text) {
        text == true && (text = '成功')
        text == false && (text = '失败')
        return text
      }
    },
    {
      title: '异常信息',
      dataIndex: 'exception',
      ellipsis: true,
      align: 'center',
      key: 'exception'
    },
    {
      title: '创建时间',
      dataIndex: 'createTime',
      align: 'center',
      key: 'createTime'
    }
  ],
  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
