refactor: 优化设备和客户端管理页面样式和滚动逻辑
- 在 `devices/index.less` 中取消注释并应用必要的 CSS 规则 - 更新 `devices/index.tsx` 和 `business/ClientManagement.tsx` 中的滚动配置和样式 - 在 `backend/lombok.config` 中添加 `lombok.copyableAnnotations` 配置dev_na
parent
33caa1201f
commit
b34efa5eb0
|
|
@ -0,0 +1 @@
|
||||||
|
lombok.copyableAnnotations += org.springframework.beans.factory.annotation.Qualifier
|
||||||
|
|
@ -363,7 +363,6 @@ export default function ClientManagement() {
|
||||||
{
|
{
|
||||||
title: "安装包信息",
|
title: "安装包信息",
|
||||||
key: "package",
|
key: "package",
|
||||||
width: 240,
|
|
||||||
render: (_, record) => (
|
render: (_, record) => (
|
||||||
<Space direction="vertical" size={0}>
|
<Space direction="vertical" size={0}>
|
||||||
<Text type="secondary">大小:{formatFileSize(record.fileSize)}</Text>
|
<Text type="secondary">大小:{formatFileSize(record.fileSize)}</Text>
|
||||||
|
|
@ -491,14 +490,14 @@ export default function ClientManagement() {
|
||||||
</Card>
|
</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" } }}>
|
<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" style={{ padding: "0 24px", overflow: "auto" }}>
|
<div className="app-page__table-wrap" style={{padding: "0 24px", overflow: "hidden"}}>
|
||||||
<Table
|
<Table
|
||||||
rowKey="id"
|
rowKey="id"
|
||||||
columns={columns}
|
columns={columns}
|
||||||
dataSource={pagedRecords}
|
dataSource={pagedRecords}
|
||||||
loading={loading || groupLoading || platformLoading}
|
loading={loading || groupLoading || platformLoading}
|
||||||
locale={platformGroups.length === 0 ? { emptyText: <Empty description="未配置 client_platform 字典项" /> } : undefined}
|
locale={platformGroups.length === 0 ? { emptyText: <Empty description="未配置 client_platform 字典项" /> } : undefined}
|
||||||
scroll={{ x: "max-content" }}
|
scroll={{x: 1100}}
|
||||||
pagination={false}
|
pagination={false}
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
||||||
|
|
@ -175,10 +175,10 @@
|
||||||
font-variant-numeric: tabular-nums;
|
font-variant-numeric: tabular-nums;
|
||||||
}
|
}
|
||||||
|
|
||||||
//.app-page__table-wrap .ant-table-wrapper .ant-table-cell-fix-right-first,
|
.app-page__table-wrap .ant-table-wrapper .ant-table-cell-fix-right-first,
|
||||||
//.app-page__table-wrap .ant-table-wrapper .ant-table-cell-fix-right-last {
|
.app-page__table-wrap .ant-table-wrapper .ant-table-cell-fix-right-last {
|
||||||
// right: 0 !important;
|
right: 0 !important;
|
||||||
//}
|
}
|
||||||
|
|
||||||
@media (max-width: 768px) {
|
@media (max-width: 768px) {
|
||||||
.devices-page {
|
.devices-page {
|
||||||
|
|
|
||||||
|
|
@ -220,7 +220,6 @@ export default function Devices() {
|
||||||
{
|
{
|
||||||
title: t("devicesExt.weatherCityName"),
|
title: t("devicesExt.weatherCityName"),
|
||||||
dataIndex: "weatherCityName",
|
dataIndex: "weatherCityName",
|
||||||
width: 140,
|
|
||||||
render: (text: string) => <Text>{text || "-"}</Text>
|
render: (text: string) => <Text>{text || "-"}</Text>
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|
@ -347,13 +346,13 @@ export default function Devices() {
|
||||||
</Row>
|
</Row>
|
||||||
|
|
||||||
<Card className="app-page__content-card" styles={{ body: { padding: 0, flex: 1, display: "flex", flexDirection: "column", overflow: "hidden" } }} style={{ flex: 1, minHeight: 0, marginTop: 16 }}>
|
<Card className="app-page__content-card" styles={{ body: { padding: 0, flex: 1, display: "flex", flexDirection: "column", overflow: "hidden" } }} style={{ flex: 1, minHeight: 0, marginTop: 16 }}>
|
||||||
<div className="app-page__table-wrap" style={{ flex: 1, minHeight: 0, overflow: "auto", padding: "0 24px" }}>
|
<div className="app-page__table-wrap" style={{flex: 1, minHeight: 0, overflow: "hidden", padding: "0 24px"}}>
|
||||||
<ListTable<DeviceInfo>
|
<ListTable<DeviceInfo>
|
||||||
rowKey="deviceId"
|
rowKey="deviceId"
|
||||||
dataSource={pagedData}
|
dataSource={pagedData}
|
||||||
loading={loading}
|
loading={loading}
|
||||||
columns={columns}
|
columns={columns}
|
||||||
scroll={{ y: "calc(100vh - 520px)", x: 1200 }}
|
scroll={{y: "calc(100vh - 520px)", x: 1980}}
|
||||||
pagination={false}
|
pagination={false}
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue