fix (接口定义): 快捷调试停止优化

This commit is contained in:
fit2-zhao 2021-08-26 14:09:14 +08:00 committed by fit2-zhao
parent a8cbf1281f
commit 1e0a349687
5 changed files with 11 additions and 5 deletions

View File

@ -15,7 +15,8 @@ export default {
reportId: String,
runData: Array,
type: String,
envMap: Map
envMap: Map,
isStop: Boolean,
},
data() {
return {
@ -31,6 +32,11 @@ export default {
//
reportId() {
this.run()
},
isStop() {
if (!this.isStop && this.websocket && this.websocket.close instanceof Function) {
this.websocket.close();
}
}
},
methods: {

View File

@ -25,7 +25,7 @@
</div>
<ms-jmx-step :request="request" :response="responseData"/>
<!-- 执行组件 -->
<ms-run :debug="true" :reportId="reportId" :run-data="runData" @runRefresh="runRefresh" ref="runTest"/>
<ms-run :debug="true" :reportId="reportId" :isStop="isStop" :run-data="runData" @runRefresh="runRefresh" ref="runTest"/>
</el-card>
<div v-if="scenario">
<el-button style="float: right;margin: 20px" type="primary" @click="handleCommand('save_as_api')"> {{ $t('commons.save') }}</el-button>

View File

@ -45,7 +45,7 @@
<ms-jmx-step :request="request" :response="responseData"/>
<!-- 执行组件 -->
<ms-run :debug="true" :reportId="reportId" :run-data="runData" @runRefresh="runRefresh" ref="runTest"/>
<ms-run :debug="true" :reportId="reportId" :isStop="isStop" :run-data="runData" @runRefresh="runRefresh" ref="runTest"/>
</div>
</el-card>

View File

@ -26,7 +26,7 @@
<ms-jmx-step :request="request" :response="responseData"/>
<!-- 执行组件 -->
<ms-run :debug="true" :reportId="reportId" :run-data="runData" @runRefresh="runRefresh" ref="runTest"/>
<ms-run :debug="true" :reportId="reportId" :isStop="isStop" :run-data="runData" @runRefresh="runRefresh" ref="runTest"/>
</el-card>
<div v-if="scenario">
<el-button style="float: right;margin: 20px" type="primary" @click="handleCommand('save_as_api')"> {{ $t('commons.save') }}</el-button>

View File

@ -37,7 +37,7 @@
<ms-jmx-step :request="request" :response="responseData"/>
<!-- 执行组件 -->
<ms-run :debug="true" :reportId="reportId" :run-data="runData" @runRefresh="runRefresh" ref="runTest"/>
<ms-run :debug="true" :reportId="reportId" :isStop="isStop" :run-data="runData" @runRefresh="runRefresh" ref="runTest"/>
</el-card>
<div v-if="scenario">
<el-button style="float: right;margin: 20px" type="primary" @click="handleCommand('save_as_api')"> {{ $t('commons.save') }}</el-button>