clear
This commit is contained in:
parent
5460497359
commit
e84fce12a7
@ -2,41 +2,11 @@
|
|||||||
|
|
||||||
import { ref, onMounted } from 'vue'
|
import { ref, onMounted } from 'vue'
|
||||||
import HeaderBlock from './HeaderBlock.vue';
|
import HeaderBlock from './HeaderBlock.vue';
|
||||||
import { Data, Network } from 'vis-network'
|
import { Network } from 'vis-network'
|
||||||
import { getGraph } from './client';
|
import { getGraph } from './client';
|
||||||
|
|
||||||
const network = ref<HTMLElement>()
|
const network = ref<HTMLElement>()
|
||||||
|
|
||||||
interface GraphNode {
|
|
||||||
id: number
|
|
||||||
label: string
|
|
||||||
color?: string
|
|
||||||
}
|
|
||||||
|
|
||||||
interface GraphEdge {
|
|
||||||
from: number
|
|
||||||
to: number
|
|
||||||
arrows: string
|
|
||||||
}
|
|
||||||
|
|
||||||
const nodes = ref<GraphNode[]>([
|
|
||||||
{ id: 1, label: 'Начало' },
|
|
||||||
{ id: 2, label: 'Шаг 1' },
|
|
||||||
{ id: 3, label: 'Шаг 2' },
|
|
||||||
{ id: 4, label: 'Шаг 3' },
|
|
||||||
{ id: 5, label: 'Конец' },
|
|
||||||
{ id: 6, label: 'Параллельный процесс' },
|
|
||||||
])
|
|
||||||
|
|
||||||
const edges = ref<GraphEdge[]>([
|
|
||||||
{ from: 1, to: 2, arrows: 'to' },
|
|
||||||
{ from: 2, to: 3, arrows: 'to' },
|
|
||||||
{ from: 3, to: 4, arrows: 'to' },
|
|
||||||
{ from: 4, to: 5, arrows: 'to' },
|
|
||||||
{ from: 2, to: 6, arrows: 'to' },
|
|
||||||
{ from: 6, to: 4, arrows: 'to' },
|
|
||||||
])
|
|
||||||
|
|
||||||
onMounted(async () => {
|
onMounted(async () => {
|
||||||
if (!network.value) return
|
if (!network.value) return
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user