fix: 拓展实体时增加限制,当前数量大于等于总数时不做响应
This commit is contained in:
@@ -964,6 +964,9 @@ export default {
|
|||||||
const sourceNode = this.graph.findById(model.sourceNode.id)
|
const sourceNode = this.graph.findById(model.sourceNode.id)
|
||||||
const sourceModel = sourceNode.getModel()
|
const sourceModel = sourceNode.getModel()
|
||||||
const expandType = model.myData.entityType
|
const expandType = model.myData.entityType
|
||||||
|
if (sourceModel.myData.relatedEntity[expandType].list.length >= sourceModel.myData.relatedEntity[expandType].total) {
|
||||||
|
return
|
||||||
|
}
|
||||||
if (sourceModel.myData.relatedEntity[expandType].list.length < 50) {
|
if (sourceModel.myData.relatedEntity[expandType].list.length < 50) {
|
||||||
this.rightBox.loading = true
|
this.rightBox.loading = true
|
||||||
try {
|
try {
|
||||||
@@ -1000,6 +1003,9 @@ export default {
|
|||||||
const node = this.graph.findById(nodeId)
|
const node = this.graph.findById(nodeId)
|
||||||
if (node) {
|
if (node) {
|
||||||
const nodeModel = node.getModel()
|
const nodeModel = node.getModel()
|
||||||
|
if (nodeModel.myData.relatedEntity[expandType].list.length >= nodeModel.myData.relatedEntity[expandType].total) {
|
||||||
|
return
|
||||||
|
}
|
||||||
if (nodeModel.myData.relatedEntity[expandType].list.length < 50) {
|
if (nodeModel.myData.relatedEntity[expandType].list.length < 50) {
|
||||||
const toAddNodeModels = []
|
const toAddNodeModels = []
|
||||||
const toAddEdgeModels = []
|
const toAddEdgeModels = []
|
||||||
|
|||||||
Reference in New Issue
Block a user