fix: 脑图缺陷 1006976 1006973 fix #6509 fix #6549

This commit is contained in:
chenjianxing 2021-09-29 11:46:44 +08:00 committed by jianxing
parent 75380580c4
commit e6afb9fe38
3 changed files with 10 additions and 6 deletions

View File

@ -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",

View File

@ -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 = {

View File

@ -71,7 +71,6 @@ export function loadNode(node, param, getCaseFuc, setParamCallback, getExtraNode
}
}
data.loaded = true;
window.minder.execCommand('expand');
}
/**