|
@@ -104,7 +104,7 @@ const CartBody = (props) => {
|
104
|
104
|
}
|
105
|
105
|
|
106
|
106
|
const header = (props) => {
|
107
|
|
- const [tempData, setTempData] = useState([])
|
|
107
|
+ const [tempData, setTempData] = useState({ records: [] })
|
108
|
108
|
const [pageTotal, setPageTotal] = useState('')
|
109
|
109
|
const [data,setData] = useState({})
|
110
|
110
|
useEffect(() => {
|
|
@@ -114,8 +114,12 @@ const header = (props) => {
|
114
|
114
|
const getList = (params) => {
|
115
|
115
|
request({ ...apis.staff.taUser, params: { ...params } }).then((data) => {
|
116
|
116
|
console.log(data, "listData")
|
|
117
|
+<<<<<<< HEAD
|
|
118
|
+ setTempData(data)
|
|
119
|
+=======
|
117
|
120
|
setData(data)
|
118
|
121
|
setTempData(data.records)
|
|
122
|
+>>>>>>> 07ab51117db15061e9e469cbddcabf3ec412859e
|
119
|
123
|
setPageTotal(data.total)
|
120
|
124
|
})
|
121
|
125
|
}
|
|
@@ -196,7 +200,7 @@ const header = (props) => {
|
196
|
200
|
<Button type="danger" style={{ margin: '20px 0', padding: '2px 36px' }} onClick={toEditStaff()}>新增</Button>
|
197
|
201
|
<Row style={{ padding: ' 0 10px' }}>
|
198
|
202
|
{
|
199
|
|
- tempData.map((item, index) => (
|
|
203
|
+ tempData.records.map((item, index) => (
|
200
|
204
|
<Col span={6}>
|
201
|
205
|
<CartBody data={item} onFresh={() => getList({ pageNum: 1, pageSize: 8 })} />
|
202
|
206
|
</Col>
|
|
@@ -206,7 +210,11 @@ const header = (props) => {
|
206
|
210
|
|
207
|
211
|
{/* 分页 */}
|
208
|
212
|
<div style={{ display: 'flex', justifyContent: 'flex-end' }}>
|
|
213
|
+<<<<<<< HEAD
|
|
214
|
+ <Pagination showQuickJumper defaultCurrent={1} total={pageTotal} onChange={onChange} current={tempData.current}/>
|
|
215
|
+=======
|
209
|
216
|
<Pagination showQuickJumper defaultCurrent={1} pageSize={8} total={pageTotal} onChange={onChange} current={data.current}/>
|
|
217
|
+>>>>>>> 07ab51117db15061e9e469cbddcabf3ec412859e
|
210
|
218
|
</div>
|
211
|
219
|
</>
|
212
|
220
|
)
|