From dd7843525c8dc329dc9d8f030114f6b60c817982 Mon Sep 17 00:00:00 2001 From: fit2-zhao Date: Wed, 27 Jan 2021 14:15:17 +0800 Subject: [PATCH] =?UTF-8?q?fix(=E5=9C=BA=E6=99=AF=E8=87=AA=E5=8A=A8?= =?UTF-8?q?=E5=8C=96):=20=E8=87=AA=E5=AE=9A=E4=B9=89=E8=AF=B7=E6=B1=82?= =?UTF-8?q?=E4=BF=AE=E5=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../automation/scenario/EditApiScenario.vue | 6 ++--- .../components/debug/DebugDubboPage.vue | 12 ++++++++-- .../components/debug/DebugHttpPage.vue | 23 +++++++++++++++++-- .../components/debug/DebugJdbcPage.vue | 12 ++++++++-- .../components/debug/DebugTcpPage.vue | 9 +++++++- 5 files changed, 52 insertions(+), 10 deletions(-) diff --git a/frontend/src/business/components/api/automation/scenario/EditApiScenario.vue b/frontend/src/business/components/api/automation/scenario/EditApiScenario.vue index f7fc3ea11a..582b148523 100644 --- a/frontend/src/business/components/api/automation/scenario/EditApiScenario.vue +++ b/frontend/src/business/components/api/automation/scenario/EditApiScenario.vue @@ -143,7 +143,7 @@ highlight-current @node-expand="nodeExpand" @node-collapse="nodeCollapse" - :allow-drop="allowDrop" @node-drag-end="allowDrag" @node-click="nodeClick" v-if="!loading" draggable class="ms-is-leaf"> + :allow-drop="allowDrop" @node-drag-end="allowDrag" @node-click="nodeClick" v-if="!loading" draggable> >> .el-tree-node__expand-icon.expanded { color: #7C3985; } - /deep/ .el-icon-caret-right { + .ms-el-icon-caret-right .el-icon-caret-right { color: #7C3985; } diff --git a/frontend/src/business/components/api/definition/components/debug/DebugDubboPage.vue b/frontend/src/business/components/api/definition/components/debug/DebugDubboPage.vue index e3459af13d..508f84f008 100644 --- a/frontend/src/business/components/api/definition/components/debug/DebugDubboPage.vue +++ b/frontend/src/business/components/api/definition/components/debug/DebugDubboPage.vue @@ -24,7 +24,7 @@
- {{$t('commons.save')}} + {{$t('commons.save')}}
@@ -103,7 +103,10 @@ handleCommand(e) { if (e === "save_as") { this.saveAs(); - } else { + } else if (e === 'save_as_api') { + this.saveAsApi(); + } + else { this.runDebug(); } }, @@ -121,6 +124,11 @@ this.loading = false; this.$refs.debugResult.reload(); }, + saveAsApi() { + let obj = {request: this.request}; + obj.request.id = getUUID(); + this.$emit('saveAs', obj); + }, saveAs() { let obj = {request: this.request}; obj.request.id = getUUID(); diff --git a/frontend/src/business/components/api/definition/components/debug/DebugHttpPage.vue b/frontend/src/business/components/api/definition/components/debug/DebugHttpPage.vue index 67dfb4b088..ce99bcbdcc 100644 --- a/frontend/src/business/components/api/definition/components/debug/DebugHttpPage.vue +++ b/frontend/src/business/components/api/definition/components/debug/DebugHttpPage.vue @@ -39,7 +39,7 @@
- {{$t('commons.save')}} + {{$t('commons.save')}}
@@ -131,7 +131,10 @@ handleCommand(e) { if (e === "save_as") { this.saveAs(); - } else { + } else if (e === 'save_as_api') { + this.saveAsApi(); + } + else { this.runDebug(); } }, @@ -157,6 +160,22 @@ this.loading = false; this.$refs.debugResult.reload(); }, + saveAsApi() { + this.$refs['debugForm'].validate((valid) => { + if (valid) { + this.debugForm.id = null; + this.request.id = getUUID(); + this.debugForm.request = this.request; + this.debugForm.userId = getCurrentUser().id; + this.debugForm.status = "Underway"; + this.debugForm.protocol = this.currentProtocol; + this.$emit('saveAs', this.debugForm); + } + else { + return false; + } + }) + }, saveAs() { this.$refs['debugForm'].validate((valid) => { if (valid) { diff --git a/frontend/src/business/components/api/definition/components/debug/DebugJdbcPage.vue b/frontend/src/business/components/api/definition/components/debug/DebugJdbcPage.vue index ef54ae3535..b1bd7200ab 100644 --- a/frontend/src/business/components/api/definition/components/debug/DebugJdbcPage.vue +++ b/frontend/src/business/components/api/definition/components/debug/DebugJdbcPage.vue @@ -25,7 +25,7 @@
- {{$t('commons.save')}} + {{$t('commons.save')}}
@@ -105,7 +105,10 @@ handleCommand(e) { if (e === "save_as") { this.saveAs(); - } else { + } else if (e === 'save_as_api') { + this.saveAsApi(); + } + else { this.$refs['requestForm'].validate(); } }, @@ -123,6 +126,11 @@ this.loading = false; this.$refs.debugResult.reload(); }, + saveAsApi() { + let obj = {request: this.request}; + obj.request.id = getUUID(); + this.$emit('saveAs', obj); + }, saveAs() { let obj = {request: this.request}; obj.request.id = getUUID(); diff --git a/frontend/src/business/components/api/definition/components/debug/DebugTcpPage.vue b/frontend/src/business/components/api/definition/components/debug/DebugTcpPage.vue index 4396231a90..575df88736 100644 --- a/frontend/src/business/components/api/definition/components/debug/DebugTcpPage.vue +++ b/frontend/src/business/components/api/definition/components/debug/DebugTcpPage.vue @@ -35,7 +35,7 @@
- {{$t('commons.save')}} + {{$t('commons.save')}}
@@ -120,6 +120,8 @@ handleCommand(e) { if (e === "save_as") { this.saveAs(); + } else if (e === 'save_as_api') { + this.saveAsApi(); } else { this.$refs['requestForm'].validate(); } @@ -138,6 +140,11 @@ this.loading = false; this.$refs.debugResult.reload(); }, + saveAsApi() { + let obj = {request: this.request}; + obj.request.id = getUUID(); + this.$emit('saveAs', obj); + }, saveAs() { let obj = {request: this.request}; obj.request.server = this.debugForm.server;