生产管理系统前端 - 瓦力0.73原型图提交

This commit is contained in:
2025-10-28 19:51:17 +08:00
parent 58f5ca7f22
commit e3829d2fcc
154 changed files with 24913 additions and 9377 deletions

View File

@@ -411,22 +411,22 @@ export function FertilizerFormula({ activePath }: FertilizerFormulaProps) {
const getStatusColor = (status: TankStatus) => {
switch (status) {
case '运行中': return 'bg-green-100 text-green-700';
case '待机': return 'bg-gray-100 text-gray-700';
case '加水中': return 'bg-blue-100 text-blue-700';
case '搅拌中': return 'bg-purple-100 text-purple-700';
case '故障': return 'bg-red-100 text-red-700';
default: return 'bg-gray-100 text-gray-700';
case '运行中': return 'bg-success-muted text-success-muted-foreground';
case '待机': return 'bg-muted text-muted-foreground';
case '加水中': return 'bg-info-muted text-info-muted-foreground';
case '搅拌中': return 'bg-muted text-muted-foreground';
case '故障': return 'bg-error-muted text-error-muted-foreground';
default: return 'bg-muted text-muted-foreground';
}
};
const getLevelStatus = (tank: FertilizerTank) => {
if (tank.currentLevel < tank.minLevel) {
return { status: '低液位', color: 'text-red-600', icon: ArrowDown };
return { status: '低液位', color: 'text-error', icon: ArrowDown };
} else if (tank.currentLevel > tank.maxLevel) {
return { status: '高液位', color: 'text-orange-600', icon: ArrowUp };
return { status: '高液位', color: 'text-warning', icon: ArrowUp };
} else {
return { status: '正常', color: 'text-green-600', icon: CheckCircle };
return { status: '正常', color: 'text-success', icon: CheckCircle };
}
};
@@ -533,7 +533,7 @@ export function FertilizerFormula({ activePath }: FertilizerFormulaProps) {
{devices.map((device) => (
<SelectItem key={device.id} value={device.id}>
{device.deviceName} ({device.deviceNo}) - {device.fieldName}
<Badge className="ml-2 bg-green-100 text-green-700" variant="outline">
<Badge className="ml-2 bg-success-muted text-success-muted-foreground" variant="outline">
{device.status}
</Badge>
</SelectItem>
@@ -552,10 +552,10 @@ export function FertilizerFormula({ activePath }: FertilizerFormulaProps) {
<div className="flex items-center justify-between">
<div>
<p className="text-xs text-muted-foreground"></p>
<p className="mt-2 text-3xl text-blue-600">{tanks.length}</p>
<p className="text-xs text-blue-600 mt-1"></p>
<p className="mt-2 text-3xl text-info">{tanks.length}</p>
<p className="text-xs text-info mt-1"></p>
</div>
<Beaker className="w-12 h-12 text-blue-600 opacity-50" />
<Beaker className="w-12 h-12 text-info opacity-50" />
</div>
</Card>
@@ -563,12 +563,12 @@ export function FertilizerFormula({ activePath }: FertilizerFormulaProps) {
<div className="flex items-center justify-between">
<div>
<p className="text-xs text-muted-foreground"></p>
<p className="mt-2 text-3xl text-green-600">
<p className="mt-2 text-3xl text-success">
{tanks.filter(t => t.waterControlStatus === '开启').length}
</p>
<p className="text-xs text-green-600 mt-1"></p>
<p className="text-xs text-success mt-1"></p>
</div>
<Droplets className="w-12 h-12 text-green-600 opacity-50" />
<Droplets className="w-12 h-12 text-success opacity-50" />
</div>
</Card>
@@ -576,12 +576,12 @@ export function FertilizerFormula({ activePath }: FertilizerFormulaProps) {
<div className="flex items-center justify-between">
<div>
<p className="text-xs text-muted-foreground"></p>
<p className="mt-2 text-3xl text-purple-600">
<p className="mt-2 text-3xl text-foreground">
{tanks.filter(t => t.stirringStatus === '运行').length}
</p>
<p className="text-xs text-purple-600 mt-1"></p>
<p className="text-xs text-foreground mt-1"></p>
</div>
<Activity className="w-12 h-12 text-purple-600 opacity-50" />
<Activity className="w-12 h-12 text-foreground opacity-50" />
</div>
</Card>
@@ -589,12 +589,12 @@ export function FertilizerFormula({ activePath }: FertilizerFormulaProps) {
<div className="flex items-center justify-between">
<div>
<p className="text-xs text-muted-foreground"></p>
<p className="mt-2 text-3xl text-orange-600">
<p className="mt-2 text-3xl text-warning">
{Math.round(tanks.reduce((sum, t) => sum + t.levelPercent, 0) / tanks.length)}%
</p>
<p className="text-xs text-orange-600 mt-1"></p>
<p className="text-xs text-warning mt-1"></p>
</div>
<Gauge className="w-12 h-12 text-orange-600 opacity-50" />
<Gauge className="w-12 h-12 text-warning opacity-50" />
</div>
</Card>
</div>

View File

@@ -770,28 +770,28 @@ export function MonitoringAlert({ activePath }: MonitoringAlertProps) {
const getLevelColor = (level: AlertLevel) => {
switch (level) {
case '提示': return 'bg-blue-100 text-blue-700';
case '警告': return 'bg-orange-100 text-orange-700';
case '严重': return 'bg-red-100 text-red-700';
default: return 'bg-gray-100 text-gray-700';
case '提示': return 'bg-info-muted text-info-muted-foreground';
case '警告': return 'bg-warning-muted text-warning-muted-foreground';
case '严重': return 'bg-error-muted text-error-muted-foreground';
default: return 'bg-muted text-muted-foreground';
}
};
const getStatusColor = (status: ThresholdConfig['status']) => {
switch (status) {
case '正常': return 'bg-green-100 text-green-700';
case '警告': return 'bg-orange-100 text-orange-700';
case '严重': return 'bg-red-100 text-red-700';
default: return 'bg-gray-100 text-gray-700';
case '正常': return 'bg-success-muted text-success-muted-foreground';
case '警告': return 'bg-warning-muted text-warning-muted-foreground';
case '严重': return 'bg-error-muted text-error-muted-foreground';
default: return 'bg-muted text-muted-foreground';
}
};
const getAlertStatusColor = (status: AlertRecord['status']) => {
switch (status) {
case '待处理': return 'bg-red-100 text-red-700';
case '处理中': return 'bg-orange-100 text-orange-700';
case '已处理': return 'bg-green-100 text-green-700';
default: return 'bg-gray-100 text-gray-700';
case '待处理': return 'bg-error-muted text-error-muted-foreground';
case '处理中': return 'bg-warning-muted text-warning-muted-foreground';
case '已处理': return 'bg-success-muted text-success-muted-foreground';
default: return 'bg-muted text-muted-foreground';
}
};

View File

@@ -504,28 +504,28 @@ export function SmartIrrigation({ activePath }: SmartIrrigationProps) {
const getStatusColor = (status: IrrigationStatus) => {
switch (status) {
case '运行中': return 'bg-green-100 text-green-700';
case '已停止': return 'bg-gray-100 text-gray-700';
case '等待中': return 'bg-yellow-100 text-yellow-700';
case '故障': return 'bg-red-100 text-red-700';
default: return 'bg-gray-100 text-gray-700';
case '运行中': return 'bg-success-muted text-success-muted-foreground';
case '已停止': return 'bg-muted text-muted-foreground';
case '等待中': return 'bg-warning-muted text-warning-muted-foreground';
case '故障': return 'bg-error-muted text-error-muted-foreground';
default: return 'bg-muted text-muted-foreground';
}
};
const getValveStatusColor = (status: ValveStatus) => {
switch (status) {
case '开启': return 'bg-green-100 text-green-700';
case '关闭': return 'bg-gray-100 text-gray-700';
case '故障': return 'bg-red-100 text-red-700';
default: return 'bg-gray-100 text-gray-700';
case '开启': return 'bg-success-muted text-success-muted-foreground';
case '关闭': return 'bg-muted text-muted-foreground';
case '故障': return 'bg-error-muted text-error-muted-foreground';
default: return 'bg-muted text-muted-foreground';
}
};
const getHistoryStatusColor = (status: '成功' | '异常' | '中断') => {
switch (status) {
case '成功': return 'bg-green-100 text-green-700';
case '异常': return 'bg-orange-100 text-orange-700';
case '中断': return 'bg-red-100 text-red-700';
case '成功': return 'bg-success-muted text-success-muted-foreground';
case '异常': return 'bg-warning-muted text-warning-muted-foreground';
case '中断': return 'bg-error-muted text-error-muted-foreground';
default: return 'bg-gray-100 text-gray-700';
}
};

File diff suppressed because it is too large Load Diff

View File

@@ -290,10 +290,10 @@ export function WaterFertilizerControl({ activePath }: WaterFertilizerControlPro
const getValveStatusColor = (status: ValveStatus) => {
switch (status) {
case '开启': return 'bg-green-100 text-green-700';
case '关闭': return 'bg-gray-100 text-gray-700';
case '故障': return 'bg-red-100 text-red-700';
default: return 'bg-gray-100 text-gray-700';
case '开启': return 'bg-success-muted text-success-muted-foreground';
case '关闭': return 'bg-muted text-muted-foreground';
case '故障': return 'bg-error-muted text-error-muted-foreground';
default: return 'bg-muted text-muted-foreground';
}
};
@@ -376,7 +376,7 @@ export function WaterFertilizerControl({ activePath }: WaterFertilizerControlPro
{machines.map((machine) => (
<SelectItem key={machine.id} value={machine.id}>
{machine.name}
<Badge className="ml-2 bg-green-100 text-green-700" variant="outline">
<Badge className="ml-2 bg-success-muted text-success-muted-foreground" variant="outline">
{machine.status}
</Badge>
</SelectItem>

File diff suppressed because it is too large Load Diff