|
|
@ -33,6 +33,7 @@ import { |
|
|
|
Location |
|
|
|
Location |
|
|
|
} from '../../components/dag/types' |
|
|
|
} from '../../components/dag/types' |
|
|
|
import Styles from './index.module.scss' |
|
|
|
import Styles from './index.module.scss' |
|
|
|
|
|
|
|
import { useGraphAutoLayout } from '../../components/dag/use-graph-auto-layout' |
|
|
|
|
|
|
|
|
|
|
|
interface SaveData { |
|
|
|
interface SaveData { |
|
|
|
saveForm: SaveForm |
|
|
|
saveForm: SaveForm |
|
|
@ -55,6 +56,7 @@ export default defineComponent({ |
|
|
|
const definition = ref<WorkflowDefinition>() |
|
|
|
const definition = ref<WorkflowDefinition>() |
|
|
|
const readonly = ref(false) |
|
|
|
const readonly = ref(false) |
|
|
|
const isLoading = ref(true) |
|
|
|
const isLoading = ref(true) |
|
|
|
|
|
|
|
const dagRef = ref() |
|
|
|
|
|
|
|
|
|
|
|
const refresh = () => { |
|
|
|
const refresh = () => { |
|
|
|
isLoading.value = true |
|
|
|
isLoading.value = true |
|
|
@ -62,6 +64,13 @@ export default defineComponent({ |
|
|
|
readonly.value = res.processDefinition.releaseState === 'ONLINE' |
|
|
|
readonly.value = res.processDefinition.releaseState === 'ONLINE' |
|
|
|
definition.value = res |
|
|
|
definition.value = res |
|
|
|
isLoading.value = false |
|
|
|
isLoading.value = false |
|
|
|
|
|
|
|
if (!res.processDefinition.locations) { |
|
|
|
|
|
|
|
setTimeout(() => { |
|
|
|
|
|
|
|
const graph = dagRef.value |
|
|
|
|
|
|
|
const { submit } = useGraphAutoLayout({ graph }) |
|
|
|
|
|
|
|
submit() |
|
|
|
|
|
|
|
}, 1000) |
|
|
|
|
|
|
|
} |
|
|
|
}) |
|
|
|
}) |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
@ -115,6 +124,7 @@ export default defineComponent({ |
|
|
|
> |
|
|
|
> |
|
|
|
{!isLoading.value && ( |
|
|
|
{!isLoading.value && ( |
|
|
|
<Dag |
|
|
|
<Dag |
|
|
|
|
|
|
|
ref={dagRef} |
|
|
|
definition={definition.value} |
|
|
|
definition={definition.value} |
|
|
|
onRefresh={refresh} |
|
|
|
onRefresh={refresh} |
|
|
|
projectCode={projectCode} |
|
|
|
projectCode={projectCode} |
|
|
|