From fe55848f7567d77d53def1be0fa5997247656fc4 Mon Sep 17 00:00:00 2001 From: shunli Date: Fri, 6 Mar 2026 09:54:14 +0800 Subject: [PATCH] =?UTF-8?q?refactor(ui):=20=E6=B7=B1=E5=BA=A6=E7=BF=BB?= =?UTF-8?q?=E6=96=B0=E4=BB=AA=E8=A1=A8=E7=9B=98=E4=B8=8E=E8=BE=B9=E7=BC=98?= =?UTF-8?q?=E9=85=8D=E7=BD=AE=E9=A1=B5=E7=9A=84=E9=AA=A8=E6=9E=B6=E4=B8=8E?= =?UTF-8?q?=E7=BB=84=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- client/src/pages/ApprovalRulesPage.tsx | 9 +++---- client/src/pages/BudgetsPage.tsx | 30 +++++++++++----------- client/src/pages/DashboardPage.tsx | 34 ++++++++++++------------- client/src/pages/DelegationsPage.tsx | 23 ++++++++--------- client/src/pages/DepartmentsPage.tsx | 9 +++---- client/src/pages/FeatureFlagsPage.tsx | 5 ++-- client/src/pages/NotificationsPage.tsx | 5 ++-- client/src/pages/ReimbursementsPage.tsx | 4 +-- client/src/pages/WorkflowTasksPage.tsx | 5 ++-- 9 files changed, 58 insertions(+), 66 deletions(-) diff --git a/client/src/pages/ApprovalRulesPage.tsx b/client/src/pages/ApprovalRulesPage.tsx index 0d0efddd..662608e3 100644 --- a/client/src/pages/ApprovalRulesPage.tsx +++ b/client/src/pages/ApprovalRulesPage.tsx @@ -11,7 +11,6 @@ import { } from "../api/approvalRules"; import { PageHeader } from "../components/common/PageHeader"; import { Button } from "../components/ui/button"; -import { Card } from "../components/ui/card"; import { Dialog, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogTitle } from "../components/ui/dialog"; import { Input } from "../components/ui/input"; import { Label } from "../components/ui/label"; @@ -156,7 +155,7 @@ export function ApprovalRulesPage() {

) : null} - +

新建审批规则

@@ -279,9 +278,9 @@ export function ApprovalRulesPage() {
-
+ - +

规则列表

{listQuery.isLoading ? : null} @@ -368,7 +367,7 @@ export function ApprovalRulesPage() {
) : null} -
+ ) : null} - +

筛选条件

setCode(event.target.value)} /> setName(event.target.value)} /> setPeriodStart(event.target.value)} /> setPeriodEnd(event.target.value)} /> setAllocatedAmount(event.target.value)} /> {createMutation.isPending ? "创建中..." : "创建预算池"} - +
) : null} - +

预算池列表

{budgetsQuery.isLoading ? : null} @@ -319,7 +319,7 @@ export function BudgetsPage() { ) : null} - +
setDateFrom(event.target.value)} @@ -183,7 +183,7 @@ export function DashboardPage() { setDateTo(event.target.value)} @@ -195,7 +195,7 @@ export function DashboardPage() { setDelegateEmployeeId(event.target.value)} value={delegateEmployeeId} @@ -107,7 +106,7 @@ export function DelegationsPage() {
) : null} -
+ ); } diff --git a/client/src/pages/DepartmentsPage.tsx b/client/src/pages/DepartmentsPage.tsx index b7174c59..c11e079f 100644 --- a/client/src/pages/DepartmentsPage.tsx +++ b/client/src/pages/DepartmentsPage.tsx @@ -11,7 +11,6 @@ import { } from "../api/departments"; import { PageHeader } from "../components/common/PageHeader"; import { Button } from "../components/ui/button"; -import { Card } from "../components/ui/card"; import { Input } from "../components/ui/input"; import { Label } from "../components/ui/label"; import { Table, TableBody, TableCell, TableHead, TableHeader, TableRow } from "../components/ui/table"; @@ -102,7 +101,7 @@ export function DepartmentsPage() {

) : null} - +

新建部门

-
+ - +

部门列表

{listQuery.isLoading ? : null} @@ -236,7 +235,7 @@ export function DepartmentsPage() {
) : null} -
+ {error}

) : null} - +

开关列表

{flagsQuery.isLoading ? : null} @@ -346,7 +345,7 @@ export function FeatureFlagsPage() {
) : null} -
+ ); } diff --git a/client/src/pages/NotificationsPage.tsx b/client/src/pages/NotificationsPage.tsx index 1896dde4..a176ae0a 100644 --- a/client/src/pages/NotificationsPage.tsx +++ b/client/src/pages/NotificationsPage.tsx @@ -7,7 +7,6 @@ import { PageHeader } from "../components/common/PageHeader"; import { TableSkeleton } from "../components/common/TableSkeleton"; import { Pagination } from "../components/common/Pagination"; import { Button } from "../components/ui/button"; -import { Card } from "../components/ui/card"; import { Table, TableBody, @@ -80,7 +79,7 @@ export function NotificationsPage() { } /> - +
setSearchParams({ unreadOnly: unreadOnly ? "1" : "0", page: String(p) })} testIdPrefix="notifications" /> - +
); } diff --git a/client/src/pages/ReimbursementsPage.tsx b/client/src/pages/ReimbursementsPage.tsx index b79e275a..b97893ca 100644 --- a/client/src/pages/ReimbursementsPage.tsx +++ b/client/src/pages/ReimbursementsPage.tsx @@ -15,9 +15,7 @@ import { TableSkeleton } from "../components/common/TableSkeleton"; import { StatusBadge } from "../components/common/StatusBadge"; import { Pagination } from "../components/common/Pagination"; import { Button } from "../components/ui/button"; -import { Card } from "../components/ui/card"; import { DropdownMenu, DropdownMenuContent, DropdownMenuItem, DropdownMenuTrigger } from "../components/ui/dropdown-menu"; -import { Table, TableBody, TableCell, TableHead, TableHeader, TableRow } from "../components/ui/table"; import { Tabs, TabsList, TabsTrigger } from "../components/ui/tabs"; const PAGE_SIZE = 20; @@ -290,7 +288,7 @@ export function ReimbursementsPage() { {item.totalAmount != null - ? new Intl.NumberFormat("zh-CN", { style: "currency", currency: "CNY" }).format(item.totalAmount) + ? new Intl.NumberFormat("zh-CN", { style: "currency", currency: "CNY" }).format(Number(item.totalAmount)) : "-"} diff --git a/client/src/pages/WorkflowTasksPage.tsx b/client/src/pages/WorkflowTasksPage.tsx index 26951168..e3f5a6b9 100644 --- a/client/src/pages/WorkflowTasksPage.tsx +++ b/client/src/pages/WorkflowTasksPage.tsx @@ -8,7 +8,6 @@ import { Pagination } from "../components/common/Pagination"; import { StatusBadge } from "../components/common/StatusBadge"; import { TableSkeleton } from "../components/common/TableSkeleton"; import { Button } from "../components/ui/button"; -import { Card } from "../components/ui/card"; import { Table, TableBody, TableCell, TableHead, TableHeader, TableRow } from "../components/ui/table"; import { Tabs, TabsList, TabsTrigger } from "../components/ui/tabs"; @@ -38,7 +37,7 @@ export function WorkflowTasksPage() {
- +
setSearchParams({ status, page: String(p) })} testIdPrefix="workflow-tasks" /> - +
); }