fix(测试跟踪): 删除用例后未定位在当前删除目录
--bug=1009751 --user=lyh 【测试跟踪】github#9467,删除用例页面进行了整体刷新未定位在当前删除目录 https://www.tapd.cn/55049933/s/1094528 Closes #9467
This commit is contained in:
parent
7cf6a90940
commit
9d0ba758de
|
@ -464,6 +464,14 @@ export default {
|
||||||
pNodes.push(rootNode.data);
|
pNodes.push(rootNode.data);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
setCurrentKey(currentNode) {
|
||||||
|
if (currentNode && currentNode.data) {
|
||||||
|
this.$nextTick(() => {
|
||||||
|
this.handleNodeSelect(currentNode);
|
||||||
|
this.$refs.tree.setCurrentKey(currentNode.data.id);
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|
|
@ -94,7 +94,8 @@ export default {
|
||||||
callback: this.handleExport,
|
callback: this.handleExport,
|
||||||
permissions: ['PROJECT_TRACK_CASE:READ+EXPORT']
|
permissions: ['PROJECT_TRACK_CASE:READ+EXPORT']
|
||||||
}
|
}
|
||||||
]
|
],
|
||||||
|
currentNode: {}
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
props: {
|
props: {
|
||||||
|
@ -147,11 +148,14 @@ export default {
|
||||||
},
|
},
|
||||||
enableTrash() {
|
enableTrash() {
|
||||||
this.condition.trashEnable = true;
|
this.condition.trashEnable = true;
|
||||||
|
// 隐藏公共用例库背景色
|
||||||
|
this.condition.publicEnable = false;
|
||||||
this.$emit('enableTrash', this.condition.trashEnable);
|
this.$emit('enableTrash', this.condition.trashEnable);
|
||||||
this.$emit('toPublic', 'trash');
|
this.$emit('toPublic', 'trash');
|
||||||
},
|
},
|
||||||
enablePublic() {
|
enablePublic() {
|
||||||
this.condition.publicEnable = true;
|
this.condition.publicEnable = true;
|
||||||
|
this.condition.trashEnable = false;
|
||||||
this.$emit('enablePublic', this.condition.publicEnable);
|
this.$emit('enablePublic', this.condition.publicEnable);
|
||||||
this.$emit('toPublic', 'public');
|
this.$emit('toPublic', 'public');
|
||||||
},
|
},
|
||||||
|
@ -166,9 +170,13 @@ export default {
|
||||||
if (this.$refs.nodeTree) {
|
if (this.$refs.nodeTree) {
|
||||||
this.$refs.nodeTree.filter(this.condition.filterText);
|
this.$refs.nodeTree.filter(this.condition.filterText);
|
||||||
}
|
}
|
||||||
|
this.setCurrentKey();
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
setCurrentKey() {
|
||||||
|
this.$refs.nodeTree.setCurrentKey(this.currentNode);
|
||||||
|
},
|
||||||
increase(id) {
|
increase(id) {
|
||||||
this.$refs.nodeTree.increase(id);
|
this.$refs.nodeTree.increase(id);
|
||||||
},
|
},
|
||||||
|
@ -238,9 +246,12 @@ export default {
|
||||||
|
|
||||||
this.$store.commit('setTestCaseSelectNode', node);
|
this.$store.commit('setTestCaseSelectNode', node);
|
||||||
this.$store.commit('setTestCaseSelectNodeIds', nodeIds);
|
this.$store.commit('setTestCaseSelectNodeIds', nodeIds);
|
||||||
|
this.condition.trashEnable = false;
|
||||||
|
this.condition.publicEnable = false;
|
||||||
|
|
||||||
this.$emit("nodeSelectEvent", node, nodeIds, pNodes);
|
this.$emit("nodeSelectEvent", node, nodeIds, pNodes);
|
||||||
this.currentModule = node.data;
|
this.currentModule = node.data;
|
||||||
|
this.currentNode = node;
|
||||||
if (node.data.id === 'root') {
|
if (node.data.id === 'root') {
|
||||||
this.$emit("nodeSelectEvent", node, [], pNodes);
|
this.$emit("nodeSelectEvent", node, [], pNodes);
|
||||||
} else {
|
} else {
|
||||||
|
|
Loading…
Reference in New Issue