fix(测试跟踪): 公共用例库在其他项目编辑用例后,所属项目会变
--bug=1009244 --user=王孝刚 【公共用例库】在其他项目编辑用例后,所属项目会变 https://www.tapd.cn/55049933/s/1087440
This commit is contained in:
parent
6584f2d167
commit
1e4a992439
|
@ -2,7 +2,7 @@
|
||||||
<div v-loading="loading">
|
<div v-loading="loading">
|
||||||
<el-row :gutter="10" type="flex" justify="space-between" align="middle">
|
<el-row :gutter="10" type="flex" justify="space-between" align="middle">
|
||||||
<el-col>
|
<el-col>
|
||||||
<el-input :disabled="isReadOnly" v-model="jsonPath.expression" maxlength="200" size="small" show-word-limit
|
<el-input :disabled="isReadOnly" v-model="jsonPath.expression" maxlength="500" size="small" show-word-limit
|
||||||
:placeholder="$t('api_test.request.extract.json_path_expression')"/>
|
:placeholder="$t('api_test.request.extract.json_path_expression')"/>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col>
|
<el-col>
|
||||||
|
|
|
@ -20,7 +20,7 @@
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col>
|
<el-col>
|
||||||
<el-input :disabled="isReadOnly" v-model="value" maxlength="200" size="small" show-word-limit
|
<el-input :disabled="isReadOnly" v-model="value" maxlength="500" size="small" show-word-limit
|
||||||
:placeholder="$t('api_test.request.assertions.value')"/>
|
:placeholder="$t('api_test.request.assertions.value')"/>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col class="assertion-checkbox">
|
<el-col class="assertion-checkbox">
|
||||||
|
|
|
@ -739,12 +739,13 @@ export default {
|
||||||
Object.assign(param, this.form);
|
Object.assign(param, this.form);
|
||||||
param.steps = JSON.stringify(this.form.steps);
|
param.steps = JSON.stringify(this.form.steps);
|
||||||
param.nodeId = this.form.module;
|
param.nodeId = this.form.module;
|
||||||
|
if (!this.publicEnable) {
|
||||||
param.nodePath = getNodePath(this.form.module, this.moduleOptions);
|
param.nodePath = getNodePath(this.form.module, this.moduleOptions);
|
||||||
if (this.projectId) {
|
if (this.projectId) {
|
||||||
param.projectId = this.projectId;
|
param.projectId = this.projectId;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
param.name = param.name.trim();
|
param.name = param.name.trim();
|
||||||
|
|
||||||
if (this.form.tags instanceof Array) {
|
if (this.form.tags instanceof Array) {
|
||||||
this.form.tags = JSON.stringify(this.form.tags);
|
this.form.tags = JSON.stringify(this.form.tags);
|
||||||
}
|
}
|
||||||
|
|
|
@ -414,7 +414,7 @@ export default {
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
tip: this.$t('commons.edit'), icon: "el-icon-edit",
|
tip: this.$t('commons.edit'), icon: "el-icon-edit",
|
||||||
exec: this.handleEdit,
|
exec: this.handleEditPublic,
|
||||||
permissions: ['PROJECT_TRACK_CASE:READ+EDIT'],
|
permissions: ['PROJECT_TRACK_CASE:READ+EDIT'],
|
||||||
isDisable: this.isPublic
|
isDisable: this.isPublic
|
||||||
},
|
},
|
||||||
|
@ -756,13 +756,24 @@ export default {
|
||||||
this.$emit('testCaseEdit');
|
this.$emit('testCaseEdit');
|
||||||
},
|
},
|
||||||
handleEdit(testCase, column) {
|
handleEdit(testCase, column) {
|
||||||
|
if (column.label !== this.$t('test_track.case.case_desc')) {
|
||||||
|
if (this.publicEnable) {
|
||||||
|
return;
|
||||||
|
} else {
|
||||||
|
this.$get('test/case/get/' + testCase.id, response => {
|
||||||
|
let testCase = response.data;
|
||||||
|
this.$emit('testCaseEdit', testCase);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
handleEditPublic(testCase, column) {
|
||||||
if (column.label !== this.$t('test_track.case.case_desc')) {
|
if (column.label !== this.$t('test_track.case.case_desc')) {
|
||||||
this.$get('test/case/get/' + testCase.id, response => {
|
this.$get('test/case/get/' + testCase.id, response => {
|
||||||
let testCase = response.data;
|
let testCase = response.data;
|
||||||
this.$emit('testCaseEdit', testCase);
|
this.$emit('testCaseEdit', testCase);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
},
|
},
|
||||||
handleEditShow(testCase, column) {
|
handleEditShow(testCase, column) {
|
||||||
if (column.label !== this.$t('test_track.case.case_desc')) {
|
if (column.label !== this.$t('test_track.case.case_desc')) {
|
||||||
|
|
Loading…
Reference in New Issue