Commit 2019b548 by zhaochengxiang

加工步骤

parent 163e170d
...@@ -3,4 +3,5 @@ import React from 'react'; ...@@ -3,4 +3,5 @@ import React from 'react';
export const EditModelContext = React.createContext({ export const EditModelContext = React.createContext({
attrIsEditingFunction: null, attrIsEditingFunction: null,
indexIsEditingFunction: null, indexIsEditingFunction: null,
processIsEditingFunction: null,
}); });
\ No newline at end of file
...@@ -13,6 +13,7 @@ import { Action } from '../../../../util/constant'; ...@@ -13,6 +13,7 @@ import { Action } from '../../../../util/constant';
import { dispatch } from '../../../../model'; import { dispatch } from '../../../../model';
import './ImportAction.less' import './ImportAction.less'
import ImportActionProcess from './ImportActionProcess';
const ImportAction = React.forwardRef((props, ref) => { const ImportAction = React.forwardRef((props, ref) => {
const { action, hints, onChange, form, modelerId, terms, ddl, roughModelerData, versionId, permitCheckOut, catalogId, logicId, metadataId } = props; const { action, hints, onChange, form, modelerId, terms, ddl, roughModelerData, versionId, permitCheckOut, catalogId, logicId, metadataId } = props;
...@@ -139,6 +140,7 @@ const ImportAction = React.forwardRef((props, ref) => { ...@@ -139,6 +140,7 @@ const ImportAction = React.forwardRef((props, ref) => {
'model-import-action-technical', 'model-import-action-technical',
'model-import-action-table', 'model-import-action-table',
'model-import-action-index', 'model-import-action-index',
'model-import-action-process',
'model-import-action-manage', 'model-import-action-manage',
// 'model-import-action-relation', // 'model-import-action-relation',
'model-import-action-comment', 'model-import-action-comment',
...@@ -539,6 +541,19 @@ const ImportAction = React.forwardRef((props, ref) => { ...@@ -539,6 +541,19 @@ const ImportAction = React.forwardRef((props, ref) => {
} }
} }
const onProcessChange = (data, validate=false) => {
const newModelerData = {...modelerDataRef.current, processingList: data};
setModelerData(newModelerData);
modelerDataRef.current = newModelerData;
onChange && onChange(newModelerData);
if (validate) {
validateDataModel(newModelerData);
}
}
const getConsistentKeys = (newModelerData) => { const getConsistentKeys = (newModelerData) => {
//分布键 //分布键
...@@ -624,6 +639,7 @@ const ImportAction = React.forwardRef((props, ref) => { ...@@ -624,6 +639,7 @@ const ImportAction = React.forwardRef((props, ref) => {
<Tabs.TabPane tab='技术信息' key="model-import-action-technical" /> <Tabs.TabPane tab='技术信息' key="model-import-action-technical" />
<Tabs.TabPane tab='数据表结构' key="model-import-action-table" /> <Tabs.TabPane tab='数据表结构' key="model-import-action-table" />
<Tabs.TabPane tab='数据表索引' key="model-import-action-index" /> <Tabs.TabPane tab='数据表索引' key="model-import-action-index" />
<Tabs.TabPane tab='加工步骤' key="model-import-action-process" />
<Tabs.TabPane tab='管理信息' key="model-import-action-manage" /> <Tabs.TabPane tab='管理信息' key="model-import-action-manage" />
{/* <Tabs.TabPane tab='关联对象' key="model-import-action-relation" /> */} {/* <Tabs.TabPane tab='关联对象' key="model-import-action-relation" /> */}
{ {
...@@ -666,6 +682,14 @@ const ImportAction = React.forwardRef((props, ref) => { ...@@ -666,6 +682,14 @@ const ImportAction = React.forwardRef((props, ref) => {
editable={action!=='detail'&&action!=='flow'&&action!=='detail-version'&&action!=='edit-inherited'} editable={action!=='detail'&&action!=='flow'&&action!=='detail-version'&&action!=='edit-inherited'}
terms={terms} terms={terms}
/> />
<ImportActionProcess
modelerData={modelerData||{}}
constraint={constraint}
template={template}
onChange={onProcessChange}
editable={action!=='detail'&&action!=='flow'&&action!=='detail-version'&&action!=='edit-inherited'}
terms={terms}
/>
<ImportActionManage <ImportActionManage
form={form} form={form}
modelerData={modelerData||{}} modelerData={modelerData||{}}
......
...@@ -196,7 +196,7 @@ const AttributesInput = ({ value = {}, attributes, onChange }) => { ...@@ -196,7 +196,7 @@ const AttributesInput = ({ value = {}, attributes, onChange }) => {
) )
} }
const EditableCell = ({ export const EditableCell = ({
editing, editing,
dataIndex, dataIndex,
colTitle, colTitle,
...@@ -285,7 +285,7 @@ const EditableCell = ({ ...@@ -285,7 +285,7 @@ const EditableCell = ({
); );
}; };
const DragableBodyRow = ({ index, moveRow, className, style, ...restProps }) => { export const DragableBodyRow = ({ index, moveRow, className, style, ...restProps }) => {
const ref = useRef(); const ref = useRef();
const [{ isOver, dropClassName }, drop] = useDrop( const [{ isOver, dropClassName }, drop] = useDrop(
......
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