From 5657d85037d34b4f60d4720f6636d211b1a64237 Mon Sep 17 00:00:00 2001 From: CaptainB Date: Thu, 20 Jan 2022 11:41:02 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8D=E5=A4=8D=E5=88=B6?= =?UTF-8?q?=E6=97=B6=E5=8F=B3=E4=B8=8A=E8=A7=92=E7=89=88=E6=9C=AC=E7=BC=93?= =?UTF-8?q?=E5=AD=98=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../components/api/automation/scenario/EditApiScenario.vue | 6 +++++- .../definition/components/complete/EditCompleteDubboApi.vue | 6 +++++- .../definition/components/complete/EditCompleteHTTPApi.vue | 6 +++++- .../definition/components/complete/EditCompleteSQLApi.vue | 6 +++++- .../definition/components/complete/EditCompleteTCPApi.vue | 6 +++++- 5 files changed, 25 insertions(+), 5 deletions(-) diff --git a/frontend/src/business/components/api/automation/scenario/EditApiScenario.vue b/frontend/src/business/components/api/automation/scenario/EditApiScenario.vue index e669cca026..34ddb7af23 100644 --- a/frontend/src/business/components/api/automation/scenario/EditApiScenario.vue +++ b/frontend/src/business/components/api/automation/scenario/EditApiScenario.vue @@ -1743,7 +1743,11 @@ export default { }, getVersionHistory() { this.$get('/api/automation/versions/' + this.currentScenario.id, response => { - this.versionData = response.data; + if (this.currentScenario.copy) { + this.versionData = response.data.filter(v => v.versionId === this.currentScenario.versionId); + } else { + this.versionData = response.data; + } }); }, compare(row) { diff --git a/frontend/src/business/components/api/definition/components/complete/EditCompleteDubboApi.vue b/frontend/src/business/components/api/definition/components/complete/EditCompleteDubboApi.vue index 3698d741f2..27b6da47b1 100644 --- a/frontend/src/business/components/api/definition/components/complete/EditCompleteDubboApi.vue +++ b/frontend/src/business/components/api/definition/components/complete/EditCompleteDubboApi.vue @@ -231,7 +231,11 @@ export default { }, getVersionHistory() { this.$get('/api/definition/versions/' + this.basisData.id, response => { - this.versionData = response.data; + if (this.httpForm.isCopy) { + this.versionData = response.data.filter(v => v.versionId === this.httpForm.versionId); + } else { + this.versionData = response.data; + } }); }, compare(row) { diff --git a/frontend/src/business/components/api/definition/components/complete/EditCompleteHTTPApi.vue b/frontend/src/business/components/api/definition/components/complete/EditCompleteHTTPApi.vue index 78dcd16a8c..0702918292 100644 --- a/frontend/src/business/components/api/definition/components/complete/EditCompleteHTTPApi.vue +++ b/frontend/src/business/components/api/definition/components/complete/EditCompleteHTTPApi.vue @@ -555,7 +555,11 @@ export default { }, getVersionHistory() { this.$get('/api/definition/versions/' + this.httpForm.id, response => { - this.versionData = response.data; + if (this.httpForm.isCopy) { + this.versionData = response.data.filter(v => v.versionId === this.httpForm.versionId); + } else { + this.versionData = response.data; + } }); }, compare(row) { diff --git a/frontend/src/business/components/api/definition/components/complete/EditCompleteSQLApi.vue b/frontend/src/business/components/api/definition/components/complete/EditCompleteSQLApi.vue index 0ac9627005..b9e2598f28 100644 --- a/frontend/src/business/components/api/definition/components/complete/EditCompleteSQLApi.vue +++ b/frontend/src/business/components/api/definition/components/complete/EditCompleteSQLApi.vue @@ -235,7 +235,11 @@ export default { }, getVersionHistory() { this.$get('/api/definition/versions/' + this.basisData.id, response => { - this.versionData = response.data; + if (this.httpForm.isCopy) { + this.versionData = response.data.filter(v => v.versionId === this.httpForm.versionId); + } else { + this.versionData = response.data; + } }); }, compare(row) { diff --git a/frontend/src/business/components/api/definition/components/complete/EditCompleteTCPApi.vue b/frontend/src/business/components/api/definition/components/complete/EditCompleteTCPApi.vue index aebb663950..b353c52f7b 100644 --- a/frontend/src/business/components/api/definition/components/complete/EditCompleteTCPApi.vue +++ b/frontend/src/business/components/api/definition/components/complete/EditCompleteTCPApi.vue @@ -352,7 +352,11 @@ export default { }, getVersionHistory() { this.$get('/api/definition/versions/' + this.basisData.id, response => { - this.versionData = response.data; + if (this.httpForm.isCopy) { + this.versionData = response.data.filter(v => v.versionId === this.httpForm.versionId); + } else { + this.versionData = response.data; + } }); }, compare(row) {