From 9814b18588b9048963f4d368d1702bcf88808f3e Mon Sep 17 00:00:00 2001 From: fit2-zhao Date: Tue, 7 Sep 2021 18:52:11 +0800 Subject: [PATCH] =?UTF-8?q?fix(=E6=8F=92=E4=BB=B6=E7=AE=A1=E7=90=86):=20?= =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E6=9F=A5=E7=9C=8B=E6=8F=92=E4=BB=B6=E6=8A=A5?= =?UTF-8?q?=E9=94=99=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/io/metersphere/service/utils/CommonUtil.java | 1 - .../business/components/settings/plugin/PluginConfig.vue | 2 +- .../business/components/settings/plugin/ScriptView.vue | 8 ++++++-- 3 files changed, 7 insertions(+), 4 deletions(-) diff --git a/backend/src/main/java/io/metersphere/service/utils/CommonUtil.java b/backend/src/main/java/io/metersphere/service/utils/CommonUtil.java index f7e77a928e..3c6aa0889d 100644 --- a/backend/src/main/java/io/metersphere/service/utils/CommonUtil.java +++ b/backend/src/main/java/io/metersphere/service/utils/CommonUtil.java @@ -53,7 +53,6 @@ public class CommonUtil { public static List> getSubClass(String fileName) throws Exception { List> classes = new LinkedList<>(); - ResourcePatternResolver resourceLoader = new PathMatchingResourcePatternResolver(); if (StringUtil.isNotEmpty(fileName) && fileName.endsWith(".jar")) { fileName = fileName.substring(0, fileName.length() - 4); } diff --git a/frontend/src/business/components/settings/plugin/PluginConfig.vue b/frontend/src/business/components/settings/plugin/PluginConfig.vue index 427919870e..2bb41e14fa 100644 --- a/frontend/src/business/components/settings/plugin/PluginConfig.vue +++ b/frontend/src/business/components/settings/plugin/PluginConfig.vue @@ -91,7 +91,7 @@ export default { this.initPlugins(); }, handleView(row){ - this.$refs.scriptView.open(row.pluginId); + this.$refs.scriptView.open(row.scriptId); }, handleDelete(id) { this.$confirm(this.$t('api_test.jar_config.delete_tip'), '', { diff --git a/frontend/src/business/components/settings/plugin/ScriptView.vue b/frontend/src/business/components/settings/plugin/ScriptView.vue index 8843de22ef..bbdcea86b6 100644 --- a/frontend/src/business/components/settings/plugin/ScriptView.vue +++ b/frontend/src/business/components/settings/plugin/ScriptView.vue @@ -45,8 +45,12 @@ export default { getPlugin(id) { if (id) { this.$get('/plugin/get/' + id, response => { - this.plugin = response.data; - this.reload(); + if (response.data) { + this.plugin = response.data; + this.reload(); + } else { + this.$warning("未找到脚本内容"); + } }); } },