生产监控看板

This commit is contained in:
2025-04-25 10:33:07 +08:00
parent 2c1e1845f4
commit 446fa9a0d1
12 changed files with 354 additions and 114 deletions

View File

@@ -295,3 +295,15 @@ export function getPath(path) {
}
return Math.floor(divisor/dividend*100)/100;
}
// 通用千分位格式化函数
export function formatThousands(value) {
if (value === null || value === undefined) return '0'
// 清理已有逗号并转为数字
const numValue = Number(String(value).replace(/,/g, ''))
if (isNaN(numValue)) return '0'
// 支持小数处理
return numValue.toLocaleString('en-US')
}