fix(测试跟踪): 脑图无法查看缺陷
--bug=1018770 --user=陈建星 【测试跟踪】测试计划/测试用例-脑图-双击缺陷名称无法跳转 https://www.tapd.cn/55049933/s/1275192
This commit is contained in:
parent
f67014da61
commit
c9c8ee8f0c
|
@ -90,13 +90,19 @@ export function getIssuesById(id) {
|
|||
return id ? get('/issues/get/' + id) : {};
|
||||
}
|
||||
|
||||
export function getIssuesListById(id, projectId, workspaceId) {
|
||||
export function getIssuesForMinder(id, projectId, workspaceId) {
|
||||
let condition = {
|
||||
id: id,
|
||||
projectId: projectId,
|
||||
workspaceId: workspaceId
|
||||
};
|
||||
return post('issues/list/' + 1 + '/' + 10, condition);
|
||||
return new Promise(resolve => {
|
||||
post('issues/list/' + 1 + '/' + 10, condition)
|
||||
.then((r) => {
|
||||
parseCustomFilesForList(r.data.listObject);
|
||||
resolve({data: r.data.listObject[0]});
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
export function getIssuesByPlanId(planId) {
|
||||
|
|
|
@ -72,10 +72,10 @@ import {setPriorityView} from "vue-minder-editor-plus/src/script/tool/utils";
|
|||
import IsChangeConfirm from "metersphere-frontend/src/components/IsChangeConfirm";
|
||||
import MsModuleMinder from "@/business/common/minder/MsModuleMinder";
|
||||
|
||||
const {getIssuesListById} = require("@/api/issue");
|
||||
import {useStore} from "@/store"
|
||||
import {mapState} from "pinia";
|
||||
import {getCurrentWorkspaceId} from "@/business/utils/sdk-utils";
|
||||
import {getIssuesForMinder} from "@/api/issue";
|
||||
|
||||
|
||||
export default {
|
||||
|
@ -204,10 +204,11 @@ export default {
|
|||
isNotDisableNode = true;
|
||||
}
|
||||
if (node.data.type === 'issue') {
|
||||
getIssuesListById(node.data.id, this.projectId, this.workspaceId, (data) => {
|
||||
data.customFields = JSON.parse(data.customFields);
|
||||
this.$refs.issueEdit.open(data);
|
||||
});
|
||||
getIssuesForMinder(node.data.id, this.projectId, this.workspaceId)
|
||||
.then((r) => {
|
||||
let data = r.data;
|
||||
this.$refs.issueEdit.open(data);
|
||||
})
|
||||
}
|
||||
});
|
||||
if (isNotDisableNode) {
|
||||
|
|
|
@ -36,8 +36,6 @@
|
|||
<script>
|
||||
import {setPriorityView} from "vue-minder-editor-plus/src/script/tool/utils";
|
||||
|
||||
const {getCurrentWorkspaceId} = require("metersphere-frontend/src/utils");
|
||||
const {getIssuesListById} = require("@/api/issue");
|
||||
import {
|
||||
handleExpandToLevel, listenBeforeExecCommand, listenNodeSelected, loadSelectNodes,
|
||||
tagBatch, getSelectedNodeData, handleIssueAdd, handleIssueBatch, listenDblclick, handleMinderIssueDelete
|
||||
|
@ -49,7 +47,8 @@ import {addIssueHotBox} from "./minderUtils";
|
|||
import MsModuleMinder from "@/business/common/minder/MsModuleMinder";
|
||||
import {useStore} from "@/store";
|
||||
import {testPlanCaseMinderEdit} from "@/api/remote/plan/test-plan-case";
|
||||
import {hasPermission} from "@/business/utils/sdk-utils";
|
||||
import {getCurrentWorkspaceId, hasPermission} from "@/business/utils/sdk-utils";
|
||||
import {getIssuesForMinder} from "@/api/issue";
|
||||
|
||||
export default {
|
||||
name: "TestPlanMinder",
|
||||
|
@ -87,7 +86,7 @@ export default {
|
|||
workspaceId() {
|
||||
return getCurrentWorkspaceId();
|
||||
},
|
||||
disableMinder() {
|
||||
disableMinder() {
|
||||
if (this.planStatus === 'Archived' || !hasPermission('PROJECT_TRACK_PLAN:READ+RUN')) {
|
||||
return true
|
||||
} else {
|
||||
|
@ -137,10 +136,11 @@ export default {
|
|||
listenDblclick(() => {
|
||||
let data = getSelectedNodeData();
|
||||
if (data.type === 'issue') {
|
||||
getIssuesListById(data.id, this.projectId, this.workspaceId, (data) => {
|
||||
data.customFields = JSON.parse(data.customFields);
|
||||
this.$refs.issueEdit.open(data);
|
||||
});
|
||||
getIssuesForMinder(data.id, this.projectId, this.workspaceId)
|
||||
.then((r) => {
|
||||
let data = r.data;
|
||||
this.$refs.issueEdit.open(data);
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
|
|
Loading…
Reference in New Issue