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 76b6976cf7
commit dc33c117b0
1 changed files with 4 additions and 0 deletions

View File

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