chore: 更新代理配置并替换分页组件
- 更新 Vite 代理配置中的后端服务器地址和端口 - 将 ExternalAppManagement 和 ClientManagement 页面中的自定义分页逻辑替换为统一的 AppPagination 组件 - 移除表格内嵌的滚动样式,使分页组件独立于表格布局dev_na
parent
017e1d2ded
commit
caf2e22df0
|
|
@ -3,7 +3,7 @@ import type { ColumnsType } from "antd/es/table";
|
|||
import { CloudUploadOutlined, DeleteOutlined, DownloadOutlined, EditOutlined, LaptopOutlined, MobileOutlined, PlusOutlined, ReloadOutlined, SearchOutlined, UploadOutlined } from "@ant-design/icons";
|
||||
import { useCallback, useEffect, useMemo, useState } from "react";
|
||||
import PageHeader from "@/components/shared/PageHeader";
|
||||
import { getStandardPagination } from "@/utils/pagination";
|
||||
import AppPagination from "@/components/shared/AppPagination";
|
||||
import { createClientDownload, deleteClientDownload, listClientDownloads, type ClientDownloadDTO, type ClientDownloadVO, updateClientDownload, uploadClientPackage } from "@/api/business/client";
|
||||
import { fetchDictItemsByTypeCode } from "@/api/dict";
|
||||
import { useDict } from "@/hooks/useDict";
|
||||
|
|
@ -410,17 +410,23 @@ export default function ClientManagement() {
|
|||
</Card>
|
||||
|
||||
<Card className="app-page__content-card flex-1 flex flex-col overflow-hidden" styles={{ body: { padding: 0, flex: 1, display: "flex", flexDirection: "column", overflow: "hidden" } }}>
|
||||
<div className="app-page__table-wrap">
|
||||
<div className="app-page__table-wrap" style={{ padding: "0 24px", overflow: "auto" }}>
|
||||
<Table
|
||||
rowKey="id"
|
||||
columns={columns}
|
||||
dataSource={pagedRecords}
|
||||
loading={loading || groupLoading || platformLoading}
|
||||
locale={platformGroups.length === 0 ? { emptyText: <Empty description="未配置 client_platform 字典项" /> } : undefined}
|
||||
scroll={{ x: "max-content", y: "calc(100vh - 360px)" }}
|
||||
pagination={getStandardPagination(filteredRecords.length, page, pageSize, (nextPage: number, nextSize: number) => { setPage(nextPage); setPageSize(nextSize); })}
|
||||
scroll={{ x: "max-content" }}
|
||||
pagination={false}
|
||||
/>
|
||||
</div>
|
||||
<AppPagination
|
||||
current={page}
|
||||
pageSize={pageSize}
|
||||
total={filteredRecords.length}
|
||||
onChange={(nextPage, nextSize) => { setPage(nextPage); setPageSize(nextSize); }}
|
||||
/>
|
||||
</Card>
|
||||
|
||||
<Drawer title={editing ? "编辑客户端版本" : "新增客户端版本"} open={drawerOpen} onClose={() => setDrawerOpen(false)} width={680} destroyOnHidden forceRender footer={<div className="app-page__drawer-footer"><Button onClick={() => setDrawerOpen(false)}>取消</Button><Button type="primary" icon={<UploadOutlined />} loading={saving} onClick={() => void handleSubmit()}>保存</Button></div>}>
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@ import type { ColumnsType } from "antd/es/table";
|
|||
import { AppstoreOutlined, DeleteOutlined, EditOutlined, GlobalOutlined, LinkOutlined, PictureOutlined, PlusOutlined, ReloadOutlined, RobotOutlined, SaveOutlined, SearchOutlined, UploadOutlined } from "@ant-design/icons";
|
||||
import { useCallback, useEffect, useMemo, useState } from "react";
|
||||
import PageHeader from "@/components/shared/PageHeader";
|
||||
import { getStandardPagination } from "@/utils/pagination";
|
||||
import AppPagination from "@/components/shared/AppPagination";
|
||||
import { createExternalApp, deleteExternalApp, listExternalApps, type ExternalAppDTO, type ExternalAppVO, updateExternalApp, uploadExternalAppApk, uploadExternalAppIcon } from "@/api/business/externalApp";
|
||||
|
||||
const { Text } = Typography;
|
||||
|
|
@ -320,9 +320,15 @@ export default function ExternalAppManagement() {
|
|||
</Card>
|
||||
|
||||
<Card className="app-page__content-card flex-1 flex flex-col overflow-hidden" styles={{ body: { padding: 0, flex: 1, display: "flex", flexDirection: "column", overflow: "hidden" } }}>
|
||||
<div className="app-page__table-wrap">
|
||||
<Table rowKey="id" columns={columns} dataSource={pagedRecords} loading={loading} scroll={{ x: "max-content", y: "calc(100vh - 360px)" }} pagination={getStandardPagination(filteredRecords.length, page, pageSize, (nextPage: number, nextSize: number) => { setPage(nextPage); setPageSize(nextSize); })} />
|
||||
<div className="app-page__table-wrap" style={{ padding: "0 24px", overflow: "auto" }}>
|
||||
<Table rowKey="id" columns={columns} dataSource={pagedRecords} loading={loading} scroll={{ x: "max-content" }} pagination={false} />
|
||||
</div>
|
||||
<AppPagination
|
||||
current={page}
|
||||
pageSize={pageSize}
|
||||
total={filteredRecords.length}
|
||||
onChange={(nextPage, nextSize) => { setPage(nextPage); setPageSize(nextSize); }}
|
||||
/>
|
||||
</Card>
|
||||
|
||||
<Drawer title={editing ? "编辑外部应用" : "新增外部应用"} open={drawerOpen} onClose={() => setDrawerOpen(false)} width={700} destroyOnHidden forceRender footer={<div className="app-page__drawer-footer"><Button onClick={() => setDrawerOpen(false)}>取消</Button><Button type="primary" icon={<SaveOutlined />} loading={saving} onClick={() => void handleSubmit()}>保存</Button></div>}>
|
||||
|
|
|
|||
|
|
@ -14,11 +14,11 @@ export default defineConfig({
|
|||
server: {
|
||||
port: 5174,
|
||||
proxy: {
|
||||
"/auth": "http://10.100.53.199:8080",
|
||||
"/sys": "http://10.100.53.199:8080",
|
||||
"/api": "http://10.100.53.199:8080",
|
||||
"/auth": "http://10.100.52.13:8081",
|
||||
"/sys": "http://10.100.52.13:8081",
|
||||
"/api": "http://10.100.52.13:8081",
|
||||
"/ws": {
|
||||
target: "ws://10.100.51.199:8080",
|
||||
target: "ws://10.100.52.13:8081",
|
||||
ws: true
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue