修改组件查看模式的状态

This commit is contained in:
linxd
2025-07-15 11:13:13 +08:00
parent 51f1559174
commit 47bf5342be
3 changed files with 9 additions and 5 deletions

View File

@ -615,7 +615,10 @@ const EvaluateTemplateTable: React.FC<EvaluateTemplateTableProps> = ({
const filterColumns = (col: any) => { const filterColumns = (col: any) => {
if (isDetail) { if (isDetail) {
return false; // 如果是详情,过滤掉操作列
if (col.key === 'level1Action') {
return false;
}
} }
if (getUserRole() != 'admin') { if (getUserRole() != 'admin') {
if ( if (
@ -633,7 +636,9 @@ const EvaluateTemplateTable: React.FC<EvaluateTemplateTableProps> = ({
}; };
const filterColumnsSecond = (col: any) => { const filterColumnsSecond = (col: any) => {
if (isDetail) { if (isDetail) {
return false; if (col.key === 'level2Action') {
return false;
}
} }
if (getUserRole() != 'admin') { if (getUserRole() != 'admin') {
if ( if (

View File

@ -48,7 +48,7 @@ const IndicatorModal: React.FC<IndicatorModalProps> = ({
// 筛选出当前评价人员负责的指标 // 筛选出当前评价人员负责的指标
if (res.data.indicatorStList && indicators.length > 0) { if (res.data.indicatorStList && indicators.length > 0) {
// 扁平化处理模板数据,提取出所有二级指标 // 扁平化处理模板数据,提取出所有二级指标
const allIndicators = []; const allIndicators: (IndicatorItem & { id: string })[] = [];
for (const stItem of res.data.indicatorStList) { for (const stItem of res.data.indicatorStList) {
if (stItem.indicatorNdList) { if (stItem.indicatorNdList) {
for (const ndItem of stItem.indicatorNdList) { for (const ndItem of stItem.indicatorNdList) {
@ -59,7 +59,7 @@ const IndicatorModal: React.FC<IndicatorModalProps> = ({
descIndicator: stItem.descIndicator, descIndicator: stItem.descIndicator,
stScore: stItem.score, stScore: stItem.score,
indicatorType: stItem.indicatorType, indicatorType: stItem.indicatorType,
id: ndItem.id, id: ndItem.id || '',
score: ndItem.score, score: ndItem.score,
}); });
} }

View File

@ -234,7 +234,6 @@ const SupplierTemplateManageAdd: React.FC<PageProps> = ({ breadcrumb, dispatch }
if (isEdit && templateDetail) { if (isEdit && templateDetail) {
dataToSubmit.id = templateDetail.id; dataToSubmit.id = templateDetail.id;
} }
debugger
setLoading(true); setLoading(true);
try { try {
// 调用API接口 // 调用API接口