fix(ui): unify table controls and organization layouts

This commit is contained in:
zhanjunhao
2026-11-24 13:26:07 +08:00
parent bf708039a3
commit 6528027d6d
124 changed files with 2682 additions and 1810 deletions
@@ -132,6 +132,14 @@ const CustomTag = ({
);
};
const getTaskChannelColorKey = (value) => {
const idNum = parseInt(value);
const colorIndex = Number.isFinite(idNum)
? ((idNum % colors.length) + colors.length) % colors.length
: 0;
return colors[colorIndex];
};
// Render functions
const renderTimestamp = (timestampInSeconds) => {
const date = new Date(timestampInSeconds * 1000);
@@ -417,11 +425,7 @@ export const getTaskLogsColumns = ({
render: (text, record, index) => {
if (!isAdminUser) return null;
const idNum = parseInt(text);
const colorIndex = Number.isFinite(idNum)
? ((idNum % colors.length) + colors.length) % colors.length
: 0;
const colorKey = colors[colorIndex];
const colorKey = getTaskChannelColorKey(text);
// 若后端返回 channel_name 则在 Tooltip 中显示名称,便于管理员快速识别;否则回落为 ID
const tooltipContent = record.channel_name || text;