fix (接口自动化): 修复步骤拖拽问题
--bug=1006430 --user=赵勇 【github#5962】场景中... https://www.tapd.cn/55049933/s/1045716
This commit is contained in:
parent
c30963dcb5
commit
88836f6c80
|
@ -338,6 +338,7 @@ 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 {
|
||||
|
@ -1176,13 +1177,23 @@ export default {
|
|||
this.getEnvironments();
|
||||
},
|
||||
allowDrop(draggingNode, dropNode, dropType) {
|
||||
// 增加插件权限控制
|
||||
if (dropType != "inner") {
|
||||
if (dropType != "inner" && !draggingNode.data.disabled) {
|
||||
if (draggingNode.data.referenced) {
|
||||
if (draggingNode.data.referenced !== 'REF' && draggingNode.data.referenced !== 'Deleted' && !draggingNode.data.disabled) {
|
||||
return true;
|
||||
} 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 false;
|
||||
}
|
||||
return true;
|
||||
} else if (dropType === "inner" && ELEMENTS.get(dropNode.data.type).indexOf(draggingNode.data.type) != -1 && !dropNode.data.disabled) {
|
||||
if (dropNode.data.referenced) {
|
||||
if (dropNode.data.referenced !== 'REF' && dropNode.data.referenced !== 'Deleted') {
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
} else {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
},
|
||||
|
|
Loading…
Reference in New Issue