fix(测试跟踪): 功能用例版本对比问题
--bug=1023383 --user=宋昌昌 【测试跟踪】功能用例版本对比问题汇总2 https://www.tapd.cn/55049933/s/1371045
This commit is contained in:
parent
42179d20f8
commit
808c0ae5b3
|
@ -454,6 +454,7 @@ public class IssuesService {
|
|||
}
|
||||
});
|
||||
handleCustomFieldStatus(issues);
|
||||
buildCustomField(issues);
|
||||
return DistinctKeyUtil.distinctByKey(issues, IssuesDao::getId);
|
||||
}
|
||||
|
||||
|
|
|
@ -106,6 +106,7 @@ export function getIssuesByCaseIdWithSearch(refType, caseId, page, condition) {
|
|||
page.data = response.data;
|
||||
}
|
||||
buildIssues(page);
|
||||
parseFields(page);
|
||||
});
|
||||
}
|
||||
}
|
||||
|
@ -263,6 +264,19 @@ export function buildIssues(page) {
|
|||
}
|
||||
}
|
||||
|
||||
export function parseFields(page) {
|
||||
let data = page.data;
|
||||
for (let i = 0; i < data.length; i++) {
|
||||
if (data[i] && data[i].fields && data[i].fields.length > 0) {
|
||||
data[i].fields.forEach(item => {
|
||||
if (item.value) {
|
||||
item.value = JSON.parse(item.value);
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
export function getPluginCustomFields(projectId) {
|
||||
return get(BASE_URL + `plugin/custom/fields/${projectId}`);
|
||||
}
|
||||
|
|
|
@ -99,6 +99,15 @@
|
|||
</el-dropdown>
|
||||
</template>
|
||||
</ms-table-column>
|
||||
<ms-table-column
|
||||
:field="item"
|
||||
:label="field.name"
|
||||
:prop="field.name"
|
||||
v-if="field.name === '处理人'">
|
||||
<template v-slot="scope">
|
||||
<span>{{ getCustomMember(scope.row, field) }}</span>
|
||||
</template>
|
||||
</ms-table-column>
|
||||
</span>
|
||||
|
||||
<ms-table-column
|
||||
|
@ -130,6 +139,7 @@ import { LOCAL } from "metersphere-frontend/src/utils/constants";
|
|||
import IssueDescriptionTableItem from "@/business/issue/IssueDescriptionTableItem";
|
||||
import { ISSUE_STATUS_MAP } from "metersphere-frontend/src/utils/table-constants";
|
||||
import { issueStatusChange } from "@/api/issue";
|
||||
import {getProjectMember} from "@/api/user";
|
||||
|
||||
export default {
|
||||
name: "CaseDiffIssueRelate",
|
||||
|
@ -149,6 +159,7 @@ export default {
|
|||
status: [],
|
||||
issueRelateVisible: false,
|
||||
fields: [],
|
||||
members: [],
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
|
@ -190,11 +201,20 @@ export default {
|
|||
this.$refs.table.reloadTable();
|
||||
}
|
||||
});
|
||||
this.getMembers();
|
||||
},
|
||||
methods: {
|
||||
getMembers() {
|
||||
getProjectMember().then((res) => {
|
||||
this.members = res.data;
|
||||
});
|
||||
},
|
||||
getCustomMember(row, field) {
|
||||
return getCustomFieldValue(row, field, this.members);
|
||||
},
|
||||
getStatus(row, field) {
|
||||
return getCustomFieldValue(row, field)
|
||||
? getCustomFieldValue(row, field)
|
||||
return getCustomFieldValue(row, field, this.members)
|
||||
? getCustomFieldValue(row, field, this.members)
|
||||
: this.issueStatusMap[row.status];
|
||||
},
|
||||
statusChange(param) {
|
||||
|
|
|
@ -99,6 +99,11 @@
|
|||
<div class="compare-wrap">
|
||||
<div class="version-left-box">
|
||||
<el-select v-model="versionLeftId" size="small" clearable>
|
||||
<template #prefix>
|
||||
<span class="compare-version-lasted" v-if="versionLeftId === dataLatestId">
|
||||
{{ $t("case.last_version") }}
|
||||
</span>
|
||||
</template>
|
||||
<el-option
|
||||
v-for="item in versionLeftCompareOptions"
|
||||
:key="item.id"
|
||||
|
@ -115,6 +120,11 @@
|
|||
<div class="desc">{{ $t("case.compare") }}</div>
|
||||
<div class="version-right-box">
|
||||
<el-select v-model="versionRightId" size="small" clearable>
|
||||
<template #prefix>
|
||||
<span class="compare-version-lasted" v-if="versionRightId === dataLatestId">
|
||||
{{ $t("case.last_version") }}
|
||||
</span>
|
||||
</template>
|
||||
<el-option
|
||||
v-for="item in versionRightCompareOptions"
|
||||
:key="item.id"
|
||||
|
@ -597,6 +607,16 @@ export default {
|
|||
margin-top: 24px;
|
||||
margin-bottom: 24px;
|
||||
}
|
||||
|
||||
:deep(.el-input--prefix .el-input__inner) {
|
||||
padding-left: 15px;
|
||||
}
|
||||
|
||||
:deep(.el-input__prefix) {
|
||||
left: 60px;
|
||||
transition: all 0.3s;
|
||||
top: 5px;
|
||||
}
|
||||
</style>
|
||||
<style>
|
||||
.version-popover {
|
||||
|
|
Loading…
Reference in New Issue