From bc0eab495d173975318b445497bbc0cac3c3d9c4 Mon Sep 17 00:00:00 2001 From: xingjx Date: Tue, 12 Dec 2023 16:00:14 +0800 Subject: [PATCH] =?UTF-8?q?fix():bug=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ParkingBusinessAly/ParkBerthAly/loadable.jsx | 16 ++++------------ 1 file changed, 4 insertions(+), 12 deletions(-) diff --git a/src/pages/DataAnalysisPrediction/ParkingBusinessAly/ParkBerthAly/loadable.jsx b/src/pages/DataAnalysisPrediction/ParkingBusinessAly/ParkBerthAly/loadable.jsx index 298e222..0bd0df5 100644 --- a/src/pages/DataAnalysisPrediction/ParkingBusinessAly/ParkBerthAly/loadable.jsx +++ b/src/pages/DataAnalysisPrediction/ParkingBusinessAly/ParkBerthAly/loadable.jsx @@ -104,26 +104,16 @@ function ParkBerthAly() { title: '停车场名称', dataIndex: 'name', key: 'name', - // render: (text, record, index) => { - // return
{ setBaseData(record); getParkingIncome({ ...formData, road_id: record.road_id }) }}>{text}
- // } }, { title: '日均泊位时长利用率', dataIndex: 'utilization_rate', key: 'utilization_rate', - //width: 200, - // render: (text, record, index) => { - // return
{ setBaseData(record); getParkingIncome({ ...formData, road_id: record.road_id }) }}>{text}
- // } }, { title: '标签', dataIndex: 'label', key: 'label', - // render: (text, record, index) => { - // return
{ setBaseData(record); getParkingIncome({ ...formData, road_id: record.road_id }) }}>{text}
- // } }, ] @@ -282,7 +272,9 @@ function ParkBerthAly() { }) .catch((err) => console.error(err)); } - + useEffect(() => { + getParkingIncome({ ...formData, road_id: baseData.road_id }) + }, [baseData]) // 获取下拉数据 const getSelectList = () => { ajax.getOperator().then((e) => { @@ -429,7 +421,7 @@ function ParkBerthAly() { rowKey={'area_name'} rowClassName={(record, index) => { if (keyVal == index) { - setBaseData(record); getParkingIncome({ ...formData, road_id: record.road_id }) + setBaseData(record); return "ben" } }}