fix(接口自动化): 修复场景引用缺陷

This commit is contained in:
fit2-zhao 2020-12-22 17:42:53 +08:00
parent 936b8637d5
commit 93914ed5b6
4 changed files with 12 additions and 3 deletions

View File

@ -84,7 +84,7 @@
<if test="request.moduleId != null">
AND api_scenario_module_id = #{request.moduleId}
</if>
and scenario_definition like CONCAT('%', #{request.id},'%')
and scenario_definition like CONCAT('%', #{request.id},'%') and id != #{request.id}
</where>
</select>

View File

@ -1,5 +1,5 @@
<template>
<el-dialog :close-on-click-modal="false" :title="$t('api_test.automation.case_ref')" :visible.sync="visible"
<el-dialog :close-on-click-modal="false" :title="$t('api_test.automation.scenario_ref')" :visible.sync="visible"
width="45%" :destroy-on-close="true">
<span>{{ $t('api_test.automation.scenario_ref') }}</span>
<div class="refs" v-loading="scenarioLoading">

View File

@ -88,6 +88,9 @@
} else {
this.request = JSON.parse(this.currentApi.request);
}
if (!this.request.headers) {
this.request.headers = [];
}
this.currentApi.request = this.request;
return true;
}
@ -135,6 +138,9 @@
if (!this.request.hashTree) {
this.request.hashTree = [];
}
if (!this.request.body.binary) {
this.request.body.binary = [];
}
//
if (this.response.body) {
let body = new Body();
@ -145,6 +151,9 @@
if (!body.kvs) {
body.kvs = [];
}
if (!body.binary) {
body.binary = [];
}
this.response.body = body;
}
if (this.currentApi.moduleId && this.currentApi.moduleId === "root") {

View File

@ -1,5 +1,5 @@
<template>
<div style="min-width: 1000px;margin-bottom: 20px">
<div style="min-width: 1200px;margin-bottom: 20px">
<el-radio-group v-model="body.type" size="mini">
<el-radio :disabled="isReadOnly" :label="type.FORM_DATA" @change="modeChange">
{{ $t('api_test.definition.request.body_form_data') }}