diff --git a/test-track/frontend/src/business/case/TestCase.vue b/test-track/frontend/src/business/case/TestCase.vue index 82a9ab3547..0f1b1d4c43 100644 --- a/test-track/frontend/src/business/case/TestCase.vue +++ b/test-track/frontend/src/business/case/TestCase.vue @@ -177,7 +177,6 @@ import MsTabButton from "metersphere-frontend/src/components/new-ui/MsTabButton" import TestCaseMinder from "../common/minder/TestCaseMinder"; import IsChangeConfirm from "metersphere-frontend/src/components/IsChangeConfirm"; import {openMinderConfirm} from "../common/minder/minderUtils"; -import TestCaseEditShow from "./components/TestCaseEditShow"; import {PROJECT_ID} from "metersphere-frontend/src/utils/constants"; import MxVersionSelect from "metersphere-frontend/src/components/version/MxVersionSelect"; import {useStore} from "@/store"; @@ -195,7 +194,7 @@ export default { name: "TestCase", components: { PublicTestCaseList, TestCaseTrashNodeTree, TestCasePublicNodeTree, IsChangeConfirm, TestCaseMinder, MsTabButton, TestCaseNodeTree, - MsMainContainer, MsAsideContainer, MsContainer, TestCaseList, SelectMenu, TestCaseEditShow, 'VersionSelect': MxVersionSelect, + MsMainContainer, MsAsideContainer, MsContainer, TestCaseList, SelectMenu, 'VersionSelect': MxVersionSelect, MsMainButtonGroup, TestCaseCommonImportNew }, comments: {}, @@ -540,18 +539,6 @@ export default { changeVersion(currentVersion) { this.currentVersion = currentVersion || null; }, - checkoutPublic(testCase, item) { - Object.assign(item.testCaseInfo, testCase) - //子组件先变更 copy 状态,再执行初始化操作 - this.$refs.testCaseEditShow[0].initEdit(item.testCaseInfo, () => { - this.$nextTick(() => { - let vh = this.$refs.testCaseEditShow[0].$refs.versionHistory; - vh.getVersionOptionList(vh.handleVersionOptions); - vh.show = false; - vh.loading = false; - }); - }); - }, checkVersionEnable() { if (!this.projectId) { return; diff --git a/test-track/frontend/src/business/case/components/TestCaseEdit.vue b/test-track/frontend/src/business/case/components/TestCaseEdit.vue index 65db29f2e2..a0bda66e47 100644 --- a/test-track/frontend/src/business/case/components/TestCaseEdit.vue +++ b/test-track/frontend/src/business/case/components/TestCaseEdit.vue @@ -359,14 +359,12 @@ import { parseCustomField, } from "metersphere-frontend/src/utils/custom_field"; import MsFormDivider from "metersphere-frontend/src/components/MsFormDivider"; -import TestCaseEditOtherInfo from "@/business/case/components/TestCaseEditOtherInfo"; import FormRichTextItem from "@/business/case/components/richtext/FormRichTextItem"; import TestCaseStepItem from "@/business/case/components/TestCaseStepItem"; import StepChangeItem from "@/business/case/components/StepChangeItem"; import MsChangeHistory from "metersphere-frontend/src/components/history/ChangeHistory"; import { getTestTemplate } from "@/api/custom-field-template"; import CustomFiledFormItem from "metersphere-frontend/src/components/form/CustomFiledFormItem"; -import TestCaseVersionDiff from "@/business/case/version/TestCaseVersionDiff"; import VersionCreateOtherInfoSelect from "@/business/case/components/VersionCreateOtherInfoSelect"; import TestCaseBaseInfo from "@/business/case/components/TestCaseBaseInfo"; import MsContainer from "metersphere-frontend/src/components/MsContainer"; @@ -419,7 +417,6 @@ export default { StepChangeItem, TestCaseStepItem, FormRichTextItem, - TestCaseEditOtherInfo, MsFormDivider, CustomFiledComponent, MsTableButton, @@ -433,7 +430,6 @@ export default { TestCaseAttachment, MsTestCaseStepRichText, MsChangeHistory, - TestCaseVersionDiff, VersionCreateOtherInfoSelect, TestCaseBaseInfo, MsContainer, diff --git a/test-track/frontend/src/business/case/components/TestCaseEditOtherInfo.vue b/test-track/frontend/src/business/case/components/TestCaseEditOtherInfo.vue index ebb1e92012..a9f3c7fe3a 100644 --- a/test-track/frontend/src/business/case/components/TestCaseEditOtherInfo.vue +++ b/test-track/frontend/src/business/case/components/TestCaseEditOtherInfo.vue @@ -122,6 +122,7 @@
@@ -180,7 +181,7 @@ export default { FormRichTextItem, TestCaseIssueRelate, TestCaseAttachment, MsRichText, TestCaseRichText }, props: ['form', 'labelWidth', 'caseId', 'readOnly', 'projectId', 'isTestPlan', 'planId', 'versionEnable', 'isCopy', 'copyCaseId', - 'type', 'comments', 'isClickAttachmentTab', + 'type', 'isClickAttachmentTab', 'defaultOpen' ], data() { @@ -204,7 +205,8 @@ export default { uploadFiles: [], relateFiles: [], unRelateFiles: [], - dumpFile: {} + dumpFile: {}, + comments: [] }; }, computed: { @@ -224,6 +226,8 @@ export default { this.$refs.relationship.open(); } else if (this.tabActiveName === 'attachment') { this.getFileMetaData(); + } else if (this.tabActiveName === 'comment') { + this.getComments(); } else if (this.tabActiveName === 'relateTest') { this.$nextTick(() => { this.getRelatedTest(); @@ -253,16 +257,21 @@ export default { }, getComments(testCase) { let id = ''; - if (testCase) { - id = testCase.id; - } else { - id = this.form.id; + if (!testCase) { + testCase = this.form } + if (testCase.caseId) { + // 评审和计划加载评论 + id = testCase.caseId; + } else { + id = testCase.id; + } + this.result.loading = true; testCaseCommentList(id) .then(res => { this.result.loading = false; - this.$emit('update:comments', res.data); + this.comments = res.data; }); }, setRelationshipCount(count) { diff --git a/test-track/frontend/src/business/case/components/TestCaseEditShow.vue b/test-track/frontend/src/business/case/components/TestCaseEditShow.vue deleted file mode 100644 index f8b860034b..0000000000 --- a/test-track/frontend/src/business/case/components/TestCaseEditShow.vue +++ /dev/null @@ -1,687 +0,0 @@ - - - - - diff --git a/test-track/frontend/src/business/case/version/TestCaseVersionDiff.vue b/test-track/frontend/src/business/case/version/TestCaseVersionDiff.vue deleted file mode 100644 index 592d038c36..0000000000 --- a/test-track/frontend/src/business/case/version/TestCaseVersionDiff.vue +++ /dev/null @@ -1,505 +0,0 @@ - - -