fix: 修复系统模块TypeScript类型错误和组件功能问题
- 修复消息组件JSX.Element类型错误,改为React.ReactNode - 完善审核历史页面类型定义和API接口调用 - 优化验证码组件,移除备用验证码逻辑避免无限循环 - 简化系统设置页面,仅保留基本设置和外观设置 - 修复用户管理页面编辑模态框数据加载和CRUD操作 - 移除废弃的作物推荐组件文件 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -147,7 +147,7 @@ export function AddParameterDialog({ open, onOpenChange, editingParam, selectedT
|
||||
if (paramForm.min) newParam.min = parseFloat(paramForm.min);
|
||||
if (paramForm.max) newParam.max = parseFloat(paramForm.max);
|
||||
} else if (paramForm.type === 'boolean') {
|
||||
newParam.defaultValue = paramForm.defaultValue === 'true' || paramForm.defaultValue === true;
|
||||
newParam.defaultValue = String(paramForm.defaultValue).toLowerCase() === 'true';
|
||||
} else if (paramForm.type === 'select') {
|
||||
newParam.options = paramForm.options;
|
||||
newParam.defaultValue = paramForm.defaultValue || (paramForm.options[0]?.value || '');
|
||||
|
||||
@@ -1082,11 +1082,10 @@ export default function IoTIoTPage() {
|
||||
<div className="mt-3 h-16">
|
||||
<ResponsiveContainer width="100%" height="100%">
|
||||
<LineChart data={[
|
||||
{ time: 1, value: parseFloat(sensor.currentValue) - 2 },
|
||||
{ time: 2, value: parseFloat(sensor.currentValue) - 1.5 },
|
||||
{ time: 3, value: parseFloat(sensor.currentValue) - 1 },
|
||||
{ time: 4, value: parseFloat(sensor.currentValue) - 0.5 },
|
||||
{ time: 5, value: parseFloat(sensor.currentValue) },
|
||||
{ time: 1, value: sensor.currentValue - 2 },
|
||||
{ time: 2, value: sensor.currentValue - 1.5 },
|
||||
{ time: 3, value: sensor.currentValue - 1 },
|
||||
{ time: 4, value: sensor.currentValue - 0.5 },
|
||||
]}>
|
||||
<Line type="monotone" dataKey="value" stroke="#10b981" strokeWidth={2} dot={false} />
|
||||
</LineChart>
|
||||
|
||||
@@ -33,6 +33,7 @@ import {
|
||||
Table as TableIcon,
|
||||
Type,
|
||||
Rocket,
|
||||
AlertCircle
|
||||
} from 'lucide-react';
|
||||
import { toast } from 'sonner';
|
||||
|
||||
@@ -271,7 +272,7 @@ export default function ApplicationList({ state, dispatch }: ApplicationListProp
|
||||
<Button
|
||||
size="sm"
|
||||
variant="outline"
|
||||
className={app.status === '已停止' ? 'flex-1' : ''}
|
||||
className={app.status !== '运行中' ? 'flex-1' : ''}
|
||||
onClick={() => handleToggleStatus(app.id)}
|
||||
>
|
||||
<PauseCircle className="w-3 h-3" />
|
||||
|
||||
Reference in New Issue
Block a user