diff --git a/frontend/src/business/components/api/automation/scenario/EditApiScenario.vue b/frontend/src/business/components/api/automation/scenario/EditApiScenario.vue index 56ec437b6c..d88ab8ba33 100644 --- a/frontend/src/business/components/api/automation/scenario/EditApiScenario.vue +++ b/frontend/src/business/components/api/automation/scenario/EditApiScenario.vue @@ -338,6 +338,27 @@ + + + + + 取 消 + 确 定 + + + @@ -382,6 +403,7 @@ export default { components: { 'MsVersionHistory': versionHistory.default, MsComponentConfig, + ScenarioDiff: () => import("@/business/components/api/automation/version/ScenarioDiff"), MsVariableList: () => import("./variable/VariableList"), ScenarioRelevance: () => import("./api/ScenarioRelevance"), ScenarioApiRelevance: () => import("./api/ApiRelevance"), @@ -450,7 +472,6 @@ export default { debugData: {}, reportId: "", enableCookieShare: false, - globalOptions: { spacing: 30 }, @@ -487,8 +508,11 @@ export default { showFollow: false, envGroupId: "", environmentType: ENV_TYPE.JSON, + versionData: [], + newData:[], + dialogVisible:false, + newScenarioDefinition:[], currentItem: {}, - versionData: [] } }, watch: { @@ -1672,7 +1696,20 @@ export default { }); }, compare(row) { - // console.log(row); + this.$get('/api/automation/get/' + row.id+"/"+this.currentScenario.refId, response => { + this.$get("/api/automation/getApiScenario/" + response.data.id, res => { + if (res.data) { + if(res.data.scenarioDefinition != null){ + let obj = JSON.parse(res.data.scenarioDefinition); + if(obj){ + this.newScenarioDefinition = obj.hashTree; + } + } + this.newData = res.data; + this.dialogVisible = true; + } + }); + }) }, checkout(row) { let api = this.versionData.filter(v => v.versionId === row.id)[0]; diff --git a/frontend/src/business/components/api/automation/version/ScenarioDiff.vue b/frontend/src/business/components/api/automation/version/ScenarioDiff.vue new file mode 100644 index 0000000000..72655c4457 --- /dev/null +++ b/frontend/src/business/components/api/automation/version/ScenarioDiff.vue @@ -0,0 +1,621 @@ + + +