diff --git a/web/public/武器装备-本体模型.xlsx b/web/public/武器装备-本体模型.xlsx
deleted file mode 100644
index b6e4ac5..0000000
Binary files a/web/public/武器装备-本体模型.xlsx and /dev/null differ
diff --git a/web/src/components/dialog/EdgeDetail.vue b/web/src/components/dialog/EdgeDetail.vue
index de1926c..eddd900 100644
--- a/web/src/components/dialog/EdgeDetail.vue
+++ b/web/src/components/dialog/EdgeDetail.vue
@@ -20,13 +20,13 @@
-
+
-
- 删 除
- 保 存
-
+
+
+
+
@@ -96,7 +96,9 @@ export default {
method: 'get',
data: {}
}).then(res => {
- vm.form[comment] = getFirstStringProperty(res.data.properties);
+
+ // vm.form[comment] = getFirstStringProperty(res.data.properties);
+ vm.form[comment] = vid;
});
},
queryEdgeDetail(edgeType, srcVid, dstVid) {
@@ -141,7 +143,8 @@ export default {
let _infoList = [];
Reflect.ownKeys(properties).forEach(key => {
_infoList.push({
- comment: map[key],
+ // comment: map[key],
+ comment: key,
field: key,
value: properties[key]
});
diff --git a/web/src/components/graph/GraphModel.vue b/web/src/components/graph/GraphModel.vue
index f16ec80..c8f2feb 100644
--- a/web/src/components/graph/GraphModel.vue
+++ b/web/src/components/graph/GraphModel.vue
@@ -258,7 +258,7 @@ var _ = require('lodash');
var nodeProps = {
id: 'vid',
label: 'properties.label',
- name: 'properties.tagName',
+ name: 'vid',
labelName: 'properties.label'
};
var edgeProps = {
@@ -873,6 +873,7 @@ function resolveGraphData(data) {
Reflect.ownKeys(nodeProps).forEach(key => {
node[key] = _.get(node, nodeProps[key], '');
});
+ console.log(node);
});
data.relations.forEach(edge => {
Reflect.ownKeys(edgeProps).forEach(key => {
diff --git a/web/src/components/graph/GraphSpace.vue b/web/src/components/graph/GraphSpace.vue
index fc71bd7..e147b0d 100644
--- a/web/src/components/graph/GraphSpace.vue
+++ b/web/src/components/graph/GraphSpace.vue
@@ -5,22 +5,22 @@
-
+
-
+
-
-
-
-
-
+
+
+
+
+
-
本体名称:{{ontologyName}}
+
本体名称:{{ ontologyName }}
@@ -36,7 +36,7 @@
-
+
@@ -55,7 +55,7 @@
-
+
@@ -79,6 +79,9 @@
+
+
+
@@ -92,7 +95,8 @@
-
+
@@ -111,8 +115,8 @@
-
-
+
+
@@ -212,7 +216,7 @@ export default {
'node-detail': nodeDetail,
'edge-detail': edgeDetail,
'graph-space-add': graphSpaceAdd,
- 'edge-add':edgeAdd
+ 'edge-add': edgeAdd
},
data() {
return {
@@ -233,15 +237,15 @@ export default {
},
tagMap: {},
edgeMap: {},
- ontologyName:"",
- showFlag:false,
- keyword:"",
- searchTag:"",
- ontologyId:"",
- comment:"",
- qo:{
- pageNo:"",
- name:""
+ ontologyName: "",
+ showFlag: false,
+ keyword: "",
+ searchTag: "",
+ ontologyId: "",
+ comment: "",
+ qo: {
+ pageNo: "",
+ name: ""
}
}
},
@@ -249,15 +253,15 @@ export default {
vm = this;
},
mounted() {
- vm.qo = {
- pageNo: this.$route.query.pageNo,
- name: this.$route.query.name
- };
- vm.ontologyId = this.$route.query.ontologyId;
- vm.space = this.$route.query.space;
- vm.comment = this.$route.query.comment;
- vm.handleSpaceChange();
- // vm.querySpaceList();
+ vm.qo = {
+ pageNo: this.$route.query.pageNo,
+ name: this.$route.query.name
+ };
+ vm.ontologyId = this.$route.query.ontologyId;
+ vm.space = this.$route.query.space;
+ vm.comment = this.$route.query.comment;
+ vm.handleSpaceChange();
+ // vm.querySpaceList();
// vm.initGraph();
},
methods: {
@@ -271,34 +275,34 @@ export default {
if (res.data.length > 0) {
vm.space = res.data[0].name;
vm.handleSpaceChange();
- }else{
- vm.space = "";
- vm.tagMap = {};
- vm.edgeMap = {};
- vm.tagList = [];
- vm.edgeList = [];
- vm.ontologyName = "";
- vm.destroyGraph();
+ } else {
+ vm.space = "";
+ vm.tagMap = {};
+ vm.edgeMap = {};
+ vm.tagList = [];
+ vm.edgeList = [];
+ vm.ontologyName = "";
+ vm.destroyGraph();
}
});
},
- queryOntologyDetail(){
- var id = vm.ontologyId;
- // vm.spaceList.forEach(item => {
- // if(item.name == vm.space){
- // id = item.OntologyId;
- // }
- // })
+ queryOntologyDetail() {
+ var id = vm.ontologyId;
+ // vm.spaceList.forEach(item => {
+ // if(item.name == vm.space){
+ // id = item.OntologyId;
+ // }
+ // })
- if(id){
- request({
- url: `/ontology/getone/`+id,
- method: 'post',
- data: {id:id}
- }).then(res => {
- vm.ontologyName = res.data.name;
- })
- }
+ if (id) {
+ request({
+ url: `/ontology/getone/` + id,
+ method: 'post',
+ data: {id: id}
+ }).then(res => {
+ vm.ontologyName = res.data.name;
+ })
+ }
},
handleSpaceChange() {
vm.initGraph();
@@ -342,10 +346,10 @@ export default {
method: 'get',
data: {}
}).then(res => {
- res.data.unshift({
- Name: `All`,
- comment: '实体数'
- });
+ // res.data.unshift({
+ // Name: `All`,
+ // comment: '实体数'
+ // });
res.data.forEach(row => {
row.count = vm.tagMap[row.Name] ? vm.tagMap[row.Name] : 0;
});
@@ -359,10 +363,10 @@ export default {
method: 'get',
data: {}
}).then(res => {
- res.data.unshift({
- Name: `All`,
- comment: '三元组数'
- });
+ // res.data.unshift({
+ // Name: `All`,
+ // comment: '三元组数'
+ // });
res.data.forEach(row => {
row.count = vm.edgeMap[row.Name] ? vm.edgeMap[row.Name] : 0;
});
@@ -405,6 +409,7 @@ export default {
queryDetail(type, obj) { // type : node/edge
vm.tabModifyCmdType = type + 'Detail';
vm.propsInfoVisible = true;
+ console.log(type);
vm.$nextTick(() => {
vm.$refs[type + 'Detail'].queryDetail(vm.space, obj);
});
@@ -478,8 +483,17 @@ export default {
});
if (node.properties) {
- node.label = node.name = getFirstStringProperty(node.properties);
+ // node.label = node.name = getFirstStringProperty(node.properties);
+ node.label = node.name = node.vid;
}
+
+ if(node.labels === 'tag_1412011336') {
+ node.style = {
+ fill: '#8fe8e8'
+ }
+ }
+
+
});
}
@@ -603,90 +617,90 @@ export default {
vm.$refs['nodeDetail'].createItem(vm.space);
});
},
- showAddEdgeDialog(){
- vm.tabModifyCmdType = 'edgeAdd';
- vm.propsInfoVisible = true;
- vm.$nextTick(() => {
- vm.$refs['edgeAdd'].createItem(vm.space);
- });
+ showAddEdgeDialog() {
+ vm.tabModifyCmdType = 'edgeAdd';
+ vm.propsInfoVisible = true;
+ vm.$nextTick(() => {
+ vm.$refs['edgeAdd'].createItem(vm.space);
+ });
},
//搜索
- searchBtn(){
- if(!vm.searchTag){
- vm.$message.warning("请选择概念");
- return false;
- }
- if(!vm.keyword){
- vm.$message.warning("请输入关键字");
- return false;
- }
- vm.graphLoading = true;
- request({
- url: `/nebula_operate/findnodebykeyword/${vm.space}/${vm.searchTag}`,
- method: 'post',
- data: {keyword:vm.keyword}
- }).then(res => {
- if (res.data) {
- res.data.forEach(node => {
- Reflect.ownKeys(nodeProps).forEach(key => {
- node[key] = _.get(node, nodeProps[key], '');
- });
+ searchBtn() {
+ if (!vm.searchTag) {
+ vm.$message.warning("请选择概念");
+ return false;
+ }
+ if (!vm.keyword) {
+ vm.$message.warning("请输入关键字");
+ return false;
+ }
+ vm.graphLoading = true;
+ request({
+ url: `/nebula_operate/findnodebykeyword/${vm.space}/${vm.searchTag}`,
+ method: 'post',
+ data: {keyword: vm.keyword}
+ }).then(res => {
+ if (res.data) {
+ res.data.forEach(node => {
+ Reflect.ownKeys(nodeProps).forEach(key => {
+ node[key] = _.get(node, nodeProps[key], '');
+ });
- if (node.properties) {
- node.label = node.name = getFirstStringProperty(node.properties);
- }
- });
+ if (node.properties) {
+ node.label = node.name = getFirstStringProperty(node.properties);
}
+ });
+ }
- graphData = {
- nodes: res.data ? res.data : [],
- edges: []
- };
- // 读取数据
- graph.data(graphData);
- // 渲染图
- graph.render();
- vm.graphLoading = false;
- });
+ graphData = {
+ nodes: res.data ? res.data : [],
+ edges: []
+ };
+ // 读取数据
+ graph.data(graphData);
+ // 渲染图
+ graph.render();
+ vm.graphLoading = false;
+ });
},
- findOnePathBySrcidAndDctid(srcId, dstId){
- request({
- url: `/nebula_operate/findonepathbysrcidanddctid/${vm.space}/${srcId}/${dstId}`,
- method: 'get',
- data: {}
- }).then(res => {
- vm.resolveGraphData(res);
- });
+ findOnePathBySrcidAndDctid(srcId, dstId) {
+ request({
+ url: `/nebula_operate/findonepathbysrcidanddctid/${vm.space}/${srcId}/${dstId}`,
+ method: 'get',
+ data: {}
+ }).then(res => {
+ vm.resolveGraphData(res);
+ });
},
- findNodeById(tag,vid){
- request({
- url: `/nebula_operate/findnodebyid/${vm.space}/${tag}/${vid}`,
- method: 'get',
- data: {}
- }).then(res => {
- if (res.data) {
- Reflect.ownKeys(nodeProps).forEach(key => {
- res.data[key] = _.get(res.data, nodeProps[key], '');
- });
+ findNodeById(tag, vid) {
+ request({
+ url: `/nebula_operate/findnodebyid/${vm.space}/${tag}/${vid}`,
+ method: 'get',
+ data: {}
+ }).then(res => {
+ if (res.data) {
+ Reflect.ownKeys(nodeProps).forEach(key => {
+ res.data[key] = _.get(res.data, nodeProps[key], '');
+ });
- if (res.data.properties) {
- res.data.label = res.data.name = getFirstStringProperty(res.data.properties);
- }
- }
+ if (res.data.properties) {
+ res.data.label = res.data.name = getFirstStringProperty(res.data.properties);
+ }
+ }
- graphData = {
- nodes: res.data ? [res.data] : [],
- edges: []
- };
- // 读取数据
- graph.data(graphData);
- // 渲染图
- graph.render();
- vm.graphLoading = false;
- });
+ graphData = {
+ nodes: res.data ? [res.data] : [],
+ edges: []
+ };
+ // 读取数据
+ graph.data(graphData);
+ // 渲染图
+ graph.render();
+ vm.graphLoading = false;
+ });
},
backGraph() { // 返回
- vm.$router.push({path: "/graphSpaceManage", query: {pageNo: vm.qo.pageNo, name: vm.qo.name}})
+ vm.$router.push({path: "/graphSpaceManage", query: {pageNo: vm.qo.pageNo, name: vm.qo.name}})
},
}
}
diff --git a/web/src/components/menus/EntrysManage.vue b/web/src/components/menus/EntrysManage.vue
index 57eba02..5d64e1a 100644
--- a/web/src/components/menus/EntrysManage.vue
+++ b/web/src/components/menus/EntrysManage.vue
@@ -7,10 +7,10 @@
-
+
-
+
搜 索
diff --git a/web/src/components/menus/FeedbackTypeManage.vue b/web/src/components/menus/FeedbackTypeManage.vue
index 837e2a5..4576082 100644
--- a/web/src/components/menus/FeedbackTypeManage.vue
+++ b/web/src/components/menus/FeedbackTypeManage.vue
@@ -7,7 +7,7 @@
-
+
搜 索
diff --git a/web/src/components/menus/UserManage.vue b/web/src/components/menus/UserManage.vue
index 9eac000..d9536fe 100644
--- a/web/src/components/menus/UserManage.vue
+++ b/web/src/components/menus/UserManage.vue
@@ -7,7 +7,7 @@
-
+
搜 索
@@ -29,8 +29,11 @@
...
-
+
+
+ 关联
+
相似
@@ -127,6 +130,14 @@ export default {
_this.qo.pageNo = val;
_this.queryData();
},
+ linkUser(item) {
+ _this.$router.push({
+ path: "linkUser", query: {
+ userId: item.fid,
+ qo: JSON.stringify(_this.qo)
+ }
+ });
+ },
similarUser(item) {
_this.$router.push({
path: "similarUser", query: {
diff --git a/web/src/components/menus/item/RecommendItem.vue b/web/src/components/menus/item/RecommendItem.vue
index f3907d7..36c1c54 100644
--- a/web/src/components/menus/item/RecommendItem.vue
+++ b/web/src/components/menus/item/RecommendItem.vue
@@ -105,11 +105,7 @@ export default {
});
},
backBtn() {
- this.$router.push({
- path: "userManage", query: {
- qo: _this.qo
- }
- });
+ _this.$router.back();
},
}
}
diff --git a/web/src/components/menus/user/LinkUser.vue b/web/src/components/menus/user/LinkUser.vue
new file mode 100644
index 0000000..74b37d4
--- /dev/null
+++ b/web/src/components/menus/user/LinkUser.vue
@@ -0,0 +1,122 @@
+
+
+
+
+
信息
+
+
+
+
+ {{ tag }}
+
+
+
+
+
+
+
Association Items
+
+
+
+
+
+
+
+ 洞悉
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/web/src/components/menus/user/SimilarUser.vue b/web/src/components/menus/user/SimilarUser.vue
index 4e08b00..aa925a1 100644
--- a/web/src/components/menus/user/SimilarUser.vue
+++ b/web/src/components/menus/user/SimilarUser.vue
@@ -37,6 +37,13 @@
{{scope.row.Score.toFixed(5)}}
+
+
+
+ 洞悉
+
+
+
@@ -91,6 +98,14 @@ export default {
_this.list = res.data;
});
},
+ recommendItem(item) {
+ _this.$router.push({
+ path: "recommendItem", query: {
+ userId: item.UserId,
+ qo: JSON.stringify(_this.qo)
+ }
+ });
+ },
backBtn() {
this.$router.push({
path: "userManage", query: {
diff --git a/web/src/css/back.css b/web/src/css/back.css
index f7c5729..24665f4 100644
--- a/web/src/css/back.css
+++ b/web/src/css/back.css
@@ -10,6 +10,7 @@ div.icon {
line-height: 50px;
margin-right: 80px;
margin-top: 9px;
+ padding: 0;
}
div.icon i {
diff --git a/web/src/router/index.js b/web/src/router/index.js
index 5f36f09..7dd16fe 100644
--- a/web/src/router/index.js
+++ b/web/src/router/index.js
@@ -67,6 +67,10 @@ export default new Router({
path: 'similarUser',
component: () => import('@/components/menus/user/SimilarUser')
},
+ {
+ path: 'linkUser',
+ component: () => import('@/components/menus/user/LinkUser')
+ },
{
path: 'recommendItem',
component: () => import('@/components/menus/item/RecommendItem')
diff --git a/web/src/utils/request.js b/web/src/utils/request.js
index 11238d6..dfc16de 100644
--- a/web/src/utils/request.js
+++ b/web/src/utils/request.js
@@ -5,7 +5,7 @@ import {getToken} from '@/utils/auth'
// var _baseURL = "http://localhost:4026";
var _baseURL = "http://139.9.106.207:4026";
-var _fileURL = "http://118.31.22.243:80/web/";
+var _fileURL = "http://139.9.106.207:4026/web/";
// create an axios instance
const service = axios.create({
baseURL: _baseURL, // url = base url + request url