fix(测试跟踪): 功能用例和测试计划用例关联缺陷,平台状态没有翻译
--bug=1026928 --user=陈建星 【测试跟踪】测试计划-编辑功能用例-关联缺陷弹窗的“平台状态” 未汉化,和缺陷管理列表不一致 https://www.tapd.cn/55049933/s/1385949
This commit is contained in:
parent
7206e6caf6
commit
ecec39cd05
|
@ -217,9 +217,9 @@ export function getIssueThirdPartTemplate() {
|
|||
}
|
||||
|
||||
export function isThirdPartEnable(callback) {
|
||||
getCurrentProject().then((project) => {
|
||||
getCurrentProject().then((r) => {
|
||||
if (callback)
|
||||
callback(project.platform !== LOCAL);
|
||||
callback(r.data.platform !== LOCAL);
|
||||
});
|
||||
}
|
||||
|
||||
|
|
|
@ -37,14 +37,7 @@
|
|||
min-width="200px">
|
||||
</ms-table-column>
|
||||
|
||||
<ms-table-column
|
||||
:label="$t('test_track.issue.platform_status')"
|
||||
v-if="isThirdPart"
|
||||
prop="platformStatus">
|
||||
<template v-slot="scope">
|
||||
{{ scope.row.platformStatus ? scope.row.platformStatus : '--' }}
|
||||
</template>
|
||||
</ms-table-column>
|
||||
<issue-platform-status-column v-if="isThirdPart" ref="issuePlatformStatus"/>
|
||||
|
||||
<ms-table-column
|
||||
v-else
|
||||
|
@ -79,7 +72,12 @@
|
|||
import MsEditDialog from "metersphere-frontend/src/components/MsEditDialog";
|
||||
import MsTable from "metersphere-frontend/src/components/table/MsTable";
|
||||
import MsTableColumn from "metersphere-frontend/src/components/table/MsTableColumn";
|
||||
import {getPlatformOption, getRelateIssues, isThirdPartEnable, testCaseIssueRelate} from "@/api/issue";
|
||||
import {
|
||||
getPlatformOption,
|
||||
getRelateIssues,
|
||||
isThirdPartEnable,
|
||||
testCaseIssueRelate
|
||||
} from "@/api/issue";
|
||||
import IssueDescriptionTableItem from "@/business/issue/IssueDescriptionTableItem";
|
||||
import {ISSUE_STATUS_MAP} from "metersphere-frontend/src/utils/table-constants";
|
||||
import MsTablePagination from "metersphere-frontend/src/components/pagination/TablePagination";
|
||||
|
@ -88,17 +86,19 @@ import {getCurrentProjectID} from "metersphere-frontend/src/utils/token";
|
|||
import {TEST_CASE_RELEVANCE_ISSUE_LIST} from "@/business/utils/sdk-utils";
|
||||
import MsSearch from "metersphere-frontend/src/components/search/MsSearch";
|
||||
import {setIssuePlatformComponent} from "@/business/issue/issue";
|
||||
|
||||
import IssuePlatformStatusColumn from "@/business/issue/IssuePlatformStatusColumn.vue";
|
||||
export default {
|
||||
name: "IssueRelateList",
|
||||
components: {MsTablePagination, IssueDescriptionTableItem, MsTableColumn, MsTable, MsEditDialog, MsSearch},
|
||||
components: {
|
||||
IssuePlatformStatusColumn,
|
||||
MsTablePagination, IssueDescriptionTableItem, MsTableColumn, MsTable, MsEditDialog, MsSearch},
|
||||
data() {
|
||||
return {
|
||||
page: getPageInfo({
|
||||
components: TEST_CASE_RELEVANCE_ISSUE_LIST
|
||||
}),
|
||||
visible: false,
|
||||
isThirdPart: false
|
||||
isThirdPart: false,
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
|
@ -107,7 +107,7 @@ export default {
|
|||
},
|
||||
projectId() {
|
||||
return getCurrentProjectID();
|
||||
}
|
||||
},
|
||||
},
|
||||
props: {
|
||||
caseId: String,
|
||||
|
@ -128,6 +128,12 @@ export default {
|
|||
.then((r) => {
|
||||
setIssuePlatformComponent(r.data, this.page.condition.components);
|
||||
});
|
||||
|
||||
this.$nextTick(() => {
|
||||
if (this.$refs.issuePlatformStatus) {
|
||||
this.$refs.issuePlatformStatus.getPlatformStatus();
|
||||
}
|
||||
});
|
||||
},
|
||||
getIssues() {
|
||||
this.page.condition.projectId = this.projectId;
|
||||
|
|
|
@ -39,15 +39,7 @@
|
|||
prop="title">
|
||||
</ms-table-column>
|
||||
|
||||
<ms-table-column
|
||||
:label="$t('test_track.issue.platform_status')"
|
||||
:field="item"
|
||||
v-if="isThirdPart"
|
||||
prop="platformStatus">
|
||||
<template v-slot="scope">
|
||||
{{ scope.row.platformStatus ? scope.row.platformStatus : '--' }}
|
||||
</template>
|
||||
</ms-table-column>
|
||||
<issue-platform-status-column v-if="isThirdPart && item.id === 'platformStatus'" ref="issuePlatformStatus"/>
|
||||
|
||||
<ms-table-column
|
||||
v-else
|
||||
|
@ -125,10 +117,13 @@ import {getCustomFieldValue, getTableHeaderWithCustomFields} from "metersphere-f
|
|||
import {LOCAL} from "metersphere-frontend/src/utils/constants";
|
||||
import {getCurrentProjectID, getCurrentWorkspaceId} from "metersphere-frontend/src/utils/token";
|
||||
import {operationConfirm} from "@/business/utils/sdk-utils";
|
||||
import IssuePlatformStatusColumn from "@/business/issue/IssuePlatformStatusColumn.vue";
|
||||
|
||||
export default {
|
||||
name: "TestCaseIssueRelate",
|
||||
components: {IssueRelateList, IssueDescriptionTableItem, MsTableColumn, MsTable, TestPlanIssueEdit},
|
||||
components: {
|
||||
IssuePlatformStatusColumn,
|
||||
IssueRelateList, IssueDescriptionTableItem, MsTableColumn, MsTable, TestPlanIssueEdit},
|
||||
data() {
|
||||
return {
|
||||
page: {
|
||||
|
@ -166,6 +161,17 @@ export default {
|
|||
},
|
||||
projectId() {
|
||||
return getCurrentProjectID();
|
||||
},
|
||||
},
|
||||
watch: {
|
||||
isThirdPart() {
|
||||
if (this.isThirdPart) {
|
||||
this.$nextTick(() => {
|
||||
if (this.$refs.issuePlatformStatus && this.$refs.issuePlatformStatus.length > 0) {
|
||||
this.$refs.issuePlatformStatus[0].getPlatformStatus();
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
},
|
||||
created() {
|
||||
|
|
|
@ -0,0 +1,76 @@
|
|||
<template>
|
||||
<ms-table-column
|
||||
:label="$t('test_track.issue.platform_status')"
|
||||
:filters="filters"
|
||||
:filter-method="filterMethod"
|
||||
prop="platformStatus">
|
||||
<template v-slot="scope">
|
||||
<span v-if="scope.row.platform === 'Tapd'">
|
||||
{{ scope.row.platformStatus ? tapdIssueStatusMap[scope.row.platformStatus] : '--' }}
|
||||
</span>
|
||||
<span v-else-if="scope.row.platform ==='Local'">
|
||||
{{ scope.row.platformStatus ? issueStatusMap[scope.row.platformStatus] : '--' }}
|
||||
</span>
|
||||
<span v-else-if="platformStatusMap && platformStatusMap.get(scope.row.platformStatus)">
|
||||
{{ platformStatusMap.get(scope.row.platformStatus) }}
|
||||
</span>
|
||||
<span v-else>
|
||||
{{ scope.row.platformStatus ? scope.row.platformStatus : '--' }}
|
||||
</span>
|
||||
</template>
|
||||
</ms-table-column>
|
||||
</template>
|
||||
<script>
|
||||
|
||||
import {ISSUE_STATUS_MAP, TAPD_ISSUE_STATUS_MAP} from "metersphere-frontend/src/utils/table-constants";
|
||||
import {getCurrentProjectID, getCurrentWorkspaceId} from "metersphere-frontend/src/utils/token";
|
||||
import MsTableColumn from "metersphere-frontend/src/components/table/MsTableColumn";
|
||||
import {getPlatformStatus} from "@/api/issue";
|
||||
|
||||
export default {
|
||||
name: "IssuePlatformStatusColumn",
|
||||
components: {MsTableColumn},
|
||||
data() {
|
||||
return {
|
||||
isThirdPart: false,
|
||||
platformStatus: [],
|
||||
platformStatusMap: new Map(),
|
||||
}
|
||||
},
|
||||
props: {
|
||||
filters: Array,
|
||||
filterMethod: Function
|
||||
},
|
||||
computed: {
|
||||
issueStatusMap() {
|
||||
return ISSUE_STATUS_MAP;
|
||||
},
|
||||
projectId() {
|
||||
return getCurrentProjectID();
|
||||
},
|
||||
tapdIssueStatusMap() {
|
||||
return TAPD_ISSUE_STATUS_MAP;
|
||||
},
|
||||
},
|
||||
methods: {
|
||||
getPlatformStatus() {
|
||||
getPlatformStatus({
|
||||
projectId: getCurrentProjectID(),
|
||||
workspaceId: getCurrentWorkspaceId()
|
||||
}).then((r) => {
|
||||
this.platformStatus = r.data;
|
||||
this.platformStatusMap = new Map();
|
||||
if (this.platformStatus) {
|
||||
this.platformStatus.forEach(item => {
|
||||
this.platformStatusMap.set(item.value, item.label);
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<style scoped>
|
||||
|
||||
</style>
|
|
@ -20,16 +20,12 @@
|
|||
prop="title">
|
||||
</ms-table-column>
|
||||
|
||||
<ms-table-column
|
||||
:label="$t('test_track.issue.platform_status')"
|
||||
<issue-platform-status-column
|
||||
v-if="isThirdPart"
|
||||
:filters="statusFilters"
|
||||
:filter-method="filterStatus"
|
||||
prop="platformStatus">
|
||||
<template v-slot="scope">
|
||||
{{ scope.row.platformStatus ? scope.row.platformStatus : '--' }}
|
||||
</template>
|
||||
</ms-table-column>
|
||||
ref="issuePlatformStatus"/>
|
||||
|
||||
|
||||
<ms-table-column
|
||||
v-else
|
||||
|
@ -64,10 +60,11 @@ import IssueDescriptionTableItem from "@/business/issue/IssueDescriptionTableIte
|
|||
import {ISSUE_PLATFORM_OPTION, ISSUE_STATUS_MAP} from "metersphere-frontend/src/utils/table-constants";
|
||||
import {getIssuesByPlanId, getShareIssuesByPlanId} from "@/api/issue";
|
||||
import MsCreateTimeColumn from "metersphere-frontend/src/components/table/MsCreateTimeColumn";
|
||||
import IssuePlatformStatusColumn from "@/business/issue/IssuePlatformStatusColumn.vue";
|
||||
|
||||
export default {
|
||||
name: "FunctionalIssueList",
|
||||
components: {MsCreateTimeColumn, IssueDescriptionTableItem, MsTableColumn, MsTable},
|
||||
components: {IssuePlatformStatusColumn, MsCreateTimeColumn, IssueDescriptionTableItem, MsTableColumn, MsTable},
|
||||
data() {
|
||||
return {
|
||||
data: [],
|
||||
|
|
Loading…
Reference in New Issue