style(接口测试): 修复循环控制器调试结果序号错误问题

This commit is contained in:
fit2-zhao 2022-04-14 15:41:15 +08:00 committed by 刘瑞斌
parent 2e0c230100
commit ee57386cf3
1 changed files with 11 additions and 2 deletions

View File

@ -88,9 +88,9 @@ import MsContainer from "@/business/components/common/components/MsContainer";
import MsMainContainer from "@/business/components/common/components/MsMainContainer";
import MsApiReportExport from "./ApiReportExport";
import MsApiReportViewHeader from "./ApiReportViewHeader";
import {RequestFactory} from "../../definition/model/ApiTestModel";
import {KeyValue, RequestFactory} from "../../definition/model/ApiTestModel";
import {windowPrint, getCurrentProjectID, getUUID} from "@/common/js/utils";
import {STEP} from "../scenario/Setting";
import {ELEMENT_TYPE, STEP, TYPE_TO_C} from "../scenario/Setting";
export default {
name: "SysnApiReportDetail",
@ -379,6 +379,7 @@ export default {
onMessage(e) {
if (e.data) {
this.runningEvaluation(e.data);
this.sort(this.fullTreeNodes);
}
if (e.data && e.data.indexOf("MS_TEST_END") !== -1) {
this.getReport();
@ -387,6 +388,14 @@ export default {
this.$emit('refresh', this.debugResult);
}
},
sort(stepArray) {
for (let i in stepArray) {
stepArray[i].index = Number(i) + 1;
if (stepArray[i].children && stepArray[i].children.length > 0) {
this.sort(stepArray[i].children);
}
}
},
},
computed: {
projectId() {