From 4c45142ce683183d8422d284eaaedf34272ca318 Mon Sep 17 00:00:00 2001 From: Dong Xia Date: Thu, 31 Oct 2024 13:07:13 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=E4=B8=8B=E5=8F=91=E7=BB=93=E6=9E=9C?= =?UTF-8?q?=E5=88=97=E8=A1=A8=E5=B1=95=E7=A4=BA=E7=BB=84=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/pages/script/components/execResult.vue | 74 ++++++++++++++++++++++ 1 file changed, 74 insertions(+) create mode 100644 src/pages/script/components/execResult.vue diff --git a/src/pages/script/components/execResult.vue b/src/pages/script/components/execResult.vue new file mode 100644 index 0000000..0e6edbf --- /dev/null +++ b/src/pages/script/components/execResult.vue @@ -0,0 +1,74 @@ + + + + + -- Gitee From d3641afdf25853f4e84e7d94772405746d17bc3a Mon Sep 17 00:00:00 2001 From: Dong Xia Date: Thu, 31 Oct 2024 13:14:45 +0800 Subject: [PATCH 2/2] =?UTF-8?q?=E5=AE=8C=E6=88=90=E8=84=9A=E6=9C=AC?= =?UTF-8?q?=E4=B8=8B=E5=8F=91=E5=8A=9F=E8=83=BD=E5=BC=80=E5=8F=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/script.js | 20 +++++++++ src/pages/script/script/index.vue | 67 +++++++++++++++++++++++++++++++ 2 files changed, 87 insertions(+) diff --git a/src/api/script.js b/src/api/script.js index d543e5e..8aacba4 100644 --- a/src/api/script.js +++ b/src/api/script.js @@ -1,5 +1,15 @@ import request from './config' +// 获取脚本列表 +export function getScriptListApi(data) { + return request({ + url: '/script/list', + method: 'post', + headers: { 'Content-Type': 'application/json' }, + data + }) +} + // 上传脚本 export function uploadScriptApi(data) { return request({ @@ -9,3 +19,13 @@ export function uploadScriptApi(data) { data }) } + +// 下发脚本 +export function executeScriptApi(data) { + return request({ + url: '/script/execute', + method: 'post', + headers: { 'Content-Type': 'application/json' }, + data + }) +} diff --git a/src/pages/script/script/index.vue b/src/pages/script/script/index.vue index d56e90b..25256a1 100644 --- a/src/pages/script/script/index.vue +++ b/src/pages/script/script/index.vue @@ -18,6 +18,9 @@ {{ text }} @@ -33,22 +36,52 @@ + + + + + + + +