Commit 9bc02df0 by zhaochengxiang

基线变更

parent 958b9fae
......@@ -6,6 +6,7 @@ import { CompareDetail } from './VersionCompare'
import './VersionCompare.less'
import { formatDate } from '../../../../util'
import { Action, ModelerId, ModelerMergeId } from '../../../../util/constant'
const FC = (props) => {
const { item, visible, title = '基线模型变更提醒',readonly = false, onCancel } = props
......@@ -19,14 +20,13 @@ const FC = (props) => {
const save = () => {
setWaiting(true)
dispatch({
type: 'datamodel.syncBranch',
type: 'datamodel.getForkedModel',
payload: {
params: {
id: item?.id,
}
id: item?.id,
},
callback: data => {
close(true)
setWaiting(false)
window.open(`/data-govern/data-model-action?${Action}=edit&${ModelerId}=${item?.id}&${ModelerMergeId}=${data?.id}`);
},
error: () => {
setWaiting(false)
......
......@@ -19,35 +19,18 @@ const FC = (props) => {
const save = () => {
setWaiting(true)
if ((items??[]).length > 1) {
dispatch({
type: 'datamodel.joinBranch',
payload: {
ids: (items??[]).map(item => item.id).toString(),
},
callback: data => {
close(true)
},
error: () => {
setWaiting(false)
}
})
} else {
dispatch({
type: 'datamodel.getForkedModel',
payload: {
id: items[0].id
},
callback: data => {
setWaiting(false)
window.open(`/data-govern/data-model-action?${Action}=edit&${ModelerId}=${data?.id}&${ModelerMergeId}=${items[0].id}`);
},
error: () => {
setWaiting(false)
}
})
}
dispatch({
type: 'datamodel.joinBranch',
payload: {
ids: (items??[]).map(item => item.id).toString(),
},
callback: data => {
close(true)
},
error: () => {
setWaiting(false)
}
})
}
const footer = React.useMemo(() => {
......
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