fix(接口定义): 排序修改

This commit is contained in:
fit2-zhao 2021-02-03 18:50:02 +08:00
parent 937ce3f3c6
commit 76bcd14500
4 changed files with 17 additions and 17 deletions

View File

@ -244,7 +244,7 @@
getFails() {
this.error = 0;
this.success = 0;
if (this.requestResult.scenarios) {
if (this.requestResult.scenarios && this.requestResult.scenarios != null) {
this.requestResult.scenarios.forEach((scenario) => {
if (scenario.requestResults) {
scenario.requestResults.forEach(item => {
@ -255,7 +255,7 @@
})
}
})
this.success = this.requestResult.scenarios.length - this.error;
this.success = this.requestResult.scenarios && this.requestResult.scenarios != null ? this.requestResult.scenarios.length - this.error : 0;
}
},
getReport() {
@ -267,6 +267,9 @@
if (this.isNotRunning) {
try {
this.requestResult = JSON.parse(this.report.content);
if (!this.requestResult) {
this.requestResult = {scenarios: []};
}
this.controller.requestResult = this.requestResult;
switch (this.controller.loopType) {
case "LOOP_COUNT":
@ -282,14 +285,11 @@
break;
}
this.getFails();
if (!this.requestResult) {
this.requestResult = {scenarios: []};
}
} catch (e) {
throw e;
}
this.loading = false;
this.activeName = this.requestResult && this.requestResult.scenarios ? this.requestResult.scenarios[0].name : "";
this.activeName = this.requestResult && this.requestResult.scenarios && this.requestResult.scenarios != null && this.requestResult.scenarios.length > 0 ? this.requestResult.scenarios[0].name : "";
} else {
setTimeout(this.getReport, 2000)
}

View File

@ -1,7 +1,7 @@
export default {
commons: {
cover:'Cover',
not_cover:'Not Cover',
cover: 'Cover',
not_cover: 'Not Cover',
import_mode: 'Import mode',
import_module: 'Import module',
please_fill_in_the_template: 'Please fill in the template',
@ -537,12 +537,12 @@ export default {
},
request: {
grade_info: "Filter by rank",
grade_order_asc: "from high to low by use case level",
grade_order_desc: "from low to high by use case level,",
grade_order_asc: "from low to high by use case level",
grade_order_desc: "from high to low by use case level",
create_time_order_asc: "by creation time from front to back",
create_time_order_desc: "from back to front by creation time,",
create_time_order_desc: "from back to front by creation time",
update_time_order_asc: "by update time from front to back",
update_time_order_desc: "from back to front by update time,",
update_time_order_desc: "from back to front by update time",
run_env: "Operating environment",
select_case: "Search use cases",
case: "Case",
@ -589,7 +589,7 @@ export default {
create_info: 'Create',
update_info: 'Update',
batch_edit: "Batch edit",
batch_move:"Batch move",
batch_move: "Batch move",
path_valid_info: "The request path is invalid",
other_config: "Other Config",
message_template: "Message Template",

View File

@ -537,8 +537,8 @@ export default {
},
request: {
grade_info: "按等级筛选",
grade_order_asc: "按用例等级从高到低",
grade_order_desc: "按用例等级从低到高",
grade_order_asc: "按用例等级从到高",
grade_order_desc: "按用例等级从到低",
create_time_order_asc: "按创建时间从前到后",
create_time_order_desc: "按创建时间从后到前",
update_time_order_asc: "按更新时间从前到后",

View File

@ -536,8 +536,8 @@ export default {
},
request: {
grade_info: "按等級篩選",
grade_order_asc: "按用例等級從高到低",
grade_order_desc: "按用例等級從低到高",
grade_order_asc: "按用例等級從到高",
grade_order_desc: "按用例等級從到低",
create_time_order_asc: "按創建時間從前到後",
create_time_order_desc: "按創建時間從後到前",
update_time_order_asc: "按更新時間從前到後",