添加新的骨架屏,将评查点列表和评查文件列表,文档列表进行数据分类
This commit is contained in:
@@ -8,6 +8,7 @@ import { Pagination } from "~/components/ui/Pagination";
|
||||
import { FileTypeTag } from "~/components/ui/FileTypeTag";
|
||||
import { FileTag } from "~/components/ui/FileTag";
|
||||
import { FilterPanel, FilterSelect, SearchFilter, DateRangeFilter } from "~/components/ui/FilterPanel";
|
||||
import { TableRowSkeleton, LoadingIndicator, NumberSkeleton } from '~/components/ui/SkeletonScreen';
|
||||
import documentsIndexStyles from "~/styles/pages/documents_index.css?url";
|
||||
import { getDocuments, deleteDocument, type DocumentUI } from "~/api/files/documents";
|
||||
import { getDocumentTypes } from "~/api/document-types/document-types";
|
||||
@@ -833,7 +834,18 @@ export default function DocumentsIndex() {
|
||||
<div className={isLoadingData ? "opacity-70 pointer-events-none transition-opacity" : "transition-opacity"}>
|
||||
{/* 页面头部 */}
|
||||
<div className="flex justify-between items-center mb-4">
|
||||
<h2 className="text-xl font-medium">文档列表</h2>
|
||||
<div className="flex items-center">
|
||||
<h2 className="text-xl font-medium">文档列表</h2>
|
||||
{isLoadingData ? (
|
||||
<div className="ml-4">
|
||||
<NumberSkeleton />
|
||||
</div>
|
||||
) : (
|
||||
<div className="ml-4 text-sm text-secondary">
|
||||
共 <span className="font-medium text-primary">{total}</span> 条记录
|
||||
</div>
|
||||
)}
|
||||
</div>
|
||||
<div>
|
||||
<Button
|
||||
type="primary"
|
||||
@@ -917,6 +929,8 @@ export default function DocumentsIndex() {
|
||||
|
||||
{/* 数据表格 */}
|
||||
<Card>
|
||||
{isLoadingData && <LoadingIndicator />}
|
||||
|
||||
<div className="mb-3 flex items-center justify-between">
|
||||
<div>
|
||||
<Button
|
||||
@@ -942,12 +956,16 @@ export default function DocumentsIndex() {
|
||||
</div>
|
||||
|
||||
<div className="overflow-x-auto">
|
||||
<Table
|
||||
columns={columns}
|
||||
dataSource={documents}
|
||||
rowKey="id"
|
||||
emptyText="暂无数据"
|
||||
/>
|
||||
{isLoadingData && documents.length === 0 ? (
|
||||
<TableRowSkeleton count={5} />
|
||||
) : (
|
||||
<Table
|
||||
columns={columns}
|
||||
dataSource={documents}
|
||||
rowKey="id"
|
||||
emptyText={isLoadingData ? "加载中..." : "暂无数据"}
|
||||
/>
|
||||
)}
|
||||
</div>
|
||||
|
||||
{/* 分页 */}
|
||||
|
||||
Reference in New Issue
Block a user