diff --git a/components/apolloTable/component/Cell.tsx b/components/apolloTable/component/Cell.tsx index e94bae4d0cb367f442dc26b3afe6bd83d81fa082..d1a8fb4a9da7924a6716dc49484265f3d86f077f 100644 --- a/components/apolloTable/component/Cell.tsx +++ b/components/apolloTable/component/Cell.tsx @@ -174,9 +174,9 @@ const Cell = (props: CellProps) => { } onClick={() => { // 不可编辑状态 - if (!cellEditable || readOnlyFlag || (dynamicCellConfigDTO && dynamicCellConfigDTO.readonlyFlag)) { - return false; - } + // if (!cellEditable || readOnlyFlag || (dynamicCellConfigDTO && dynamicCellConfigDTO.readonlyFlag)) { + // return false; + // } if (selectedCell === `${position}_${cellKey}`) { setStatus('edit'); } else { diff --git a/components/apolloTable/component/filter-condition/index.tsx b/components/apolloTable/component/filter-condition/index.tsx index c75b2e1e72bbcd248778945c24a12cee947374d1..987f48372e143f47ae2877c93107fcae5eee7a93 100644 --- a/components/apolloTable/component/filter-condition/index.tsx +++ b/components/apolloTable/component/filter-condition/index.tsx @@ -18,7 +18,11 @@ const formatTags = (columns: ColumnProps[], tags: any[]) => { return item.columnName === tag.colName; }); if (!colConfig) return; - const { operator = [], columnType } = colConfig; + const { operator = [] } = colConfig; + let { columnType } = colConfig; + if (!config[columnType]) { + columnType = '1'; + } const { componentAttr, getFormatter } = config[columnType]; const newProps = { ...(componentAttr || {}), diff --git a/components/apolloTable/component/filter/index.tsx b/components/apolloTable/component/filter/index.tsx index d45a4bda8fdab5524e5ae16af1a99765fd762744..6e7c1dc5c47a8f6295d168ff37d8df9ddcbe1ff1 100644 --- a/components/apolloTable/component/filter/index.tsx +++ b/components/apolloTable/component/filter/index.tsx @@ -166,12 +166,12 @@ export default class Filter extends Component { for (let i = 0; i < filterConfig.length; i++) { // 筛选条件值为undefined或[]或[{text:'',value:''}]都算空,不能提交 if ( - !filterConfig[i].colName - || !filterConfig[i].operationCode - || !filterConfig[i].colValues - || filterConfig[i].colValues.length === 0 - || (!filterConfig[i].colValues && filterConfig[i].colValues !== 0) - || (!filterConfig[i].colValues[0].text && filterConfig[i].colValues[0].text !== 0) + !filterConfig[i].colName || + !filterConfig[i].operationCode || + !filterConfig[i].colValues || + filterConfig[i].colValues.length === 0 || + (!filterConfig[i].colValues && filterConfig[i].colValues !== 0) || + (!filterConfig[i].colValues[0].text && filterConfig[i].colValues[0].text !== 0) ) { message.error(locale.filterEmpty); return; @@ -210,6 +210,9 @@ export default class Filter extends Component { if (filterItem) { operateOptions = filterItem.operator; type = String(filterItem.columnType); + if (!config[type]) { + type = '1'; + } delete filterItem.columnAttrObj.maxLength; const { columnAttrObj } = filterItem; newProps = { diff --git a/components/apolloTable/editFormV3/index.tsx b/components/apolloTable/editFormV3/index.tsx index 4d00a58779275a6d3a2fef9afe25bf816487c4e6..06bfc0c87a200da5ea113f3b70c7a3a5e5da78c6 100644 --- a/components/apolloTable/editFormV3/index.tsx +++ b/components/apolloTable/editFormV3/index.tsx @@ -116,7 +116,15 @@ class FormWrap extends Component { validateTrigger, rules: [{ required: !!item.requiredFlag, message: '必填项不能为空' }, ...rules], initialValue: getFormat(detailConfig, item, value), - })()} + })( + , + )} ); };