|
@@ -224,7 +224,7 @@ export default {
|
|
|
this.entName
|
|
|
).then((resp) => {
|
|
|
let data = resp.data
|
|
|
- this.getJson(data)
|
|
|
+ // this.getJson(data)
|
|
|
this.$refs.chart.drawChart(
|
|
|
this.rootId,
|
|
|
data.entListVO,
|
|
@@ -323,18 +323,18 @@ export default {
|
|
|
)
|
|
|
this.entName = value;
|
|
|
this.getEntityList(undefined,this.degreeCache,value,this.entName).then(
|
|
|
- (data) => {
|
|
|
- this.getJson(data)
|
|
|
+ (resp) => {
|
|
|
+ // this.getJson(data)
|
|
|
this.isOpenRightMenu = false
|
|
|
- this.entityClassList = data.entClsListVO
|
|
|
- this.linkClassList = data.relClsListVO
|
|
|
- this.nodes = data.entListVO
|
|
|
- this.links = data.relListVO
|
|
|
+ this.entityClassList = resp.data.entClsListVO
|
|
|
+ this.linkClassList = resp.data.relClsListVO
|
|
|
+ this.nodes = resp.data.entListVO
|
|
|
+ this.links = resp.data.relListVO
|
|
|
this.rootId = undefined
|
|
|
this.$refs.chart.drawChart(
|
|
|
undefined,
|
|
|
- data.entListVO,
|
|
|
- data.relListVO
|
|
|
+ resp.data.entListVO,
|
|
|
+ resp.data.relListVO
|
|
|
)
|
|
|
this.spinning = false
|
|
|
}
|
|
@@ -358,18 +358,18 @@ export default {
|
|
|
}
|
|
|
this.spinning = true
|
|
|
this.getEntityList(selected.entId, this.degreeCache,this.entName).then(
|
|
|
- (data) => {
|
|
|
- this.getJson(data)
|
|
|
+ (resp) => {
|
|
|
+ // this.getJson(data)
|
|
|
this.isOpenRightMenu = false
|
|
|
- this.entityClassList = data.entClsListVO
|
|
|
- this.linkClassList = data.relClsListVO
|
|
|
- this.nodes = data.entListVO
|
|
|
- this.links = data.relListVO
|
|
|
+ this.entityClassList = resp.data.entClsListVO
|
|
|
+ this.linkClassList = resp.data.relClsListVO
|
|
|
+ this.nodes = resp.data.entListVO
|
|
|
+ this.links = resp.data.relListVO
|
|
|
this.rootId = selected.entId
|
|
|
this.$refs.chart.drawChart(
|
|
|
selected.entId,
|
|
|
- data.entListVO,
|
|
|
- data.relListVO
|
|
|
+ resp.data.entListVO,
|
|
|
+ resp.data.relListVO
|
|
|
)
|
|
|
this.spinning = false
|
|
|
}
|
|
@@ -493,21 +493,22 @@ export default {
|
|
|
entConditionQueries: entConditionQueries
|
|
|
}
|
|
|
|
|
|
- getChart(data).then(__data => {
|
|
|
- this.getJson(__data)
|
|
|
+ getChart(data).then(resp => {
|
|
|
+ debugger
|
|
|
+ // this.getJson(__data)
|
|
|
this.tooltip.entityShow = false
|
|
|
this.tooltip.linkShow = false
|
|
|
- this.entityClassList = __data.entClsListVO
|
|
|
- this.linkClassList = __data.relClsListVO
|
|
|
- this.nodes = __data.entListVO
|
|
|
- this.links = __data.relListVO
|
|
|
+ this.entityClassList = resp.data.entClsListVO
|
|
|
+ this.linkClassList = resp.data.relClsListVO
|
|
|
+ this.nodes = resp.data.entListVO
|
|
|
+ this.links = resp.data.relListVO
|
|
|
this.directionsList.forEach((v) => {
|
|
|
v.checked = true
|
|
|
})
|
|
|
this.$refs.chart.reDraw(
|
|
|
this.rootId,
|
|
|
- __data.entListVO,
|
|
|
- __data.relListVO
|
|
|
+ resp.data.entListVO,
|
|
|
+ resp.data.relListVO
|
|
|
)
|
|
|
this.spinning = false
|
|
|
})
|
|
@@ -526,24 +527,24 @@ export default {
|
|
|
redrawChart(id) {
|
|
|
this.spinning = true
|
|
|
if(this.chartType){
|
|
|
- this.getEntityList(id, this.degreeCache,this.entName).then((data) => {
|
|
|
+ this.getEntityList(id, this.degreeCache,this.entName).then((resp) => {
|
|
|
this.rootId = id
|
|
|
this.tooltip.entId = false
|
|
|
this.tooltip.relID = false
|
|
|
this.$refs.fuzzySearch.clearSelected()
|
|
|
- this.entityClassList = data.entClsListVO
|
|
|
- this.linkClassList = data.relClsListVO
|
|
|
- this.nodes = data.entListVO
|
|
|
- this.links = data.relListVO
|
|
|
- this.$refs.chart.reDraw(id, data.entListVO, data.relListVO)
|
|
|
+ this.entityClassList = resp.data.entClsListVO
|
|
|
+ this.linkClassList = resp.data.relClsListVO
|
|
|
+ this.nodes = resp.data.entListVO
|
|
|
+ this.links = resp.data.relListVO
|
|
|
+ this.$refs.chart.reDraw(id, resp.data.entListVO, resp.data.relListVO)
|
|
|
this.spinning = false
|
|
|
})
|
|
|
}else{
|
|
|
//add
|
|
|
if(id!=this.rootId){//中心点变更
|
|
|
- this.getEntityList(id, this.degreeCache,this.entName).then((data) => {
|
|
|
- let nodes = data.entListVO
|
|
|
- let links = data.relListVO
|
|
|
+ this.getEntityList(id, this.degreeCache,this.entName).then((resp) => {
|
|
|
+ let nodes = resp.data.entListVO
|
|
|
+ let links = resp.data.relListVO
|
|
|
let addNodes = nodes.filter(item =>{
|
|
|
return !this.nodes.some(c => {
|
|
|
return c.entId===item.entId
|
|
@@ -599,20 +600,20 @@ export default {
|
|
|
// this.entityClassCache,
|
|
|
// this.linkClassCache,
|
|
|
// this.directionCache
|
|
|
- ).then((__data) => {
|
|
|
+ ).then((resp) => {
|
|
|
this.tooltip.entityShow = false
|
|
|
this.tooltip.linkShow = false
|
|
|
- this.entityClassList = __data.entClsListVO
|
|
|
- this.linkClassList = __data.relClsListVO
|
|
|
- this.nodes = __data.entListVO
|
|
|
- this.links = __data.relListVO
|
|
|
+ this.entityClassList = resp.data.entClsListVO
|
|
|
+ this.linkClassList = resp.data.relClsListVO
|
|
|
+ this.nodes = resp.data.entListVO
|
|
|
+ this.links = resp.data.relListVO
|
|
|
this.directionsList.forEach((v) => {
|
|
|
v.checked = true
|
|
|
})
|
|
|
this.$refs.chart.reDraw(
|
|
|
this.rootId,
|
|
|
- __data.entListVO,
|
|
|
- __data.relListVO
|
|
|
+ resp.data.entListVO,
|
|
|
+ resp.data.relListVO
|
|
|
)
|
|
|
this.spinning = false
|
|
|
})
|
|
@@ -694,13 +695,13 @@ export default {
|
|
|
this.degreeCache,
|
|
|
this.entName
|
|
|
)
|
|
|
- .then((res) => {
|
|
|
- this.entityClassList = res.entClsListVO
|
|
|
- this.linkClassList = res.relClsListVO
|
|
|
+ .then((resp) => {
|
|
|
+ this.entityClassList = resp.data.entClsListVO
|
|
|
+ this.linkClassList = resp.data.relClsListVO
|
|
|
this.$refs.chart.reDraw(
|
|
|
this.rootId,
|
|
|
- res.entListVO,
|
|
|
- res.relListVO
|
|
|
+ resp.data.entListVO,
|
|
|
+ resp.data.relListVO
|
|
|
)
|
|
|
})
|
|
|
},
|