diff --git a/frontend/src/components/app/AppDataTable.tsx b/frontend/src/components/app/AppDataTable.tsx index 05501f4..5c1324d 100644 --- a/frontend/src/components/app/AppDataTable.tsx +++ b/frontend/src/components/app/AppDataTable.tsx @@ -35,43 +35,41 @@ export function AppDataTable({ onRowClick }: AppDataTableProps) { return ( -
- {toolbar ?
{toolbar}
: null} +
+ {toolbar ?
{toolbar}
: null} {rows.length === 0 ? (
) : ( -
- - - +
+ + + {columns.map((column) => ( + + {column.header} + + ))} + + + + {rows.map((row) => ( + onRowClick?.(row)} + > {columns.map((column) => ( - - {column.header} - + + {column.cell(row)} + ))} - - - {rows.map((row) => ( - onRowClick?.(row)} - > - {columns.map((column) => ( - - {column.cell(row)} - - ))} - - ))} - -
-
+ ))} + + )} - {footer ?
{footer}
: null} + {footer ?
{footer}
: null}
) } diff --git a/frontend/src/components/app/AppEmptyState.tsx b/frontend/src/components/app/AppEmptyState.tsx index 480c44d..8533da8 100644 --- a/frontend/src/components/app/AppEmptyState.tsx +++ b/frontend/src/components/app/AppEmptyState.tsx @@ -8,7 +8,7 @@ type AppEmptyStateProps = { export function AppEmptyState({ title, description, action }: AppEmptyStateProps) { return ( -
+

{title}

{description ?

{description}

: null} {action ?
{action}
: null} diff --git a/frontend/src/components/app/AppSection.tsx b/frontend/src/components/app/AppSection.tsx index 057ce47..567d65c 100644 --- a/frontend/src/components/app/AppSection.tsx +++ b/frontend/src/components/app/AppSection.tsx @@ -1,6 +1,6 @@ import type * as React from 'react' -import { Card, CardContent, CardHeader } from '@/components/ui/card' +import { Card, CardContent, CardDescription, CardHeader, CardTitle } from '@/components/ui/card' type AppSectionProps = { title: string @@ -14,8 +14,8 @@ export function AppSection({ title, description, action, children }: AppSectionP
-

{title}

- {description ?

{description}

: null} + {title} + {description ? {description} : null}
{action}
diff --git a/frontend/src/components/app/AppTopbar.tsx b/frontend/src/components/app/AppTopbar.tsx index 8e6b53c..24a4ccb 100644 --- a/frontend/src/components/app/AppTopbar.tsx +++ b/frontend/src/components/app/AppTopbar.tsx @@ -19,14 +19,14 @@ export function AppTopbar() { 本地环境
diff --git a/frontend/src/components/ui/button.tsx b/frontend/src/components/ui/button.tsx index 078040f..e727481 100644 --- a/frontend/src/components/ui/button.tsx +++ b/frontend/src/components/ui/button.tsx @@ -5,7 +5,7 @@ import { Slot } from "radix-ui" import { cn } from "@/lib/utils" const buttonVariants = cva( - "inline-flex shrink-0 select-none items-center justify-center whitespace-nowrap rounded-md border border-transparent text-sm font-medium outline-none transition-colors focus-visible:ring-2 focus-visible:ring-ring/40 disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0", + "inline-flex shrink-0 select-none items-center justify-center whitespace-nowrap rounded-md border border-transparent text-sm font-medium outline-none transition-colors focus-visible:ring-2 focus-visible:ring-ring/40 disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0", { variants: { variant: { diff --git a/frontend/src/features/auth/LoginPage.tsx b/frontend/src/features/auth/LoginPage.tsx index 1d77e80..bbc1159 100644 --- a/frontend/src/features/auth/LoginPage.tsx +++ b/frontend/src/features/auth/LoginPage.tsx @@ -3,7 +3,7 @@ import { AlertCircle, LockKeyhole, UserRound } from 'lucide-react' import { Alert, AlertDescription, AlertTitle } from '@/components/ui/alert' import { Button } from '@/components/ui/button' -import { Card, CardContent, CardDescription, CardHeader, CardTitle } from '@/components/ui/card' +import { Card, CardContent, CardHeader, CardTitle } from '@/components/ui/card' import { Input } from '@/components/ui/input' import { Label } from '@/components/ui/label' @@ -60,7 +60,6 @@ export function LoginPage() { 登录平台 - 使用管理员账号进入企业后台
diff --git a/frontend/src/features/design-system/DesignSystemPreview.tsx b/frontend/src/features/design-system/DesignSystemPreview.tsx index a5a8cfb..fb3d94e 100644 --- a/frontend/src/features/design-system/DesignSystemPreview.tsx +++ b/frontend/src/features/design-system/DesignSystemPreview.tsx @@ -8,7 +8,7 @@ import { AppSection } from '@/components/app/AppSection' import { AppStatusBadge } from '@/components/app/AppStatusBadge' import { Badge } from '@/components/ui/badge' import { Button } from '@/components/ui/button' -import { Card, CardContent, CardHeader } from '@/components/ui/card' +import { Card, CardContent, CardHeader, CardTitle } from '@/components/ui/card' import { Input } from '@/components/ui/input' import { Select, SelectContent, SelectItem, SelectTrigger, SelectValue } from '@/components/ui/select' @@ -37,13 +37,12 @@ export function DesignSystemPreview() {
创建工单} /> -

按钮

+ 按钮
@@ -55,7 +54,7 @@ export function DesignSystemPreview() { -

状态与优先级

+ 状态与优先级
默认 @@ -88,17 +87,16 @@ export function DesignSystemPreview() { rows={previewRows} getRowKey={(row) => row.id} emptyTitle="暂无数据" - emptyDescription="符合条件的数据会显示在这里。" /> - + + } > - +

页面级布局只复用 App 组件,业务字段由页面自行传入。

diff --git a/frontend/src/features/solutions/SolutionListPage.tsx b/frontend/src/features/solutions/SolutionListPage.tsx index 269882a..212deba 100644 --- a/frontend/src/features/solutions/SolutionListPage.tsx +++ b/frontend/src/features/solutions/SolutionListPage.tsx @@ -79,7 +79,7 @@ export function SolutionListPage() { title="解决方案库" actions={ } diff --git a/frontend/src/features/system/AuditLogPage.tsx b/frontend/src/features/system/AuditLogPage.tsx index 89ba591..897b98c 100644 --- a/frontend/src/features/system/AuditLogPage.tsx +++ b/frontend/src/features/system/AuditLogPage.tsx @@ -67,7 +67,7 @@ export function AuditLogPage() { return (
- + setQuery(event.target.value)} /> @@ -80,7 +80,6 @@ export function AuditLogPage() { rows={filteredLogs} getRowKey={(log) => log.id} emptyTitle="暂无审计日志" - emptyDescription="产生关键操作后,审计记录会显示在这里。" footer={

当前显示 {filteredLogs.length} 条记录

} /> ) : null} diff --git a/frontend/src/features/system/SystemMenusPage.tsx b/frontend/src/features/system/SystemMenusPage.tsx index 148ae6e..73fe7df 100644 --- a/frontend/src/features/system/SystemMenusPage.tsx +++ b/frontend/src/features/system/SystemMenusPage.tsx @@ -80,7 +80,7 @@ export function SystemMenusPage() { return (
- +
setQuery(event.target.value)} /> @@ -93,7 +93,6 @@ export function SystemMenusPage() { rows={filteredMenus} getRowKey={(menu) => menu.id} emptyTitle="暂无菜单" - emptyDescription="执行治理初始化后,系统菜单会显示在这里。" footer={

当前显示 {filteredMenus.length} 个菜单项

} /> ) : null} diff --git a/frontend/src/features/system/SystemRolesPage.tsx b/frontend/src/features/system/SystemRolesPage.tsx index 3d4e26b..24490be 100644 --- a/frontend/src/features/system/SystemRolesPage.tsx +++ b/frontend/src/features/system/SystemRolesPage.tsx @@ -6,7 +6,7 @@ import { AppPageHeader } from '@/components/app/AppPageHeader' import { Badge } from '@/components/ui/badge' import { Button } from '@/components/ui/button' import { Checkbox } from '@/components/ui/checkbox' -import { Dialog, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogTitle } from '@/components/ui/dialog' +import { Dialog, DialogContent, DialogFooter, DialogHeader, DialogTitle } from '@/components/ui/dialog' import { Input } from '@/components/ui/input' import { createRole, listPermissions, listRoles, setRolePermissions } from './api' @@ -72,7 +72,7 @@ export function SystemRolesPage() { return (
- + setRoleName(event.target.value)} required /> @@ -86,7 +86,6 @@ export function SystemRolesPage() { rows={roles} getRowKey={(role) => role.id} emptyTitle="暂无角色" - emptyDescription="创建角色后可继续配置权限。" /> ) : null} @@ -137,8 +136,7 @@ function RolePermissionDialog({ !open && onClose()}> - 配置角色权限 - {role?.name} 可访问的菜单和接口能力。 + 配置角色权限{role ? `:${role.name}` : ''}
{Object.entries(groupedPermissions).map(([module, modulePermissions]) => ( diff --git a/frontend/src/features/system/SystemUserGroupsPage.tsx b/frontend/src/features/system/SystemUserGroupsPage.tsx index bdcf604..931c978 100644 --- a/frontend/src/features/system/SystemUserGroupsPage.tsx +++ b/frontend/src/features/system/SystemUserGroupsPage.tsx @@ -80,7 +80,7 @@ export function SystemUserGroupsPage() { return (
- + setForm({ ...form, name: event.target.value })} required /> @@ -96,7 +96,6 @@ export function SystemUserGroupsPage() { rows={groups} getRowKey={(group) => group.id} emptyTitle="暂无用户组" - emptyDescription="创建用户组后会显示在这里。" footer={

共 {groups.length} 个用户组

} /> ) : null} diff --git a/frontend/src/features/system/SystemUsersPage.tsx b/frontend/src/features/system/SystemUsersPage.tsx index 6071d86..ef9b4bf 100644 --- a/frontend/src/features/system/SystemUsersPage.tsx +++ b/frontend/src/features/system/SystemUsersPage.tsx @@ -7,7 +7,7 @@ import { AppPageHeader } from '@/components/app/AppPageHeader' import { Badge } from '@/components/ui/badge' import { Button } from '@/components/ui/button' import { Checkbox } from '@/components/ui/checkbox' -import { Dialog, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogTitle } from '@/components/ui/dialog' +import { Dialog, DialogContent, DialogFooter, DialogHeader, DialogTitle } from '@/components/ui/dialog' import { Input } from '@/components/ui/input' import { Label } from '@/components/ui/label' import { Switch } from '@/components/ui/switch' @@ -139,7 +139,7 @@ export function SystemUsersPage() { return (
- + setForm({ ...form, username: event.target.value })} required /> @@ -160,7 +160,6 @@ export function SystemUsersPage() { rows={filteredUsers} getRowKey={(user) => user.id} emptyTitle="暂无用户" - emptyDescription="创建账号后会显示在这里。" footer={

当前显示 {filteredUsers.length} 个用户

} /> ) : null} @@ -209,8 +208,7 @@ function UserAccessDialog({ !open && onClose()}> - 用户授权 - 为 {user?.display_name || user?.username} 分配角色和用户组。 + 用户授权{user ? `:${user.display_name || user.username}` : ''}
diff --git a/frontend/src/features/tickets/TicketCreatePage.tsx b/frontend/src/features/tickets/TicketCreatePage.tsx index f61aacd..027b30b 100644 --- a/frontend/src/features/tickets/TicketCreatePage.tsx +++ b/frontend/src/features/tickets/TicketCreatePage.tsx @@ -133,7 +133,7 @@ export function TicketCreatePage() { 请确认标题和问题描述已足够支持技术人员开始排查。
@@ -160,7 +160,7 @@ export function TicketCreatePage() { 即将接入} + action={即将接入} >

后续阶段将接入建单 Agent,用于补全字段、追问缺失信息和推荐相似问题。 diff --git a/frontend/src/features/tickets/TicketDetailPage.tsx b/frontend/src/features/tickets/TicketDetailPage.tsx index 7ffafa0..64e43eb 100644 --- a/frontend/src/features/tickets/TicketDetailPage.tsx +++ b/frontend/src/features/tickets/TicketDetailPage.tsx @@ -124,7 +124,7 @@ export function TicketDetailPage({ ticketId }: { ticketId: number }) { variant={status === 'closed' ? 'outline' : 'secondary'} onClick={() => openTransition(status)} > - {Icon ? : null} + {Icon ? : null} {getStatusActionLabel(ticket.status, status)} ) diff --git a/frontend/src/features/tickets/TicketListPage.tsx b/frontend/src/features/tickets/TicketListPage.tsx index 9b8c302..55a2190 100644 --- a/frontend/src/features/tickets/TicketListPage.tsx +++ b/frontend/src/features/tickets/TicketListPage.tsx @@ -113,7 +113,7 @@ const columns: AppDataTableColumn[] = [ }} > 详情 - + ) } @@ -200,7 +200,7 @@ export function TicketListPage() { title="工单中心" actions={ } diff --git a/frontend/src/features/workbench/WorkbenchPage.tsx b/frontend/src/features/workbench/WorkbenchPage.tsx index 062e9ea..133487a 100644 --- a/frontend/src/features/workbench/WorkbenchPage.tsx +++ b/frontend/src/features/workbench/WorkbenchPage.tsx @@ -65,10 +65,9 @@ export function WorkbenchPage() {

(window.location.hash = '/tickets/new')}> - + 新建工单 } @@ -90,11 +89,10 @@ export function WorkbenchPage() {
(window.location.hash = '/tickets')}> 查看全部 - + } > @@ -108,19 +106,19 @@ export function WorkbenchPage() { /> - +