From 3e36a8b0b1035dbd5b9bd16574ec5591a168dc5a Mon Sep 17 00:00:00 2001 From: mike Date: Wed, 29 Jul 2026 10:54:35 +0800 Subject: [PATCH] Update App.jsx via upload script - 2026-07-29 10:54:11 --- App.jsx | 166 +++++++++++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 164 insertions(+), 2 deletions(-) diff --git a/App.jsx b/App.jsx index b9bde15..a353777 100644 --- a/App.jsx +++ b/App.jsx @@ -60,6 +60,7 @@ const LEGACY_PRODUCT_TAXONOMY = [ subs: [ { id: 'lead_acid', label: '铅酸电池 / Lead-acid Battery', short: '铅酸电池' }, { id: 'lifepo4', label: '磷酸铁锂电池 / LiFePO4 Battery', short: '磷酸铁锂电池' }, + { id: 'ups_lithium_system', label: 'UPS配套锂电池系统 / UPS-matched Lithium Battery System', short: 'UPS配套锂电池系统' }, ], }, ]; @@ -328,6 +329,28 @@ const TRANSLATION_DICTIONARY = { '输出功率因数': { en: 'Output Power Factor', fr: 'Facteur de puissance de sortie', ru: 'Выходной коэффициент мощности', es: 'Factor de potencia de salida', ar: 'معامل قدرة الخرج' }, '可并联台数': { en: 'Parallel Units', fr: 'Unités en parallèle', ru: 'Количество параллельных блоков', es: 'Unidades en paralelo', ar: 'عدد الوحدات المتوازية' }, '过载保护': { en: 'Overload Protection', fr: 'Protection contre les surcharges', ru: 'Защита от перегрузки', es: 'Protección contra sobrecarga', ar: 'حماية من الحمل الزائد' }, + 'UPS配套锂电池系统': { en: 'UPS-matched Lithium Battery System', fr: 'Système de batterie lithium pour UPS', ru: 'Литиевая батарейная система для ИБП', es: 'Sistema de batería de litio para SAI', ar: 'نظام بطارية ليثيوم متوافق مع UPS' }, + '模块类型': { en: 'Module Type', fr: 'Type de module', ru: 'Тип модуля', es: 'Tipo de módulo', ar: 'نوع الوحدة' }, + '额定容量': { en: 'Rated Capacity', fr: 'Capacité nominale', ru: 'Номинальная ёмкость', es: 'Capacidad nominal', ar: 'السعة الاسمية' }, + '电芯类型': { en: 'Cell Type', fr: 'Type de cellule', ru: 'Тип элемента', es: 'Tipo de celda', ar: 'نوع الخلية' }, + '额定电压': { en: 'Rated Voltage', fr: 'Tension nominale', ru: 'Номинальное напряжение', es: 'Voltaje nominal', ar: 'الجهد الاسمي' }, + '放电倍率': { en: 'Discharge Rate', fr: 'Taux de décharge', ru: 'Скорость разряда', es: 'Tasa de descarga', ar: 'معدل التفريغ' }, + '充电倍率': { en: 'Charge Rate', fr: 'Taux de charge', ru: 'Скорость заряда', es: 'Tasa de carga', ar: 'معدل الشحن' }, + '模块最大能量(kWh)': { en: 'Module Max Energy (kWh)', fr: 'Énergie max du module (kWh)', ru: 'Макс. энергия модуля (кВт·ч)', es: 'Energía máxima del módulo (kWh)', ar: 'أقصى طاقة للوحدة (كيلوواط ساعة)' }, + '模块输出功率(kW)': { en: 'Module Output Power (kW)', fr: 'Puissance de sortie du module (kW)', ru: 'Выходная мощность модуля (кВт)', es: 'Potencia de salida del módulo (kW)', ar: 'طاقة خرج الوحدة (كيلوواط)' }, + '模块尺寸(mm)': { en: 'Module Dimensions (mm)', fr: 'Dimensions du module (mm)', ru: 'Габариты модуля (мм)', es: 'Dimensiones del módulo (mm)', ar: 'أبعاد الوحدة (مم)' }, + '模块重量(kg)': { en: 'Module Weight (kg)', fr: 'Poids du module (kg)', ru: 'Вес модуля (кг)', es: 'Peso del módulo (kg)', ar: 'وزن الوحدة (كجم)' }, + '电池最大能量(kWh)': { en: 'Battery Max Energy (kWh)', fr: 'Énergie max de la batterie (kWh)', ru: 'Макс. энергия батареи (кВт·ч)', es: 'Energía máxima de la batería (kWh)', ar: 'أقصى طاقة للبطارية (كيلوواط ساعة)' }, + '额定输出电压(V)': { en: 'Rated Output Voltage (V)', fr: 'Tension de sortie nominale (V)', ru: 'Номинальное выходное напряжение (В)', es: 'Voltaje de salida nominal (V)', ar: 'جهد الخرج الاسمي (فولت)' }, + '循环寿命': { en: 'Cycle Life', fr: 'Durée de vie (cycles)', ru: 'Циклический ресурс', es: 'Vida útil (ciclos)', ar: 'عمر الدورة' }, + '通信接口': { en: 'Communication Interface', fr: 'Interface de communication', ru: 'Интерфейс связи', es: 'Interfaz de comunicación', ar: 'واجهة الاتصال' }, + '保护功能': { en: 'Protection Functions', fr: 'Fonctions de protection', ru: 'Функции защиты', es: 'Funciones de protección', ar: 'وظائف الحماية' }, + '运行温度': { en: 'Operating Temperature', fr: 'Température de fonctionnement', ru: 'Рабочая температура', es: 'Temperatura de funcionamiento', ar: 'درجة حرارة التشغيل' }, + '颜色': { en: 'Color', fr: 'Couleur', ru: 'Цвет', es: 'Color', ar: 'اللون' }, + '系统柜尺寸(mm)': { en: 'Cabinet Dimensions (mm)', fr: "Dimensions de l'armoire (mm)", ru: 'Габариты шкафа (мм)', es: 'Dimensiones del gabinete (mm)', ar: 'أبعاد الخزانة (مم)' }, + '系统柜重量(kg)': { en: 'Cabinet Weight (kg)', fr: "Poids de l'armoire (kg)", ru: 'Вес шкафа (кг)', es: 'Peso del gabinete (kg)', ar: 'وزن الخزانة (كجم)' }, + '海拔(m)': { en: 'Altitude (m)', fr: 'Altitude (m)', ru: 'Высота над уровнем моря (м)', es: 'Altitud (m)', ar: 'الارتفاع (م)' }, + '自放电率': { en: 'Self-discharge Rate', fr: "Taux d'autodécharge", ru: 'Скорость саморазряда', es: 'Tasa de autodescarga', ar: 'معدل التفريغ الذاتي' }, '在线式高频UPS': { en: 'Online High-Frequency UPS', fr: 'Onduleur en ligne haute fréquence', ru: 'Онлайн высокочастотный ИБП', es: 'SAI en línea de alta frecuencia', ar: 'يو بي إس عالي التردد أونلاين' }, '电压': { en: 'Voltage', fr: 'Tension', ru: 'Напряжение', es: 'Voltaje', ar: 'الجهد' }, '视载功率': { en: 'Rated Power (VA)', fr: 'Puissance nominale (VA)', ru: 'Номинальная мощность (ВА)', es: 'Potencia nominal (VA)', ar: 'الطاقة الاسمية (فولت أمبير)' }, @@ -407,7 +430,30 @@ async function resolveExportTranslations(terms, lang) { function productExportRows(p, categories) { const cat = (categories || []).find(c => c.id === p.category); const rows = []; - if (isUpsCategory(cat) && (p.type === '离线式UPS' || p.type === '在线互动式UPS')) { + if (isBatteryCategory(cat) && p.type === 'UPS配套锂电池系统') { + if (p.moduleType) rows.push({ labelKey: '模块类型', value: p.moduleType }); + if (p.moduleCapacity) rows.push({ labelKey: '额定容量', value: p.moduleCapacity }); + if (p.cellType) rows.push({ labelKey: '电芯类型', value: p.cellType }); + if (p.moduleVoltage) rows.push({ labelKey: '额定电压', value: p.moduleVoltage }); + if (p.dischargeRate) rows.push({ labelKey: '放电倍率', value: p.dischargeRate }); + if (p.chargeRate) rows.push({ labelKey: '充电倍率', value: p.chargeRate }); + if (p.moduleMaxEnergy) rows.push({ labelKey: '模块最大能量(kWh)', value: p.moduleMaxEnergy }); + if (p.moduleOutputPower) rows.push({ labelKey: '模块输出功率(kW)', value: p.moduleOutputPower }); + if (p.moduleDimensions) rows.push({ labelKey: '模块尺寸(mm)', value: p.moduleDimensions }); + if (p.moduleWeight) rows.push({ labelKey: '模块重量(kg)', value: p.moduleWeight }); + if (p.cabinetMaxEnergy) rows.push({ labelKey: '电池最大能量(kWh)', value: p.cabinetMaxEnergy }); + if (p.cabinetRatedVoltage) rows.push({ labelKey: '额定输出电压(V)', value: p.cabinetRatedVoltage }); + if (p.cycleLife) rows.push({ labelKey: '循环寿命', value: p.cycleLife }); + if (p.commInterface) rows.push({ labelKey: '通信接口', value: p.commInterface }); + if (p.protectionFunctions) rows.push({ labelKey: '保护功能', value: p.protectionFunctions }); + if (p.operatingTemp) rows.push({ labelKey: '运行温度', value: p.operatingTemp }); + if (p.humidity) rows.push({ labelKey: '湿度', value: p.humidity }); + if (p.color) rows.push({ labelKey: '颜色', value: p.color }); + if (p.cabinetDimensions) rows.push({ labelKey: '系统柜尺寸(mm)', value: p.cabinetDimensions }); + if (p.cabinetWeight) rows.push({ labelKey: '系统柜重量(kg)', value: p.cabinetWeight }); + if (p.altitude) rows.push({ labelKey: '海拔(m)', value: p.altitude }); + if (p.selfDischargeRate) rows.push({ labelKey: '自放电率', value: p.selfDischargeRate }); + } else if (isUpsCategory(cat) && (p.type === '离线式UPS' || p.type === '在线互动式UPS')) { if (p.powerOrCapacity) rows.push({ labelKey: '容量', value: p.powerOrCapacity }); if (p.inputVoltage) rows.push({ labelKey: '输入电压', value: p.inputVoltage }); if (p.inputVoltageRange) rows.push({ labelKey: '输入电压范围', value: p.inputVoltageRange }); @@ -610,6 +656,29 @@ const blankProduct = () => ({ outputPowerFactor: '', // 输出功率因数,如 "0.9" 或 "1" parallelUnits: '', // 可并联台数,如 "Not supported" 或具体数字 overload: '', // 过载保护,如 "105%-125% 6-25s; >150% 200ms" + // UPS配套锂电池系统专属字段(储能电池大类)——模块级参数 + moduleType: '', // 模块类型,如 "长延时型" + moduleCapacity: '', // 模块额定容量(Ah),如 "100" + cellType: '', // 电芯类型,如 "磷酸铁锂电池(LFP)" + moduleVoltage: '', // 模块额定电压(V),如 "51.2" + dischargeRate: '', // 放电倍率(C),如 "2" + chargeRate: '', // 充电倍率(C),如 "1" + moduleMaxEnergy: '', // 模块最大能量(kWh),如 "5.12" + moduleOutputPower: '', // 模块输出功率(kW),如 "10.24" + moduleDimensions: '', // 模块尺寸(mm),如 "440*440*131" + moduleWeight: '', // 模块重量(kg),如 "43±2" + // UPS配套锂电池系统专属字段——电池系统柜级参数 + cabinetMaxEnergy: '', // 电池最大能量(kWh),如 "40.96" + cabinetRatedVoltage: '', // 额定输出电压(V),如 "409.6/±204.8/460.8/512/±256/563.2/614.4/±307.2" + cycleLife: '', // 循环寿命,如 "5000次@50%DOD" + commInterface: '', // 通信接口,如 "LAN/CAN/RS485/干接点" + protectionFunctions: '', // 保护功能,如 "过充、过放、过温、过流、短路等" + operatingTemp: '', // 运行温度,如 "0~40℃(推荐20~25℃运行)" + color: '', // 颜色,如 "RAL9004" + cabinetDimensions: '', // 系统柜尺寸(mm),如 "600×850×2000" + cabinetWeight: '', // 系统柜重量(kg),如 "544±10(8模组配置)" + altitude: '', // 海拔(m),如 "≤4000(>2000降额使用)" + selfDischargeRate: '', // 自放电率,如 "<5%(环境温度0~30℃/30天)" batterySpec: '', // 电池型号和数量,如 "12V4.5AH*1"(迷你UPS/离线式/在线互动式UPS共用) dimensions: '', // 尺寸(mm)(迷你UPS/离线式/在线互动式UPS共用) netWeight: '', // 净重(kg)(迷你UPS/离线式/在线互动式UPS共用) @@ -621,6 +690,9 @@ const blankProduct = () => ({ function isUpsCategory(cat) { return !!cat && (cat.id === 'ups' || cat.name === 'UPS不间断电源'); } +function isBatteryCategory(cat) { + return !!cat && (cat.id === 'battery' || cat.name === '储能电池'); +} function spaceToAsterisk(v) { return (v || '').replace(/ /g, '*'); } function computeMaxPowerKW(ratedPower, ratedPowerUnit, powerFactor) { const rp = parseFloat(ratedPower); @@ -632,6 +704,32 @@ function computeMaxPowerKW(ratedPower, ratedPowerUnit, powerFactor) { } function powerInfoItems(p, categories) { const cat = (categories || []).find(c => c.id === p.category); + if (isBatteryCategory(cat) && p.type === 'UPS配套锂电池系统') { + const items = []; + if (p.moduleType) items.push({ key: 'moduletype', label: '模块类型', value: p.moduleType }); + if (p.moduleCapacity) items.push({ key: 'modulecap', label: '额定容量', value: p.moduleCapacity }); + if (p.cellType) items.push({ key: 'celltype', label: '电芯类型', value: p.cellType }); + if (p.moduleVoltage) items.push({ key: 'modulevoltage', label: '额定电压', value: p.moduleVoltage }); + if (p.dischargeRate) items.push({ key: 'dischargerate', label: '放电倍率', value: p.dischargeRate }); + if (p.chargeRate) items.push({ key: 'chargerate', label: '充电倍率', value: p.chargeRate }); + if (p.moduleMaxEnergy) items.push({ key: 'modulemaxenergy', label: '模块最大能量(kWh)', value: p.moduleMaxEnergy }); + if (p.moduleOutputPower) items.push({ key: 'moduleoutputpower', label: '模块输出功率(kW)', value: p.moduleOutputPower }); + if (p.moduleDimensions) items.push({ key: 'moduledim', label: '模块尺寸(mm)', value: p.moduleDimensions }); + if (p.moduleWeight) items.push({ key: 'moduleweight', label: '模块重量(kg)', value: p.moduleWeight }); + if (p.cabinetMaxEnergy) items.push({ key: 'cabinetmaxenergy', label: '电池最大能量(kWh)', value: p.cabinetMaxEnergy }); + if (p.cabinetRatedVoltage) items.push({ key: 'cabinetvoltage', label: '额定输出电压(V)', value: p.cabinetRatedVoltage }); + if (p.cycleLife) items.push({ key: 'cyclelife', label: '循环寿命', value: p.cycleLife }); + if (p.commInterface) items.push({ key: 'comminterface', label: '通信接口', value: p.commInterface }); + if (p.protectionFunctions) items.push({ key: 'protectionfunc', label: '保护功能', value: p.protectionFunctions }); + if (p.operatingTemp) items.push({ key: 'operatingtemp', label: '运行温度', value: p.operatingTemp }); + if (p.humidity) items.push({ key: 'humidity', label: '湿度', value: p.humidity }); + if (p.color) items.push({ key: 'color', label: '颜色', value: p.color }); + if (p.cabinetDimensions) items.push({ key: 'cabinetdim', label: '系统柜尺寸(mm)', value: p.cabinetDimensions }); + if (p.cabinetWeight) items.push({ key: 'cabinetweight', label: '系统柜重量(kg)', value: p.cabinetWeight }); + if (p.altitude) items.push({ key: 'altitude', label: '海拔(m)', value: p.altitude }); + if (p.selfDischargeRate) items.push({ key: 'selfdischarge', label: '自放电率', value: p.selfDischargeRate }); + return items; + } if (isUpsCategory(cat) && (p.type === '离线式UPS' || p.type === '在线互动式UPS')) { const items = []; if (p.powerOrCapacity) items.push({ key: 'capacity', label: '容量', value: p.powerOrCapacity }); @@ -2117,6 +2215,15 @@ function MainApp({ username, onLogout }) { efficiencyBatteryMode: p.efficiencyBatteryMode || '', chargingVoltage: p.chargingVoltage || '', optionalSnmp: p.optionalSnmp || '', outputPowerFactor: p.outputPowerFactor || '', parallelUnits: p.parallelUnits || '', overload: p.overload || '', + moduleType: p.moduleType || '', moduleCapacity: p.moduleCapacity || '', cellType: p.cellType || '', + moduleVoltage: p.moduleVoltage || '', dischargeRate: p.dischargeRate || '', chargeRate: p.chargeRate || '', + moduleMaxEnergy: p.moduleMaxEnergy || '', moduleOutputPower: p.moduleOutputPower || '', + moduleDimensions: p.moduleDimensions || '', moduleWeight: p.moduleWeight || '', + cabinetMaxEnergy: p.cabinetMaxEnergy || '', cabinetRatedVoltage: p.cabinetRatedVoltage || '', + cycleLife: p.cycleLife || '', commInterface: p.commInterface || '', protectionFunctions: p.protectionFunctions || '', + operatingTemp: p.operatingTemp || '', color: p.color || '', + cabinetDimensions: p.cabinetDimensions || '', cabinetWeight: p.cabinetWeight || '', + altitude: p.altitude || '', selfDischargeRate: p.selfDischargeRate || '', batterySpec: p.batterySpec || '', dimensions: p.dimensions || '', netWeight: p.netWeight || '', notes: p.notes || '', })); setAiImportDrafts(drafts); @@ -2173,6 +2280,15 @@ function MainApp({ username, onLogout }) { efficiencyBatteryMode: d.efficiencyBatteryMode || '', chargingVoltage: d.chargingVoltage || '', optionalSnmp: d.optionalSnmp || '', outputPowerFactor: d.outputPowerFactor || '', parallelUnits: d.parallelUnits || '', overload: d.overload || '', + moduleType: d.moduleType || '', moduleCapacity: d.moduleCapacity || '', cellType: d.cellType || '', + moduleVoltage: d.moduleVoltage || '', dischargeRate: d.dischargeRate || '', chargeRate: d.chargeRate || '', + moduleMaxEnergy: d.moduleMaxEnergy || '', moduleOutputPower: d.moduleOutputPower || '', + moduleDimensions: d.moduleDimensions || '', moduleWeight: d.moduleWeight || '', + cabinetMaxEnergy: d.cabinetMaxEnergy || '', cabinetRatedVoltage: d.cabinetRatedVoltage || '', + cycleLife: d.cycleLife || '', commInterface: d.commInterface || '', protectionFunctions: d.protectionFunctions || '', + operatingTemp: d.operatingTemp || '', color: d.color || '', + cabinetDimensions: d.cabinetDimensions || '', cabinetWeight: d.cabinetWeight || '', + altitude: d.altitude || '', selfDischargeRate: d.selfDischargeRate || '', batterySpec: d.batterySpec || '', dimensions: d.dimensions || '', netWeight: d.netWeight || '', notes: d.notes || '', }; } @@ -3761,6 +3877,7 @@ function ProductForm({ draft, setDraft, onSave, onCancel, categories, onManage, const isRackUps = isUps && draft.type === '机架式UPS'; const isOnlineHighFreq = isUps && draft.type === '在线式高频UPS'; const isRackLikeUps = isRackUps || isOnlineHighFreq; + const isBatterySystem = isBatteryCategory(cat) && draft.type === 'UPS配套锂电池系统'; const maxKW = computeMaxPowerKW(draft.ratedPower, draft.ratedPowerUnit, draft.powerFactor); const extraNames = draft.extraNames || []; const [imageUploading, setImageUploading] = useState(false); @@ -3907,7 +4024,52 @@ function ProductForm({ draft, setDraft, onSave, onCancel, categories, onManage, )} - {isUps && isRackLikeUps ? ( + {isBatterySystem ? ( + <> +
+
模块类型 set({ moduleType: e.target.value })} placeholder="如:长延时型" />
+
电芯类型 set({ cellType: e.target.value })} placeholder="如:磷酸铁锂电池(LFP)" />
+
+
+
额定容量(Ah) set({ moduleCapacity: e.target.value })} placeholder="如:100" />
+
额定电压(V) set({ moduleVoltage: e.target.value })} placeholder="如:51.2" />
+
+
+
放电倍率(C) set({ dischargeRate: e.target.value })} placeholder="如:2" />
+
充电倍率(C) set({ chargeRate: e.target.value })} placeholder="如:1" />
+
+
+
模块最大能量(kWh) set({ moduleMaxEnergy: e.target.value })} placeholder="如:5.12" />
+
模块输出功率(kW) set({ moduleOutputPower: e.target.value })} placeholder="如:10.24" />
+
+
+
模块尺寸(mm) set({ moduleDimensions: spaceToAsterisk(e.target.value) })} placeholder="如:440*440*131" />
+
模块重量(kg) set({ moduleWeight: e.target.value })} placeholder="如:43±2" />
+
+
+
电池最大能量(kWh) set({ cabinetMaxEnergy: e.target.value })} placeholder="如:40.96" />
+
额定输出电压(V) set({ cabinetRatedVoltage: e.target.value })} placeholder="如:409.6/±204.8/460.8/512" />
+
+
+
循环寿命 set({ cycleLife: e.target.value })} placeholder="如:5000次@50%DOD" />
+
通信接口 set({ commInterface: e.target.value })} placeholder="如:LAN/CAN/RS485/干接点" />
+
+
保护功能 set({ protectionFunctions: e.target.value })} placeholder="如:过充、过放、过温、过流、短路等" />
+
+
运行温度 set({ operatingTemp: e.target.value })} placeholder="如:0~40℃(推荐20~25℃运行)" />
+
湿度 set({ humidity: e.target.value })} placeholder="如:5%~95%(无凝露)" />
+
+
+
颜色 set({ color: e.target.value })} placeholder="如:RAL9004" />
+
海拔(m) set({ altitude: e.target.value })} placeholder="如:≤4000(>2000降额使用)" />
+
+
+
系统柜尺寸(mm) set({ cabinetDimensions: spaceToAsterisk(e.target.value) })} placeholder="如:600×850×2000" />
+
系统柜重量(kg) set({ cabinetWeight: e.target.value })} placeholder="如:544±10(8模组配置)" />
+
+
自放电率 set({ selfDischargeRate: e.target.value })} placeholder="如:<5%(环境温度0~30℃/30天)" />
+ + ) : isUps && isRackLikeUps ? ( <>
相数 set({ phase: e.target.value })} placeholder="如:1-phase input/1-phase output" />