const config = {
  remoteUrl: {
    url: '/master/strategyConfig/getAll-strategyConfig	',
    headers: {
      'Content-Type': 'application/JSON'
    },
    method: 'get'
  },
  items: [
    {
      span: 8,
      type: 'input',
      name: 'strategyNo',
      label: '策略编号',
      value: ''
    },
    {
      span: 8,
      type: 'input',
      name: 'strategyName',
      label: '策略名称',
      value: ''
    },
    {
      span: 8,
      type: 'select',
      name: 'type',
      label: '类型',
      value: '',
      //   10.入库分货位11.入库找区域 20.出库
      options: [
        { label: '入库分货位', value: 10 },
        { label: '入库找区域', value: 11 },
        { label: '出库', value: 20 }
      ]
    },
    {
      span: 8,
      type: 'select',
      name: 'status',
      label: '状态',
      value: '',
      options: [
        { label: '未使用', value: 0 },
        { label: '正在使用', value: 1 }
      ]
    },

    {
      span: 24,
      type: 'buttonGroup',
      style: { textAlign: 'right' },
      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: [
    {
      dataIndex: 'strategyNo',
      key: 'strategyNo',
      align: 'center',
      title: '策略编号'
    },
    {
      title: '策略名称',
      dataIndex: 'strategyName',
      align: 'center',
      key: 'strategyName'
    },
    {
      title: '类型',
      dataIndex: 'type',
      align: 'center',
      key: 'type',
      // 10.入库分货位11.入库找区域 20.出库
      customRender(text) {
        text == 10 && (text = '入库分货位')
        text == 11 && (text = '入库找区域')
        text == 20 && (text = '出库')

        return text
      }
    },
    {
      title: '策略描述',
      dataIndex: 'comment',
      align: 'center',
      key: 'comment'
    },
    {
      title: '状态',
      dataIndex: 'status',
      align: 'center',
      key: 'status',
      customRender(text) {
        text == 0 && (text = '未使用')
        text == 1 && (text = '正在使用')
        return text
      }
    },

    {
      title: '操作',
      key: 'operation',
      scopedSlots: { customRender: 'operation' },
      fixed: 'right',
      align: 'center'
    }
  ],
  Modelitems: [
    {
      span: 24,
      type: 'input',
      name: 'strategyNo',
      required: true,
      label: '策略编号',
      value: ''
    },
    {
      span: 24,
      type: 'input',
      name: 'id',
      hidden: true,
      label: 'id',
      value: ''
    },
    {
      span: 24,
      type: 'input',
      name: 'strategyName',
      required: true,
      label: '策略名称',
      value: ''
    },
    {
      span: 24,
      type: 'select',
      required: true,
      name: 'type',
      label: '类型',
      value: '',
      options: [
        { label: '入库分货位', value: 10 },
        { label: '入库找区域', value: 11 },
        { label: '出库', value: 20 }
      ]
    },
    {
      span: 24,
      type: 'textarea',
      name: 'comment',
      required: true,
      label: '描述',
      value: ''
    }
  ],

  selectmodel: [
    {
      span: 24,
      type: 'check',
      name: 'field-input11',
      label: '入库',
      value: [1],
      scopedSlots: { customRender: 'diy' }
    },
    {
      span: 24,
      type: 'check',
      name: 'field-inpu11t',
      label: '出库',
      value: [2],
      scopedSlots: { customRender: 'diy1' }
    }
  ],
  details: {
    currentArea: '当前节点区域',
    nextArea: '下个节点区域',
    routeTaskState: '任务状态',
    routeExecuteState: '执行状态',
    currentLocation: '当前节点点位',
    nextLocation: '下个节点点位',
    deviceTask_id: '设备任务ID',
    deviceNo: '执行设备编号',
    arriveTime: '到位时间',
    errorMsg: '错误消息',
    updateTime: '修改时间'
  }
}
export default config
