Commit ce8a7960 by zhaochengxiang

bug fix

parent 171f2f2c
......@@ -589,7 +589,7 @@ const ImportAction = React.forwardRef((props, ref) => {
setActiveValue(val);
var targetElement = container?.querySelector(`.${val}`); // 找到目标元素
if (targetElement) {
importActionSubject.next({ type: 'expand', key: val })
importActionSubject.next({ type: 'expand', key: val, action })
setTimeout(() => {
animating.current = true;
targetElement.scrollIntoView();
......@@ -619,6 +619,7 @@ const ImportAction = React.forwardRef((props, ref) => {
onChange={onHeaderChange}
terms={terms}
supportedPartitionTypes={supportedPartitionTypes}
action={action}
/>
<ImportActionTable
modelerData={modelerData||{}}
......@@ -641,11 +642,13 @@ const ImportAction = React.forwardRef((props, ref) => {
onChange={onIndexChange}
editable={action!=='detail'&&action!=='flow'&&action!=='detail-version'&&action!=='edit-inherited'}
terms={terms}
action={action}
/>
<ImportActionManage
form={form}
modelerData={modelerData||{}}
editable={action!=='detail'&&action!=='flow'&&action!=='detail-version'&&action!=='edit-inherited'}
action={action}
/>
<ImportActionRelation
modelerData={modelerData} action={action}
......@@ -653,6 +656,7 @@ const ImportAction = React.forwardRef((props, ref) => {
{
modelerData?.id && <ImportActionComment
modelerData={modelerData}
action={action}
/>
}
</div>
......
......@@ -8,7 +8,7 @@ import './ImportActionComment.less'
import { importActionSubject } from "./ImportAction"
const FC = (props) => {
const { modelerData } = props
const { modelerData, action } = props
const [isCollapse, setCollapse] = React.useState(true)
const [uploading, setUploading] = React.useState(false)
const [fileList, setFileList] = React.useState()
......@@ -18,7 +18,7 @@ const FC = (props) => {
React.useEffect(() => {
const $importActionSubject = importActionSubject.subscribe((props) => {
if (props.type === 'expand' && props.key === 'model-import-action-comment') {
if (props.type === 'expand' && props.key === 'model-import-action-comment' && props.action === action) {
setCollapse(false)
}
})
......@@ -26,7 +26,7 @@ const FC = (props) => {
return () => {
$importActionSubject.unsubscribe()
}
}, [])
}, [action])
React.useEffect(() => {
if (modelerData?.id) {
......
......@@ -50,7 +50,7 @@ const dataTypeRemark = '描述ETL框架中目标表的数据类型';
const bindingLoadRemark = '描述ETL框架绑定加载列表,如chain、daily、current等';
const ImportActionHeader = (props) => {
const { editable, form, modelerData, constraints, templates, onConstraintChange, onTemplateChange, validateReports, onChange, terms, supportedPartitionTypes } = props;
const { editable, form, modelerData, constraints, templates, onConstraintChange, onTemplateChange, validateReports, onChange, terms, supportedPartitionTypes, action } = props;
const [ options, setOptions ] = useState([]);
......@@ -64,7 +64,7 @@ const ImportActionHeader = (props) => {
useEffect(() => {
const $importActionSubject = importActionSubject.subscribe((props) => {
if (props.type === 'expand' && props.key === 'model-import-action-technical') {
if (props.type === 'expand' && props.key === 'model-import-action-technical' && props.action === action) {
setCollapse(false)
}
})
......@@ -72,7 +72,7 @@ const ImportActionHeader = (props) => {
return () => {
$importActionSubject.unsubscribe()
}
}, [])
}, [action])
useEffect(() => {
getDataTypeList();
......
......@@ -340,7 +340,7 @@ const DragableBodyRow = ({ index, moveRow, className, style, ...restProps }) =>
};
const ImportActionIndex = (props) => {
const { modelerData, onChange, editable, constraint, template, validateReports, terms, types } = props;
const { modelerData, onChange, editable, constraint, template, validateReports, terms, types, action } = props;
const [ attributes, setAttributes ] = useState([]);
const [ data, setData ] = useState([]);
......@@ -369,7 +369,7 @@ const ImportActionIndex = (props) => {
useEffect(() => {
const $importActionSubject = importActionSubject.subscribe((props) => {
if (props.type === 'expand' && props.key === 'model-import-action-index') {
if (props.type === 'expand' && props.key === 'model-import-action-index' && props.action === action) {
setCollapse(false)
}
})
......@@ -377,7 +377,7 @@ const ImportActionIndex = (props) => {
return () => {
$importActionSubject.unsubscribe()
}
}, [])
}, [action])
useClickAway(() => {
save();
......
......@@ -9,13 +9,13 @@ import { importActionSubject } from './ImportAction';
export const ImportActionHeaderSubject = new Subject();
const FC = (props) => {
const { editable, form, modelerData } = props
const { editable, form, modelerData, action } = props
const [isCollapse, setCollapse] = React.useState(true)
const [maintenanceRecords, setMaintenanceRecords] = React.useState()
React.useEffect(() => {
const $importActionSubject = importActionSubject.subscribe((props) => {
if (props.type === 'expand' && props.key === 'model-import-action-manage') {
if (props.type === 'expand' && props.key === 'model-import-action-manage' && props.action === action) {
setCollapse(false)
}
})
......@@ -23,7 +23,7 @@ const FC = (props) => {
return () => {
$importActionSubject.unsubscribe()
}
}, [])
}, [action])
React.useEffect(() => {
if (modelerData?.id) {
......
......@@ -15,7 +15,7 @@ const FC = (props) => {
React.useEffect(() => {
const $importActionSubject = importActionSubject.subscribe((props) => {
if (props.type === 'expand' && props.key === 'model-import-action-relation') {
if (props.type === 'expand' && props.key === 'model-import-action-relation' && props.action === action) {
setCollapse(false)
}
})
......@@ -23,7 +23,7 @@ const FC = (props) => {
return () => {
$importActionSubject.unsubscribe()
}
}, [])
}, [action])
React.useEffect(() => {
if (modelerData?.inheritedFromEasyDataModelerDataModel) {
......
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