fix: 新增完模块再改成用例保存报错
This commit is contained in:
parent
be8784d3b5
commit
121a04da51
|
@ -336,7 +336,7 @@ name: "TestCaseMinder",
|
||||||
this.throwError(this.$t('test_track.case.minder_all_module_tip'));
|
this.throwError(this.$t('test_track.case.minder_all_module_tip'));
|
||||||
}
|
}
|
||||||
|
|
||||||
if (parent.isExtraNode) {
|
if (parent.isExtraNode && !isModuleNodeData(parent)) {
|
||||||
this.throwError(this.$t('test_track.case.minder_tem_node_tip', [parent.text]));
|
this.throwError(this.$t('test_track.case.minder_tem_node_tip', [parent.text]));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -452,6 +452,11 @@ export function handleAfterSave(rootNode) {
|
||||||
rootNode.data.deleteChild = null;
|
rootNode.data.deleteChild = null;
|
||||||
rootNode.data.changed = false;
|
rootNode.data.changed = false;
|
||||||
rootNode.data.contextChanged = false;
|
rootNode.data.contextChanged = false;
|
||||||
|
if (isModuleNode(rootNode)) {
|
||||||
|
rootNode.data.type = 'node';
|
||||||
|
} else if (isCaseNodeData(rootNode.data)) {
|
||||||
|
rootNode.data.type = 'case';
|
||||||
|
}
|
||||||
if (rootNode.children) {
|
if (rootNode.children) {
|
||||||
for (let i = 0; i < rootNode.children.length; i++) {
|
for (let i = 0; i < rootNode.children.length; i++) {
|
||||||
handleAfterSave(rootNode.children[i]);
|
handleAfterSave(rootNode.children[i]);
|
||||||
|
|
Loading…
Reference in New Issue