Merge branch 'master' of https://github.com/metersphere/metersphere
This commit is contained in:
commit
3a342b915d
|
@ -41,7 +41,7 @@
|
|||
<el-dropdown @command="handleCommand" v-tester>
|
||||
<el-button type="primary" plain icon="el-icon-plus" size="mini" v-tester/>
|
||||
<el-dropdown-menu slot="dropdown">
|
||||
<el-dropdown-item command="ADD">{{ $t('api_test.definition.request.title') }}</el-dropdown-item>
|
||||
<el-dropdown-item command="ADD">{{ $t('api_test.automation.add_scenario') }}</el-dropdown-item>
|
||||
<el-dropdown-item command="CLOSE_ALL">{{ $t('api_test.definition.request.close_all_label') }}
|
||||
</el-dropdown-item>
|
||||
</el-dropdown-menu>
|
||||
|
|
|
@ -374,6 +374,7 @@
|
|||
},
|
||||
copy(row) {
|
||||
row.copy = true;
|
||||
row.name = 'copy_'+row.name;
|
||||
this.$emit('edit', row);
|
||||
},
|
||||
showReport(row) {
|
||||
|
|
|
@ -92,7 +92,7 @@
|
|||
<!-- 场景步骤-->
|
||||
<div v-loading="loading">
|
||||
<div @click="showAll">
|
||||
<p class="tip">{{$t('api_test.automation.scenario_step')}} </p>
|
||||
<p class="tip">{{$t('api_test.automation.scenario_stepscenario_step')}} </p>
|
||||
</div>
|
||||
<el-row>
|
||||
<el-col :span="21">
|
||||
|
@ -692,9 +692,19 @@
|
|||
if (!hasEnvironment) {
|
||||
this.currentEnvironmentId = '';
|
||||
}
|
||||
//检查场景是否需要先进行保存
|
||||
this.checkDataIsCopy();
|
||||
});
|
||||
}
|
||||
},
|
||||
|
||||
checkDataIsCopy(){
|
||||
// 如果是复制按钮创建的场景,直接进行保存
|
||||
if(this.currentScenario.copy){
|
||||
this.editScenario(false);
|
||||
}
|
||||
},
|
||||
|
||||
openEnvironmentConfig() {
|
||||
if (!this.projectId) {
|
||||
this.$error(this.$t('api_test.select_project'));
|
||||
|
@ -937,7 +947,7 @@
|
|||
}
|
||||
|
||||
.ms-scenario-button {
|
||||
margin-left: 30%;
|
||||
margin-left: 20px;
|
||||
padding: 7px;
|
||||
}
|
||||
|
||||
|
|
|
@ -16,43 +16,43 @@
|
|||
</template>
|
||||
|
||||
<script>
|
||||
import ApiBaseComponent from "../common/ApiBaseComponent";
|
||||
import MsRequestResultTail from "../../../definition/components/response/RequestResultTail";
|
||||
import ElCollapseTransition from "element-ui/src/transitions/collapse-transition";
|
||||
import MsRequestMetric from "../../../definition/components/response/RequestMetric";
|
||||
import ApiBaseComponent from "../common/ApiBaseComponent";
|
||||
import MsRequestResultTail from "../../../definition/components/response/RequestResultTail";
|
||||
import ElCollapseTransition from "element-ui/src/transitions/collapse-transition";
|
||||
import MsRequestMetric from "../../../definition/components/response/RequestMetric";
|
||||
|
||||
export default {
|
||||
name: "ApiResponseComponent",
|
||||
components: {ElCollapseTransition, MsRequestResultTail, ApiBaseComponent, MsRequestMetric},
|
||||
props: ['apiItem'],
|
||||
data() {
|
||||
return {
|
||||
isActive: false,
|
||||
response: {responseResult: {}}
|
||||
export default {
|
||||
name: "ApiResponseComponent",
|
||||
components: {ElCollapseTransition, MsRequestResultTail, ApiBaseComponent, MsRequestMetric},
|
||||
props: ['apiItem'],
|
||||
data() {
|
||||
return {
|
||||
isActive: false,
|
||||
response: {responseResult: {}}
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.getExecResult();
|
||||
},
|
||||
methods: {
|
||||
getExecResult() {
|
||||
// 执行结果信息
|
||||
if (this.apiItem) {
|
||||
let url = "/api/definition/report/getReport/" + this.apiItem.id;
|
||||
this.$get(url, response => {
|
||||
if (response.data) {
|
||||
let data = JSON.parse(response.data.content);
|
||||
this.response = data;
|
||||
this.$set(this.apiItem, 'responseData', data);
|
||||
}
|
||||
});
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
getExecResult() {
|
||||
// 执行结果信息
|
||||
if (this.apiItem) {
|
||||
let url = "/api/definition/report/getReport/" + this.apiItem.id;
|
||||
this.$get(url, response => {
|
||||
if (response.data) {
|
||||
let data = JSON.parse(response.data.content);
|
||||
this.response = data;
|
||||
this.$set(this.apiItem, 'responseData', data);
|
||||
}
|
||||
});
|
||||
}
|
||||
},
|
||||
active() {
|
||||
this.isActive = !this.isActive;
|
||||
if (this.isActive) {
|
||||
this.getExecResult();
|
||||
}
|
||||
}
|
||||
active() {
|
||||
this.isActive = !this.isActive;
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
|
|
|
@ -122,7 +122,7 @@
|
|||
@keydown.enter.native.prevent
|
||||
type="primary"
|
||||
circle
|
||||
style="padding: 7px 0.5px;font-size: 0.5px;color:white"
|
||||
style="color:white;padding: 0px 0.1px;font-size: 11px;width: 28px;height: 28px;"
|
||||
size="mini" >case
|
||||
</el-button>
|
||||
</el-tooltip>
|
||||
|
|
|
@ -50,6 +50,8 @@
|
|||
|
||||
.active {
|
||||
border: solid 1px #6d317c;
|
||||
background-color: #7C3985;
|
||||
color: #FFFFFF;
|
||||
}
|
||||
|
||||
.case-button {
|
||||
|
|
|
@ -15,7 +15,7 @@
|
|||
</span>
|
||||
</el-tooltip>
|
||||
<el-row>
|
||||
<el-link class="ms-el-link" @click="batchAdd"> {{$t("commons.batch_add")}}</el-link>
|
||||
<el-link class="ms-el-link" @click="batchAdd" style="color: #783887"> {{$t("commons.batch_add")}}</el-link>
|
||||
</el-row>
|
||||
|
||||
<ms-api-key-value :is-read-only="isReadOnly" :isShowEnable="isShowEnable" :suggestions="headerSuggestions" :items="headers"/>
|
||||
|
@ -30,7 +30,7 @@
|
|||
</div></span>
|
||||
</el-tooltip>
|
||||
<el-row>
|
||||
<el-link class="ms-el-link" @click="batchAdd"> {{$t("commons.batch_add")}}</el-link>
|
||||
<el-link class="ms-el-link" @click="batchAdd" style="color: #783887"> {{$t("commons.batch_add")}}</el-link>
|
||||
</el-row>
|
||||
<ms-api-variable :is-read-only="isReadOnly" :isShowEnable="isShowEnable" :parameters="request.arguments"/>
|
||||
</el-tab-pane>
|
||||
|
@ -46,7 +46,7 @@
|
|||
</span>
|
||||
</el-tooltip>
|
||||
<el-row>
|
||||
<el-link class="ms-el-link" @click="batchAdd"> {{$t("commons.batch_add")}}</el-link>
|
||||
<el-link class="ms-el-link" @click="batchAdd" style="color: #783887"> {{$t("commons.batch_add")}}</el-link>
|
||||
</el-row>
|
||||
<ms-api-variable :is-read-only="isReadOnly" :isShowEnable="isShowEnable" :parameters="request.rest"/>
|
||||
</el-tab-pane>
|
||||
|
|
|
@ -27,7 +27,7 @@
|
|||
<span>
|
||||
<el-button size="mini" p="$t('commons.remove')" icon="el-icon-close" circle @click="remove(scope.row)"
|
||||
class="ht-btn-remove"/>
|
||||
<el-button size="mini" p="$t('commons.save')" icon="el-icon-check" circle @click="confirm(scope.row)"
|
||||
<el-button size="mini" p="$t('commons.save')" icon="el-icon-check" type="primary" circle @click="confirm(scope.row)"
|
||||
class="ht-btn-confirm"/>
|
||||
</span>
|
||||
</template>
|
||||
|
@ -143,13 +143,13 @@
|
|||
|
||||
.ht-btn-confirm {
|
||||
color: white;
|
||||
background-color: #1483F6;
|
||||
/*background-color: #1483F6;*/
|
||||
}
|
||||
|
||||
.ht-btn-add {
|
||||
border: 0px;
|
||||
margin-top: 10px;
|
||||
color: #1483F6;
|
||||
color: #783887;
|
||||
background-color: white;
|
||||
}
|
||||
|
||||
|
|
|
@ -1 +1 @@
|
|||
Subproject commit cea763d974b213104f6d6fc30ab48434b72e10f4
|
||||
Subproject commit 8a6a9ae708306eaf436f35394b71927cec075b0e
|
Loading…
Reference in New Issue