修改API测试判断名称不能重复
This commit is contained in:
parent
2bd46011ea
commit
ffaefb3985
|
@ -130,6 +130,7 @@ public class APITestService {
|
|||
test.setScenarioDefinition(request.getScenarioDefinition());
|
||||
test.setUpdateTime(System.currentTimeMillis());
|
||||
test.setStatus(APITestStatus.Saved.name());
|
||||
checkApiTestPlanExist(test);
|
||||
apiTestMapper.updateByPrimaryKeySelective(test);
|
||||
return test;
|
||||
}
|
||||
|
|
|
@ -7,7 +7,8 @@
|
|||
:title="$t('commons.test')"
|
||||
@create="create" :createTip="$t('load_test.create')"/>
|
||||
</template>
|
||||
<el-table :data="tableData" class="table-content">
|
||||
<el-table :data="tableData" class="table-content" @sort-change="sort"
|
||||
@filter-change="filter">
|
||||
<el-table-column :label="$t('commons.name')" width="250" show-overflow-tooltip>
|
||||
<template v-slot:default="scope">
|
||||
<el-link type="info" @click="handleEdit(scope.row)">{{ scope.row.name }}</el-link>
|
||||
|
@ -28,7 +29,7 @@
|
|||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="status" :label="$t('commons.status')"
|
||||
:filter-method="filter"
|
||||
column-key="status"
|
||||
:filters="statusFilters">
|
||||
<template v-slot:default="{row}">
|
||||
<ms-api-test-status :row="row"/>
|
||||
|
@ -55,6 +56,7 @@
|
|||
import MsMainContainer from "../../common/components/MsMainContainer";
|
||||
import MsApiTestStatus from "./ApiTestStatus";
|
||||
import MsTableOperators from "../../common/components/MsTableOperators";
|
||||
import {_filter, _sort} from "../../../../common/js/utils";
|
||||
|
||||
export default {
|
||||
components: {
|
||||
|
@ -150,9 +152,17 @@
|
|||
this.projectId = this.$route.params.projectId;
|
||||
this.search();
|
||||
},
|
||||
filter(value, row) {
|
||||
/* filter(value, row) {
|
||||
return row.status === value;
|
||||
}
|
||||
}*/
|
||||
sort(column) {
|
||||
_sort(column, this.condition);
|
||||
this.initTableData();
|
||||
},
|
||||
filter(filters) {
|
||||
_filter(filters, this.condition);
|
||||
this.initTableData();
|
||||
},
|
||||
},
|
||||
created() {
|
||||
this.init();
|
||||
|
|
Loading…
Reference in New Issue