Commit c21fb45f by zhaochengxiang

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

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