fix: 测试计划关联接口用例数量错误

This commit is contained in:
chenjianxing 2021-05-25 20:50:24 +08:00 committed by jianxing
parent c24633d69a
commit a8fcadbd1d
5 changed files with 42 additions and 69 deletions

View File

@ -165,7 +165,6 @@
import ShowMoreBtn from "../../../../track/case/components/ShowMoreBtn";
import MsBatchEdit from "../../../definition/components/basis/BatchEdit";
import {API_METHOD_COLOUR, CASE_PRIORITY} from "../../../definition/model/JsonData";
import {getCurrentProjectID} from "@/common/js/utils";
import ApiListContainer from "../../../definition/components/list/ApiListContainer";
import PriorityTableItem from "../../../../track/common/tableItems/planview/PriorityTableItem";
import MsEnvironmentSelect from "../../../definition/components/case/MsEnvironmentSelect";
@ -419,6 +418,11 @@
let param = buildBatchParam(this);
param.ids = Array.from(sampleSelectRows).map(row => row.id);
return param;
},
clear() {
if (this.$refs.apitable) {
this.$refs.apitable.clear();
}
}
},
}

View File

@ -99,51 +99,6 @@
</ms-table-column>
</template>
</ms-table>
<!-- <el-table v-loading="result.loading"-->
<!-- border-->
<!-- :data="tableData"-->
<!-- row-key="id"-->
<!-- class="test-content adjust-table"-->
<!-- @select-all="handleSelectAll"-->
<!-- @filter-change="filter"-->
<!-- @sort-change="sort"-->
<!-- @select="handleSelect" ref="table">-->
<!-- <el-table-column reserve-selection type="selection"/>-->
<!-- <el-table-column prop="name" :label="$t('api_test.definition.api_name')" show-overflow-tooltip/>-->
<!-- <el-table-column-->
<!-- prop="priority"-->
<!-- :filters="priorityFilters"-->
<!-- column-key="priority"-->
<!-- :label="$t('test_track.case.priority')"-->
<!-- show-overflow-tooltip>-->
<!-- <template v-slot:default="scope">-->
<!-- <priority-table-item :value="scope.row.priority"/>-->
<!-- </template>-->
<!-- </el-table-column>-->
<!-- <el-table-column-->
<!-- prop="path"-->
<!-- :label="$t('api_test.definition.api_path')"-->
<!-- show-overflow-tooltip/>-->
<!-- <el-table-column-->
<!-- prop="createUser"-->
<!-- :label="'创建人'"-->
<!-- show-overflow-tooltip/>-->
<!-- <el-table-column-->
<!-- sortable="custom"-->
<!-- width="160"-->
<!-- :label="$t('api_test.definition.api_last_time')"-->
<!-- prop="updateTime">-->
<!-- <template v-slot:default="scope">-->
<!-- <span>{{ scope.row.updateTime | timestampFormatDate }}</span>-->
<!-- </template>-->
<!-- </el-table-column>-->
<!-- </el-table>-->
<ms-table-pagination :change="initTable" :current-page.sync="currentPage" :page-size.sync="pageSize"
:total="total"/>
</api-list-container>
@ -303,7 +258,11 @@ export default {
});
getLabel(this, API_CASE_LIST);
},
clear() {
if (this.$refs.table) {
this.$refs.table.clear();
}
},
showExecResult(row) {
this.visible = false;
this.$emit('showExecResult', row);

View File

@ -156,6 +156,9 @@
});
});
},
clear() {
this.selectRows.clear();
},
handleSelectAll(selection) {
_handleSelectAll(this, selection, this.tableData, this.selectRows);
this.initProjectIds();

View File

@ -86,6 +86,12 @@
open() {
this.init();
this.$refs.baseRelevance.open();
if (this.$refs.apiList) {
this.$refs.apiList.clear();
}
if (this.$refs.apiCaseList) {
this.$refs.apiCaseList.clear();
}
},
init() {
if (this.$refs.apiList) {

View File

@ -76,6 +76,7 @@
open() {
this.$refs.baseRelevance.open();
if (this.$refs.apiScenarioList) {
this.$refs.apiScenarioList.clear();
this.$refs.apiScenarioList.search();
}
},