fix: 未保存用例生成关系图报错

--bug=1010654 --user=陈建星 github#10250-功能用例查看前后依赖关系报错 https://www.tapd.cn/55049933/s/1115664
This commit is contained in:
chenjianxing 2022-03-09 15:21:05 +08:00 committed by 刘瑞斌
parent ab1c3f7b7b
commit e1a3a882f8
1 changed files with 4 additions and 0 deletions

View File

@ -56,6 +56,10 @@ export default {
this.$refs.postRelationshipList.getTableData(); this.$refs.postRelationshipList.getTableData();
}, },
openGraph() { openGraph() {
if (!this.resourceId) {
this.$warning(this.$t('api_test.automation.save_case_info'));
return;
}
getRelationshipGraph(this.resourceId, this.resourceType, (data) => { getRelationshipGraph(this.resourceId, this.resourceType, (data) => {
this.graphData = data; this.graphData = data;
this.$refs.relationshipGraph.open(); this.$refs.relationshipGraph.open();