生产管理系统前端 开发中心配置系统 所有页面

This commit is contained in:
2025-10-21 18:04:39 +08:00
parent 4a5d278d89
commit 9afc680833
185 changed files with 13677 additions and 4487 deletions

View File

@@ -0,0 +1,49 @@
'use client';
import React from 'react';
import { Card } from '@/components/ui/card';
import { AuditStats, Enterprise } from '../types';
interface AuditStatsCardsProps {
enterprises: Enterprise[];
}
export function AuditStatsCards({ enterprises }: AuditStatsCardsProps) {
const stats: AuditStats[] = [
{
label: '待审核',
value: enterprises.filter(e => e.auditStatus === 'pending').length,
color: 'text-yellow-600',
bg: 'bg-yellow-100',
},
{
label: '已通过',
value: enterprises.filter(e => e.auditStatus === 'approved').length,
color: 'text-green-600',
bg: 'bg-green-100',
},
{
label: '已驳回',
value: enterprises.filter(e => e.auditStatus === 'rejected').length,
color: 'text-red-600',
bg: 'bg-red-100',
},
{
label: '总企业数',
value: enterprises.length,
color: 'text-blue-600',
bg: 'bg-blue-100',
},
];
return (
<div className="grid grid-cols-2 md:grid-cols-4 gap-4">
{stats.map((stat, index) => (
<Card key={index} className="p-4">
<div className="text-sm text-muted-foreground">{stat.label}</div>
<div className={`mt-2 ${stat.color} text-2xl font-semibold`}>{stat.value}</div>
</Card>
))}
</div>
);
}