fix(测试跟踪): 功能用例编辑缺少版本管理

--bug=1018702 --user=陈建星 [测试跟踪]开启版本管理功能后,功能用例编辑页没有版本管理功能 https://www.tapd.cn/55049933/s/1273579
This commit is contained in:
chenjianxing 2022-10-24 10:42:44 +08:00 committed by jianxing
parent f68deab837
commit 8c30823e87
3 changed files with 7 additions and 10 deletions

View File

@ -25,7 +25,7 @@ export function getTestCase(id) {
} }
export function hasTestCaseOtherInfo(id) { export function hasTestCaseOtherInfo(id) {
return get(BASE_URL + `test/case/hasOtherInfo/${id}`); return get(BASE_URL + `hasOtherInfo/${id}`);
} }
export function testCaseGetByVersionId(versionId, id) { export function testCaseGetByVersionId(versionId, id) {

View File

@ -39,7 +39,7 @@
{{ $t('operating_log.change_history') }} {{ $t('operating_log.change_history') }}
</el-link> </el-link>
<!-- 版本历史 --> <!-- 版本历史 -->
<ms-version-history v-xpack <mx-version-history v-xpack
ref="versionHistory" ref="versionHistory"
:version-data="versionData" :version-data="versionData"
:current-id="currentTestCaseInfo.id" :current-id="currentTestCaseInfo.id"
@ -163,7 +163,6 @@ import CustomFiledComponent from "metersphere-frontend/src/components/template/C
import { import {
buildCustomFields, buildCustomFields,
buildTestCaseOldFields, buildTestCaseOldFields,
getTemplate,
parseCustomField parseCustomField
} from "metersphere-frontend/src/utils/custom_field"; } from "metersphere-frontend/src/utils/custom_field";
import MsFormDivider from "metersphere-frontend/src/components/MsFormDivider"; import MsFormDivider from "metersphere-frontend/src/components/MsFormDivider";
@ -180,7 +179,6 @@ import TestCaseBaseInfo from "@/business/case/components/TestCaseBaseInfo";
import MsContainer from "metersphere-frontend/src/components/MsContainer"; import MsContainer from "metersphere-frontend/src/components/MsContainer";
import MsAsideContainer from "metersphere-frontend/src/components/MsAsideContainer"; import MsAsideContainer from "metersphere-frontend/src/components/MsAsideContainer";
import MsMainContainer from "metersphere-frontend/src/components/MsMainContainer"; import MsMainContainer from "metersphere-frontend/src/components/MsMainContainer";
import MxVersionSelect from "metersphere-frontend/src/components/version/MxVersionSelect";
import {useStore} from "@/store"; import {useStore} from "@/store";
import {getProjectApplicationConfig} from "@/api/project-application"; import {getProjectApplicationConfig} from "@/api/project-application";
import { import {
@ -211,13 +209,13 @@ export default {
TestCaseComment, MsPreviousNextButton, MsInputTag, CaseComment, MsDialogFooter, TestCaseAttachment, TestCaseComment, MsPreviousNextButton, MsInputTag, CaseComment, MsDialogFooter, TestCaseAttachment,
MsTestCaseStepRichText, MsTestCaseStepRichText,
MsChangeHistory, MsChangeHistory,
'MsVersionHistory': MxVersionSelect,
TestCaseVersionDiff, TestCaseVersionDiff,
VersionCreateOtherInfoSelect, VersionCreateOtherInfoSelect,
TestCaseBaseInfo, TestCaseBaseInfo,
MsContainer, MsContainer,
MsAsideContainer, MsAsideContainer,
MsMainContainer, MsMainContainer,
MxVersionHistory: () => import("metersphere-frontend/src/components/version/MxVersionHistory")
}, },
data() { data() {
return { return {
@ -1118,7 +1116,7 @@ export default {
hasOtherInfo() { hasOtherInfo() {
return new Promise((resolve) => { return new Promise((resolve) => {
if (this.form.id) { if (this.form.id) {
hasTestCaseOtherInfo() hasTestCaseOtherInfo(this.form.id)
.then((res) => { .then((res) => {
resolve(res.data); resolve(res.data);
}); });

View File

@ -19,7 +19,7 @@
{{ $t('operating_log.change_history') }} {{ $t('operating_log.change_history') }}
</el-link> </el-link>
<!-- 版本历史 --> <!-- 版本历史 -->
<ms-version-history v-xpack <mx-version-history v-xpack
ref="versionHistory" ref="versionHistory"
:version-data="versionData" :version-data="versionData"
:current-id="currentTestCaseInfo.id" :current-id="currentTestCaseInfo.id"
@ -145,7 +145,6 @@ import StepChangeItem from "@/business/case/components/StepChangeItem";
import MsChangeHistory from "metersphere-frontend/src/components/history/ChangeHistory"; import MsChangeHistory from "metersphere-frontend/src/components/history/ChangeHistory";
import BatchMove from "@/business/case/components/BatchMove"; import BatchMove from "@/business/case/components/BatchMove";
import TestCaseVersionDiff from "@/business/case/version/TestCaseVersionDiff"; import TestCaseVersionDiff from "@/business/case/version/TestCaseVersionDiff";
import MxVersionSelect from "metersphere-frontend/src/components/version/MxVersionSelect";
import {useStore} from "@/store"; import {useStore} from "@/store";
import { import {
getTestCase, getTestCase,
@ -172,8 +171,8 @@ export default {
MsTestCaseStepRichText, MsTestCaseStepRichText,
MsChangeHistory, MsChangeHistory,
BatchMove, BatchMove,
'MsVersionHistory': MxVersionSelect, TestCaseVersionDiff,
TestCaseVersionDiff MxVersionHistory: () => import("metersphere-frontend/src/components/version/MxVersionHistory")
}, },
data() { data() {
return { return {