From 7205c4e9525e4926a86e6ac32fa30735206bcfca Mon Sep 17 00:00:00 2001 From: chenjianxing Date: Wed, 29 Sep 2021 11:46:44 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E8=84=91=E5=9B=BE=E7=BC=BA=E9=99=B7=201?= =?UTF-8?q?006976=201006973=20fix=20#6509=20fix=20#6549?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- frontend/package.json | 2 +- .../track/common/minder/TestCaseMinder.vue | 13 +++++++++---- .../components/track/common/minder/minderUtils.js | 1 - 3 files changed, 10 insertions(+), 6 deletions(-) diff --git a/frontend/package.json b/frontend/package.json index ea6d9431fc..7c306cf3fa 100644 --- a/frontend/package.json +++ b/frontend/package.json @@ -54,7 +54,7 @@ "vue-float-action-button": "^0.6.6", "vue-i18n": "^8.15.3", "vue-jsonpath-picker": "^1.1.5", - "vue-minder-editor-plus": "^1.0.27", + "vue-minder-editor-plus": "^1.0.29", "vue-papa-parse": "^2.0.0", "vue-pdf": "^4.2.0", "vue-router": "^3.1.3", diff --git a/frontend/src/business/components/track/common/minder/TestCaseMinder.vue b/frontend/src/business/components/track/common/minder/TestCaseMinder.vue index fb05d4b72e..b7e556344f 100644 --- a/frontend/src/business/components/track/common/minder/TestCaseMinder.vue +++ b/frontend/src/business/components/track/common/minder/TestCaseMinder.vue @@ -172,8 +172,7 @@ name: "TestCaseMinder", this._buildSaveCase(root, saveCases, deleteCases, parent, preNode, nextNode); } else { let deleteChild = data.deleteChild; - if (deleteChild && deleteChild.length > 0 - && data.type === 'node') { + if (deleteChild && deleteChild.length > 0 && data.type === 'node') { deleteCases.push(...deleteChild); } @@ -277,13 +276,13 @@ name: "TestCaseMinder", if (isChange) { testCase.targetId = null; // ζŽ’εΊε€„η† - if (preNode) { + if (this.isCaseNode(preNode)) { let preId = preNode.data.id; if (preId && preId.length > 15) { testCase.targetId = preId; testCase.moveMode = 'AFTER'; } - } else if (nextNode) { + } else if (this.isCaseNode(nextNode)) { let nextId = nextNode.data.id; if (nextId && nextId.length > 15) { testCase.targetId = nextId; @@ -299,6 +298,12 @@ name: "TestCaseMinder", throw new Error(tip); } }, + isCaseNode(node) { + if (node && node.resource && node.resource.indexOf(this.$t('api_test.definition.request.case')) > -1) { + return true; + } + return false; + }, buildExtraNode(node) { let data = node.data; let nodeData = { diff --git a/frontend/src/business/components/track/common/minder/minderUtils.js b/frontend/src/business/components/track/common/minder/minderUtils.js index 35a1ca1644..5cd871ccf5 100644 --- a/frontend/src/business/components/track/common/minder/minderUtils.js +++ b/frontend/src/business/components/track/common/minder/minderUtils.js @@ -71,7 +71,6 @@ export function loadNode(node, param, getCaseFuc, setParamCallback, getExtraNode } } data.loaded = true; - window.minder.execCommand('expand'); } /**