27 lines
568 B
TypeScript
27 lines
568 B
TypeScript
import { computed, reactive, ref } from 'vue';
|
|
|
|
/**图状态 */
|
|
export const graphState = reactive<Record<string, any>>({
|
|
/**当前图组名 */
|
|
group: '5GC System Architecture3',
|
|
/**图数据 */
|
|
data: {
|
|
combos: [],
|
|
edges: [],
|
|
nodes: [],
|
|
},
|
|
});
|
|
|
|
/**图点击选择 */
|
|
export const graphNodeClickID = ref<string>('UPF');
|
|
|
|
/**图节点网元信息状态 */
|
|
export const graphNodeState = computed(() =>
|
|
graphState.data.nodes.map((item: any) => ({
|
|
id: item.id,
|
|
label: item.label,
|
|
neInfo: item.neInfo,
|
|
neState: item.neState,
|
|
}))
|
|
);
|