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) {
|
export function isThirdPartEnable(callback) {
|
||||||
getCurrentProject().then((project) => {
|
getCurrentProject().then((r) => {
|
||||||
if (callback)
|
if (callback)
|
||||||
callback(project.platform !== LOCAL);
|
callback(r.data.platform !== LOCAL);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -37,14 +37,7 @@
|
||||||
min-width="200px">
|
min-width="200px">
|
||||||
</ms-table-column>
|
</ms-table-column>
|
||||||
|
|
||||||
<ms-table-column
|
<issue-platform-status-column v-if="isThirdPart" ref="issuePlatformStatus"/>
|
||||||
: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>
|
|
||||||
|
|
||||||
<ms-table-column
|
<ms-table-column
|
||||||
v-else
|
v-else
|
||||||
|
@ -79,7 +72,12 @@
|
||||||
import MsEditDialog from "metersphere-frontend/src/components/MsEditDialog";
|
import MsEditDialog from "metersphere-frontend/src/components/MsEditDialog";
|
||||||
import MsTable from "metersphere-frontend/src/components/table/MsTable";
|
import MsTable from "metersphere-frontend/src/components/table/MsTable";
|
||||||
import MsTableColumn from "metersphere-frontend/src/components/table/MsTableColumn";
|
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 IssueDescriptionTableItem from "@/business/issue/IssueDescriptionTableItem";
|
||||||
import {ISSUE_STATUS_MAP} from "metersphere-frontend/src/utils/table-constants";
|
import {ISSUE_STATUS_MAP} from "metersphere-frontend/src/utils/table-constants";
|
||||||
import MsTablePagination from "metersphere-frontend/src/components/pagination/TablePagination";
|
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 {TEST_CASE_RELEVANCE_ISSUE_LIST} from "@/business/utils/sdk-utils";
|
||||||
import MsSearch from "metersphere-frontend/src/components/search/MsSearch";
|
import MsSearch from "metersphere-frontend/src/components/search/MsSearch";
|
||||||
import {setIssuePlatformComponent} from "@/business/issue/issue";
|
import {setIssuePlatformComponent} from "@/business/issue/issue";
|
||||||
|
import IssuePlatformStatusColumn from "@/business/issue/IssuePlatformStatusColumn.vue";
|
||||||
export default {
|
export default {
|
||||||
name: "IssueRelateList",
|
name: "IssueRelateList",
|
||||||
components: {MsTablePagination, IssueDescriptionTableItem, MsTableColumn, MsTable, MsEditDialog, MsSearch},
|
components: {
|
||||||
|
IssuePlatformStatusColumn,
|
||||||
|
MsTablePagination, IssueDescriptionTableItem, MsTableColumn, MsTable, MsEditDialog, MsSearch},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
page: getPageInfo({
|
page: getPageInfo({
|
||||||
components: TEST_CASE_RELEVANCE_ISSUE_LIST
|
components: TEST_CASE_RELEVANCE_ISSUE_LIST
|
||||||
}),
|
}),
|
||||||
visible: false,
|
visible: false,
|
||||||
isThirdPart: false
|
isThirdPart: false,
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
|
@ -107,7 +107,7 @@ export default {
|
||||||
},
|
},
|
||||||
projectId() {
|
projectId() {
|
||||||
return getCurrentProjectID();
|
return getCurrentProjectID();
|
||||||
}
|
},
|
||||||
},
|
},
|
||||||
props: {
|
props: {
|
||||||
caseId: String,
|
caseId: String,
|
||||||
|
@ -128,6 +128,12 @@ export default {
|
||||||
.then((r) => {
|
.then((r) => {
|
||||||
setIssuePlatformComponent(r.data, this.page.condition.components);
|
setIssuePlatformComponent(r.data, this.page.condition.components);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
this.$nextTick(() => {
|
||||||
|
if (this.$refs.issuePlatformStatus) {
|
||||||
|
this.$refs.issuePlatformStatus.getPlatformStatus();
|
||||||
|
}
|
||||||
|
});
|
||||||
},
|
},
|
||||||
getIssues() {
|
getIssues() {
|
||||||
this.page.condition.projectId = this.projectId;
|
this.page.condition.projectId = this.projectId;
|
||||||
|
|
|
@ -39,15 +39,7 @@
|
||||||
prop="title">
|
prop="title">
|
||||||
</ms-table-column>
|
</ms-table-column>
|
||||||
|
|
||||||
<ms-table-column
|
<issue-platform-status-column v-if="isThirdPart && item.id === 'platformStatus'" ref="issuePlatformStatus"/>
|
||||||
: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>
|
|
||||||
|
|
||||||
<ms-table-column
|
<ms-table-column
|
||||||
v-else
|
v-else
|
||||||
|
@ -125,10 +117,13 @@ import {getCustomFieldValue, getTableHeaderWithCustomFields} from "metersphere-f
|
||||||
import {LOCAL} from "metersphere-frontend/src/utils/constants";
|
import {LOCAL} from "metersphere-frontend/src/utils/constants";
|
||||||
import {getCurrentProjectID, getCurrentWorkspaceId} from "metersphere-frontend/src/utils/token";
|
import {getCurrentProjectID, getCurrentWorkspaceId} from "metersphere-frontend/src/utils/token";
|
||||||
import {operationConfirm} from "@/business/utils/sdk-utils";
|
import {operationConfirm} from "@/business/utils/sdk-utils";
|
||||||
|
import IssuePlatformStatusColumn from "@/business/issue/IssuePlatformStatusColumn.vue";
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: "TestCaseIssueRelate",
|
name: "TestCaseIssueRelate",
|
||||||
components: {IssueRelateList, IssueDescriptionTableItem, MsTableColumn, MsTable, TestPlanIssueEdit},
|
components: {
|
||||||
|
IssuePlatformStatusColumn,
|
||||||
|
IssueRelateList, IssueDescriptionTableItem, MsTableColumn, MsTable, TestPlanIssueEdit},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
page: {
|
page: {
|
||||||
|
@ -166,6 +161,17 @@ export default {
|
||||||
},
|
},
|
||||||
projectId() {
|
projectId() {
|
||||||
return getCurrentProjectID();
|
return getCurrentProjectID();
|
||||||
|
},
|
||||||
|
},
|
||||||
|
watch: {
|
||||||
|
isThirdPart() {
|
||||||
|
if (this.isThirdPart) {
|
||||||
|
this.$nextTick(() => {
|
||||||
|
if (this.$refs.issuePlatformStatus && this.$refs.issuePlatformStatus.length > 0) {
|
||||||
|
this.$refs.issuePlatformStatus[0].getPlatformStatus();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
created() {
|
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">
|
prop="title">
|
||||||
</ms-table-column>
|
</ms-table-column>
|
||||||
|
|
||||||
<ms-table-column
|
<issue-platform-status-column
|
||||||
:label="$t('test_track.issue.platform_status')"
|
|
||||||
v-if="isThirdPart"
|
v-if="isThirdPart"
|
||||||
:filters="statusFilters"
|
:filters="statusFilters"
|
||||||
:filter-method="filterStatus"
|
:filter-method="filterStatus"
|
||||||
prop="platformStatus">
|
ref="issuePlatformStatus"/>
|
||||||
<template v-slot="scope">
|
|
||||||
{{ scope.row.platformStatus ? scope.row.platformStatus : '--' }}
|
|
||||||
</template>
|
|
||||||
</ms-table-column>
|
|
||||||
|
|
||||||
<ms-table-column
|
<ms-table-column
|
||||||
v-else
|
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 {ISSUE_PLATFORM_OPTION, ISSUE_STATUS_MAP} from "metersphere-frontend/src/utils/table-constants";
|
||||||
import {getIssuesByPlanId, getShareIssuesByPlanId} from "@/api/issue";
|
import {getIssuesByPlanId, getShareIssuesByPlanId} from "@/api/issue";
|
||||||
import MsCreateTimeColumn from "metersphere-frontend/src/components/table/MsCreateTimeColumn";
|
import MsCreateTimeColumn from "metersphere-frontend/src/components/table/MsCreateTimeColumn";
|
||||||
|
import IssuePlatformStatusColumn from "@/business/issue/IssuePlatformStatusColumn.vue";
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: "FunctionalIssueList",
|
name: "FunctionalIssueList",
|
||||||
components: {MsCreateTimeColumn, IssueDescriptionTableItem, MsTableColumn, MsTable},
|
components: {IssuePlatformStatusColumn, MsCreateTimeColumn, IssueDescriptionTableItem, MsTableColumn, MsTable},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
data: [],
|
data: [],
|
||||||
|
|
Loading…
Reference in New Issue