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