diff --git a/frontend/src/business/components/api/definition/components/list/ApiCaseSimpleList.vue b/frontend/src/business/components/api/definition/components/list/ApiCaseSimpleList.vue
index 8ce2bc20d6..4bda7f4ea3 100644
--- a/frontend/src/business/components/api/definition/components/list/ApiCaseSimpleList.vue
+++ b/frontend/src/business/components/api/definition/components/list/ApiCaseSimpleList.vue
@@ -185,7 +185,7 @@
:total="total"/>
-
0 ? false : true;
-
- if (this.apiDefinitionId) {
- this.condition.apiDefinitionId = this.apiDefinitionId;
- }
- this.condition.status = "";
- this.condition.moduleIds = this.selectNodeIds;
if (this.trashEnable) {
this.condition.moduleIds = [];
if (this.condition.filters) {
@@ -579,41 +572,13 @@ export default {
this.condition.filters = {status: ["Trash"]};
}
}
- if (this.condition.filters && !this.condition.filters.status) {
- this.$delete(this.condition.filters, 'status');
- }
- if (!this.selectAll) {
- this.selectAll = false;
- this.unSelection = [];
- this.selectDataCounts = 0;
- }
- this.condition.projectId = this.projectId;
+ this.initCondition();
- if (this.currentProtocol != null) {
- this.condition.protocol = this.currentProtocol;
- }
-
- //检查是否只查询本周数据
- this.isSelectThissWeekData();
- this.condition.selectThisWeedData = false;
- this.condition.id = null;
- if (this.selectDataRange == 'thisWeekCount') {
- this.condition.selectThisWeedData = true;
- } else if (this.selectDataRange != null) {
- let selectParamArr = this.selectDataRange.split("single:");
-
- if (selectParamArr.length === 2) {
- this.condition.id = selectParamArr[1];
- }
- }
let isNext = false;
if (this.condition.projectId) {
this.result = this.$post('/api/testcase/list/' + this.currentPage + "/" + this.pageSize, this.condition, response => {
this.total = response.data.itemCount;
this.tableData = response.data.listObject;
- if (!this.selectAll) {
- this.unSelection = response.data.listObject.map(s => s.id);
- }
this.tableData.forEach(item => {
if (item.tags && item.tags.length > 0) {
item.tags = JSON.parse(item.tags);
@@ -625,7 +590,6 @@ export default {
isNext = true;
}
});
-
this.$nextTick(() => {
if (this.$refs.caseTable) {
this.$refs.caseTable.clear();
@@ -641,7 +605,14 @@ export default {
});
}
},
- refreshStatus() {
+ setRunning(id) {
+ this.tableData.forEach(item => {
+ if (id && id === item.id) {
+ item.status = "Running";
+ }
+ });
+ },
+ initCondition() {
if (this.apiDefinitionId) {
this.condition.apiDefinitionId = this.apiDefinitionId;
}
@@ -671,6 +642,9 @@ export default {
this.condition.id = selectParamArr[1];
}
}
+ },
+ refreshStatus(id) {
+ this.initCondition();
if (this.condition.projectId) {
this.result = this.$post('/api/testcase/list/' + this.currentPage + "/" + this.pageSize, this.condition, response => {
let isNext = false;
@@ -682,6 +656,9 @@ export default {
item.lastResultId = tableData[i].lastResultId;
}
}
+ if (id && id === item.id) {
+ item.status = "Running";
+ }
if (item.status === 'Running') {
isNext = true;
}