fix(测试跟踪): 功能用例TAB菜单角标问题
--bug=1026581 --user=宋昌昌 统一角标风格为圆圈加数字,另外关联用例和关联缺陷下面都有数据,但是没有显示角标 https://www.tapd.cn/55049933/s/1378500
This commit is contained in:
parent
bdd66b7f87
commit
cdbdcb931c
|
@ -83,7 +83,7 @@ export function getIssuesByCaseId(refType, caseId, page) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function like(key, target) {
|
export function like(key, target) {
|
||||||
if (key === undefined || target === undefined) {
|
if (key === undefined || target === undefined) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
@ -93,22 +93,7 @@ function like(key, target) {
|
||||||
|
|
||||||
export function getIssuesByCaseIdWithSearch(refType, caseId, page, condition) {
|
export function getIssuesByCaseIdWithSearch(refType, caseId, page, condition) {
|
||||||
if (caseId) {
|
if (caseId) {
|
||||||
return get('issues/get/case/' + refType + '/' + caseId)
|
return get('issues/get/case/' + refType + '/' + caseId);
|
||||||
.then((response) => {
|
|
||||||
if(condition && condition.name && response.data){
|
|
||||||
//过滤
|
|
||||||
page.data = response.data.filter((v) => {
|
|
||||||
return (
|
|
||||||
like(condition.name, v.title) ||
|
|
||||||
like(condition.name, v.num)
|
|
||||||
);
|
|
||||||
});
|
|
||||||
} else{
|
|
||||||
page.data = response.data;
|
|
||||||
}
|
|
||||||
buildIssues(page);
|
|
||||||
parseFields(page);
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -3,6 +3,7 @@
|
||||||
<!-- 非创建状态下 展示 -->
|
<!-- 非创建状态下 展示 -->
|
||||||
<div class="tab-pane-wrap" v-if="!editable">
|
<div class="tab-pane-wrap" v-if="!editable">
|
||||||
<el-tabs v-model="caseActiveName" @tab-click="tabClick">
|
<el-tabs v-model="caseActiveName" @tab-click="tabClick">
|
||||||
|
<!-- 用例详情 -->
|
||||||
<el-tab-pane :label="$t('case.use_case_detail')" name="detail">
|
<el-tab-pane :label="$t('case.use_case_detail')" name="detail">
|
||||||
<div
|
<div
|
||||||
class="tab-container"
|
class="tab-container"
|
||||||
|
@ -31,10 +32,17 @@
|
||||||
</el-scrollbar>
|
</el-scrollbar>
|
||||||
</div>
|
</div>
|
||||||
</el-tab-pane>
|
</el-tab-pane>
|
||||||
|
<!-- 关联用例 -->
|
||||||
<el-tab-pane
|
<el-tab-pane
|
||||||
:label="$t('case.associate_test_cases')"
|
:label="$t('case.associate_test_cases')"
|
||||||
name="associateTestCases"
|
name="associateTestCases"
|
||||||
>
|
>
|
||||||
|
<span slot="label">
|
||||||
|
{{ $t('case.associate_test_cases') }}
|
||||||
|
<div class="el-step__icon is-text ms-api-col ms-header" v-if="relateCaseCount && relateCaseCount > 0">
|
||||||
|
<div class="el-step__icon-inner">{{ relateCaseCount }}</div>
|
||||||
|
</div>
|
||||||
|
</span>
|
||||||
<div
|
<div
|
||||||
class="tab-container"
|
class="tab-container"
|
||||||
:class="{ 'comment-edit-tab-container': isCommentEdit }"
|
:class="{ 'comment-edit-tab-container': isCommentEdit }"
|
||||||
|
@ -42,6 +50,7 @@
|
||||||
<el-scrollbar>
|
<el-scrollbar>
|
||||||
<div class="content-container">
|
<div class="content-container">
|
||||||
<case-test-relate
|
<case-test-relate
|
||||||
|
@setCount="setRelateCaseCount"
|
||||||
ref="relateTest"
|
ref="relateTest"
|
||||||
:case-id="caseId"
|
:case-id="caseId"
|
||||||
:read-only="readOnly"
|
:read-only="readOnly"
|
||||||
|
@ -56,6 +65,12 @@
|
||||||
:label="$t('test_track.case.relate_issue')"
|
:label="$t('test_track.case.relate_issue')"
|
||||||
name="associatedDefects"
|
name="associatedDefects"
|
||||||
>
|
>
|
||||||
|
<span slot="label">
|
||||||
|
{{ $t('test_track.case.relate_issue') }}
|
||||||
|
<div class="el-step__icon is-text ms-api-col ms-header" v-if="relateIssueCount && relateIssueCount > 0">
|
||||||
|
<div class="el-step__icon-inner">{{ relateIssueCount }}</div>
|
||||||
|
</div>
|
||||||
|
</span>
|
||||||
<div
|
<div
|
||||||
class="tab-container"
|
class="tab-container"
|
||||||
:class="{ 'comment-edit-tab-container': isCommentEdit }"
|
:class="{ 'comment-edit-tab-container': isCommentEdit }"
|
||||||
|
@ -63,6 +78,7 @@
|
||||||
<el-scrollbar>
|
<el-scrollbar>
|
||||||
<div class="content-container">
|
<div class="content-container">
|
||||||
<case-issue-relate
|
<case-issue-relate
|
||||||
|
@setCount="setRelateIssueCount"
|
||||||
:plan-id="planId"
|
:plan-id="planId"
|
||||||
:is-copy="isCopy"
|
:is-copy="isCopy"
|
||||||
:copy-case-id="copyCaseId"
|
:copy-case-id="copyCaseId"
|
||||||
|
@ -75,13 +91,14 @@
|
||||||
</el-scrollbar>
|
</el-scrollbar>
|
||||||
</div>
|
</div>
|
||||||
</el-tab-pane>
|
</el-tab-pane>
|
||||||
|
<!-- 依赖关系 -->
|
||||||
<el-tab-pane :label="$t('case.dependencies')" name="dependencies">
|
<el-tab-pane :label="$t('case.dependencies')" name="dependencies">
|
||||||
<template v-slot:label>
|
<span slot="label">
|
||||||
<tab-pane-count
|
{{ $t('commons.relationship.name') }}
|
||||||
:title="$t('commons.relationship.name')"
|
<div class="el-step__icon is-text ms-api-col ms-header" v-if="relationshipCount && relationshipCount > 0">
|
||||||
:count="relationshipCount"
|
<div class="el-step__icon-inner">{{ relationshipCount }}</div>
|
||||||
/>
|
</div>
|
||||||
</template>
|
</span>
|
||||||
<div
|
<div
|
||||||
class="tab-container"
|
class="tab-container"
|
||||||
:class="{ 'comment-edit-tab-container': isCommentEdit }"
|
:class="{ 'comment-edit-tab-container': isCommentEdit }"
|
||||||
|
@ -101,6 +118,7 @@
|
||||||
</el-scrollbar>
|
</el-scrollbar>
|
||||||
</div>
|
</div>
|
||||||
</el-tab-pane>
|
</el-tab-pane>
|
||||||
|
<!-- 评论 -->
|
||||||
<el-tab-pane :label="$t('case.comment')" name="comment">
|
<el-tab-pane :label="$t('case.comment')" name="comment">
|
||||||
<span slot="label">
|
<span slot="label">
|
||||||
{{ $t('case.comment') }}
|
{{ $t('case.comment') }}
|
||||||
|
@ -236,6 +254,8 @@ export default {
|
||||||
fileList: [],
|
fileList: [],
|
||||||
tableData: [],
|
tableData: [],
|
||||||
demandOptions: [],
|
demandOptions: [],
|
||||||
|
relateCaseCount: 0,
|
||||||
|
relateIssueCount: 0,
|
||||||
relationshipCount: 0,
|
relationshipCount: 0,
|
||||||
demandValue: [],
|
demandValue: [],
|
||||||
demandLabel: "",
|
demandLabel: "",
|
||||||
|
@ -344,6 +364,12 @@ export default {
|
||||||
setRelationshipCount(count) {
|
setRelationshipCount(count) {
|
||||||
this.relationshipCount = count;
|
this.relationshipCount = count;
|
||||||
},
|
},
|
||||||
|
setRelateCaseCount(count) {
|
||||||
|
this.relateCaseCount = count;
|
||||||
|
},
|
||||||
|
setRelateIssueCount(count) {
|
||||||
|
this.relateIssueCount = count;
|
||||||
|
},
|
||||||
setRelationshipGraph(val) {
|
setRelationshipGraph(val) {
|
||||||
this.$emit("syncRelationGraphOpen", val);
|
this.$emit("syncRelationGraphOpen", val);
|
||||||
},
|
},
|
||||||
|
|
|
@ -185,23 +185,19 @@ import IssueDescriptionTableItem from "@/business/issue/IssueDescriptionTableIte
|
||||||
import {ISSUE_STATUS_MAP, TAPD_ISSUE_STATUS_MAP} from "metersphere-frontend/src/utils/table-constants";
|
import {ISSUE_STATUS_MAP, TAPD_ISSUE_STATUS_MAP} from "metersphere-frontend/src/utils/table-constants";
|
||||||
import IssueRelateList from "./CaseIssueRelateList";
|
import IssueRelateList from "./CaseIssueRelateList";
|
||||||
import {
|
import {
|
||||||
|
buildIssues,
|
||||||
closeIssue,
|
closeIssue,
|
||||||
deleteIssueRelate,
|
deleteIssueRelate,
|
||||||
getIssuePartTemplateWithProject,
|
getIssuePartTemplateWithProject,
|
||||||
getIssuesByCaseId,
|
getIssuesByCaseIdWithSearch,
|
||||||
|
getPlatformStatus,
|
||||||
issueStatusChange,
|
issueStatusChange,
|
||||||
getIssuesByCaseIdWithSearch, getPlatformStatus,
|
like,
|
||||||
|
parseFields,
|
||||||
} from "@/api/issue";
|
} from "@/api/issue";
|
||||||
import {
|
import {getCustomFieldValue, getTableHeaderWithCustomFields,} from "metersphere-frontend/src/utils/tableUtils";
|
||||||
getCustomFieldValue,
|
|
||||||
getTableHeaderWithCustomFields,
|
|
||||||
} from "metersphere-frontend/src/utils/tableUtils";
|
|
||||||
import {LOCAL} from "metersphere-frontend/src/utils/constants";
|
import {LOCAL} from "metersphere-frontend/src/utils/constants";
|
||||||
import {
|
import {getCurrentProjectID, getCurrentWorkspaceId,} from "metersphere-frontend/src/utils/token";
|
||||||
getCurrentProjectID,
|
|
||||||
getCurrentWorkspaceId,
|
|
||||||
} from "metersphere-frontend/src/utils/token";
|
|
||||||
import {operationConfirm} from "@/business/utils/sdk-utils";
|
|
||||||
import MsNewUiSearch from "metersphere-frontend/src/components/new-ui/MsSearch";
|
import MsNewUiSearch from "metersphere-frontend/src/components/new-ui/MsSearch";
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
|
@ -297,6 +293,7 @@ export default {
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
activated() {
|
activated() {
|
||||||
|
this.search();
|
||||||
getPlatformStatus({
|
getPlatformStatus({
|
||||||
projectId: getCurrentProjectID(),
|
projectId: getCurrentProjectID(),
|
||||||
workspaceId: getCurrentWorkspaceId()
|
workspaceId: getCurrentWorkspaceId()
|
||||||
|
@ -326,12 +323,23 @@ export default {
|
||||||
getIssues() {
|
getIssues() {
|
||||||
if (!this.isCopy) {
|
if (!this.isCopy) {
|
||||||
this.page.result = true;
|
this.page.result = true;
|
||||||
let result = getIssuesByCaseIdWithSearch(
|
let result = getIssuesByCaseIdWithSearch(this.planId ? "PLAN_FUNCTIONAL" : "FUNCTIONAL", this.getCaseResourceId())
|
||||||
this.planId ? "PLAN_FUNCTIONAL" : "FUNCTIONAL",
|
.then((response) => {
|
||||||
this.getCaseResourceId(),
|
if(this.condition && this.condition.name && response.data){
|
||||||
this.page,
|
//过滤
|
||||||
this.condition
|
this.page.data = response.data.filter((v) => {
|
||||||
);
|
return (
|
||||||
|
like(condition.name, v.title) ||
|
||||||
|
like(condition.name, v.num)
|
||||||
|
);
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
this.page.data = response.data;
|
||||||
|
}
|
||||||
|
this.$emit("setCount", this.page.data.length);
|
||||||
|
buildIssues(page);
|
||||||
|
parseFields(page);
|
||||||
|
});
|
||||||
if (result) {
|
if (result) {
|
||||||
this.page.result = result;
|
this.page.result = result;
|
||||||
}
|
}
|
||||||
|
|
|
@ -229,7 +229,7 @@ export default {
|
||||||
} else {
|
} else {
|
||||||
this.data = data;
|
this.data = data;
|
||||||
}
|
}
|
||||||
|
this.$emit("setCount", this.data.length);
|
||||||
this.notInIds = this.data.map((i) => i.testId);
|
this.notInIds = this.data.map((i) => i.testId);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue