fix(接口定义): 修复引用场景包含条件控制器仍可以开启禁用的缺陷

--bug=1019922 --user=王孝刚 【接口测试】场景引用其他场景,第一次引用过来后可以开启禁用的步骤
https://www.tapd.cn/55049933/s/1302664
This commit is contained in:
wxg0103 2022-11-23 14:39:47 +08:00 committed by wxg0103
parent 1931739abb
commit 705dcca705
1 changed files with 5 additions and 5 deletions

View File

@ -1509,7 +1509,7 @@ export default {
if (!item.hashTree) {
item.hashTree = [];
}
this.resetResourceId(item.hashTree);
this.resetResourceId(item.hashTree, item.referenced);
item.enable === undefined ? (item.enable = true) : item.enable;
item.variableEnable = item.variableEnable === undefined ? true : item.variableEnable;
if (this.selectedTreeNode) {
@ -1638,15 +1638,15 @@ export default {
},
});
},
resetResourceId(hashTree) {
resetResourceId(hashTree, referenced) {
hashTree.forEach((item) => {
item.resourceId = item.resourceId || getUUID();
//
if (item.referenced === 'REF' && !item.enable) {
if (referenced === 'REF' && !item.enable) {
item.refEnable = true;
}
if (item.hashTree && item.hashTree.length > 0) {
this.resetResourceId(item.hashTree);
this.resetResourceId(item.hashTree, referenced);
}
});
},
@ -1657,7 +1657,7 @@ export default {
let obj = JSON.parse(JSON.stringify(row));
obj.resourceId = getUUID();
if (obj.hashTree && obj.hashTree.length > 0) {
this.resetResourceId(obj.hashTree);
this.resetResourceId(obj.hashTree, obj.referenced);
}
if (obj.name) {
obj.name = obj.name + '_copy';