diff --git a/test-track/frontend/src/business/case/components/TestCaseEdit.vue b/test-track/frontend/src/business/case/components/TestCaseEdit.vue index 8373abbdcb..17ddb16c58 100644 --- a/test-track/frontend/src/business/case/components/TestCaseEdit.vue +++ b/test-track/frontend/src/business/case/components/TestCaseEdit.vue @@ -882,9 +882,10 @@ export default { this.saveCase(); } else { this.saveCase(function (t) { - let tab = {}; - tab.name = "add"; - t.$emit("addTab", tab); + if(t){ + t.$router.push({path: "/track/case/create",}); + location.reload(); + } }); } } else if (e === "ADD_AND_PUBLIC") { @@ -1124,6 +1125,8 @@ export default { } if (callback) { callback(this); + + return; } // 保存用例后刷新附件 diff --git a/test-track/frontend/src/business/case/components/case/CaseEditInfoComponent.vue b/test-track/frontend/src/business/case/components/case/CaseEditInfoComponent.vue index d56d33ce11..a8843c9e5b 100644 --- a/test-track/frontend/src/business/case/components/case/CaseEditInfoComponent.vue +++ b/test-track/frontend/src/business/case/components/case/CaseEditInfoComponent.vue @@ -1,11 +1,13 @@ @@ -144,6 +173,7 @@ import CaseCommentComponent from "./CaseCommentComponent"; import CaseCommentViewer from "./CaseCommentViewer"; import { getRelationshipCountCase } from "@/api/testCase"; import { testCaseCommentList } from "@/api/test-case-comment"; +import TabPaneCount from "@/business/plan/view/comonents/report/detail/component/TabPaneCount"; export default { name: "CaseEditInfoComponent", components: { @@ -156,6 +186,7 @@ export default { CaseCommentViewer, CaseRelationshipViewer, CaseTestRelate, + TabPaneCount, }, props: [ "richTextDefaultOpen", @@ -201,7 +232,7 @@ export default { relateFiles: [], unRelateFiles: [], dumpFile: {}, - commentState: 'READY' + commentState: "READY", }; }, computed: { @@ -209,8 +240,8 @@ export default { return true; }, isCommentEdit() { - return this.commentState == 'EDIT'; - } + return this.commentState == "EDIT"; + }, }, watch: { caseId() { @@ -267,7 +298,7 @@ export default { this.$nextTick(() => { this.getRelatedTest(); }); - } else if(tab.name === "changeRecord"){ + } else if (tab.name === "changeRecord") { this.$refs.caseChangeHistoryRef.openHit(); } },