From 88836f6c80cd894419613e8554375bdf1de127b9 Mon Sep 17 00:00:00 2001 From: fit2-zhao Date: Mon, 13 Sep 2021 11:24:33 +0800 Subject: [PATCH] =?UTF-8?q?fix=20(=E6=8E=A5=E5=8F=A3=E8=87=AA=E5=8A=A8?= =?UTF-8?q?=E5=8C=96):=20=E4=BF=AE=E5=A4=8D=E6=AD=A5=E9=AA=A4=E6=8B=96?= =?UTF-8?q?=E6=8B=BD=E9=97=AE=E9=A2=98=20--bug=3D1006430=20--user=3D?= =?UTF-8?q?=E8=B5=B5=E5=8B=87=20=E3=80=90github#5962=E3=80=91=E5=9C=BA?= =?UTF-8?q?=E6=99=AF=E4=B8=AD...=20https://www.tapd.cn/55049933/s/1045716?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../automation/scenario/EditApiScenario.vue | 23 ++++++++++++++----- 1 file changed, 17 insertions(+), 6 deletions(-) diff --git a/frontend/src/business/components/api/automation/scenario/EditApiScenario.vue b/frontend/src/business/components/api/automation/scenario/EditApiScenario.vue index f0fc3f9fb7..77c8ca7532 100644 --- a/frontend/src/business/components/api/automation/scenario/EditApiScenario.vue +++ b/frontend/src/business/components/api/automation/scenario/EditApiScenario.vue @@ -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") { - 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) { + if (dropType != "inner" && !draggingNode.data.disabled) { + if (draggingNode.data.referenced) { + if (draggingNode.data.referenced !== 'REF' && draggingNode.data.referenced !== 'Deleted' && !draggingNode.data.disabled) { + return true; + } + 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; },