分离识别结果标签页;限制 DMA 数量最大数量

This commit is contained in:
JIANG
2026-03-06 10:15:47 +08:00
parent 377fc32f4c
commit 5430a9d885
4 changed files with 292 additions and 179 deletions
@@ -0,0 +1,21 @@
export const AREA_COLORS = [
"#2563eb",
"#7c3aed",
"#0891b2",
"#16a34a",
"#ca8a04",
"#dc2626",
"#ea580c",
"#0f766e",
"#4338ca",
"#be123c",
];
export const getAreaColor = (areaId: string | number | undefined) => {
const text = String(areaId ?? "");
let hash = 0;
for (let i = 0; i < text.length; i += 1) {
hash = (hash * 31 + text.charCodeAt(i)) >>> 0;
}
return AREA_COLORS[hash % AREA_COLORS.length];
};