Commit c21fb45f by zhaochengxiang

修改流程编辑之后再编辑报错的问题

parent ba9752bf
......@@ -186,8 +186,8 @@ const EditModel = (props) => {
setModelerData(data);
const _action = getQueryParam(Action, props.location.search);
if (_action === 'flow') {
setActionData({ ...actionData, ...{modelerId: data?.id, editable: data?.editable||false, stateId: data?.state?.id||''} });
if (_action === 'flow' || (permitCheckOut&&data?.permitCheckOut===false)) {
setActionData({ ...actionData, ...{modelerId: data?.id, editable: data?.editable||false, stateId: data?.state?.id||'', permitCheckOut: data?.permitCheckOut||false} });
}
}
......
......@@ -34,6 +34,11 @@ const ImportAction = (props) => {
return;
}
//流程打开模型详情的情况下,id由-1变成-2,会再次触发获取模型详情.这里直接return掉
if (!mountRef.current && action === 'flow') {
return;
}
mountRef.current = false;
//初始化form状态
......
......@@ -515,10 +515,9 @@ const ImportActionHeader = (props) => {
<div
style={{
display: 'flex',
justifyContent: 'space-between',
}}
>
<h2>基本信息</h2>
<h2 className='mr-3'>基本信息</h2>
{
onlyShowRequireChange ? <Button type='text' style={{ padding: 0, color: '#0069AC' }} onClick={onOnlyShowRequireChange}>展开<DownOutlined /></Button> : <Button type='text' style={{ padding: 0, color: '#0069AC' }} onClick={onOnlyShowRequireChange}>收起<UpOutlined /></Button>
}
......@@ -531,7 +530,7 @@ const ImportActionHeader = (props) => {
onValuesChange={onValuesChange}
>
<Row gutter={10}>
<Col md={24} lg={12} xl={8}>
<Col xs={24} sm={24} lg={12} xl={8}>
<Form.Item
label="中文名称"
name="cnName"
......@@ -541,7 +540,7 @@ const ImportActionHeader = (props) => {
<InputDebounce />
</Form.Item>
</Col>
<Col md={24} lg={12} xl={8}>
<Col xs={24} sm={24} lg={12} xl={8}>
<Form.Item
label="英文名称"
name="name"
......@@ -551,7 +550,7 @@ const ImportActionHeader = (props) => {
<AutoComplete options={options} onSearch={onSearch} />
</Form.Item>
</Col>
<Col md={24} lg={12} xl={8}>
<Col xs={24} sm={24} lg={12} xl={8}>
<Form.Item
label="规范"
name="easyDataModelerModelingConstraint"
......@@ -564,7 +563,7 @@ const ImportActionHeader = (props) => {
/>
</Form.Item>
</Col>
<Col md={24} lg={12} xl={8}>
<Col xs={24} sm={24} lg={12} xl={8}>
<Form.Item
label="数据内容"
name="remark"
......@@ -574,7 +573,7 @@ const ImportActionHeader = (props) => {
<TextArea row={4} />
</Form.Item>
</Col>
<Col md={24} lg={12} xl={8}>
<Col xs={24} sm={24} lg={12} xl={8}>
<Form.Item
label="生成表类型"
name="easyDataModelerModelingTemplate"
......@@ -588,7 +587,7 @@ const ImportActionHeader = (props) => {
/>
</Form.Item>
</Col>
<Col md={24} lg={12} xl={8}>
<Col xs={24} sm={24} lg={12} xl={8}>
<Form.Item
label="数据表类型"
name="tableType"
......@@ -598,7 +597,7 @@ const ImportActionHeader = (props) => {
<Input />
</Form.Item>
</Col>
<Col md={24} lg={12} xl={8}>
<Col xs={24} sm={24} lg={12} xl={8}>
<Form.Item
label="数据平台"
name="dataResidence"
......@@ -608,7 +607,7 @@ const ImportActionHeader = (props) => {
<Input disabled={true} />
</Form.Item>
</Col>
<Col md={24} lg={12} xl={8}>
<Col xs={24} sm={24} lg={12} xl={8}>
<Form.Item
label="数据情况"
name="dataCircumstances"
......@@ -618,7 +617,7 @@ const ImportActionHeader = (props) => {
<Input />
</Form.Item>
</Col>
<Col md={24} lg={12} xl={8}>
<Col xs={24} sm={24} lg={12} xl={8}>
<Form.Item
label="分布键"
name="easyDataModelerDistributionKey"
......@@ -628,7 +627,7 @@ const ImportActionHeader = (props) => {
<AttributesSelect modelerData={modelerData} />
</Form.Item>
</Col>
<Col md={24} lg={12} xl={8}>
<Col xs={24} sm={24} lg={12} xl={8}>
<Form.Item
label="分区键"
name="partition"
......@@ -638,7 +637,7 @@ const ImportActionHeader = (props) => {
<PartitionSelect modelerData={modelerData} partitionTypes={supportedPartitionTypes} />
</Form.Item>
</Col>
<Col md={24} lg={12} xl={8}>
<Col xs={24} sm={24} lg={12} xl={8}>
<Form.Item
label="主键"
name="easyDataModelerPrimaryKey"
......@@ -648,7 +647,7 @@ const ImportActionHeader = (props) => {
<AttributesSelect modelerData={modelerData} />
</Form.Item>
</Col>
<Col md={24} lg={12} xl={8}>
<Col xs={24} sm={24} lg={12} xl={8}>
<Form.Item
label="类主键"
name="easyDataModelerSemiPrimaryKey"
......@@ -658,7 +657,7 @@ const ImportActionHeader = (props) => {
<AttributesSelect modelerData={modelerData} mode='tags' />
</Form.Item>
</Col>
<Col md={24} lg={12} xl={8}>
<Col xs={24} sm={24} lg={12} xl={8}>
<Form.Item
label="加载方式"
name="dataLoadingStrategy"
......@@ -668,7 +667,7 @@ const ImportActionHeader = (props) => {
<LoadSelect />
</Form.Item>
</Col>
<Col md={24} lg={12} xl={8}>
<Col xs={24} sm={24} lg={12} xl={8}>
<Form.Item
label="更新时间"
name="dataUpdatingTiming"
......@@ -678,7 +677,7 @@ const ImportActionHeader = (props) => {
<UpdateSelect />
</Form.Item>
</Col>
<Col md={24} lg={12} xl={8}>
<Col xs={24} sm={24} lg={12} xl={8}>
<Form.Item
label="维护历史"
name="maintenanceRecords"
......
......@@ -863,7 +863,7 @@ const ImportActionTable = (props) => {
{
value => <React.Fragment>
{
!editable && <React.Fragment>
(action==='flow') && <React.Fragment>
{
record?.isPossibleNewRecommendedDefinition?.possible && <Typography.Link className='mr-3' onClick={(event) => {
event.stopPropagation();
......@@ -1028,6 +1028,11 @@ const ImportActionTable = (props) => {
//非编辑状态下 隐藏重点关注
let _columns = hasValidateReports ? includeValidateColumn: columns;
if (action === 'flow') {
_columns = hasValidateReports ? includeValidateEditableColumn: editableColumn;
}
_columns = _columns.filter((col) => col.dataIndex!=='needAttention');
return _columns;
......
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