From bdc86619a6b7899ba95b890c6b97ccbe5bce6b97 Mon Sep 17 00:00:00 2001 From: song-cc-rock Date: Tue, 14 Mar 2023 14:34:53 +0800 Subject: [PATCH] =?UTF-8?q?fix(=E6=B5=8B=E8=AF=95=E8=B7=9F=E8=B8=AA):=20?= =?UTF-8?q?=E7=94=A8=E4=BE=8B=E8=AF=84=E5=AE=A1=E5=B1=95=E7=A4=BA=E7=94=A8?= =?UTF-8?q?=E4=BE=8B=E8=87=AA=E5=AE=9A=E4=B9=89=E5=AD=97=E6=AE=B5=E5=80=BC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --bug=1021536 --user=宋昌昌 【测试跟踪】github #21073功能用例自定义字段的值在用例评审页面不能显示 https://www.tapd.cn/55049933/s/1349534 --- .../review/view/components/TestReviewTestCaseEdit.vue | 7 +++++++ .../view/components/TestReviewTestCaseEditHeaderBar.vue | 9 ++++++++- 2 files changed, 15 insertions(+), 1 deletion(-) diff --git a/test-track/frontend/src/business/review/view/components/TestReviewTestCaseEdit.vue b/test-track/frontend/src/business/review/view/components/TestReviewTestCaseEdit.vue index 21ea490e13..57854664f7 100644 --- a/test-track/frontend/src/business/review/view/components/TestReviewTestCaseEdit.vue +++ b/test-track/frontend/src/business/review/view/components/TestReviewTestCaseEdit.vue @@ -343,6 +343,13 @@ export default { null, buildTestCaseOldFields(item) ); + this.testCaseTemplate.customFields.forEach((item) => { + try { + item.defaultValue = JSON.parse(item.defaultValue); + } catch (e) { + // nothing + } + }); this.isCustomFiledActive = true; this.testCase = item; if (!this.testCase.actualResult) { diff --git a/test-track/frontend/src/business/review/view/components/TestReviewTestCaseEditHeaderBar.vue b/test-track/frontend/src/business/review/view/components/TestReviewTestCaseEditHeaderBar.vue index 93a92dc507..630f9a6bbe 100644 --- a/test-track/frontend/src/business/review/view/components/TestReviewTestCaseEditHeaderBar.vue +++ b/test-track/frontend/src/business/review/view/components/TestReviewTestCaseEditHeaderBar.vue @@ -44,6 +44,7 @@ import ReviewStatus from "@/business/case/components/ReviewStatus"; import {getReviewerStatusComment} from "@/api/test-review-test-case"; import MsUserIcon from "metersphere-frontend/src/components/MsUserIcon"; import {openCaseEdit} from "@/business/case/test-case"; +import { checkProjectPermission } from "@/api/testCase"; export default { name: "TestReviewTestCaseEditHeaderBar", @@ -78,7 +79,13 @@ export default { } }, openTestCase() { - openCaseEdit({caseId: this.testCase.caseId}, this); + checkProjectPermission(this.testCase.projectId).then((r) => { + if (r.data) { + openCaseEdit({caseId: this.testCase.caseId}, this); + } else { + this.$error(this.$t("commons.project_permission")); + } + }); }, close() { this.$emit('close');