fix(场景自动化) 场景步骤深度复制

This commit is contained in:
fit2-zhao 2021-11-01 09:39:35 +08:00 committed by fit2-zhao
parent f96e30d341
commit a116c35d97
1 changed files with 11 additions and 0 deletions

View File

@ -542,6 +542,9 @@ export default {
const hashTree = parent.data.hashTree || parent.data;
//
let obj = JSON.parse(JSON.stringify(row));
if (obj.hashTree && obj.hashTree.length > 0) {
this.resetResourceId(obj.hashTree);
}
obj.resourceId = getUUID();
if (obj.name) {
obj.name = obj.name + '_copy';
@ -555,6 +558,14 @@ export default {
this.sort();
this.reload();
},
resetResourceId(hashTree) {
hashTree.forEach(item => {
item.resourceId = getUUID();
if (item.hashTree && item.hashTree.length > 0) {
this.resetResourceId(item.hashTree);
}
})
},
showHide() {
this.showHideTree = false
this.$nextTick(() => {