feat: 优化3D可视化性能并更新文档

- 实现3D可视化性能优化(降低DPR、阴影贴图、简化光源)
- 实现LOD多级细节系统,根据相机距离自动切换
- 添加设备弹出动画开关,默认关闭
- 修复设备缩放时位置偏移问题
- 更新README添加项目截图占位符
- 精简DEPLOYMENT.md文档,添加Gitee仓库支持
- 更新CHANGELOG.md记录v1.1.0版本
This commit is contained in:
zhang1106
2026-01-26 17:21:20 +08:00
parent 6e57e0b74c
commit a0ad9ad604
44 changed files with 4212 additions and 5448 deletions
+20 -8
View File
@@ -83,15 +83,27 @@ router.post('/config', async (req, res) => {
// 批量更新字段配置
const updatedFields = [];
for (const config of fieldConfigs) {
// 使用fieldName作为更新条件,因为这是唯一的
const [updated] = await DeviceField.update(
{ visible: config.visible },
{ where: { fieldName: config.fieldName } }
);
// 检查字段是否存在
const existingField = await DeviceField.findOne({ where: { fieldName: config.fieldName } });
if (updated) {
const updatedField = await DeviceField.findOne({ where: { fieldName: config.fieldName } });
updatedFields.push(updatedField);
if (existingField) {
// 更新现有字段
await existingField.update({
visible: config.visible,
displayName: config.displayName // 同时更新显示名称,以防变化
});
updatedFields.push(existingField);
} else {
// 创建新字段
const newField = await DeviceField.create({
fieldName: config.fieldName,
visible: config.visible,
displayName: config.displayName,
fieldType: config.fieldType || 'text',
required: false, // 默认为非必填
order: 0 // 默认顺序
});
updatedFields.push(newField);
}
}