From 1e4a992439a196f7442b135ccbb582083d071805 Mon Sep 17 00:00:00 2001
From: wxg0103 <727495428@qq.com>
Date: Mon, 27 Dec 2021 09:55:23 +0800
Subject: [PATCH] =?UTF-8?q?fix(=E6=B5=8B=E8=AF=95=E8=B7=9F=E8=B8=AA):=20?=
=?UTF-8?q?=E5=85=AC=E5=85=B1=E7=94=A8=E4=BE=8B=E5=BA=93=E5=9C=A8=E5=85=B6?=
=?UTF-8?q?=E4=BB=96=E9=A1=B9=E7=9B=AE=E7=BC=96=E8=BE=91=E7=94=A8=E4=BE=8B?=
=?UTF-8?q?=E5=90=8E=EF=BC=8C=E6=89=80=E5=B1=9E=E9=A1=B9=E7=9B=AE=E4=BC=9A?=
=?UTF-8?q?=E5=8F=98?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
--bug=1009244 --user=王孝刚 【公共用例库】在其他项目编辑用例后,所属项目会变
https://www.tapd.cn/55049933/s/1087440
---
.../components/assertion/ApiAssertionJsonPath.vue | 2 +-
.../components/assertion/ApiAssertionText.vue | 2 +-
.../track/case/components/TestCaseEdit.vue | 9 +++++----
.../track/case/components/TestCaseList.vue | 15 +++++++++++++--
4 files changed, 20 insertions(+), 8 deletions(-)
diff --git a/frontend/src/business/components/api/definition/components/assertion/ApiAssertionJsonPath.vue b/frontend/src/business/components/api/definition/components/assertion/ApiAssertionJsonPath.vue
index 7da4f481c0..ac28dbbea2 100644
--- a/frontend/src/business/components/api/definition/components/assertion/ApiAssertionJsonPath.vue
+++ b/frontend/src/business/components/api/definition/components/assertion/ApiAssertionJsonPath.vue
@@ -2,7 +2,7 @@
-
diff --git a/frontend/src/business/components/api/definition/components/assertion/ApiAssertionText.vue b/frontend/src/business/components/api/definition/components/assertion/ApiAssertionText.vue
index fb13c58f50..e4376dd73a 100644
--- a/frontend/src/business/components/api/definition/components/assertion/ApiAssertionText.vue
+++ b/frontend/src/business/components/api/definition/components/assertion/ApiAssertionText.vue
@@ -20,7 +20,7 @@
-
diff --git a/frontend/src/business/components/track/case/components/TestCaseEdit.vue b/frontend/src/business/components/track/case/components/TestCaseEdit.vue
index c37baadeb0..e7125839e3 100644
--- a/frontend/src/business/components/track/case/components/TestCaseEdit.vue
+++ b/frontend/src/business/components/track/case/components/TestCaseEdit.vue
@@ -739,12 +739,13 @@ export default {
Object.assign(param, this.form);
param.steps = JSON.stringify(this.form.steps);
param.nodeId = this.form.module;
- param.nodePath = getNodePath(this.form.module, this.moduleOptions);
- if (this.projectId) {
- param.projectId = this.projectId;
+ if (!this.publicEnable) {
+ param.nodePath = getNodePath(this.form.module, this.moduleOptions);
+ if (this.projectId) {
+ param.projectId = this.projectId;
+ }
}
param.name = param.name.trim();
-
if (this.form.tags instanceof Array) {
this.form.tags = JSON.stringify(this.form.tags);
}
diff --git a/frontend/src/business/components/track/case/components/TestCaseList.vue b/frontend/src/business/components/track/case/components/TestCaseList.vue
index 56a08b82d5..61c6898b65 100644
--- a/frontend/src/business/components/track/case/components/TestCaseList.vue
+++ b/frontend/src/business/components/track/case/components/TestCaseList.vue
@@ -414,7 +414,7 @@ export default {
},
{
tip: this.$t('commons.edit'), icon: "el-icon-edit",
- exec: this.handleEdit,
+ exec: this.handleEditPublic,
permissions: ['PROJECT_TRACK_CASE:READ+EDIT'],
isDisable: this.isPublic
},
@@ -756,13 +756,24 @@ export default {
this.$emit('testCaseEdit');
},
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')) {
this.$get('test/case/get/' + testCase.id, response => {
let testCase = response.data;
this.$emit('testCaseEdit', testCase);
});
}
-
},
handleEditShow(testCase, column) {
if (column.label !== this.$t('test_track.case.case_desc')) {