refactor: 更新管理端页面元数据,统一国际化支持,移除冗余代码

This commit is contained in:
2026-05-21 17:27:52 +08:00
parent 26feed3c4f
commit e8a5507411
77 changed files with 1669 additions and 732 deletions

View File

@@ -2,6 +2,7 @@
import Link from "next/link";
import { useCallback, useEffect, useMemo, useState } from "react";
import { useExportLabels } from "@/hooks/use-export-labels";
import { useTranslation } from "react-i18next";
import { getAdminDraws } from "@/api/admin-draws";
@@ -47,6 +48,7 @@ const DRAW_STATUS_OPTIONS: { value: string; label: string }[] = [
export function RiskIndexConsole() {
const { t } = useTranslation(["risk", "common"]);
const exportLabels = useExportLabels("riskIndex");
const formatDt = useAdminDateTimeFormatter();
const [data, setData] = useState<AdminDrawListData | null>(null);
const [loading, setLoading] = useState(true);
@@ -158,8 +160,8 @@ export function RiskIndexConsole() {
<div className="admin-list-actions">
<AdminTableExportButton
tableId="risk-index-table"
filename="风控中心期号列表"
sheetName="风控中心"
filename={exportLabels.filename}
sheetName={exportLabels.sheetName}
/>
<Button type="button" size="sm" onClick={() => applySearch()}>
{t("search")}