Commit 34441bae authored by zhangwenshuai's avatar zhangwenshuai

增加兼容

parent d276efd5
......@@ -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 {
......
......@@ -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 || {}),
......
......@@ -166,12 +166,12 @@ export default class Filter extends Component<Props, State> {
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<Props, State> {
if (filterItem) {
operateOptions = filterItem.operator;
type = String(filterItem.columnType);
if (!config[type]) {
type = '1';
}
delete filterItem.columnAttrObj.maxLength;
const { columnAttrObj } = filterItem;
newProps = {
......
......@@ -116,7 +116,15 @@ class FormWrap extends Component {
validateTrigger,
rules: [{ required: !!item.requiredFlag, message: '必填项不能为空' }, ...rules],
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>
);
};
......
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