fix:【接口自动化】全屏没有“失败继续”选项

This commit is contained in:
wenyann 2021-06-17 16:41:40 +08:00 committed by 刘瑞斌
parent 8ca37bb453
commit 40c03b0a99
2 changed files with 28 additions and 9 deletions

View File

@ -237,8 +237,14 @@
<!--步骤最大化--> <!--步骤最大化-->
<ms-drawer :visible="drawer" :size="100" @close="close" direction="default" :show-full-screen="false" :is-show-close="false" style="overflow: hidden"> <ms-drawer :visible="drawer" :size="100" @close="close" direction="default" :show-full-screen="false" :is-show-close="false" style="overflow: hidden">
<template v-slot:header> <template v-slot:header>
<scenario-header :currentScenario="currentScenario" :projectEnvMap="projectEnvMap" :projectIds.sync="projectIds" :projectList="projectList" :scenarioDefinition="scenarioDefinition" :enableCookieShare="enableCookieShare" <scenario-header :currentScenario="currentScenario" :projectEnvMap="projectEnvMap"
:isFullUrl.sync="isFullUrl" @closePage="close" @unFullScreen="unFullScreen" @showAllBtn="showAllBtn" @runDebug="runDebug" @setProjectEnvMap="setProjectEnvMap" @showScenarioParameters="showScenarioParameters" @setCookieShare="setCookieShare" :projectIds.sync="projectIds" :projectList="projectList"
:scenarioDefinition="scenarioDefinition" :enableCookieShare="enableCookieShare"
:onSampleError="onSampleError"
:isFullUrl.sync="isFullUrl" @closePage="close" @unFullScreen="unFullScreen"
@showAllBtn="showAllBtn" @runDebug="runDebug" @setProjectEnvMap="setProjectEnvMap"
@showScenarioParameters="showScenarioParameters"
@setCookieShare="setCookieShare" @setSampleError="setSampleError"
ref="maximizeHeader"/> ref="maximizeHeader"/>
</template> </template>
@ -539,6 +545,9 @@ export default {
setCookieShare(cookie) { setCookieShare(cookie) {
this.enableCookieShare = cookie; this.enableCookieShare = cookie;
}, },
setSampleError(sampleError) {
this.onSampleError = sampleError;
},
showAllBtn() { showAllBtn() {
this.$refs.maximizeScenario.showAll(); this.$refs.maximizeScenario.showAll();
}, },

View File

@ -18,12 +18,16 @@
</el-row> </el-row>
</div> </div>
<div class="ms-header-right"> <div class="ms-header-right">
<el-checkbox v-model="cookieShare" @change="setCookieShare" style="margin-right: 20px">共享cookie</el-checkbox> <el-checkbox v-model="cookieShare" @change="setCookieShare">共享cookie</el-checkbox>
<el-checkbox v-model="sampleError" @change="setOnSampleError" style="margin-right: 10px">失败继续</el-checkbox>
<env-popover :disabled="scenarioDefinition.length < 1" :isReadOnly="scenarioDefinition.length < 1"
:env-map="envMap" :project-ids="projectIds" @setProjectEnvMap="setProjectEnvMap"
@showPopover="showPopover" :project-list="projectList" ref="envPopover" class="ms-right"
:result="envResult"/>
<env-popover :disabled="scenarioDefinition.length < 1" :isReadOnly="scenarioDefinition.length < 1" :env-map="envMap" :project-ids="projectIds" @setProjectEnvMap="setProjectEnvMap" <el-button :disabled="scenarioDefinition.length < 1" size="mini" type="primary" v-prevent-re-click
@showPopover="showPopover" :project-list="projectList" ref="envPopover" class="ms-right" :result="envResult"/> @click="runDebug">{{ $t('api_test.request.debug') }}
</el-button>
<el-button :disabled="scenarioDefinition.length < 1" size="mini" type="primary" v-prevent-re-click @click="runDebug">{{$t('api_test.request.debug')}}</el-button>
<font-awesome-icon class="ms-alt-ico" :icon="['fa', 'compress-alt']" size="lg" @click="unFullScreen"/> <font-awesome-icon class="ms-alt-ico" :icon="['fa', 'compress-alt']" size="lg" @click="unFullScreen"/>
<!-- <i class="el-icon-close alt-ico-close" @click="close"/>--> <!-- <i class="el-icon-close alt-ico-close" @click="close"/>-->
@ -39,7 +43,8 @@ import html2canvas from 'html2canvas';
export default { export default {
name: "ScenarioHeader", name: "ScenarioHeader",
components: {EnvPopover}, components: {EnvPopover},
props: {currentScenario: {}, scenarioDefinition: Array, enableCookieShare: Boolean, props: {
currentScenario: {}, scenarioDefinition: Array, enableCookieShare: Boolean, onSampleError: Boolean,
projectEnvMap: Map, projectEnvMap: Map,
projectIds: Set, projectIds: Set,
projectList: Array, projectList: Array,
@ -51,6 +56,7 @@ import html2canvas from 'html2canvas';
loading: false, loading: false,
varSize: 0, varSize: 0,
cookieShare: false, cookieShare: false,
sampleError: true,
envResult: { envResult: {
loading: false loading: false
} }
@ -65,6 +71,7 @@ import html2canvas from 'html2canvas';
this.envMap = this.projectEnvMap; this.envMap = this.projectEnvMap;
this.getVariableSize(); this.getVariableSize();
this.cookieShare = this.enableCookieShare; this.cookieShare = this.enableCookieShare;
this.sampleError = this.onSampleError;
}, },
methods: { methods: {
handleExport() { handleExport() {
@ -94,6 +101,9 @@ import html2canvas from 'html2canvas';
setCookieShare() { setCookieShare() {
this.$emit('setCookieShare', this.cookieShare); this.$emit('setCookieShare', this.cookieShare);
}, },
setOnSampleError() {
this.$emit('setSampleError', this.sampleError);
},
showScenarioParameters() { showScenarioParameters() {
this.$emit('showScenarioParameters'); this.$emit('showScenarioParameters');
}, },
@ -159,7 +169,7 @@ import html2canvas from 'html2canvas';
.ms-header-right { .ms-header-right {
float: right; float: right;
width: 380px; width: 500px;
margin-top: 4px; margin-top: 4px;
z-index: 1; z-index: 1;
} }