更新流量池列表相關邏輯,替換獲客場景和包選項的獲取方式,調整篩選條件的狀態管理,並優化篩選模態框的數據加載。

This commit is contained in:
超级老白兔
2025-08-13 17:34:38 +08:00
parent 907451df48
commit 3c71a2be96

View File

@@ -5,7 +5,7 @@ import {
ReloadOutlined,
BarChartOutlined,
} from "@ant-design/icons";
import { Input, Button, Checkbox } from "antd";
import { Input, Button, Checkbox, Pagination } from "antd";
import styles from "./index.module.scss";
import { Empty, Avatar } from "antd-mobile";
import { useNavigate } from "react-router-dom";
@@ -136,6 +136,17 @@ const TrafficPoolList: React.FC = () => {
</div>
</>
}
footer={
<div className="pagination-container">
<Pagination
current={page}
pageSize={20}
total={total}
showSizeChanger={false}
onChange={setPage}
/>
</div>
}
>
{/* 批量加入分组弹窗 */}
<BatchAddModal
@@ -227,23 +238,6 @@ const TrafficPoolList: React.FC = () => {
</div>
)}
</div>
{/* 分页 */}
{total > pageSize && (
<div className={styles.pagination}>
<button disabled={page === 1} onClick={() => setPage(page - 1)}>
</button>
<span>
{page} / {Math.ceil(total / pageSize)}
</span>
<button
disabled={page === Math.ceil(total / pageSize)}
onClick={() => setPage(page + 1)}
>
</button>
</div>
)}
</Layout>
);
};