Commit 057acd94 by zhaochengxiang

bug fix

parent ebc0a272
...@@ -263,7 +263,7 @@ const ImportAction = React.forwardRef((props, ref) => { ...@@ -263,7 +263,7 @@ const ImportAction = React.forwardRef((props, ref) => {
}, },
error: () => { error: () => {
form.setFieldsValue({ form?.setFieldsValue({
easyDataModelerModelingTemplate: modelerDataRef.current.easyDataModelerModelingTemplate, easyDataModelerModelingTemplate: modelerDataRef.current.easyDataModelerModelingTemplate,
tableType: modelerDataRef.current.tableType tableType: modelerDataRef.current.tableType
}); });
...@@ -339,7 +339,7 @@ const ImportAction = React.forwardRef((props, ref) => { ...@@ -339,7 +339,7 @@ const ImportAction = React.forwardRef((props, ref) => {
getSupportedIndextypes(); getSupportedIndextypes();
if (newModelerData) { if (newModelerData) {
form.setFieldsValue({ form?.setFieldsValue({
cnName: newModelerData.cnName||'', cnName: newModelerData.cnName||'',
name: newModelerData.name||'', name: newModelerData.name||'',
remark: newModelerData.remark||'', remark: newModelerData.remark||'',
...@@ -367,7 +367,7 @@ const ImportAction = React.forwardRef((props, ref) => { ...@@ -367,7 +367,7 @@ const ImportAction = React.forwardRef((props, ref) => {
const index = (constraints??[]).findIndex(item => item.id === value) const index = (constraints??[]).findIndex(item => item.id === value)
if (index !== -1) { if (index !== -1) {
currentConstraint = constraints[index] currentConstraint = constraints[index]
form.setFieldsValue({ form?.setFieldsValue({
easyDataModelerModelingConstraint: currentConstraint easyDataModelerModelingConstraint: currentConstraint
}); });
const newModelerData = {...modelerData, easyDataModelerModelingConstraint: currentConstraint }; const newModelerData = {...modelerData, easyDataModelerModelingConstraint: currentConstraint };
...@@ -513,13 +513,12 @@ const ImportAction = React.forwardRef((props, ref) => { ...@@ -513,13 +513,12 @@ const ImportAction = React.forwardRef((props, ref) => {
} }
const validateDataModel = (data) => { const validateDataModel = (data) => {
const row = form?.getFieldsValue();
const row = form.getFieldsValue();
dispatch({ dispatch({
type: 'datamodel.validateDataModel', type: 'datamodel.validateDataModel',
payload: { payload: {
data: (action==='detail'||action==='flow'||action==='detail-version')?data:{ ...data, ...{ name: row.name||'', cnName: row.cnName||'' } }, data: (action==='detail'||action==='flow'||action==='detail-version')?data:{ ...data, ...{ name: row?.name||'', cnName: row?.cnName||'' } },
}, },
callback: _data => { callback: _data => {
setValidateReports(_data||[]); setValidateReports(_data||[]);
......
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