From cd731a579a7edbb0cf040182d2e1f5269d39545a Mon Sep 17 00:00:00 2001 From: dengyinhuan Date: Fri, 4 Aug 2023 18:00:30 +0800 Subject: [PATCH] =?UTF-8?q?=E5=AE=8C=E5=96=84=E8=B7=AF=E6=94=BF=E5=88=86?= =?UTF-8?q?=E9=A1=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- web/client/src/sections/fillion/containers/luzheng.js | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/web/client/src/sections/fillion/containers/luzheng.js b/web/client/src/sections/fillion/containers/luzheng.js index 5158c3e7..b2153fac 100644 --- a/web/client/src/sections/fillion/containers/luzheng.js +++ b/web/client/src/sections/fillion/containers/luzheng.js @@ -38,6 +38,7 @@ function Assess(props) { const [datasource,setdatasource] = useState([]) const [dateRange, setDateRange] = useState(['1970-1-1', '2099-12-31']); const { RangePicker } = DatePicker + const [total,settotal]= useState(0) const [editAble, setEditAble] = useState(user?.username !== 'SuperAdmin' && user?.userResources?.find(i => i.resourceId === 'ASSESSMANAGE')?.isshow === "true" ? true : '') useEffect(() => { @@ -53,6 +54,7 @@ function Assess(props) { dispatch(getRoadadministration(query)).then(res => { if(res?.success){ setdatasource(res?.payload?.data?.rows) + settotal(res?.payload?.data?.count) setLoading(false) } }) @@ -63,8 +65,8 @@ function Assess(props) {
{ - setQuery({ ...query, unit: v.unit,startTime : moment(v?.time[0]).startOf('day').format('YYYY-MM-DD HH:mm:ss'), - endTime :moment(v?.time[1]).add(1, 'days').endOf('day').format('YYYY-MM-DD HH:mm:ss') }) + setQuery({ ...query, page:1,unit: v.unit,startTime : v?.time && moment(v?.time[0]).startOf('day').format('YYYY-MM-DD HH:mm:ss'), + endTime : v?.time && moment(v?.time[1]).add(1, 'days').endOf('day').format('YYYY-MM-DD HH:mm:ss') }) }}> @@ -158,7 +160,7 @@ function Assess(props) { dataSource={datasource || []} loading={loading} pagination={{ - total: assess?.count || 0, + total: total || 0, pageSize: 10, defaultPageSize: 10, showSizeChanger: false,