|
|
@ -1,6 +1,6 @@ |
|
|
|
import React, { useEffect, useState } from 'react'; |
|
|
|
import { connect } from 'react-redux'; |
|
|
|
import { Button, Table, Popconfirm } from 'antd'; |
|
|
|
import { Button, Table, Popconfirm, Input } from 'antd'; |
|
|
|
import '../style.less'; |
|
|
|
import PointModel from '../components/pointModel' |
|
|
|
|
|
|
@ -17,6 +17,8 @@ const Information = (props) => { |
|
|
|
const [select, setSelect] = useState([]) |
|
|
|
const [selec, setSelec] = useState() |
|
|
|
const [qrCodeingIds, setQrCodeingIds] = useState(null) |
|
|
|
const [searchTableList, setSearchTableList] = useState([]) |
|
|
|
const [name, setName] = useState('') |
|
|
|
|
|
|
|
const qrCodeId = props?.match?.params?.id |
|
|
|
|
|
|
@ -35,6 +37,7 @@ const Information = (props) => { |
|
|
|
}) |
|
|
|
}) |
|
|
|
settableList(data?.map(v => ({ ...v, key: v.id }))) |
|
|
|
setSearchTableList(data?.map(v => ({ ...v, key: v.id }))) |
|
|
|
setLimits(res.payload.data?.count) |
|
|
|
} |
|
|
|
}) |
|
|
@ -128,14 +131,18 @@ const Information = (props) => { |
|
|
|
}) |
|
|
|
} |
|
|
|
}} disabled={qrCodeingIds?.length}>一键生成二维码</Button> |
|
|
|
<Input style={{ width: 300, margin: '0px 20px' }} placeholder="请输入点位名称" onChange={(e) => { setName(e.target.value) }} /> |
|
|
|
<Button type="primary" onClick={() => { |
|
|
|
setSearchTableList(tableList?.filter(l => l.name?.includes(name))) |
|
|
|
}}>搜索</Button> |
|
|
|
</div> |
|
|
|
|
|
|
|
<Table |
|
|
|
columns={columns} |
|
|
|
dataSource={tableList} |
|
|
|
dataSource={searchTableList} |
|
|
|
pagination={{ |
|
|
|
current: query.page + 1, |
|
|
|
total: limits, |
|
|
|
// current: query.page + 1,
|
|
|
|
// total: limits,
|
|
|
|
showSizeChanger: true, |
|
|
|
showQuickJumper: true, |
|
|
|
pageSizeOptions: [10, 20, 50], |
|
|
|