Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

使用 graph.fromJSON(jsonData) 渲染时 有时候渲染失败 #3899

Closed
History-1024 opened this issue Sep 8, 2023 · 1 comment
Closed

Comments

@History-1024
Copy link

问题描述

image
Cannot read properties of undefined (reading 'foContent') 我的代码中没有用到这个属性
image
再执行这段代码时 有时候就会报错 我这里的图表节点使用的时候vue自定义节点 具体报错原因还没搞清楚

重现链接

暂无

重现步骤

graph.fromJSON(jsonData) 执行时报错
jsonData数据
{
"cells": [
{
"shape": "data-processing-curve",
"connector": {
"name": "curveConnector"
},
"id": "e7df962d-5c25-45e8-8555-cf4a7788cf4a",
"zIndex": -1,
"data": {
"sourceCell": "root-node",
"targetCell": "17b7cde8-d259-4abc-9489-e306bc21e613"
},
"source": {
"cell": "root-node",
"port": "root-node-outSuccess"
},
"target": {
"cell": "17b7cde8-d259-4abc-9489-e306bc21e613",
"port": "17b7cde8-d259-4abc-9489-e306bc21e613-in"
}
},
{
"position": {
"x": 100,
"y": 60
},
"size": {
"width": 220,
"height": 280
},
"view": "vue-shape-view",
"shape": "dag-node",
"ports": {
"groups": {
"in": {
"position": {
"name": "absolute",
"args": {
"dx": 0,
"dy": -45,
"x": 0,
"y": 95
}
},
"attrs": {
"circle": {
"r": 5,
"magnet": true,
"stroke": "#409eff",
"strokeWidth": 1,
"fill": "transparent"
}
}
},
"outSuccess": {
"position": {
"name": "right",
"args": {
"dx": 0,
"dy": -15
}
},
"attrs": {
"circle": {
"r": 5,
"magnet": true,
"stroke": "#67c23a",
"strokeWidth": 1,
"fill": "transparent"
}
}
},
"outFail": {
"position": {
"name": "right",
"args": {
"dx": 0,
"dy": 10
}
},
"attrs": {
"circle": {
"r": 5,
"magnet": true,
"stroke": "#f56c6c",
"strokeWidth": 1,
"fill": "transparent"
}
}
}
},
"items": [
{
"id": "root-node-in",
"group": "in"
},
{
"id": "root-node-outSuccess",
"group": "outSuccess"
},
{
"id": "root-node-outFail",
"group": "outFail"
}
]
},
"id": "root-node",
"data": {
"label": "开始",
"root": true,
"name": "root-node",
"applyInfo": [
{
"id": 2,
"name": "测试001----20220220",
"apply_logo": "TestApp001",
"request_key": "sfsdfsfefdfdsfrfsfawer"
}
],
"applyId": 2,
"applyObj": {
"id": 2,
"name": "测试001----20220220",
"apply_logo": "TestApp001",
"request_key": "sfsdfsfefdfdsfrfsfawer"
},
"paramsList": [
{
"param_english_name": "typeDictionary",
"param_name": "类型字典",
"isSelect": true,
"required": true,
"input_type": "input"
},
{
"param_english_name": "password",
"param_name": "密码",
"required": true,
"param_value": "",
"input_type": "input"
},
{
"param_english_name": "userName",
"param_name": "用户名",
"required": true,
"param_value": "",
"input_type": "input"
},
{
"param_english_name": "url",
"param_name": "页面URL",
"required": true,
"param_value": "",
"input_type": "input"
}
],
"apiId": 2,
"apiObj": {
"id": 2,
"name": "登陆并查看指标",
"api_numbering": "cdc094f6-deb2-480f-93a7-bada72a19bfb",
"associated_process": true,
"response_data_visual": false,
"api_image_url": "/erupt-attachment/2023-08-30/LUdQIOXfpUvB.png"
},
"processId": "520"
},
"zIndex": 1
},
{
"position": {
"x": 618.40625,
"y": 294.015625
},
"size": {
"width": 220,
"height": 280
},
"view": "vue-shape-view",
"shape": "dag-node",
"ports": {
"groups": {
"in": {
"position": {
"name": "absolute",
"args": {
"dx": 0,
"dy": -45,
"x": 0,
"y": 95
}
},
"attrs": {
"circle": {
"r": 5,
"magnet": true,
"stroke": "#409eff",
"strokeWidth": 1,
"fill": "transparent"
}
}
},
"outSuccess": {
"position": {
"name": "right",
"args": {
"dx": 0,
"dy": -15
}
},
"attrs": {
"circle": {
"r": 5,
"magnet": true,
"stroke": "#67c23a",
"strokeWidth": 1,
"fill": "transparent"
}
}
},
"outFail": {
"position": {
"name": "right",
"args": {
"dx": 0,
"dy": 10
}
},
"attrs": {
"circle": {
"r": 5,
"magnet": true,
"stroke": "#f56c6c",
"strokeWidth": 1,
"fill": "transparent"
}
}
}
},
"items": [
{
"id": "17b7cde8-d259-4abc-9489-e306bc21e613-in",
"group": "in"
},
{
"id": "17b7cde8-d259-4abc-9489-e306bc21e613-outSuccess",
"group": "outSuccess"
},
{
"id": "17b7cde8-d259-4abc-9489-e306bc21e613-outFail",
"group": "outFail"
}
]
},
"id": "17b7cde8-d259-4abc-9489-e306bc21e613",
"data": {
"name": "node_2",
"applyInfo": [
{
"id": 2,
"name": "测试001----20220220",
"apply_logo": "TestApp001",
"request_key": "sfsdfsfefdfdsfrfsfawer"
}
],
"applyId": 2,
"applyObj": {
"id": 2,
"name": "测试001----20220220",
"apply_logo": "TestApp001",
"request_key": "sfsdfsfefdfdsfrfsfawer"
}
},
"zIndex": 2
}
]
}

预期行为

我期望知道这报错的原因和解决方案

平台

  • 操作系统: [macOS, Windows, Linux, React Native ...]
  • 网页浏览器: [Google Chrome, Safari, Firefox ...]
  • X6 版本: [2.11.1 ...]

屏幕截图或视频(可选)

No response

补充说明(可选)

No response

@History-1024 History-1024 closed this as not planned Won't fix, can't repro, duplicate, stale Sep 8, 2023
@x6-bot
Copy link
Contributor

x6-bot bot commented Sep 8, 2024

This thread has been automatically locked because it has not had recent activity.

Please open a new issue for related bugs and link to relevant comments in this thread.

@x6-bot x6-bot bot locked as resolved and limited conversation to collaborators Sep 8, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant