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 65898fe4b5..b47bda4884 100644
--- a/frontend/src/business/components/api/definition/components/complete/EditCompleteDubboApi.vue
+++ b/frontend/src/business/components/api/definition/components/complete/EditCompleteDubboApi.vue
@@ -73,6 +73,7 @@
{{ $t('commons.remark') }}
{{ $t('commons.relationship.name') }}
+ CASE
@@ -352,7 +353,9 @@ export default {
this.basisData.versionName = row.name;
this.$set(this.basisData, 'newVersionRemark', !!this.basisData.remark);
this.$set(this.basisData, 'newVersionDeps', this.$refs.apiOtherInfo.relationshipCount > 0);
- if (this.$refs.apiOtherInfo.relationshipCount > 0 || this.basisData.remark) {
+ this.$set(this.basisData, 'newVersionCase', this.basisData.caseTotal > 0);
+
+ if (this.$refs.apiOtherInfo.relationshipCount > 0 || this.basisData.remark || this.basisData.newVersionCase) {
this.createNewVersionVisible = true;
} else {
this.saveApi();
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 33c7b46fa0..4613c073a9 100644
--- a/frontend/src/business/components/api/definition/components/complete/EditCompleteSQLApi.vue
+++ b/frontend/src/business/components/api/definition/components/complete/EditCompleteSQLApi.vue
@@ -74,6 +74,7 @@
{{ $t('commons.remark') }}
{{ $t('commons.relationship.name') }}
+ CASE
@@ -357,7 +358,9 @@ export default {
this.basisData.versionName = row.name;
this.$set(this.basisData, 'newVersionRemark', !!this.basisData.remark);
this.$set(this.basisData, 'newVersionDeps', this.$refs.apiOtherInfo.relationshipCount > 0);
- if (this.$refs.apiOtherInfo.relationshipCount > 0 || this.basisData.remark) {
+ this.$set(this.basisData, 'newVersionCase', this.basisData.caseTotal > 0);
+
+ if (this.$refs.apiOtherInfo.relationshipCount > 0 || this.basisData.remark || this.basisData.newVersionCase) {
this.createNewVersionVisible = true;
} else {
this.saveApi();
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 8bd9a737ec..063403898c 100644
--- a/frontend/src/business/components/api/definition/components/complete/EditCompleteTCPApi.vue
+++ b/frontend/src/business/components/api/definition/components/complete/EditCompleteTCPApi.vue
@@ -108,6 +108,8 @@
{{ $t('commons.remark') }}
{{ $t('commons.relationship.name') }}
+ CASE
+ MOCK
@@ -482,11 +484,18 @@ export default {
this.basisData.versionName = row.name;
this.$set(this.basisData, 'newVersionRemark', !!this.basisData.remark);
this.$set(this.basisData, 'newVersionDeps', this.$refs.apiOtherInfo.relationshipCount > 0);
- if (this.$refs.apiOtherInfo.relationshipCount > 0 || this.basisData.remark) {
- this.createNewVersionVisible = true;
- } else {
- this.saveApi();
- }
+ this.$set(this.basisData, 'newVersionCase', this.basisData.caseTotal > 0);
+
+ this.$post('/mockConfig/genMockConfig', {projectId: this.projectId, apiId: this.basisData.id}, response => {
+ this.$set(this.basisData, 'newVersionMock', response.data.mockExpectConfigList.length > 0);
+
+ if (this.$refs.apiOtherInfo.relationshipCount > 0 || this.basisData.remark ||
+ this.basisData.newVersionCase || this.basisData.newVersionMock) {
+ this.createNewVersionVisible = true;
+ } else {
+ this.saveApi();
+ }
+ });
},
del(row) {
this.$alert(this.$t('api_test.definition.request.delete_confirm') + ' ' + row.name + " ?", '', {