fix: 对齐运维页面原型并收口权限边界

- 删除模型大类概览和细分银行概览中原型未包含的过渡跳转按钮,保留卡片点击、筛选、指标趋势和详情入口。

- 移除运维系统配置页中的模型平台新增页面依赖、登录角色来源等内部说明,仅保留实际配置内容。

- 将开发工作台访问控制统一收敛到 dashboard:view,业务团队仅保留运维工作台权限;直接访问开发工作台时自动回到运维工作台。

- 补充架构实现基线、外部写入协议、运维 API 清单、三角色权限验收说明和首条纵向链路联调手册。

- 按当前实现更新架构变更记录和本周目标完成情况。
This commit is contained in:
郑龙捷
2026-09-02 17:39:36 +08:00
parent 74dd97428f
commit 7d5e3e9a50
12 changed files with 496 additions and 39 deletions
@@ -1,5 +1,5 @@
import { useState } from "react";
import { Database, Download, History, RefreshCw, Save, Settings2, Users } from "lucide-react";
import { Database, Download, History, RefreshCw, Save } from "lucide-react";
import { toast } from "sonner";
import { Button } from "~/components/ui/button";
@@ -56,17 +56,10 @@ export default function SystemConfigPage() {
</Card>
</div>
<div className="grid grid-cols-2 gap-6">
<Card>
<CardHeader className="border-b border-border"><CardTitle></CardTitle><CardDescription></CardDescription><CardAction><Button variant="outline" size="xs" onClick={() => void exportRowsToExcel({ fileName: "通知与催办配置", sheetName: "通知配置", headers: ["配置项", "配置值"], rows: notificationRows })}><Download /> Excel</Button></CardAction></CardHeader>
<CardContent className="px-0"><Table><TableBody>{notificationRows.map(([item, value]) => <TableRow key={item}><TableCell className="w-52 font-medium text-foreground">{item}</TableCell><TableCell>{value}</TableCell></TableRow>)}</TableBody></Table></CardContent>
</Card>
<Card>
<CardHeader><CardTitle className="flex items-center gap-2"><Users className="size-5 text-primary" /></CardTitle><CardDescription></CardDescription></CardHeader>
<CardContent className="space-y-4"><div className="rounded-xl bg-brand-soft p-4 text-sm leading-6 text-primary"> <code className="rounded bg-white/70 px-1.5 py-0.5 font-mono text-xs">role_code</code> <code className="rounded bg-white/70 px-1.5 py-0.5 font-mono text-xs">permissions</code></div><div className="grid grid-cols-3 gap-3">{[["业务团队", "business / business_team"], ["模型团队", "developer / model_team"], ["管理员", "admin"]].map(([label, code]) => <div className="rounded-xl border border-border p-4" key={label}><b className="block text-sm text-foreground">{label}</b><small className="mt-1 block font-mono text-xs text-muted-foreground">{code}</small></div>)}</div><p className="text-xs leading-5 text-muted-foreground"></p></CardContent>
</Card>
</div>
<Card>
<CardHeader className="border-b border-border"><CardTitle></CardTitle><CardDescription></CardDescription><CardAction><Button variant="outline" size="xs" onClick={() => void exportRowsToExcel({ fileName: "通知与催办配置", sheetName: "通知配置", headers: ["配置项", "配置值"], rows: notificationRows })}><Download /> Excel</Button></CardAction></CardHeader>
<CardContent className="px-0"><Table><TableBody>{notificationRows.map(([item, value]) => <TableRow key={item}><TableCell className="w-52 font-medium text-foreground">{item}</TableCell><TableCell>{value}</TableCell></TableRow>)}</TableBody></Table></CardContent>
</Card>
<Card>
<CardHeader className="border-b border-border"><CardTitle></CardTitle><CardDescription> 15 </CardDescription><CardAction className="flex items-end gap-2"><FilterSelect className="w-44" label="选择银行" value={selectedBank} allLabel="暂无银行数据" options={Object.keys(bankConfigs)} onChange={setSelectedBank} /><Button variant="outline" size="xs" onClick={() => void exportRowsToExcel({ fileName: "报告周期配置", sheetName: "报告周期", headers: ["银行", "报告时间维度", "输出日期", "下次生成"], rows: Object.entries(bankConfigs).map(([bank, config]) => [bank, config.frequency, `每月 ${config.day}`, nextGeneration(config.frequency, config.day)]) })}><Download /> Excel</Button></CardAction></CardHeader>
@@ -74,10 +67,6 @@ export default function SystemConfigPage() {
<CardContent className="px-0 pt-0"><Table><TableHeader><TableRow><TableHead></TableHead><TableHead></TableHead><TableHead></TableHead><TableHead></TableHead></TableRow></TableHeader><TableBody>{Object.entries(bankConfigs).length ? Object.entries(bankConfigs).map(([bank, config]) => <TableRow data-state={bank === selectedBank ? "selected" : undefined} key={bank}><TableCell className="font-medium text-foreground">{bank}</TableCell><TableCell>{config.frequency}</TableCell><TableCell> {config.day} </TableCell><TableCell>{nextGeneration(config.frequency, config.day)}</TableCell></TableRow>) : <TableRow><TableCell colSpan={4} className="h-28 text-center text-muted-foreground"></TableCell></TableRow>}</TableBody></Table></CardContent>
</Card>
<Card>
<CardHeader><CardTitle className="flex items-center gap-2"><Settings2 className="size-5 text-primary" /></CardTitle><CardDescription></CardDescription><CardAction><span className="rounded-full bg-muted px-2.5 py-1 text-xs text-muted-foreground"></span></CardAction></CardHeader>
<CardContent className="space-y-4"><div className="rounded-xl bg-warning-soft p-4 text-sm leading-6 text-foreground">线</div><div className="rounded-xl bg-bg-log p-5 font-mono text-xs leading-6 text-white/80"> × ID<br /> / / / / 线 / / / / / / 线</div></CardContent>
</Card>
</div>
</section>
);