refactor(ui): [UI8] 彻底移除遗留Card并补充下拉框中文化
这个提交包含在:
@@ -16,7 +16,6 @@ import { useAuth } from "../auth/AuthContext";
|
||||
import { hasPermission } from "../auth/permissions";
|
||||
import { PageHeader } from "../components/common/PageHeader";
|
||||
import { Button } from "../components/ui/button";
|
||||
import { Card } from "../components/ui/card";
|
||||
import { downloadBlob } from "../lib/download";
|
||||
|
||||
function currentDateString() {
|
||||
@@ -116,10 +115,10 @@ export function DashboardPage() {
|
||||
return (
|
||||
<div className="space-y-4">
|
||||
<PageHeader title="仪表盘" subtitle="你当前没有看板权限,请联系管理员开通。" />
|
||||
<Card className="space-y-2 p-6 text-sm">
|
||||
<div className="card-std space-y-2 p-6 text-sm">
|
||||
<p className="text-zinc-700">当前用户:{me?.name ?? "-"}</p>
|
||||
<p className="text-zinc-500">所需权限:report.dashboard.view</p>
|
||||
</Card>
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
@@ -163,7 +162,7 @@ export function DashboardPage() {
|
||||
</p>
|
||||
) : null}
|
||||
|
||||
<Card className="space-y-4 p-6">
|
||||
<div className="card-std space-y-4 p-6">
|
||||
<div className="grid gap-3 md:grid-cols-4">
|
||||
<div className="space-y-1">
|
||||
<label className="text-xs text-zinc-600" htmlFor="dashboard-date-from">
|
||||
@@ -226,28 +225,28 @@ export function DashboardPage() {
|
||||
</Button>
|
||||
</div>
|
||||
</div>
|
||||
</Card>
|
||||
</div>
|
||||
|
||||
<div className="grid gap-4 md:grid-cols-4">
|
||||
<div className="card-std space-y-1">
|
||||
<div className="card-std p-4 space-y-1">
|
||||
<p className="text-xs text-zinc-500">报销单总数</p>
|
||||
<p className="mt-1 text-2xl font-semibold text-zinc-900">
|
||||
{loading ? "..." : overviewQuery.data?.totalCount ?? 0}
|
||||
</p>
|
||||
</div>
|
||||
<div className="card-std space-y-1">
|
||||
<div className="card-std p-4 space-y-1">
|
||||
<p className="text-xs text-zinc-500">报销总金额</p>
|
||||
<p className="mt-1 text-2xl font-semibold text-zinc-900">
|
||||
{loading ? "..." : toCurrency(overviewQuery.data?.totalAmount)}
|
||||
</p>
|
||||
</div>
|
||||
<div className="card-std space-y-1">
|
||||
<div className="card-std p-4 space-y-1">
|
||||
<p className="text-xs text-zinc-500">已付款金额</p>
|
||||
<p className="mt-1 text-2xl font-semibold text-zinc-900">
|
||||
{loading ? "..." : toCurrency(overviewQuery.data?.paidAmount)}
|
||||
</p>
|
||||
</div>
|
||||
<div className="card-std space-y-1">
|
||||
<div className="card-std p-4 space-y-1">
|
||||
<p className="text-xs text-zinc-500">审批中数量</p>
|
||||
<p className="mt-1 text-2xl font-semibold text-zinc-900">
|
||||
{loading ? "..." : overviewQuery.data?.reviewingCount ?? 0}
|
||||
@@ -256,7 +255,7 @@ export function DashboardPage() {
|
||||
</div>
|
||||
|
||||
<div className="grid gap-4 lg:grid-cols-2">
|
||||
<div className="card-std space-y-4">
|
||||
<div className="card-std p-6 space-y-4">
|
||||
<h3 className="text-base font-semibold text-zinc-900">费用趋势</h3>
|
||||
{trendPoints.length ? (
|
||||
<div className="space-y-2">
|
||||
@@ -283,7 +282,7 @@ export function DashboardPage() {
|
||||
)}
|
||||
</div>
|
||||
|
||||
<div className="card-std space-y-4">
|
||||
<div className="card-std p-6 space-y-4">
|
||||
<h3 className="text-base font-semibold text-zinc-900">费用分类 TopN</h3>
|
||||
{topCategories.length ? (
|
||||
<div className="space-y-2">
|
||||
@@ -313,7 +312,7 @@ export function DashboardPage() {
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div className="card-std space-y-2 text-sm">
|
||||
<div className="card-std p-6 space-y-2 text-sm">
|
||||
<h3 className="text-base font-semibold text-zinc-900">审批效率</h3>
|
||||
<p className="text-zinc-700">
|
||||
已统计通过单据:
|
||||
|
||||
在新工单中引用
屏蔽一个用户