Commit 34441bae authored by zhangwenshuai's avatar zhangwenshuai

增加兼容

parent d276efd5
...@@ -174,9 +174,9 @@ const Cell = (props: CellProps) => { ...@@ -174,9 +174,9 @@ const Cell = (props: CellProps) => {
} }
onClick={() => { onClick={() => {
// 不可编辑状态 // 不可编辑状态
if (!cellEditable || readOnlyFlag || (dynamicCellConfigDTO && dynamicCellConfigDTO.readonlyFlag)) { // if (!cellEditable || readOnlyFlag || (dynamicCellConfigDTO && dynamicCellConfigDTO.readonlyFlag)) {
return false; // return false;
} // }
if (selectedCell === `${position}_${cellKey}`) { if (selectedCell === `${position}_${cellKey}`) {
setStatus('edit'); setStatus('edit');
} else { } else {
......
...@@ -18,7 +18,11 @@ const formatTags = (columns: ColumnProps[], tags: any[]) => { ...@@ -18,7 +18,11 @@ const formatTags = (columns: ColumnProps[], tags: any[]) => {
return item.columnName === tag.colName; return item.columnName === tag.colName;
}); });
if (!colConfig) return; if (!colConfig) return;
const { operator = [], columnType } = colConfig; const { operator = [] } = colConfig;
let { columnType } = colConfig;
if (!config[columnType]) {
columnType = '1';
}
const { componentAttr, getFormatter } = config[columnType]; const { componentAttr, getFormatter } = config[columnType];
const newProps = { const newProps = {
...(componentAttr || {}), ...(componentAttr || {}),
......
...@@ -166,12 +166,12 @@ export default class Filter extends Component<Props, State> { ...@@ -166,12 +166,12 @@ export default class Filter extends Component<Props, State> {
for (let i = 0; i < filterConfig.length; i++) { for (let i = 0; i < filterConfig.length; i++) {
// 筛选条件值为undefined或[]或[{text:'',value:''}]都算空,不能提交 // 筛选条件值为undefined或[]或[{text:'',value:''}]都算空,不能提交
if ( if (
!filterConfig[i].colName !filterConfig[i].colName ||
|| !filterConfig[i].operationCode !filterConfig[i].operationCode ||
|| !filterConfig[i].colValues !filterConfig[i].colValues ||
|| filterConfig[i].colValues.length === 0 filterConfig[i].colValues.length === 0 ||
|| (!filterConfig[i].colValues && filterConfig[i].colValues !== 0) (!filterConfig[i].colValues && filterConfig[i].colValues !== 0) ||
|| (!filterConfig[i].colValues[0].text && filterConfig[i].colValues[0].text !== 0) (!filterConfig[i].colValues[0].text && filterConfig[i].colValues[0].text !== 0)
) { ) {
message.error(locale.filterEmpty); message.error(locale.filterEmpty);
return; return;
...@@ -210,6 +210,9 @@ export default class Filter extends Component<Props, State> { ...@@ -210,6 +210,9 @@ export default class Filter extends Component<Props, State> {
if (filterItem) { if (filterItem) {
operateOptions = filterItem.operator; operateOptions = filterItem.operator;
type = String(filterItem.columnType); type = String(filterItem.columnType);
if (!config[type]) {
type = '1';
}
delete filterItem.columnAttrObj.maxLength; delete filterItem.columnAttrObj.maxLength;
const { columnAttrObj } = filterItem; const { columnAttrObj } = filterItem;
newProps = { newProps = {
......
...@@ -116,7 +116,15 @@ class FormWrap extends Component { ...@@ -116,7 +116,15 @@ class FormWrap extends Component {
validateTrigger, validateTrigger,
rules: [{ required: !!item.requiredFlag, message: '必填项不能为空' }, ...rules], rules: [{ required: !!item.requiredFlag, message: '必填项不能为空' }, ...rules],
initialValue: getFormat(detailConfig, item, value), initialValue: getFormat(detailConfig, item, value),
})(<EditComp {...transferColumn} columnConfig={item} disabled={disabled} origin="editForm" />)} })(
<EditComp
{...transferColumn}
columnConfig={item}
disabled={disabled}
origin="editForm"
form={this.props.form}
/>,
)}
</FormItem> </FormItem>
); );
}; };
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment