fix (接口定义): 批量步骤拖拽恢复

This commit is contained in:
fit2-zhao 2021-09-13 19:11:50 +08:00 committed by fit2-zhao
parent d8c7a3c1d8
commit a61aaf52b6
1 changed files with 6 additions and 20 deletions

View File

@ -338,7 +338,6 @@ import "@/common/css/material-icons.css"
import OutsideClick from "@/common/js/outside-click";
import {saveScenario} from "@/business/components/api/automation/api-automation";
import MsComponentConfig from "./component/ComponentConfig";
import {ELEMENTS} from "@/business/components/api/automation/scenario/Setting";
let jsonPath = require('jsonpath');
export default {
@ -1177,26 +1176,13 @@ export default {
this.getEnvironments();
},
allowDrop(draggingNode, dropNode, dropType) {
if(dropNode.data.disabled){
return false;
}
if (dropType != "inner" && !draggingNode.data.disabled) {
if (draggingNode.data.referenced) {
if (draggingNode.data.referenced !== 'REF' && draggingNode.data.referenced !== 'Deleted') {
//
if (dropType != "inner") {
return true;
}
return false;
}
} else if (dropType === "inner" && dropNode.data.referenced !== 'REF' && dropNode.data.referenced !== 'Deleted'
&& (this.stepFilter.get(dropNode.data.type) && this.stepFilter.get(dropNode.data.type).indexOf(draggingNode.data.type) != -1)
&& !draggingNode.data.disabled) {
return true;
} else if (dropType === "inner" && ELEMENTS.get(dropNode.data.type).indexOf(draggingNode.data.type) != -1) {
if (dropNode.data.referenced) {
if (dropNode.data.referenced !== 'REF' && dropNode.data.referenced !== 'Deleted') {
return true;
}
return false;
} else {
return true;
}
}
return false;
},