const config = {
  remoteUrl: {
    url: '/master/sysParam/getAll-sysParam',
    headers: {
      'Content-Type': 'application/x-www-form-urlencoded'
    },
    method: 'get'
  },
  items: [
    {
      span: 8,
      type: 'input',
      name: 'paramNo',
      label: '参数编号',
      value: ''
    },
    {
      span: 8,
      type: 'input',
      name: 'remark',
      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: [
    {
      dataIndex: 'paramNo',
      key: 'paramNo',
      align: 'center',
      title: '参数编号'
    },
    {
      title: '参数值',
      dataIndex: 'paramValue',
      align: 'center',
      key: 'paramValue'
    },
    {
      title: '参数类型',
      dataIndex: 'paramType',
      align: 'center',
      key: 'paramType',
      customRender(text) {
        text == 1 && (text = '字符串')
        text == 2 && (text = '整数')
        text == 3 && (text = '小数')
        return text
      }
    },
    {
      title: '是否只读',
      dataIndex: 'isReadOnly',
      align: 'center',
      key: 'isReadOnly',
      customRender(text) {
        text == 0 && (text = '否')
        text == 1 && (text = '是')
        return text
      }
    },

    {
      title: '备注',
      dataIndex: 'remark',
      align: 'center',
      ellipsis: true,
      key: 'remark'
    },

    {
      title: '操作',
      key: 'operation',
      scopedSlots: { customRender: 'operation' },
      fixed: 'right',
      align: 'center'
    }
  ],
  Modelitems: [
    {
      span: 24,
      type: 'input',
      name: 'paramNo',
      required: true,
      label: '参数编号',
      value: ''
    },
    {
      span: 24,
      type: 'input',
      name: 'id',
      hidden: true,
      label: 'id',
      value: ''
    },
    {
      span: 24,
      type: 'input',
      required: true,
      name: 'paramValue',
      label: '参数值',
      value: ''
    },
    {
      span: 24,
      type: 'select',
      name: 'paramType',
      required: true,
      label: '参数类型',
      value: '',
      options: [
        { label: '字符串', value: 1 },
        { label: '整数', value: 2 },
        { label: '小数', value: 3 }
      ]
    },

    {
      span: 24,
      type: 'select',
      required: true,
      name: 'isReadOnly',
      label: '是否只读',
      value: '',
      options: [
        { label: '否', value: 0 },
        { label: '是', value: 1 }
      ]
    },
    {
      span: 24,
      type: 'input',
      name: 'remark',
      label: '备注',
      value: ''
    }
  ],
  details: {
    currentArea: '当前节点区域',
    nextArea: '下个节点区域',
    routeTaskState: '任务状态',
    routeExecuteState: '执行状态',
    currentLocation: '当前节点点位',
    nextLocation: '下个节点点位',
    deviceTask_id: '设备任务ID',
    deviceNo: '执行设备编号',
    arriveTime: '到位时间',
    errorMsg: '错误消息',
    updateTime: '修改时间'
  }
}
export default config
