diff --git a/src/components/D3Visualization/GraphEventHandler.js b/src/components/D3Visualization/GraphEventHandler.js index 9cdf7f1..c00b3e2 100644 --- a/src/components/D3Visualization/GraphEventHandler.js +++ b/src/components/D3Visualization/GraphEventHandler.js @@ -108,7 +108,7 @@ export class GraphEventHandler { this.selectItem(relationship) this.onItemSelected({type: 'relationship', item: {id: relationship.id, type: relationship.type, properties: relationship.propertyList}}) // 存储关系数据到vuex中,其他模块可使用 - store.commit('kg/SET_KG', {type: 'relation', item: {id: relationship.id, labels: relationship.type, properties: relationship.propertyList}}) + store.commit('kg/SET_KG', {type: 'relation', item: {id: relationship.id, labels: [relationship.type], properties: relationship.propertyList}}) } else { this.deselectItem() } diff --git a/src/store/modules/kg.js b/src/store/modules/kg.js index 44e0d76..85b8290 100644 --- a/src/store/modules/kg.js +++ b/src/store/modules/kg.js @@ -12,12 +12,37 @@ const state = getDefaultState() const mutations = { RESET_KG: (state) => { - state = getDefaultState() + state.type = 'node' + state.data = {} + // state = getDefaultState() + // console.log('mutation', state) }, SET_KG: (state, obj) => { state.type = obj.type state.data = obj.item }, + SET_VALUE: (state, obj) => { + for(let i=0; i { + let properties = state.data.properties + let index = -1 + for(let i=0; i -
- -
+ + + + + + + + + + - - - - + \ No newline at end of file diff --git a/src/views/manage/event/basic/index.vue b/src/views/manage/event/basic/index.vue index f5c8dce..337d786 100644 --- a/src/views/manage/event/basic/index.vue +++ b/src/views/manage/event/basic/index.vue @@ -52,15 +52,79 @@
-
{{curType}}
+
+ {{ curType }}: {{ curTypeName }} +
+
+ ID {{ curId }} +
+ + + + + + + + + + + 删除整个{{ this.curType }}
+ + + + + + 取 消 + 确 定 + +