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;