|
@ -51,7 +51,8 @@ function Assess(props) { |
|
|
|
|
|
|
|
|
const getData = () => { |
|
|
const getData = () => { |
|
|
setLoading(true) |
|
|
setLoading(true) |
|
|
dispatch(getRoadadministration(query)).then(res => { |
|
|
console.log(query,'query') |
|
|
|
|
|
dispatch(getRoadadministration({...query})).then(res => { |
|
|
if(res?.success){ |
|
|
if(res?.success){ |
|
|
setdatasource(res?.payload?.data?.rows) |
|
|
setdatasource(res?.payload?.data?.rows) |
|
|
settotal(res?.payload?.data?.count) |
|
|
settotal(res?.payload?.data?.count) |
|
@ -146,8 +147,10 @@ function Assess(props) { |
|
|
setLoading(true) |
|
|
setLoading(true) |
|
|
dispatch(delRoadadministration(record.id)).then(res => { |
|
|
dispatch(delRoadadministration(record.id)).then(res => { |
|
|
setLoading(false) |
|
|
setLoading(false) |
|
|
|
|
|
|
|
|
if (res.success) { |
|
|
if (res.success) { |
|
|
getData() |
|
|
setQuery({...query, page: 1, pageSize: 10, limit: 10}) |
|
|
|
|
|
// getData(page)
|
|
|
} |
|
|
} |
|
|
}) |
|
|
}) |
|
|
}} |
|
|
}} |
|
@ -165,6 +168,7 @@ function Assess(props) { |
|
|
defaultPageSize: 10, |
|
|
defaultPageSize: 10, |
|
|
showSizeChanger: false, |
|
|
showSizeChanger: false, |
|
|
onChange: (page, pageSize) => { |
|
|
onChange: (page, pageSize) => { |
|
|
|
|
|
console.log(page,'page') |
|
|
setQuery({ |
|
|
setQuery({ |
|
|
...query, |
|
|
...query, |
|
|
page, limit: pageSize |
|
|
page, limit: pageSize |
|
|