fix(测试跟踪): 脑图保存丢失临时节点

--bug=1013090 --user=陈建星 【测试跟踪】github#13428脑图 模块下 直接添加数据,不添加标签,切换全部用例模块,添加的数据没有直接展示 https://www.tapd.cn/55049933/s/1155900
This commit is contained in:
chenjianxing 2022-05-11 14:36:47 +08:00 committed by jianxing
parent f03367ecf3
commit 14a6fd6d96
2 changed files with 2 additions and 3 deletions

View File

@ -142,11 +142,10 @@ export default {
if (!children) { if (!children) {
children = []; children = [];
} }
let caseNum = root.data.caseNum;
if (root.data.text === '未规划用例' && root.data.level === 1) { if (root.data.text === '未规划用例' && root.data.level === 1) {
root.data.disable = true; root.data.disable = true;
} }
if (children.length < 1 && (this.ignoreNum || caseNum && caseNum > 0)) { if (children.length < 1) {
root.children.push({ root.children.push({
data: { data: {
text: '', text: '',

View File

@ -323,7 +323,7 @@ name: "TestCaseMinder",
nodes = []; nodes = [];
} }
nodes.push(JSON.stringify(this._buildExtraNode(root))); nodes.push(JSON.stringify(this._buildExtraNode(root)));
this.saveExtraNode[parent.id] = nodes; this.saveExtraNode[parent.newId ? parent.newId : parent.id] = nodes;
} }
}, },
buildSaveCase(node, parent, preNode, nextNode) { buildSaveCase(node, parent, preNode, nextNode) {