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 @@ + + + + + + + + + + + + + + + + + + {{ $t('test_track.plan_view.base_info') }} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + {{ $t('api_test.automation.scenario_step') }} + + + + + + + + + + {{ + oldData.name === undefined || '' ? $t('api_test.scenario.name') : oldData.name + }} + + + + {{ + oldData.name === undefined || '' ? $t('api_test.scenario.name') : oldData.name + }} + + + + + {{ $t('api_test.automation.step_total') }}:{{ 0}} + + + {{ $t('api_test.automation.scenario_total') }} + + :{{ oldVariableSize }} + + + {{ $t('api_test.scenario.share_cookie') }} + + + {{ $t('commons.failure_continues') }} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + {{ $t('test_track.plan_view.base_info') }} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + {{ $t('api_test.automation.scenario_step') }} + + + + + + + + + + {{ + newData.name === undefined || '' ? $t('api_test.scenario.name') : newData.name + }} + + + + {{ + newData.name === undefined || '' ? $t('api_test.scenario.name') : newData.name + }} + + + + + {{ $t('api_test.automation.step_total') }}:{{ 0 }} + + + {{ $t('api_test.automation.scenario_total') }} + + :{{ newVariableSize }} + + + {{ $t('api_test.scenario.share_cookie') }} + + + {{ $t('commons.failure_continues') }} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
{{ $t('api_test.automation.scenario_step') }}