|
@@ -30,7 +30,7 @@
|
|
<div class="radiokboxs">
|
|
<div class="radiokboxs">
|
|
<el-radio-group v-model="radioNods">
|
|
<el-radio-group v-model="radioNods">
|
|
<el-radio
|
|
<el-radio
|
|
-
|
|
|
|
|
|
+
|
|
:label="item.id"
|
|
:label="item.id"
|
|
v-for="(item, index) in nodesAll"
|
|
v-for="(item, index) in nodesAll"
|
|
:key="index"
|
|
:key="index"
|
|
@@ -138,7 +138,7 @@
|
|
v-model="num"
|
|
v-model="num"
|
|
:precision="2"
|
|
:precision="2"
|
|
:step="0.1"
|
|
:step="0.1"
|
|
-
|
|
|
|
|
|
+
|
|
></el-input-number>
|
|
></el-input-number>
|
|
<el-select
|
|
<el-select
|
|
filterable
|
|
filterable
|
|
@@ -450,7 +450,7 @@ export default {
|
|
watch: {
|
|
watch: {
|
|
dialogVisibleDowDoubli:{
|
|
dialogVisibleDowDoubli:{
|
|
handler(newValue, oldValue) {
|
|
handler(newValue, oldValue) {
|
|
-
|
|
|
|
|
|
+
|
|
if (!newValue) {
|
|
if (!newValue) {
|
|
setTimeout(() => {
|
|
setTimeout(() => {
|
|
this.addNodesBool = false
|
|
this.addNodesBool = false
|
|
@@ -474,7 +474,7 @@ export default {
|
|
: "";
|
|
: "";
|
|
if (!!url) {
|
|
if (!!url) {
|
|
this.postRequest(url, "get").then((res) => {
|
|
this.postRequest(url, "get").then((res) => {
|
|
-
|
|
|
|
|
|
+
|
|
if (res.data.code == 0) {
|
|
if (res.data.code == 0) {
|
|
this.data.nodes = res.data.data.nodes;
|
|
this.data.nodes = res.data.data.nodes;
|
|
this.data.links = res.data.data.links;
|
|
this.data.links = res.data.data.links;
|
|
@@ -523,7 +523,7 @@ export default {
|
|
},
|
|
},
|
|
old: {
|
|
old: {
|
|
handler(newValue, oldValue) {
|
|
handler(newValue, oldValue) {
|
|
-
|
|
|
|
|
|
+
|
|
this.oldname = newValue;
|
|
this.oldname = newValue;
|
|
},
|
|
},
|
|
deep: true, //确认是否深入监听。(一般监听时是不能监听到对象属性值的变化的,数组的值变化可以听到。)
|
|
deep: true, //确认是否深入监听。(一般监听时是不能监听到对象属性值的变化的,数组的值变化可以听到。)
|
|
@@ -656,10 +656,12 @@ export default {
|
|
this.checkLists.value === undefined
|
|
this.checkLists.value === undefined
|
|
? this.num
|
|
? this.num
|
|
: this.num + this.checkLists.value,
|
|
: this.num + this.checkLists.value,
|
|
|
|
+ value: this.num,
|
|
|
|
+ unit: this.checkLists.value,
|
|
label: "数值",
|
|
label: "数值",
|
|
entityName: this.checkListsChange.entityName,
|
|
entityName: this.checkListsChange.entityName,
|
|
};
|
|
};
|
|
-
|
|
|
|
|
|
+debugger
|
|
if (this.discern === "本体图谱") {
|
|
if (this.discern === "本体图谱") {
|
|
numPost.noumenonId = this.formLabelAligIdBACK;
|
|
numPost.noumenonId = this.formLabelAligIdBACK;
|
|
} else {
|
|
} else {
|
|
@@ -680,7 +682,7 @@ export default {
|
|
message: "选择成功",
|
|
message: "选择成功",
|
|
type: "success",
|
|
type: "success",
|
|
});
|
|
});
|
|
-
|
|
|
|
|
|
+
|
|
let nodesConts = JSON.parse(JSON.stringify(numPost));
|
|
let nodesConts = JSON.parse(JSON.stringify(numPost));
|
|
nodesConts.id = res.data.data;
|
|
nodesConts.id = res.data.data;
|
|
nodesConts.types = "Number";
|
|
nodesConts.types = "Number";
|
|
@@ -688,18 +690,18 @@ export default {
|
|
if (this.discern == "实体管理" ||this.discern == "新建实体" ) {
|
|
if (this.discern == "实体管理" ||this.discern == "新建实体" ) {
|
|
let url = `entity/info/${this.formLabelAligIdBACK}`;
|
|
let url = `entity/info/${this.formLabelAligIdBACK}`;
|
|
this.postRequest(url, "get").then((res) => {
|
|
this.postRequest(url, "get").then((res) => {
|
|
-
|
|
|
|
|
|
+
|
|
if (res.data.code == 0) {
|
|
if (res.data.code == 0) {
|
|
this.data.nodes = res.data.data.nodes;
|
|
this.data.nodes = res.data.data.nodes;
|
|
this.data.links = res.data.data.links;
|
|
this.data.links = res.data.data.links;
|
|
-
|
|
|
|
|
|
+
|
|
}
|
|
}
|
|
});
|
|
});
|
|
}else{
|
|
}else{
|
|
console.log(nodesConts);
|
|
console.log(nodesConts);
|
|
this.data.nodes.push(nodesConts);
|
|
this.data.nodes.push(nodesConts);
|
|
}
|
|
}
|
|
-
|
|
|
|
|
|
+
|
|
this.dialogVisibleDowDoubli = false;
|
|
this.dialogVisibleDowDoubli = false;
|
|
this.radioCreat = "";
|
|
this.radioCreat = "";
|
|
this.checkListsChange = {};
|
|
this.checkListsChange = {};
|
|
@@ -748,7 +750,7 @@ export default {
|
|
this.checkListsChange.entityName == this.checkListsChange.name &&
|
|
this.checkListsChange.entityName == this.checkListsChange.name &&
|
|
(this.radioCreat == "4" || this.radioCreat == "7")
|
|
(this.radioCreat == "4" || this.radioCreat == "7")
|
|
) {
|
|
) {
|
|
-
|
|
|
|
|
|
+
|
|
this.$message.error("不能添加自己");
|
|
this.$message.error("不能添加自己");
|
|
this.addNodesBool = false
|
|
this.addNodesBool = false
|
|
console.log(this.addNodesBool);
|
|
console.log(this.addNodesBool);
|
|
@@ -759,10 +761,10 @@ export default {
|
|
? "/noumenon/addNode"
|
|
? "/noumenon/addNode"
|
|
: "/entity/addNode";
|
|
: "/entity/addNode";
|
|
this.postRequest(url, this.checkListsChange, "post").then((res) => {
|
|
this.postRequest(url, this.checkListsChange, "post").then((res) => {
|
|
-
|
|
|
|
|
|
+
|
|
if (res.data.code == 0) {
|
|
if (res.data.code == 0) {
|
|
if (this.discern != "本体图谱") {
|
|
if (this.discern != "本体图谱") {
|
|
-
|
|
|
|
|
|
+
|
|
this.checkListsChange.name = res.data.data.node.name;
|
|
this.checkListsChange.name = res.data.data.node.name;
|
|
this.checkListsChange.id = res.data.data.node.id;
|
|
this.checkListsChange.id = res.data.data.node.id;
|
|
|
|
|
|
@@ -770,11 +772,11 @@ export default {
|
|
message: "选择成功",
|
|
message: "选择成功",
|
|
type: "success",
|
|
type: "success",
|
|
});
|
|
});
|
|
-
|
|
|
|
-
|
|
|
|
|
|
+
|
|
|
|
+
|
|
// let url = `entity/info/${this.formLabelAligIdBACK}`;
|
|
// let url = `entity/info/${this.formLabelAligIdBACK}`;
|
|
// this.postRequest(url, "get").then((res) => {
|
|
// this.postRequest(url, "get").then((res) => {
|
|
-
|
|
|
|
|
|
+
|
|
// if (res.data.code == 0) {
|
|
// if (res.data.code == 0) {
|
|
this.data.nodes=this.data.nodes.concat(res.data.data.nodes);
|
|
this.data.nodes=this.data.nodes.concat(res.data.data.nodes);
|
|
if (res.data.data.links.length>0) {
|
|
if (res.data.data.links.length>0) {
|
|
@@ -783,13 +785,13 @@ export default {
|
|
}
|
|
}
|
|
// }
|
|
// }
|
|
// });
|
|
// });
|
|
-
|
|
|
|
|
|
+
|
|
// let nodesConts = JSON.parse(
|
|
// let nodesConts = JSON.parse(
|
|
// JSON.stringify(this.checkListsChange)
|
|
// JSON.stringify(this.checkListsChange)
|
|
// );
|
|
// );
|
|
// this.data.nodes.push(nodesConts);
|
|
// this.data.nodes.push(nodesConts);
|
|
} else if (this.discern == "本体图谱") {
|
|
} else if (this.discern == "本体图谱") {
|
|
-
|
|
|
|
|
|
+
|
|
this.data.nodes=this.data.nodes.concat(res.data.data.nodes);
|
|
this.data.nodes=this.data.nodes.concat(res.data.data.nodes);
|
|
if (res.data.data.links.length>0) {
|
|
if (res.data.data.links.length>0) {
|
|
this.data.links=this.data.links.concat(res.data.data.links)
|
|
this.data.links=this.data.links.concat(res.data.data.links)
|
|
@@ -819,7 +821,7 @@ export default {
|
|
type: 'warning'
|
|
type: 'warning'
|
|
});
|
|
});
|
|
}
|
|
}
|
|
-
|
|
|
|
|
|
+
|
|
},
|
|
},
|
|
agreeChange(val) {
|
|
agreeChange(val) {
|
|
this.selectaNumericBool = false;
|
|
this.selectaNumericBool = false;
|
|
@@ -923,7 +925,7 @@ export default {
|
|
}
|
|
}
|
|
let status=false
|
|
let status=false
|
|
!!this.data.links&&this.data.links.length&&this.data.links.forEach(rs=>{
|
|
!!this.data.links&&this.data.links.length&&this.data.links.forEach(rs=>{
|
|
-
|
|
|
|
|
|
+
|
|
if (rs.source.id==this.startNodes&&rs.target.id==this.radioNods&&rs.value==this.weisModel) {
|
|
if (rs.source.id==this.startNodes&&rs.target.id==this.radioNods&&rs.value==this.weisModel) {
|
|
this.$message.error('已经存在该节点')
|
|
this.$message.error('已经存在该节点')
|
|
status=true
|
|
status=true
|
|
@@ -1058,7 +1060,7 @@ export default {
|
|
this.data.links = res.data.data.links;
|
|
this.data.links = res.data.data.links;
|
|
|
|
|
|
|
|
|
|
-
|
|
|
|
|
|
+
|
|
|
|
|
|
}
|
|
}
|
|
});
|
|
});
|
|
@@ -1070,8 +1072,8 @@ export default {
|
|
});
|
|
});
|
|
|
|
|
|
|
|
|
|
-
|
|
|
|
-
|
|
|
|
|
|
+
|
|
|
|
+
|
|
// } else {
|
|
// } else {
|
|
// this.$message.error(res.data.message);
|
|
// this.$message.error(res.data.message);
|
|
// }
|
|
// }
|
|
@@ -1291,7 +1293,7 @@ export default {
|
|
|
|
|
|
// 节点集
|
|
// 节点集
|
|
this.nodeds = this.data.nodes;
|
|
this.nodeds = this.data.nodes;
|
|
-
|
|
|
|
|
|
+
|
|
|
|
|
|
// 设置一个颜色比例尺
|
|
// 设置一个颜色比例尺
|
|
// 边集
|
|
// 边集
|
|
@@ -1662,7 +1664,7 @@ export default {
|
|
formateArr(val){
|
|
formateArr(val){
|
|
let result=val.map(its=>its[its.length-1])
|
|
let result=val.map(its=>its[its.length-1])
|
|
return result
|
|
return result
|
|
- },
|
|
|
|
|
|
+ },
|
|
updateStatus(){
|
|
updateStatus(){
|
|
this.updateObj={
|
|
this.updateObj={
|
|
... this.updateObj,
|
|
... this.updateObj,
|
|
@@ -1680,7 +1682,7 @@ export default {
|
|
}else{
|
|
}else{
|
|
obj[res.key]=res.value2
|
|
obj[res.key]=res.value2
|
|
}
|
|
}
|
|
-
|
|
|
|
|
|
+
|
|
}
|
|
}
|
|
})
|
|
})
|
|
this.postRequest('/noumenon/node', {id:this.updateObj.id,...obj }, "put").then((res) => {
|
|
this.postRequest('/noumenon/node', {id:this.updateObj.id,...obj }, "put").then((res) => {
|
|
@@ -2527,7 +2529,7 @@ export default {
|
|
this.endY < i.y + 40 &&
|
|
this.endY < i.y + 40 &&
|
|
this.sufu3
|
|
this.sufu3
|
|
) {
|
|
) {
|
|
-
|
|
|
|
|
|
+
|
|
this.innerVisible = true;
|
|
this.innerVisible = true;
|
|
// if (!isNaN(this.assoc)) {
|
|
// if (!isNaN(this.assoc)) {
|
|
// this.weiArr = [{ name: "设置" }];
|
|
// this.weiArr = [{ name: "设置" }];
|
|
@@ -2583,7 +2585,7 @@ export default {
|
|
this.nodeds2 = res.data.data.nodes;
|
|
this.nodeds2 = res.data.data.nodes;
|
|
this.edgeds2 = res.data.data.links;
|
|
this.edgeds2 = res.data.data.links;
|
|
//
|
|
//
|
|
-
|
|
|
|
|
|
+
|
|
this.drawThumb1(d);
|
|
this.drawThumb1(d);
|
|
$(`#thumbSvg1`)
|
|
$(`#thumbSvg1`)
|
|
.detach()
|
|
.detach()
|
|
@@ -2635,7 +2637,7 @@ export default {
|
|
this.checkList = [];
|
|
this.checkList = [];
|
|
this.value = "";
|
|
this.value = "";
|
|
this.radioNods = "";
|
|
this.radioNods = "";
|
|
-
|
|
|
|
|
|
+
|
|
this.values = "";
|
|
this.values = "";
|
|
this.radioCreat = '';
|
|
this.radioCreat = '';
|
|
this.radio = "";
|
|
this.radio = "";
|
|
@@ -2951,14 +2953,14 @@ export default {
|
|
} else {
|
|
} else {
|
|
delname = this.oldname;
|
|
delname = this.oldname;
|
|
}
|
|
}
|
|
- //
|
|
|
|
|
|
+ //
|
|
let id=''
|
|
let id=''
|
|
if (typeof d.id === "object" && d.id !== null) {
|
|
if (typeof d.id === "object" && d.id !== null) {
|
|
id= d.id.node.id;
|
|
id= d.id.node.id;
|
|
}else{
|
|
}else{
|
|
id = d.id;
|
|
id = d.id;
|
|
}
|
|
}
|
|
-
|
|
|
|
|
|
+
|
|
let url =
|
|
let url =
|
|
this.discern === "本体图谱" ? "/noumenon/delNode" : "/entity/delNode";
|
|
this.discern === "本体图谱" ? "/noumenon/delNode" : "/entity/delNode";
|
|
this.postRequest(url, { id, name:delname }, "put").then(
|
|
this.postRequest(url, { id, name:delname }, "put").then(
|
|
@@ -2999,7 +3001,7 @@ export default {
|
|
},
|
|
},
|
|
|
|
|
|
handleClearLabel(d) {
|
|
handleClearLabel(d) {
|
|
-
|
|
|
|
|
|
+
|
|
if(d.label == '本体'){
|
|
if(d.label == '本体'){
|
|
this.backName.push(d.id);
|
|
this.backName.push(d.id);
|
|
}else if(d.label == '实体'){
|
|
}else if(d.label == '实体'){
|
|
@@ -3182,7 +3184,7 @@ export default {
|
|
this.exitHighlightMenu(d);
|
|
this.exitHighlightMenu(d);
|
|
})
|
|
})
|
|
.on("click", (d, i, nodes) => {
|
|
.on("click", (d, i, nodes) => {
|
|
-
|
|
|
|
|
|
+
|
|
this.onMenuClick(d, pie_g, node, node_dx, node_dy, node_dradius);
|
|
this.onMenuClick(d, pie_g, node, node_dx, node_dy, node_dradius);
|
|
});
|
|
});
|
|
/* .on('mousedown', (d, i, nodes) => {
|
|
/* .on('mousedown', (d, i, nodes) => {
|
|
@@ -3783,7 +3785,7 @@ export default {
|
|
status:true,
|
|
status:true,
|
|
...d
|
|
...d
|
|
}
|
|
}
|
|
-
|
|
|
|
|
|
+
|
|
this.postRequest(`/noumenon/detail/${d.id}`, "get").then(async (res) => {
|
|
this.postRequest(`/noumenon/detail/${d.id}`, "get").then(async (res) => {
|
|
if (res.data.code == 0) {
|
|
if (res.data.code == 0) {
|
|
this.detailed = [{ name: "名称", value: res.data.data.n.name,
|
|
this.detailed = [{ name: "名称", value: res.data.data.n.name,
|
|
@@ -3859,9 +3861,9 @@ export default {
|
|
res.data.data.n.typeIds,
|
|
res.data.data.n.typeIds,
|
|
this.temp_treeData
|
|
this.temp_treeData
|
|
)
|
|
)
|
|
-
|
|
|
|
|
|
+
|
|
this.detailed.push(
|
|
this.detailed.push(
|
|
-
|
|
|
|
|
|
+
|
|
{
|
|
{
|
|
name: "本体",
|
|
name: "本体",
|
|
key:'ontologySts',
|
|
key:'ontologySts',
|
|
@@ -3906,7 +3908,7 @@ export default {
|
|
this.temp_treeData
|
|
this.temp_treeData
|
|
);
|
|
);
|
|
this.detailed.push(
|
|
this.detailed.push(
|
|
-
|
|
|
|
|
|
+
|
|
{
|
|
{
|
|
name: "本体",
|
|
name: "本体",
|
|
value2:res.data.data.n.ontologySts,
|
|
value2:res.data.data.n.ontologySts,
|
|
@@ -4010,7 +4012,7 @@ export default {
|
|
this.temp_treeData
|
|
this.temp_treeData
|
|
);
|
|
);
|
|
this.detailed.push(
|
|
this.detailed.push(
|
|
-
|
|
|
|
|
|
+
|
|
{
|
|
{
|
|
name: "实体详情",
|
|
name: "实体详情",
|
|
value2:res.data.data.n.introduction,
|
|
value2:res.data.data.n.introduction,
|
|
@@ -4040,9 +4042,9 @@ export default {
|
|
res.data.data.n.typeIds,
|
|
res.data.data.n.typeIds,
|
|
this.temp_treeData
|
|
this.temp_treeData
|
|
);
|
|
);
|
|
-
|
|
|
|
|
|
+
|
|
this.detailed.push(
|
|
this.detailed.push(
|
|
-
|
|
|
|
|
|
+
|
|
{
|
|
{
|
|
name: "本体简介",
|
|
name: "本体简介",
|
|
value2:res.data.data.n.introduction,
|
|
value2:res.data.data.n.introduction,
|
|
@@ -4124,7 +4126,7 @@ export default {
|
|
return this.postRequest("/type/tree/"+val || this.requestType, "get").then((res) => {
|
|
return this.postRequest("/type/tree/"+val || this.requestType, "get").then((res) => {
|
|
if (res.status == 200) {
|
|
if (res.status == 200) {
|
|
this.temp_treeData1 = this.getTreeDatas(JSON.parse(JSON.stringify(res.data.data)));
|
|
this.temp_treeData1 = this.getTreeDatas(JSON.parse(JSON.stringify(res.data.data)));
|
|
-
|
|
|
|
|
|
+
|
|
this.temp_treeData = res.data.data;
|
|
this.temp_treeData = res.data.data;
|
|
|
|
|
|
} else {
|
|
} else {
|
|
@@ -4135,14 +4137,14 @@ export default {
|
|
},
|
|
},
|
|
getCascPath1(currentValue,source){
|
|
getCascPath1(currentValue,source){
|
|
const paths = [];
|
|
const paths = [];
|
|
-
|
|
|
|
|
|
+
|
|
// 遍历currentValue数组中的每个元素
|
|
// 遍历currentValue数组中的每个元素
|
|
for (const value of currentValue) {
|
|
for (const value of currentValue) {
|
|
// 递归查找路径
|
|
// 递归查找路径
|
|
const path = this.findPath1(value, source);
|
|
const path = this.findPath1(value, source);
|
|
paths.push(path);
|
|
paths.push(path);
|
|
}
|
|
}
|
|
-
|
|
|
|
|
|
+
|
|
// 输出路径
|
|
// 输出路径
|
|
console.log(paths);
|
|
console.log(paths);
|
|
return paths
|
|
return paths
|
|
@@ -4155,7 +4157,7 @@ findPath1(value, source, path = []) {
|
|
if (node.id === value) {
|
|
if (node.id === value) {
|
|
return [...path, node.id];
|
|
return [...path, node.id];
|
|
}
|
|
}
|
|
-
|
|
|
|
|
|
+
|
|
// 如果节点有子节点,递归查找路径
|
|
// 如果节点有子节点,递归查找路径
|
|
if (node.children) {
|
|
if (node.children) {
|
|
const childPath = this.findPath1(value, node.children, [...path, node.id]);
|
|
const childPath = this.findPath1(value, node.children, [...path, node.id]);
|
|
@@ -4164,7 +4166,7 @@ findPath1(value, source, path = []) {
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
-
|
|
|
|
|
|
+
|
|
// 没有找到匹配的节点,返回空路径
|
|
// 没有找到匹配的节点,返回空路径
|
|
return [];
|
|
return [];
|
|
},
|
|
},
|
|
@@ -4174,14 +4176,14 @@ findPath1(value, source, path = []) {
|
|
return ""
|
|
return ""
|
|
}
|
|
}
|
|
const paths = [];
|
|
const paths = [];
|
|
-
|
|
|
|
|
|
+
|
|
// 遍历currentValue数组中的每个元素
|
|
// 遍历currentValue数组中的每个元素
|
|
for (const value of currentValue) {
|
|
for (const value of currentValue) {
|
|
// 递归查找路径
|
|
// 递归查找路径
|
|
const path = this.findPath(value, source);
|
|
const path = this.findPath(value, source);
|
|
paths.push(path);
|
|
paths.push(path);
|
|
}
|
|
}
|
|
-
|
|
|
|
|
|
+
|
|
// 输出路径
|
|
// 输出路径
|
|
console.log(paths);
|
|
console.log(paths);
|
|
return paths.join(',')
|
|
return paths.join(',')
|
|
@@ -4194,7 +4196,7 @@ findPath(value, source, path = []) {
|
|
if (node.id === value) {
|
|
if (node.id === value) {
|
|
return node.name;
|
|
return node.name;
|
|
}
|
|
}
|
|
-
|
|
|
|
|
|
+
|
|
// 如果节点有子节点,递归查找路径
|
|
// 如果节点有子节点,递归查找路径
|
|
if (node.children) {
|
|
if (node.children) {
|
|
const childPath = this.findPath(value, node.children, [...path, node.id]);
|
|
const childPath = this.findPath(value, node.children, [...path, node.id]);
|
|
@@ -4203,7 +4205,7 @@ findPath(value, source, path = []) {
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
-
|
|
|
|
|
|
+
|
|
// 没有找到匹配的节点,返回空路径
|
|
// 没有找到匹配的节点,返回空路径
|
|
return [];
|
|
return [];
|
|
},
|
|
},
|
|
@@ -5639,4 +5641,4 @@ header {
|
|
position: relative;
|
|
position: relative;
|
|
top: 1px;
|
|
top: 1px;
|
|
}
|
|
}
|
|
-</style>
|
|
|
|
|
|
+</style>
|