fix (接口定义): 用例执行刷新优化
This commit is contained in:
parent
e016c988f3
commit
769d4bc204
|
@ -1,5 +1,5 @@
|
|||
<template>
|
||||
<el-card style="margin-top: 5px" @click.native="selectTestCase(apiCase,$event)" v-loading="loading">
|
||||
<el-card style="margin-top: 5px" @click.native="selectTestCase(apiCase,$event)" v-loading="saveLoading">
|
||||
<div @click="active(apiCase)" v-if="type!=='detail'">
|
||||
<el-row>
|
||||
<el-col :span="3">
|
||||
|
@ -220,6 +220,7 @@ export default {
|
|||
{name: this.$t('test_track.case.batch_edit_case'), handleClick: this.handleEditBatch}
|
||||
],
|
||||
methodColorMap: new Map(API_METHOD_COLOUR),
|
||||
saveLoading: false,
|
||||
}
|
||||
},
|
||||
props: {
|
||||
|
@ -367,9 +368,9 @@ export default {
|
|||
});
|
||||
},
|
||||
reload() {
|
||||
this.loading = true
|
||||
this.saveLoading = true
|
||||
this.$nextTick(() => {
|
||||
this.loading = false
|
||||
this.saveLoading = false
|
||||
});
|
||||
},
|
||||
saveCase(row, hideAlert) {
|
||||
|
@ -415,6 +416,10 @@ export default {
|
|||
if (!hideAlert) {
|
||||
this.$emit('refresh');
|
||||
}
|
||||
// 刷新编辑后用例列表
|
||||
if (this.api.source === "editCase") {
|
||||
this.$store.state.currentApiCase = {refresh: "true"};
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
|
|
|
@ -184,6 +184,7 @@ export default {
|
|||
},
|
||||
add(api) {
|
||||
this.api = api;
|
||||
this.api.source = "editCase";
|
||||
this.condition = {components: API_CASE_CONFIGS};
|
||||
this.sysAddition();
|
||||
this.visible = true;
|
||||
|
@ -262,14 +263,14 @@ export default {
|
|||
this.runResult = {testId: getUUID()};
|
||||
this.$refs.apiCaseItem.runLoading = false;
|
||||
this.$success(this.$t('organization.integration.successful_operation'));
|
||||
this.$emit("refresh");
|
||||
//this.$emit("refresh");
|
||||
},
|
||||
errorRefresh() {
|
||||
this.batchLoadingIds = [];
|
||||
this.singleLoading = false;
|
||||
this.singleRunId = "";
|
||||
this.$refs.apiCaseItem.runLoading = false;
|
||||
this.$emit("refresh");
|
||||
//this.$emit("refresh");
|
||||
},
|
||||
refresh() {
|
||||
this.getApiTest();
|
||||
|
@ -414,7 +415,7 @@ export default {
|
|||
this.runData.push(row.request);
|
||||
/*触发执行操作*/
|
||||
this.reportId = getUUID().substring(0, 8);
|
||||
this.$emit("refresh", row.id);
|
||||
this.$emit("refreshCase", row.id);
|
||||
},
|
||||
|
||||
stop(callback) {
|
||||
|
|
|
@ -162,7 +162,7 @@
|
|||
:total="total"/>
|
||||
</div>
|
||||
|
||||
<api-case-list @showExecResult="showExecResult" @refresh="initTable" :currentApi="selectCase" ref="caseList"/>
|
||||
<api-case-list @showExecResult="showExecResult" @refreshCase="initTable" :currentApi="selectCase" ref="caseList"/>
|
||||
<!--批量编辑-->
|
||||
<ms-batch-edit ref="batchEdit" :data-count="$refs.caseTable ? $refs.caseTable.selectDataCounts : 0" @batchEdit="batchEdit" :typeArr="typeArr" :value-arr="valueArr"/>
|
||||
<!--选择环境(当创建性能测试的时候)-->
|
||||
|
@ -419,6 +419,12 @@ export default {
|
|||
},
|
||||
relevanceProjectId() {
|
||||
this.initTable();
|
||||
},
|
||||
'$store.state.currentApiCase.refresh'() {
|
||||
if (this.$store.state.currentApiCase.refresh) {
|
||||
this.initTable();
|
||||
}
|
||||
this.$store.state.currentApiCase = {};
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
|
|
Loading…
Reference in New Issue