fix(测试跟踪): 脑图保存用例丢失

--bug=1011813 --user=陈建星 【测试跟踪】-github#12143 脑图新增标题后,点击报存,在设置为用例后,多次点击保存,新增的用例出现丢失 https://www.tapd.cn/55049933/s/1128031
This commit is contained in:
chenjianxing 2022-03-31 11:53:28 +08:00 committed by 刘瑞斌
parent bcd8ea9328
commit f6e64bd399

View File

@ -75,7 +75,8 @@ name: "TestCaseMinder",
saveModules: [],
saveModuleNodeMap: new Map(),
deleteNodes: [], //
saveExtraNode: {}
saveExtraNode: {},
extraNodeChanged: [] //
}
},
props: {
@ -215,6 +216,10 @@ name: "TestCaseMinder",
this.result = this.$post('/test/case/minder/edit', param, () => {
this.$success(this.$t('commons.save_success'));
handleAfterSave(window.minder.getRoot());
this.extraNodeChanged.forEach(item => {
item.isExtraNode = false;
});
this.extraNodeChanged = [];
this.$emit('refresh');
this.setIsChange(false);
});
@ -285,6 +290,7 @@ name: "TestCaseMinder",
//
this.pushDeleteNode(data);
module.id = null;
this.extraNodeChanged.push(data);
}
if (data.type === 'case') {
@ -410,6 +416,7 @@ name: "TestCaseMinder",
//
this.pushDeleteNode(data);
testCase.id = null;
this.extraNodeChanged.push(data);
}
if (isChange) {