Update App.jsx via upload script - 2026-07-28 21:04:33
This commit is contained in:
parent
dfcb603a5e
commit
8857841b91
34
App.jsx
34
App.jsx
|
|
@ -40,6 +40,7 @@ const LEGACY_PRODUCT_TAXONOMY = [
|
|||
id: 'online', label: '在线式UPS / Online UPS', short: '在线式UPS',
|
||||
subs: [
|
||||
{ id: 'rack', label: '机架式UPS / Rack-mount UPS', short: '机架式UPS' },
|
||||
{ id: 'online_high_freq', label: '在线高频UPS / Online High-Frequency UPS', short: '在线高频UPS' },
|
||||
{ id: 'high_freq_tower', label: '高频塔式UPS / High-Frequency Tower UPS', short: '高频塔式UPS' },
|
||||
{ id: 'low_freq', label: '工频UPS / Low-Frequency UPS', short: '工频UPS' },
|
||||
{ id: 'modular', label: '模块化UPS / Modular UPS', short: '模块化UPS' },
|
||||
|
|
@ -323,6 +324,10 @@ const TRANSLATION_DICTIONARY = {
|
|||
'效率(电池模式)': { en: 'Efficiency (Battery Mode)', fr: 'Rendement (mode batterie)', ru: 'КПД (режим батареи)', es: 'Eficiencia (modo batería)', ar: 'الكفاءة (وضع البطارية)' },
|
||||
'充电电压': { en: 'Charging Voltage', fr: 'Tension de charge', ru: 'Напряжение зарядки', es: 'Voltaje de carga', ar: 'جهد الشحن' },
|
||||
'可选SNMP': { en: 'Optional SNMP', fr: 'SNMP en option', ru: 'SNMP (опционально)', es: 'SNMP opcional', ar: 'SNMP اختياري' },
|
||||
'输出功率因数': { 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: '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: 'الطاقة الاسمية (فولت أمبير)' },
|
||||
'功率因数': { en: 'Power Factor', fr: 'Facteur de puissance', ru: 'Коэффициент мощности', es: 'Factor de potencia', ar: 'معامل القدرة' },
|
||||
|
|
@ -424,14 +429,16 @@ function productExportRows(p, categories) {
|
|||
if (p.noiseLevel) rows.push({ labelKey: '噪音', value: p.noiseLevel });
|
||||
if (p.dimensions) rows.push({ labelKey: '尺寸(mm)', value: p.dimensions });
|
||||
if (p.netWeight) rows.push({ labelKey: '净重(kg)', value: p.netWeight });
|
||||
} else if (isUpsCategory(cat) && p.type === '机架式UPS') {
|
||||
} else if (isUpsCategory(cat) && (p.type === '机架式UPS' || p.type === '在线高频UPS')) {
|
||||
if (p.phase) rows.push({ labelKey: '相数', value: p.phase });
|
||||
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 });
|
||||
if (p.inputFrequency) rows.push({ labelKey: '输入频率', value: p.inputFrequency });
|
||||
if (p.inputPowerFactor) rows.push({ labelKey: '输入功率因数', value: p.inputPowerFactor });
|
||||
if (p.parallelUnits) rows.push({ labelKey: '可并联台数', value: p.parallelUnits });
|
||||
if (p.outputVoltage) rows.push({ labelKey: '输出电压', value: p.outputVoltage });
|
||||
if (p.outputPowerFactor) rows.push({ labelKey: '输出功率因数', value: p.outputPowerFactor });
|
||||
if (p.outputVoltageRange) rows.push({ labelKey: '输出电压范围', value: p.outputVoltageRange });
|
||||
if (p.frequencyRangeBatteryMode) rows.push({ labelKey: '频率范围(电池模式)', value: p.frequencyRangeBatteryMode });
|
||||
if (p.currentCrestRatio) rows.push({ labelKey: '峰值电流比', value: p.currentCrestRatio });
|
||||
|
|
@ -439,6 +446,7 @@ function productExportRows(p, categories) {
|
|||
if (p.transferTimeAcToBattery) rows.push({ labelKey: '转换时间(市电到电池)', value: p.transferTimeAcToBattery });
|
||||
if (p.transferTime) rows.push({ labelKey: '转换时间', value: p.transferTime });
|
||||
if (p.waveform) rows.push({ labelKey: '波形', value: p.waveform });
|
||||
if (p.overload) rows.push({ labelKey: '过载保护', value: p.overload });
|
||||
if (p.efficiencyAcMode) rows.push({ labelKey: '效率(市电模式)', value: p.efficiencyAcMode });
|
||||
if (p.efficiencyBatteryMode) rows.push({ labelKey: '效率(电池模式)', value: p.efficiencyBatteryMode });
|
||||
if (p.batterySpec) rows.push({ labelKey: '电池型号和数量', value: p.batterySpec });
|
||||
|
|
@ -570,6 +578,10 @@ const blankProduct = () => ({
|
|||
efficiencyBatteryMode: '', // 效率(电池模式),如 "83%"
|
||||
chargingVoltage: '', // 充电电压,如 "27.4VDC±1%"
|
||||
optionalSnmp: '', // 可选SNMP,如 "Power management from SNMP manager and web browser"
|
||||
// 在线高频UPS专属字段(在机架式UPS那套字段基础上再加这3个)
|
||||
outputPowerFactor: '', // 输出功率因数,如 "0.9" 或 "1"
|
||||
parallelUnits: '', // 可并联台数,如 "Not supported" 或具体数字
|
||||
overload: '', // 过载保护,如 "105%-125% 6-25s; >150% 200ms"
|
||||
batterySpec: '', // 电池型号和数量,如 "12V4.5AH*1"(迷你UPS/离线式/在线互动式UPS共用)
|
||||
dimensions: '', // 尺寸(mm)(迷你UPS/离线式/在线互动式UPS共用)
|
||||
netWeight: '', // 净重(kg)(迷你UPS/离线式/在线互动式UPS共用)
|
||||
|
|
@ -618,7 +630,7 @@ function powerInfoItems(p, categories) {
|
|||
if (p.netWeight) items.push({ key: 'weight', label: '净重(kg)', value: p.netWeight });
|
||||
return items;
|
||||
}
|
||||
if (isUpsCategory(cat) && p.type === '机架式UPS') {
|
||||
if (isUpsCategory(cat) && (p.type === '机架式UPS' || p.type === '在线高频UPS')) {
|
||||
const items = [];
|
||||
if (p.phase) items.push({ key: 'phase', label: '相数', value: p.phase });
|
||||
if (p.powerOrCapacity) items.push({ key: 'capacity', label: '容量', value: p.powerOrCapacity });
|
||||
|
|
@ -626,7 +638,9 @@ function powerInfoItems(p, categories) {
|
|||
if (p.inputVoltageRange) items.push({ key: 'inputvoltagerange', label: '输入电压范围', value: p.inputVoltageRange });
|
||||
if (p.inputFrequency) items.push({ key: 'inputfreq', label: '输入频率', value: p.inputFrequency });
|
||||
if (p.inputPowerFactor) items.push({ key: 'inputpf', label: '输入功率因数', value: p.inputPowerFactor });
|
||||
if (p.parallelUnits) items.push({ key: 'parallel', label: '可并联台数', value: p.parallelUnits });
|
||||
if (p.outputVoltage) items.push({ key: 'outputvoltage', label: '输出电压', value: p.outputVoltage });
|
||||
if (p.outputPowerFactor) items.push({ key: 'outputpf', label: '输出功率因数', value: p.outputPowerFactor });
|
||||
if (p.outputVoltageRange) items.push({ key: 'outputvoltagerange', label: '输出电压范围', value: p.outputVoltageRange });
|
||||
if (p.frequencyRangeBatteryMode) items.push({ key: 'freqrange', label: '频率范围(电池模式)', value: p.frequencyRangeBatteryMode });
|
||||
if (p.currentCrestRatio) items.push({ key: 'crestratio', label: '峰值电流比', value: p.currentCrestRatio });
|
||||
|
|
@ -634,6 +648,7 @@ function powerInfoItems(p, categories) {
|
|||
if (p.transferTimeAcToBattery) items.push({ key: 'transferacbat', label: '转换时间(市电到电池)', value: p.transferTimeAcToBattery });
|
||||
if (p.transferTime) items.push({ key: 'transfertime', label: '转换时间', value: p.transferTime });
|
||||
if (p.waveform) items.push({ key: 'waveform', label: '波形', value: p.waveform });
|
||||
if (p.overload) items.push({ key: 'overload', label: '过载保护', value: p.overload });
|
||||
if (p.efficiencyAcMode) items.push({ key: 'effac', label: '效率(市电模式)', value: p.efficiencyAcMode });
|
||||
if (p.efficiencyBatteryMode) items.push({ key: 'effbat', label: '效率(电池模式)', value: p.efficiencyBatteryMode });
|
||||
if (p.batterySpec) items.push({ key: 'batteryspec', label: '电池型号和数量', value: p.batterySpec });
|
||||
|
|
@ -2072,6 +2087,7 @@ function MainApp({ username, onLogout }) {
|
|||
harmonicDistortion: p.harmonicDistortion || '', efficiencyAcMode: p.efficiencyAcMode || '',
|
||||
efficiencyBatteryMode: p.efficiencyBatteryMode || '', chargingVoltage: p.chargingVoltage || '',
|
||||
optionalSnmp: p.optionalSnmp || '',
|
||||
outputPowerFactor: p.outputPowerFactor || '', parallelUnits: p.parallelUnits || '', overload: p.overload || '',
|
||||
batterySpec: p.batterySpec || '', dimensions: p.dimensions || '', netWeight: p.netWeight || '', notes: p.notes || '',
|
||||
}));
|
||||
setAiImportDrafts(drafts);
|
||||
|
|
@ -2127,6 +2143,7 @@ function MainApp({ username, onLogout }) {
|
|||
harmonicDistortion: d.harmonicDistortion || '', efficiencyAcMode: d.efficiencyAcMode || '',
|
||||
efficiencyBatteryMode: d.efficiencyBatteryMode || '', chargingVoltage: d.chargingVoltage || '',
|
||||
optionalSnmp: d.optionalSnmp || '',
|
||||
outputPowerFactor: d.outputPowerFactor || '', parallelUnits: d.parallelUnits || '', overload: d.overload || '',
|
||||
batterySpec: d.batterySpec || '', dimensions: d.dimensions || '', netWeight: d.netWeight || '', notes: d.notes || '',
|
||||
};
|
||||
}
|
||||
|
|
@ -3713,6 +3730,8 @@ function ProductForm({ draft, setDraft, onSave, onCancel, categories, onManage,
|
|||
const isMiniUps = isUps && draft.type === '迷你UPS';
|
||||
const isOfflineOrLI = isUps && (draft.type === '离线式UPS' || draft.type === '在线互动式UPS');
|
||||
const isRackUps = isUps && draft.type === '机架式UPS';
|
||||
const isOnlineHighFreq = isUps && draft.type === '在线高频UPS';
|
||||
const isRackLikeUps = isRackUps || isOnlineHighFreq;
|
||||
const maxKW = computeMaxPowerKW(draft.ratedPower, draft.ratedPowerUnit, draft.powerFactor);
|
||||
const extraNames = draft.extraNames || [];
|
||||
const [imageUploading, setImageUploading] = useState(false);
|
||||
|
|
@ -3859,7 +3878,7 @@ function ProductForm({ draft, setDraft, onSave, onCancel, categories, onManage,
|
|||
</div>
|
||||
)}
|
||||
|
||||
{isUps && isRackUps ? (
|
||||
{isUps && isRackLikeUps ? (
|
||||
<>
|
||||
<div className="grid-2">
|
||||
<div className="field"><span className="field-label">相数</span><input className="input" value={draft.phase} onChange={e => set({ phase: e.target.value })} placeholder="如:1-phase input/1-phase output" /></div>
|
||||
|
|
@ -3873,10 +3892,16 @@ function ProductForm({ draft, setDraft, onSave, onCancel, categories, onManage,
|
|||
<div className="field"><span className="field-label">输入频率范围</span><input className="input" value={draft.inputFrequency} onChange={e => set({ inputFrequency: e.target.value })} placeholder="如:40Hz~70Hz" /></div>
|
||||
<div className="field"><span className="field-label">输入功率因数</span><input className="input" value={draft.inputPowerFactor} onChange={e => set({ inputPowerFactor: e.target.value })} placeholder="如:≥0.99@100% load" /></div>
|
||||
</div>
|
||||
{isOnlineHighFreq && (
|
||||
<div className="field"><span className="field-label">可并联台数</span><input className="input" value={draft.parallelUnits} onChange={e => set({ parallelUnits: e.target.value })} placeholder="如:Not supported,或具体可并联数量" /></div>
|
||||
)}
|
||||
<div className="grid-2">
|
||||
<div className="field"><span className="field-label">输出电压</span><input className="input" value={draft.outputVoltage} onChange={e => set({ outputVoltage: e.target.value })} placeholder="如:100/110/115/120/127VAC or 200/208/220/230/240VAC" /></div>
|
||||
<div className="field"><span className="field-label">输出电压范围(电压调整率)</span><input className="input" value={draft.outputVoltageRange} onChange={e => set({ outputVoltageRange: e.target.value })} placeholder="如:±1%" /></div>
|
||||
</div>
|
||||
{isOnlineHighFreq && (
|
||||
<div className="field"><span className="field-label">输出功率因数</span><input className="input" value={draft.outputPowerFactor} onChange={e => set({ outputPowerFactor: e.target.value })} placeholder="如:0.9 或 1" /></div>
|
||||
)}
|
||||
<div className="grid-2">
|
||||
<div className="field"><span className="field-label">频率范围(电池模式)</span><input className="input" value={draft.frequencyRangeBatteryMode} onChange={e => set({ frequencyRangeBatteryMode: e.target.value })} placeholder="如:50Hz±0.25Hz or 60Hz±0.3Hz" /></div>
|
||||
<div className="field"><span className="field-label">峰值电流比</span><input className="input" value={draft.currentCrestRatio} onChange={e => set({ currentCrestRatio: e.target.value })} placeholder="如:3:1" /></div>
|
||||
|
|
@ -3890,6 +3915,9 @@ function ProductForm({ draft, setDraft, onSave, onCancel, categories, onManage,
|
|||
<div className="field"><span className="field-label">波形(电池模式)</span><input className="input" value={draft.waveform} onChange={e => set({ waveform: e.target.value })} placeholder="如:pure sine wave" /></div>
|
||||
<div className="field"><span className="field-label">效率(市电模式)</span><input className="input" value={draft.efficiencyAcMode} onChange={e => set({ efficiencyAcMode: e.target.value })} placeholder="如:88%" /></div>
|
||||
</div>
|
||||
{isOnlineHighFreq && (
|
||||
<div className="field"><span className="field-label">过载保护</span><input className="input" value={draft.overload} onChange={e => set({ overload: e.target.value })} placeholder="如:105%-125% 6-25s; >150% 200ms" /></div>
|
||||
)}
|
||||
<div className="grid-2">
|
||||
<div className="field"><span className="field-label">效率(电池模式)</span><input className="input" value={draft.efficiencyBatteryMode} onChange={e => set({ efficiencyBatteryMode: e.target.value })} placeholder="如:83%" /></div>
|
||||
<div className="field"><span className="field-label">充电电流</span><input className="input" value={draft.chargeCurrent} onChange={e => set({ chargeCurrent: e.target.value })} placeholder="如:1.0A" /></div>
|
||||
|
|
|
|||
Loading…
Reference in New Issue