diff --git a/test-track/frontend/src/api/issue.js b/test-track/frontend/src/api/issue.js
index ee6f3f1c7a..7a5512a8dc 100644
--- a/test-track/frontend/src/api/issue.js
+++ b/test-track/frontend/src/api/issue.js
@@ -83,7 +83,7 @@ export function getIssuesByCaseId(refType, caseId, page) {
}
}
-function like(key, target) {
+export function like(key, target) {
if (key === undefined || target === undefined) {
return false;
}
@@ -93,22 +93,7 @@ function like(key, target) {
export function getIssuesByCaseIdWithSearch(refType, caseId, page, condition) {
if (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);
- });
+ return get('issues/get/case/' + refType + '/' + caseId);
}
}
diff --git a/test-track/frontend/src/business/case/components/case/CaseEditInfoComponent.vue b/test-track/frontend/src/business/case/components/case/CaseEditInfoComponent.vue
index f097769f31..57b3f8ead2 100644
--- a/test-track/frontend/src/business/case/components/case/CaseEditInfoComponent.vue
+++ b/test-track/frontend/src/business/case/components/case/CaseEditInfoComponent.vue
@@ -3,6 +3,7 @@
+
+
+
+ {{ $t('case.associate_test_cases') }}
+
+
+
+ {{ $t('test_track.case.relate_issue') }}
+
+
+
-
-
-
+
+ {{ $t('commons.relationship.name') }}
+
+
+
{{ $t('case.comment') }}
@@ -236,6 +254,8 @@ export default {
fileList: [],
tableData: [],
demandOptions: [],
+ relateCaseCount: 0,
+ relateIssueCount: 0,
relationshipCount: 0,
demandValue: [],
demandLabel: "",
@@ -344,6 +364,12 @@ export default {
setRelationshipCount(count) {
this.relationshipCount = count;
},
+ setRelateCaseCount(count) {
+ this.relateCaseCount = count;
+ },
+ setRelateIssueCount(count) {
+ this.relateIssueCount = count;
+ },
setRelationshipGraph(val) {
this.$emit("syncRelationGraphOpen", val);
},
diff --git a/test-track/frontend/src/business/case/components/case/CaseIssueRelate.vue b/test-track/frontend/src/business/case/components/case/CaseIssueRelate.vue
index 9c021c660d..a60b466541 100644
--- a/test-track/frontend/src/business/case/components/case/CaseIssueRelate.vue
+++ b/test-track/frontend/src/business/case/components/case/CaseIssueRelate.vue
@@ -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 IssueRelateList from "./CaseIssueRelateList";
import {
+ buildIssues,
closeIssue,
deleteIssueRelate,
getIssuePartTemplateWithProject,
- getIssuesByCaseId,
+ getIssuesByCaseIdWithSearch,
+ getPlatformStatus,
issueStatusChange,
- getIssuesByCaseIdWithSearch, getPlatformStatus,
+ like,
+ parseFields,
} from "@/api/issue";
-import {
- getCustomFieldValue,
- getTableHeaderWithCustomFields,
-} from "metersphere-frontend/src/utils/tableUtils";
+import {getCustomFieldValue, getTableHeaderWithCustomFields,} from "metersphere-frontend/src/utils/tableUtils";
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 {getCurrentProjectID, getCurrentWorkspaceId,} from "metersphere-frontend/src/utils/token";
import MsNewUiSearch from "metersphere-frontend/src/components/new-ui/MsSearch";
export default {
@@ -297,6 +293,7 @@ export default {
});
},
activated() {
+ this.search();
getPlatformStatus({
projectId: getCurrentProjectID(),
workspaceId: getCurrentWorkspaceId()
@@ -326,12 +323,23 @@ export default {
getIssues() {
if (!this.isCopy) {
this.page.result = true;
- let result = getIssuesByCaseIdWithSearch(
- this.planId ? "PLAN_FUNCTIONAL" : "FUNCTIONAL",
- this.getCaseResourceId(),
- this.page,
- this.condition
- );
+ let result = getIssuesByCaseIdWithSearch(this.planId ? "PLAN_FUNCTIONAL" : "FUNCTIONAL", this.getCaseResourceId())
+ .then((response) => {
+ if(this.condition && this.condition.name && response.data){
+ //过滤
+ 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) {
this.page.result = result;
}
diff --git a/test-track/frontend/src/business/case/components/case/CaseTestRelate.vue b/test-track/frontend/src/business/case/components/case/CaseTestRelate.vue
index 9e7efac9e6..2f690b7bd5 100644
--- a/test-track/frontend/src/business/case/components/case/CaseTestRelate.vue
+++ b/test-track/frontend/src/business/case/components/case/CaseTestRelate.vue
@@ -229,7 +229,7 @@ export default {
} else {
this.data = data;
}
-
+ this.$emit("setCount", this.data.length);
this.notInIds = this.data.map((i) => i.testId);
});
}