const baseUrl = '/api/service-ai-eis-route-center-eistest'
const config = {
  remoteUrl: {
    url: baseUrl + '/api/v1/route/location/findContainerPageForNoCarryTask',
    headers: {
      'Content-Type': 'application/JSON',
    },
    method: 'get',
  },
  items: [
    {
      span: 8,
      type: 'input',
      name: 'containerNo',
      label: '容器号',
      value: '',
    },
    {
      span: 8,
      type: 'input',
      name: 'palletNo',
      label: '载具编号',
      value: '',
    },
    {
      span: 8,
      type: 'input',
      name: 'currentArea',
      label: '当前区域',
      value: '',
    },
    {
      span: 8,
      type: 'input',
      name: 'currentLocation',
      label: '当前点位',
      value: '',
    },

    {
      span: 8,
      type: 'select',
      name: 'taskState',
      label: '状态',
      value: '',
      options: [
        { label: '未开始', value: 0 },
        { label: '待发送任务', value: 10 },
        { label: '已发送指令', value: 20 },
        { label: '设备回告开始', value: 30 },
        { label: '已经离开原位置', value: 40 },
      ],
    },

    {
      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: 'containerNo',
      key: 'containerNo',
      align: 'center',
      title: '容器号',
    },
    {
      title: '载具编号',
      dataIndex: 'palletNo',
      align: 'center',
      key: 'palletNo',
      //   customRender(text) {
      //     text == 1 && (text = '四向车')
      //     text == 2 && (text = '堆垛机')
      //     text == 3 && (text = 'AGV')
      //     text == 4 && (text = '提升机')
      //     text == 5 && (text = '多穿车')
      //     text == 6 && (text = '托盘输送线')
      //     text == 7 && (text = '料箱输送线')
      //     return text
      //   },
    },
    {
      title: '当前区域',
      dataIndex: 'currentArea',
      align: 'center',
      key: 'currentArea',
      //   customRender(text) {
      //     text == 1 && (text = '出库口')
      //     text == 2 && (text = '钢平台拣选')
      //     text == 3 && (text = '在线拣选')
      //     return text
      //   }
    },
    {
      title: '当前点位',
      key: 'currentLocation',
      dataIndex: 'currentLocation',
      align: 'center',
    },
    {
      title: '任务状态',
      key: 'taskState',
      dataIndex: 'taskState',
      align: 'center',
      customRender(text) {
        text == 0 && (text = '未开始')
        text == 10 && (text = '待发送任务')
        text == 20 && (text = '已发送指令')
        text == 30 && (text = '设备回告开始')
        text == 40 && (text = '已经离开原位置')
        return text
      },
    },
    {
      title: '重量',
      key: 'weight',
      dataIndex: 'weight',
      align: 'center',
    },
    {
      title: '高度',
      key: 'height',
      dataIndex: 'height',
      align: 'center',
    },
    {
      title: '业务属性',
      key: 'businessProperty',
      ellipsis: true,
      dataIndex: 'businessProperty',
      align: 'center',
    },

    {
      title: '操作',
      key: 'operation',
      scopedSlots: { customRender: 'operation' },
      //   fixed: 'right',
      align: 'center',
    },
  ],
  Modelitems: [
    {
      span: 24,
      type: 'input',
      name: 'extend1',
      disabled: true,
      //   required: true,
      //   disabled:true,
      label: '预留字段1',
      value: '',
    },
    {
      span: 24,
      type: 'input',
      name: 'extend2',
      disabled: true,
      // required: true,
      label: '预留字段2',
      value: '',
    },
    {
      span: 24,
      type: 'input',
      name: 'extend3',
      disabled: true,
      // required: true,
      label: '预留字段3',
      value: '',
    },
  ],
  details: {
    currentArea: '当前节点区域',
    nextArea: '下个节点区域',
    routeTaskState: '任务状态',
    routeExecuteState: '执行状态',
    currentLocation: '当前节点点位',
    nextLocation: '下个节点点位',
    deviceTask_id: '设备任务ID',
    deviceNo: '执行设备编号',
    arriveTime: '到位时间',
    errorMsg: '错误消息',
    updateTime: '修改时间',
  },
}
export default config
