fix (接口自动化): 报告步骤展示问题修复 #1006150

--bug=1006150 --user=赵勇 【接口自动化】执行后... https://www.tapd.cn/55049933/s/1039573
This commit is contained in:
fit2-zhao 2021-08-25 15:22:30 +08:00 committed by fit2-zhao
parent 34cbd83437
commit 68177e988e
1 changed files with 14 additions and 1 deletions

View File

@ -199,12 +199,25 @@ export default {
} }
}) })
}, },
getType(type) {
switch (type) {
case "LoopController":
return "循环控制器";
case "TransactionController":
return "事物控制器";
case "ConstantTimer":
return "等待控制器";
case "IfController":
return "条件控制器";
}
return type;
},
formatContent(hashTree, tree, fullPath) { formatContent(hashTree, tree, fullPath) {
if (hashTree) { if (hashTree) {
hashTree.forEach(item => { hashTree.forEach(item => {
if (item.enable) { if (item.enable) {
item.parentIndex = fullPath ? fullPath + "_" + item.index : item.index; item.parentIndex = fullPath ? fullPath + "_" + item.index : item.index;
let name = item.name ? item.name : item.type; let name = item.name ? item.name : this.getType(item.type);
let obj = {resId: item.resourceId + "_" + item.parentIndex, index: Number(item.index), label: name, value: {name: name, responseResult: {}, unexecute: true, testing: false}, children: [], unsolicited: true}; let obj = {resId: item.resourceId + "_" + item.parentIndex, index: Number(item.index), label: name, value: {name: name, responseResult: {}, unexecute: true, testing: false}, children: [], unsolicited: true};
tree.children.push(obj); tree.children.push(obj);
if (ELEMENTS.get("AllSamplerProxy").indexOf(item.type) != -1) { if (ELEMENTS.get("AllSamplerProxy").indexOf(item.type) != -1) {