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 bd290756f6
commit 7205c4e952
3 changed files with 10 additions and 6 deletions

View File

@ -54,7 +54,7 @@
"vue-float-action-button": "^0.6.6", "vue-float-action-button": "^0.6.6",
"vue-i18n": "^8.15.3", "vue-i18n": "^8.15.3",
"vue-jsonpath-picker": "^1.1.5", "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-papa-parse": "^2.0.0",
"vue-pdf": "^4.2.0", "vue-pdf": "^4.2.0",
"vue-router": "^3.1.3", "vue-router": "^3.1.3",

View File

@ -172,8 +172,7 @@ name: "TestCaseMinder",
this._buildSaveCase(root, saveCases, deleteCases, parent, preNode, nextNode); this._buildSaveCase(root, saveCases, deleteCases, parent, preNode, nextNode);
} else { } else {
let deleteChild = data.deleteChild; let deleteChild = data.deleteChild;
if (deleteChild && deleteChild.length > 0 if (deleteChild && deleteChild.length > 0 && data.type === 'node') {
&& data.type === 'node') {
deleteCases.push(...deleteChild); deleteCases.push(...deleteChild);
} }
@ -277,13 +276,13 @@ name: "TestCaseMinder",
if (isChange) { if (isChange) {
testCase.targetId = null; // testCase.targetId = null; //
if (preNode) { if (this.isCaseNode(preNode)) {
let preId = preNode.data.id; let preId = preNode.data.id;
if (preId && preId.length > 15) { if (preId && preId.length > 15) {
testCase.targetId = preId; testCase.targetId = preId;
testCase.moveMode = 'AFTER'; testCase.moveMode = 'AFTER';
} }
} else if (nextNode) { } else if (this.isCaseNode(nextNode)) {
let nextId = nextNode.data.id; let nextId = nextNode.data.id;
if (nextId && nextId.length > 15) { if (nextId && nextId.length > 15) {
testCase.targetId = nextId; testCase.targetId = nextId;
@ -299,6 +298,12 @@ name: "TestCaseMinder",
throw new Error(tip); 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) { buildExtraNode(node) {
let data = node.data; let data = node.data;
let nodeData = { let nodeData = {

View File

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