From 5db52e087f10d9a2bb4179eaac55fde9702fdd3e Mon Sep 17 00:00:00 2001 From: qmj <37242163+qmj666@users.noreply.github.com> Date: Thu, 5 Feb 2026 16:23:50 +0800 Subject: [PATCH] 修改生产进度颜色调整 --- src/components/Common/CommonTable/index.js | 163 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++---------------------------------------------------------------------------------- 1 file changed, 81 insertions(+), 82 deletions(-) diff --git a/src/components/Common/CommonTable/index.js b/src/components/Common/CommonTable/index.js index 66362fa..599d448 100644 --- a/src/components/Common/CommonTable/index.js +++ b/src/components/Common/CommonTable/index.js @@ -1336,48 +1336,47 @@ class CommonTableRc extends React.Component { if (t?.background) { colorValue = t.background; } else { - - const iStatus = commonUtils.isEmpty(t.iStatus) ? 4 : t.iStatus; - switch ( - Number(iStatus) // 根据状态显示颜色 - ) { - case 0: - colorValue = "#808080"; /* 0:灰色 */ - break; - case 1: - colorValue = "#808080"; /* 1:灰色 */ - break; - case 2: - colorValue = "#ff4d4f"; /* 2:红色 */ - break; - case 3: - colorValue = "#d4b106"; /* 3:黄色 */ - break; - case 4: - colorValue = "#000000"; /* 黑色 */ - break; - case 5: - colorValue = "#49aa19"; /* 5:绿色 */ - break; - default: - colorValue = "#000000"; - } - // switch ( - // Number(sState) // 根据状态显示颜色 - // ) { - // case 2: - // colorValue = "#FF6600"; /* 2:等待:黄色 */ - // break; - // case 4: - // colorValue = "#648c4b"; /* 4:已完成:绿色 */ - // break; - // case 1: - // case 3: - // colorValue = "#106abe"; /* 1、3:进行中:蓝色 */ - // break; - // default: - // colorValue = "#000000"; - // } + const sState = commonUtils.isEmpty(t.sState) ? 4 : t.sState; + // switch ( + // Number(iStatus) // 根据状态显示颜色 + // ) { + // case 0: + // colorValue = "#808080"; /* 0:灰色 */ + // break; + // case 1: + // colorValue = "#808080"; /* 1:灰色 */ + // break; + // case 2: + // colorValue = "#ff4d4f"; /* 2:红色 */ + // break; + // case 3: + // colorValue = "#d4b106"; /* 3:黄色 */ + // break; + // case 4: + // colorValue = "#000000"; /* 黑色 */ + // break; + // case 5: + // colorValue = "#49aa19"; /* 5:绿色 */ + // break; + // default: + // colorValue = "#000000"; + // } + switch ( + Number(sState) // 根据状态显示颜色 + ) { + case 2: + colorValue = "#FF6600"; /* 2:等待:黄色 */ + break; + case 4: + colorValue = "#648c4b"; /* 4:已完成:绿色 */ + break; + case 1: + case 3: + colorValue = "#106abe"; /* 1、3:进行中:蓝色 */ + break; + default: + colorValue = "#000000"; + } } return (