From 6745d8b5fcfb69c20eed4930cb5fd5ad3781e660 Mon Sep 17 00:00:00 2001 From: q4speed Date: Fri, 8 May 2020 11:04:04 +0800 Subject: [PATCH 1/4] =?UTF-8?q?=E4=BF=AE=E5=A4=8Dkey=20value=E4=B8=8D?= =?UTF-8?q?=E8=83=BD=E6=AD=A3=E7=A1=AE=E6=98=BE=E7=A4=BA=E7=9A=84=E9=97=AE?= =?UTF-8?q?=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../components/api/test/ApiTestConfig.vue | 30 +++++++++++-------- .../api/test/components/ApiScenarioConfig.vue | 24 ++++++++------- frontend/src/common/js/message.js | 4 +-- frontend/src/i18n/zh-CN.js | 1 + 4 files changed, 35 insertions(+), 24 deletions(-) diff --git a/frontend/src/business/components/api/test/ApiTestConfig.vue b/frontend/src/business/components/api/test/ApiTestConfig.vue index 4c981189f4..f3581e31f9 100644 --- a/frontend/src/business/components/api/test/ApiTestConfig.vue +++ b/frontend/src/business/components/api/test/ApiTestConfig.vue @@ -16,9 +16,13 @@ {{$t('commons.save')}} - + {{$t('load_test.save_and_run')}} + + + {{$t('api_test.run')}} + {{$t('commons.cancel')}} @@ -91,29 +95,31 @@ } }); }, + save: function (callback) { + this.change = false; + let url = this.create ? "/api/create" : "/api/update"; + this.result = this.$request(this.getOptions(url), () => { + this.create = false; + if (callback) callback(); + }); + }, saveTest: function () { this.save(() => { this.$success(this.$t('commons.save_success')); }) }, - save: function (callback) { - this.change = false; - let url = this.create ? "/api/create" : "/api/update"; - this.result = this.$request(this.getOptions(url), response => { - this.create = false; - if (callback) callback(); + runTest: function () { + this.result = this.$post("/api/run", {id: this.test.id}, () => { + this.$success(this.$t('api_test.running')); }); }, - runTest: function () { + saveRunTest: function () { this.change = false; this.save(() => { this.$success(this.$t('commons.save_success')); - this.result = this.$post("/api/run", {id: this.test.id}, response => { - this.$success(this.$t('api_test.running')); - }); + this.runTest(); }) - }, cancel: function () { this.$router.push('/api/test/list/all'); diff --git a/frontend/src/business/components/api/test/components/ApiScenarioConfig.vue b/frontend/src/business/components/api/test/components/ApiScenarioConfig.vue index 149b18264a..76b4d241fd 100644 --- a/frontend/src/business/components/api/test/components/ApiScenarioConfig.vue +++ b/frontend/src/business/components/api/test/components/ApiScenarioConfig.vue @@ -12,20 +12,20 @@ {{$t('api_test.scenario.config')}} - - - - - - - + + + + + + + - - + + @@ -90,9 +90,13 @@ } }, select: function (obj) { - this.selected = obj; + this.selected = null; + this.$nextTick(function () { + this.selected = obj; + }); }, reset: function () { + this.selected = null; this.$nextTick(function () { this.activeName = 0; this.select(this.scenarios[0]); diff --git a/frontend/src/common/js/message.js b/frontend/src/common/js/message.js index cb3d2fa2a8..0b88ec7ed8 100644 --- a/frontend/src/common/js/message.js +++ b/frontend/src/common/js/message.js @@ -12,7 +12,7 @@ export default { message: message, type: "success", showClose: true, - duration: 1000 + duration: 1500 }) }; @@ -30,7 +30,7 @@ export default { message: message, type: "warning", showClose: true, - duration: 2000 + duration: 5000 }) }; diff --git a/frontend/src/i18n/zh-CN.js b/frontend/src/i18n/zh-CN.js index eda4519f39..b52c9cc388 100644 --- a/frontend/src/i18n/zh-CN.js +++ b/frontend/src/i18n/zh-CN.js @@ -187,6 +187,7 @@ export default { }, api_test: { save_and_run: "保存并执行", + run: "执行", running: "正在执行", reset: "重置", input_name: "请输入测试名称", From d38fe65d2bb41aa1356e4edb210ec3ccf22c9473 Mon Sep 17 00:00:00 2001 From: shiziyuan9527 Date: Fri, 8 May 2020 12:11:02 +0800 Subject: [PATCH 2/4] =?UTF-8?q?=E4=BC=98=E5=8C=96=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../settings/system/SystemWorkspace.vue | 23 +++++++++++-------- 1 file changed, 13 insertions(+), 10 deletions(-) diff --git a/frontend/src/business/components/settings/system/SystemWorkspace.vue b/frontend/src/business/components/settings/system/SystemWorkspace.vue index 2a73b74da7..cf8a4d2d4a 100644 --- a/frontend/src/business/components/settings/system/SystemWorkspace.vue +++ b/frontend/src/business/components/settings/system/SystemWorkspace.vue @@ -12,7 +12,8 @@ @@ -85,7 +86,7 @@ - + @@ -112,7 +113,7 @@ + @close="closeWsMemberAddDialog"> @@ -152,7 +153,7 @@ + @close="closeWsMemberUpdateDialog"> @@ -180,7 +181,7 @@